[MMTK] modes to numpy arrays

Ramon Crehuet rcrehuet at gmail.com
Wed Aug 31 09:44:15 UTC 2011


Hi all,
I would like to convert a NormalModes object into a numpy array. I tried:
modes = NormalModes(universe)
m_numpy = modes.array
and
m2_numpy = numpy.asarray(modes)
which do not give the same... (though it gives arrays with the same shape,
so they are not simple a transposition).
Curiously, modes[0].array and modes.array[0] are also different, and in
particular:
np.all(modes[0].array==m2_numpy[0]) is True. So m2_numpy seems to contain as
vectors, each mode. By then, what is modes.array...?
Thanks for any hint!
Ramon
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://starship.python.net/pipermail/mmtk/attachments/20110831/54fa8e35/attachment.htm>


More information about the mmtk mailing list