# Best way to extract parts of arrays in a bigger array

**URL:** <https://discourse.julialang.org/t/best-way-to-extract-parts-of-arrays-in-a-bigger-array/55274>\
**Category:** Performance\
**Tags:** performance, arrays\
**Created:** [February 14, 2021, 8:00pm UTC](https://discourse.julialang.org/t/best-way-to-extract-parts-of-arrays-in-a-bigger-array/55274 "2021-02-14T20:00:02Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![stebett](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/stebett/32/20336_2.png) [@stebett](https://discourse.julialang.org/u/stebett)\
**Post date:** [February 14, 2021, 8:00pm UTC](https://discourse.julialang.org/t/best-way-to-extract-parts-of-arrays-in-a-bigger-array/55274/1 "2021-02-14T20:00:02Z")

</div>

Hello everyone,

I’m wondering if anybody can find a better solution to this problem:

I have 2 arrays of arrays: in the first one there are time series, and in the second one there are timepoints on those time series.

My objective is to extract the values of the time series around the timepoints in the second array of arrays.

There are multiple timepoints for each time series.

thanks in advance!

---

<div class="post-metadata">

**Author:** ![nilshg](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/nilshg/32/2283_2.png) [@nilshg](https://discourse.julialang.org/u/nilshg)\
**Post date:** [February 14, 2021, 9:36pm UTC](https://discourse.julialang.org/t/best-way-to-extract-parts-of-arrays-in-a-bigger-array/55274/2 "2021-02-14T21:36:51Z")

</div>

Better is relative - what is your current solution? Consider reading [Please read: make it easier to help you](https://discourse.julialang.org/t/psa-make-it-easier-to-help-you/14757)

---

<div class="post-metadata">

**Author:** ![JeffreySarnoff](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/jeffreysarnoff/32/1980_2.png) [@JeffreySarnoff](https://discourse.julialang.org/u/JeffreySarnoff)\
**Post date:** [February 15, 2021, 8:38am UTC](https://discourse.julialang.org/t/best-way-to-extract-parts-of-arrays-in-a-bigger-array/55274/3 "2021-02-15T08:38:41Z")

</div>

I don’t follow this: you have 2 arrays of arrays … the second one [is an array of arrays of] timepoints. Is the second one an array of 1-element arrays or an array of arrays of multiple timepoints, each different? Also, what is the approach you have chosen currently?
