div>
This is an old version, <a href="https://mc-stan.org/docs/stan-users-guide/multi-indexing.html">view current version</a>.
</div>




<section id="multi-indexing.chapter" class="level1">
<h1>Multiple Indexing and Range Indexing</h1>
<p>Stan allows multiple indexes to be provided for containers (i.e., arrays, vectors, and matrices) in a single position, using either an array of integer indexes or range bounds. In many cases, there are functions that provide similar behavior.</p>
<p>Allowing multiple inde