blaze / datashape

Language defining a data description protocol
BSD 2-Clause "Simplified" License
183 stars 65 forks source link

Negative and NewAxis Subshape slicing #127

Closed mrocklin closed 9 years ago

mrocklin commented 9 years ago
In [1]: from datashape import dshape

In [2]: ds = dshape('10 * 10 * int32')

In [3]: ds.subshape[:5, -3:]
Out[3]: dshape("5 * 3 * int32")

In [4]: ds.subshape[:5, None, :]
Out[4]: dshape("5 * 1 * 10 * int32")
mrocklin commented 9 years ago

Fixes https://github.com/ContinuumIO/blaze/issues/922