# Partial Linear Indexing Deprecation

**URL:** <https://discourse.julialang.org/t/partial-linear-indexing-deprecation/5501>\
**Category:** General Usage\
**Created:** [August 22, 2017, 12:47pm UTC](https://discourse.julialang.org/t/partial-linear-indexing-deprecation/5501 "2017-08-22T12:47:53Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![tobias.knopp](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/tobias.knopp/32/7551_2.png) [@tobias.knopp](https://discourse.julialang.org/u/tobias.knopp)\
**Post date:** [August 22, 2017, 12:47pm UTC](https://discourse.julialang.org/t/partial-linear-indexing-deprecation/5501/1 "2017-08-22T12:47:53Z")

</div>

Hi,

I would like to solve the partial linear indexing deprecation but its not clear how. I am an mmaped array `A_mmaped` having 4 dimensions. I am currently indexing like this

```julia
A[:,:,sub_indices]

```

where `sub_indices` is just a subset of all indices. When I first perform a reshape, does it load the full array A? How can I prevent this?

---

<div class="post-metadata">

**Author:** ![tim.holy](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/tim.holy/32/52_2.png) [@tim.holy](https://discourse.julialang.org/u/tim.holy)\
**Post date:** [August 22, 2017, 5:02pm UTC](https://discourse.julialang.org/t/partial-linear-indexing-deprecation/5501/2 "2017-08-22T17:02:27Z")

</div>

You should be fine with `A3 = reshape(A, Val{3})`. You can explicitly use a `ReshapedArray`, but in this case that should not be necessary. If you find something to the contrary, let us know!

---

<div class="post-metadata">

**Author:** ![tobias.knopp](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/tobias.knopp/32/7551_2.png) [@tobias.knopp](https://discourse.julialang.org/u/tobias.knopp)\
**Post date:** [August 22, 2017, 5:20pm UTC](https://discourse.julialang.org/t/partial-linear-indexing-deprecation/5501/3 "2017-08-22T17:20:30Z")

</div>

so `A3 = reshape(A, Val{3})` returns a view?  
will try, thanks

---

<div class="post-metadata">

**Author:** ![tim.holy](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/tim.holy/32/52_2.png) [@tim.holy](https://discourse.julialang.org/u/tim.holy)\
**Post date:** [August 22, 2017, 6:12pm UTC](https://discourse.julialang.org/t/partial-linear-indexing-deprecation/5501/4 "2017-08-22T18:12:29Z")

</div>

Yes, check with `pointer`.
