[SciPy-user] slice question

Karl Young karl.young@ucsf....
Wed Feb 11 17:31:08 CST 2009

Sorry for the dumb question but I did search quite a bit before 
realizing it would only take a couple of keystrokes from an Illuminati 
to dispel my ignorance.

I want to slice an array as:


starting with two 1d arrays containing the lower and upper slice limits:

B = [a,c,e,...] and C = [b,d,f,...]

and I'd like to write a general expression for this given A,B,C (i.e. 
not specify the dimension) but I can't figure out how to turn B and C 
into  a:b,c:d,e:f,... re indexing A - any thoughts ? Thanks

More information about the SciPy-user mailing list