Oh, sorry, I never *actually* answered your question. Yes, if I run your
code, I get similar timing results. The naive numpy copy definitely does
its looping and unpacking in python.
But that's my point. I'm proposing a way that would allow us to copy that
data without python iteration to any type
Ah, that's copying from one imath array to another, and that's not what I'm
trying to accomplish.
I'm trying to get the data out of the imath array objects into another form
(in this case, numpy)
I know the imathnumpy module exists. However, the code only handles 2 of
the array types IIRC.
It also
The native imath python arrays are pretty fast, I think your version is
triggering an element by element python copy of data into the numpy array.
Here's the timings with the native (fast) array copy and the python only
iteration on the array types. Here's the script:
import imath
import time
co
Getting data in and out of imath in python is *SLOW*. And yes, Python is a
slow language, but that doesn't mean we can't kick it up a notch.
Could I get some feedback on my proposals to speed things up?
https://github.com/openexr/openexr/pull/373
First is a PR with a *very* simple change that just