Generate negative indices from the slices()
strategy
#2468
Labels
enhancement
it's not broken, but we want it to be better
slices()
strategy
#2468
For example,
slices(size=3)
should be able to generateslice(-3, -1)
as an equivalent form ofslice(0, 2)
. We should also sometimes drawstep=None
ifstep=1
would be allowed. It would also be nice to support slicing length-zero sequences, i.e.if size == 0: return builds(slice, none(), none(), none() | integers().filter(bool))
.Both would be helpful for downstream users - see e.g. Quansight-Labs/ndindex#46.
The text was updated successfully, but these errors were encountered: