# Help understanding a docstring: what are "wrapped indices"?

**URL:** <https://discourse.julialang.org/t/help-understanding-a-docstring-what-are-wrapped-indices/80928>\
**Category:** New to Julia\
**Created:** [May 12, 2022, 3:35am UTC](https://discourse.julialang.org/t/help-understanding-a-docstring-what-are-wrapped-indices/80928 "2022-05-12T03:35:12Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Lilith](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/lilith/32/27492_2.png) [@Lilith](https://discourse.julialang.org/u/Lilith)\
**Post date:** [May 12, 2022, 3:35am UTC](https://discourse.julialang.org/t/help-understanding-a-docstring-what-are-wrapped-indices/80928/1 "2022-05-12T03:35:12Z")

</div>

```julia
help?> Base.Slice
  Slice(indices)

  Represent an AbstractUnitRange of indices as a vector of the indices
  themselves, with special handling to signal they represent a complete
  slice of a dimension (:).

  Upon calling to_indices, Colons are converted to Slice objects to
  represent the indices over which the Colon spans. Slice objects are
  themselves unit ranges with the same indices as those they wrap. This
  means that indexing into Slice objects with an integer always returns
  that exact integer, and they iterate over all the wrapped indices,
  even supporting offset indices.

```

What does “all the wrapped indices” mean? what is a “wrapped index”?

---

<div class="post-metadata">

**Author:** ![jling](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/jling/32/212909_2.png) [@jling](https://discourse.julialang.org/u/jling)\
**Post date:** [May 12, 2022, 3:36am UTC](https://discourse.julialang.org/t/help-understanding-a-docstring-what-are-wrapped-indices/80928/2 "2022-05-12T03:36:38Z")

</div>

`indices` is wrapped by `Slice`

---

<div class="post-metadata">

**Author:** ![Lilith](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/lilith/32/27492_2.png) [@Lilith](https://discourse.julialang.org/u/Lilith)\
**Post date:** [May 12, 2022, 3:40am UTC](https://discourse.julialang.org/t/help-understanding-a-docstring-what-are-wrapped-indices/80928/3 "2022-05-12T03:40:16Z")

</div>

Thanks!
