[Numpy-discussion] sampling arrays

Sudheer Joseph sudheer.joseph@yahoo....
Sun Jun 16 01:48:34 CDT 2013

Dear experts,
               Is it possible to sample a 4D array of numpy at given dimensions with out writing loops? ie a smart python way?

for example,

I have a  data cube with cube=c(x,y,z,t) dimensions which are essentially latitude longitude depth and time. Is it possible to sample this array at a given dimensions ie

sample1= sample(c,:,:,1,1) this is sample at surface at time 1
sample2= sample(c,:,:,1,:) this is time series of surface  data
sample3= sample(c,1,1,:,1) this is a profile at given location and time
sample4= sample(c,1,1,:,:) this is time series at given location at all depths

with best regards,

Sudheer Joseph 
Indian National Centre for Ocean Information Services
Ministry of Earth Sciences, Govt. of India
POST BOX NO: 21, IDA Jeedeemetla P.O.
Via Pragathi Nagar,Kukatpally, Hyderabad; Pin:5000 55
Web- http://oppamthadathil.tripod.com

More information about the NumPy-Discussion mailing list