Stack Overflow is a community of 4.7 million programmers, just like you, helping each other.

Join them; it only takes a minute:

Sign up
Join the Stack Overflow community to:
  1. Ask programming questions
  2. Answer and help your peers
  3. Get recognized for your expertise

So I have some irregular, multi-dimensional data that I'd like to be able to index by the 'age' and 'Z' value.

For each 'age', and 'Z' I have and array of 100 wavelengths and assoc'd fluxes (ex data):

age    = np.array([10,20,30,40,50])
Z      = np.array([7,8])
waveln = np.array([np.array([a for a in arange(100)]) for b in arange(2*5)])
flux   = np.array([np.array([a*10 for a in arange(100)]) for b in arange(2*5)])

SO in this example, waveln[0] (an array of 100 entries) and flux[0] would get assoc'd with

myData['age' = 10, 'Z' = 7]['waveln'] # which I want to return the waveln array

and something like

myData['age' = 10, 'Z' = 7]['flux'] # which I want to return the flux array

how should I set this up?? The problem is, age and Z are both floats...

Thx,

share|improve this question

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Browse other questions tagged or ask your own question.