xtensor-stack / xtensor-python

Python bindings for xtensor
BSD 3-Clause "New" or "Revised" License
347 stars 58 forks source link

Add a xtensor-python macro that does xt::import_numpy #177

Open wolfv opened 5 years ago

wolfv commented 5 years ago

We could add a macro that automatically does the following, so that users don't forget to do xt::import_numpy() which results in weird segfaults.

PYBIND11_MODULE(mymodule, m) {
    xt::import_numpy();
}