On Fri, Jun 18, 2010 at 09:39, Benjamin Root <[email protected]> wrote:

> Just for my own knowledge, would Robert's suggestion of using '>i2' as the
> dtype be considered the "best" solution, mostly because of its simplicity,
> but also because it does not assume the endian-ness of the host computer?

It does come with the tradeoff that math will be a little bit slower
on it. A quick .astype(np.uint16) will fix that. That said, the cost
of creating the memory for the new native array will probably wipe
away those gains unless if the data is reused a number of times for
calculations.

-- 
Robert Kern

"I have come to believe that the whole world is an enigma, a harmless
enigma that is made terrible by our own mad attempt to interpret it as
though it had an underlying truth."
  -- Umberto Eco
_______________________________________________
NumPy-Discussion mailing list
[email protected]
http://mail.scipy.org/mailman/listinfo/numpy-discussion

Reply via email to