You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi, I've been on a quest the past two days to figure out why PyCall (through pyjulia) does not turn an Array on the Julia side into a NumPy array on the Python side (and produces a Python list instead). See paulmelis/blender-julia-test#2 for all the gory details in nailing it down, particularly paulmelis/blender-julia-test#2 (comment)
The problem turns out to be that the NumPy installation I was using (as part of Blender) did not contain any header files and so npyinitialize in numpy.jl fails. There is an error() raised at that point with message could not read __multiarray_api.h to parse PyArray_API but that apparently never surfaces to the user level. In this case it gets raised further on from NpyArray but gets hidden in the catch part of function PyObject(a::StridedArray{T}) where T<:PYARR_TYPES. The message certainly isn't printed. It's also not mentioned anywhere in the docs that NumPy headers are being parsed (I could only find a reference to this in #38 from 2013).
So please add a note somewhere in the readme that the headers are a requirement for the NumPy installation used and are being parsed (which is quite unexpected). And NumPy initialization silently failing is also pretty suboptimal.
The text was updated successfully, but these errors were encountered:
Hi, I've been on a quest the past two days to figure out why PyCall (through pyjulia) does not turn an
Array
on the Julia side into a NumPy array on the Python side (and produces a Python list instead). See paulmelis/blender-julia-test#2 for all the gory details in nailing it down, particularly paulmelis/blender-julia-test#2 (comment)The problem turns out to be that the NumPy installation I was using (as part of Blender) did not contain any header files and so
npyinitialize
innumpy.jl
fails. There is anerror()
raised at that point with messagecould not read __multiarray_api.h to parse PyArray_API
but that apparently never surfaces to the user level. In this case it gets raised further on fromNpyArray
but gets hidden in the catch part offunction PyObject(a::StridedArray{T}) where T<:PYARR_TYPES
. The message certainly isn't printed. It's also not mentioned anywhere in the docs that NumPy headers are being parsed (I could only find a reference to this in #38 from 2013).So please add a note somewhere in the readme that the headers are a requirement for the NumPy installation used and are being parsed (which is quite unexpected). And NumPy initialization silently failing is also pretty suboptimal.
The text was updated successfully, but these errors were encountered: