It appears not to be possible to calculate slice a stride in the third dimesion of a RaggedArray:
a = ra.RaggedArray(np.zeros((100, 2)), lengths=[90, 10])
a[:, :, ::2]
gives
ValueError Traceback (most recent call last)
<ipython-input-37-64bea6dd4686> in <module>()
1 a = ra.RaggedArray(np.zeros((100, 2)), lengths=[90, 10])
----> 2 a[:, :, ::2]
~/modules/enspara/ra/ra.py in __getitem__(self, iis)
531 # tuples get index conversion from 2d to 1d
532 elif isinstance(iis, tuple):
--> 533 first_dimension, second_dimension = iis
534 # if the first dimension is a slice, converts both sets of indices
535 if isinstance(first_dimension, slice):
ValueError: too many values to unpack (expected 2)
@mizimmer90 is this a bug or expected behavior? It seems very reasonable to want to do this.
It appears not to be possible to calculate slice a stride in the third dimesion of a
RaggedArray
:gives
@mizimmer90 is this a bug or expected behavior? It seems very reasonable to want to do this.