Implicit dependency on NumPy headers not made explicit anywhere
- Lingua principale
- Julia
- Stelle
- 1.5k
- Fork
- 186
- Metriche di merge delle PR
- Nessuna PR unita negli ultimi 30g
Descrizione
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 https://github.com/paulmelis/blender-julia-test/issues/2 for all the gory details in nailing it down, particularly https://github.com/paulmelis/blender-julia-test/issues/2#issuecomment-687354497
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.
Guida per i contributori
Nessuna guida per i contributori indicizzata per questo repository
Valutazione
Questa issue non è ancora stata valutata.