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
You could simplify the code significantly if you moved to using pybind11. This would remove the need to import the numpy headers in setup.py completely. The binding code would be:
You could simplify the code significantly if you moved to using pybind11. This would remove the need to import the numpy headers in setup.py completely. The binding code would be:
At the top of the file
And, after the C++ code is imported, or at the bottom of the file, in a file named
landau.cpp
:This does automatic vectorization, as well, so x can be a vector or a single value. Here's a file example: https://gist.github.com/henryiii/9419a0b803664d8ff2a159c1fcfd644e
Compile by hand if you want:
To update pylandau, you'd need a little wrapper to add your new functions in python (probably, c++ is easy too as you can see), and a
setup.py
.The text was updated successfully, but these errors were encountered: