Closed Roger-luo closed 6 years ago
Can you please provide more details about this?
(Version of Python, Numpy, OS, more comprehensive error message?)
This is the version. I did a little search, it seems that the macro PY_ARRAY_UNIQUE_SYMBOL
will be defined by numpy? But I don't know why I have this error.
Python Version: Python 3.6.2 Numpy Version: 1.13.1
uname -a
4.13.0-26-generic #29~16.04.2-Ubuntu SMP Tue Jan 9 22:00:44 UTC 2018 x86_64 x86_64 x86_64 GNU/Linux
According to this, it seems that we forgot to define FORCE_IMPORT_ARRAY
and to call xt::import_numpy();
in the module definition, as it is done in the first example.
@Roger-luo can you confirm that the first example works for you? If so, can you define the FORCE_IMPORT_ARRAY
symbol and call xt::import_numpy();
in the module definition of the example 2, like it is done in example 1? This should fix the problem.
@JohanMabille Thanks, it works now!
@JohanMabille qre you changing the readme example?
@SylvainCorlay Yep I make a PR
Hi guys, I tried the example 2. But I got this ImportError. It seems that xtensor_python_ARRAY_API is not defined. I tried
grep
this in bothxtensor
andxtensor-python
but I cannot find its definition.It is used here in
pycontainer.hpp