|
From: Eric F. <ef...@ha...> - 2011-02-05 21:02:22
|
On 02/04/2011 02:03 PM, Christoph Gohlke wrote: [...] > > How about these changes to color.py (attached). This avoids copies, uses > in-place operations, and calculates single precision when normalizing > small integer and float32 arrays. Similar could be done for LogNorm. Do > masked arrays support in-place operations? > > Christoph Christoph, Thank you. Done (with slight modifications) in 8946 (trunk). I was surprised by the speedup in normalizing large arrays when using float32 versus float64. A factor of 10 on my machine with (1000,1000), timed with ipython %timeit. Because of the way %timeit does multiple tests, I suspect it may exaggerate cache effects. Eric |