dsharlet / array

C++ multidimensional arrays in the spirit of the STL
Apache License 2.0
198 stars 15 forks source link

Slicing does not reduce rank #14

Closed dsharlet closed 4 years ago

dsharlet commented 4 years ago

It would better match behavior of similar systems, and probably would be more useful, if slicing an array reduced its rank. Currently, the behavior of a(_, 5) is to produce an array_ref with a 2D shape {a.x(), {5, 1, a.y().stride()}. It would be better if it produced a 1D shaped result with a.x() as the only dimension.