[Numpy-discussion] how to test if index-tuple is "contained" in tuple of slice objects
Sebastian Haase
haase@msg.ucsf....
Thu Sep 25 08:56:15 CDT 2008
Hi,
Is there a good way to test that e.g.
(2,3) is "contained" in [:,3] { == (slice(None), 3) }
but not in [:,2]
?
Background: I have an nd-image "2d section" viewer that supports line
graphics overlays. Currently I can assign a tuple of ints to a given
graphic, so that the lines are only shown when the respective
2d-section is displayed. I would like to extend this to support tuples
such as (2,slice(None)) to show the graphics for "all z sections" at
time 2, assuming the axis order to be time,z,y,x.
Thanks for any help,
Sebastian Haase
More information about the Numpy-discussion
mailing list