There is more than one way to form the same slice. For example, a[:2] and a[0:2] and a[0:2:] pass slice objects to getitem with the same start, stop and step. Is there any way to get a hold of the exact character sequence the user used to form the slice? That is, I'd like to know if the user entered ":2", "0:2" or "0:2:".
Context: Say I have a 2d array-like object with axis 0 named 'space' and axis 1 named 'time', I'd like to be able to make the following distinctions: a['time':2] --> a[:,2] a['time':2:] --> a[:,2:] a['space':2] --> a[2] a['space':2:] --> a[2:] _______________________________________________ NumPy-Discussion mailing list NumPy-Discussion@scipy.org http://mail.scipy.org/mailman/listinfo/numpy-discussion