Travis Oliphant wrote: > Sebastian Haase wrote: >> This is what I get: It claims that the 'title' field (the last one) >> is 10 times 'S80' but trying to read that array from the first (and >> only) record (a.Mrc._hdrArray.title[0]) I just get None... >> > Hopefully that problem is resolved now. I should discuss a little bit > about how the 10-element sub-array field is handled by NumPy. > > Any sub-array present causes the shape of the returned array for a given > field to grow by the sub-array size. > > So, in your case you have a (10,)-shape subarray in the title field. > > Thus if g is a record-array of shape gshape g.title will be a chararray > of shape gshape + (10,) > > In this case of a 1-d array with 1-element we have gshape = (1,). > Therefore, g.title will be a (1,10) chararray and g[0].title will be a > (10,)-shaped chararray. > > -Travis > Thanks, for fixing everything so quickly - I'll test it tomorrow. BTW: are you intentionally sending the last few messages ONLY to me and NOT to the mailing list !? I actually think the mailing should be configured that a "normal reply" automatically defaults to go only (!) to the list. (I'm on some other lists that know how to do that). Who would be able to change that for the numpy and the scipy list !?
Thanks again, Sebastian ------------------------------------------------------------------------- Using Tomcat but need to do more? Need to support web services, security? Get stuff done quickly with pre-integrated technology to make your job easier Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642 _______________________________________________ Numpy-discussion mailing list Numpy-discussion@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/numpy-discussion