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
I think that PyCall is great and was really excited to see I could use pyplot from it. However, I've hit a small problem.
I am using Python 2.7.2 and numpy 1.8_dev_3abd869 installed with the ScipySuperpack on OSX 10.8. In the npyinitialize function on line 55 of numpy.jl the attempt to find the function pointer to the numpy multiarray _ARRAY_API as a PyCapsule returns a NULL pointer and thus anything that used numpy arrays failed, for example the pyplot example. I found that on my system numpy.core.multiarray._ARRAY_API is a PyCObject so I tried the code on line 51 of numpy.jl and a non-zero function pointer was returned. I hacked the Python 2.7.2 case to try the PyCapsule version and if a NULL pointer is returned then to try the PyCObject version. Now the pyplot example works as do numpy functions that use arrays.
I'm not sure what the right way is to handle this, but I just wanted to bring it to your attention.
Thanks.
The text was updated successfully, but these errors were encountered:
You're quite right. I just checked the Numpy source, and they only use the PyCapsule version for Python 3+ (even though PyCObject was deprecated in Python 2.7). I will post an updated version of PyCall soon.
I think that PyCall is great and was really excited to see I could use pyplot from it. However, I've hit a small problem.
I am using Python 2.7.2 and numpy 1.8_dev_3abd869 installed with the ScipySuperpack on OSX 10.8. In the npyinitialize function on line 55 of numpy.jl the attempt to find the function pointer to the numpy multiarray _ARRAY_API as a PyCapsule returns a NULL pointer and thus anything that used numpy arrays failed, for example the pyplot example. I found that on my system numpy.core.multiarray._ARRAY_API is a PyCObject so I tried the code on line 51 of numpy.jl and a non-zero function pointer was returned. I hacked the Python 2.7.2 case to try the PyCapsule version and if a NULL pointer is returned then to try the PyCObject version. Now the pyplot example works as do numpy functions that use arrays.
I'm not sure what the right way is to handle this, but I just wanted to bring it to your attention.
Thanks.
The text was updated successfully, but these errors were encountered: