How to use functions like np.unique()
and np.any()
on pybind11::array
?
#3184
sun1638650145
started this conversation in
General
Replies: 1 comment 5 replies
-
You can always just import numpy through it's python interface to access it's advanced functionality.
See the documentation on importing Python modules for mode details: https://pybind11.readthedocs.io/en/stable/advanced/embedding.html?highlight=import#importing-modules Alternatively, Eigen has it's own unique and sort functions etc so I would just use those on the array object. |
Beta Was this translation helpful? Give feedback.
5 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I want to use functions similar to
np.unique()
andnp.any()
onpybind11::array
, so I first castpybind11::array
toEigen::ArrayXf
, Then proceed with processing. But no matter how I operate, I can only process1/2-D array
, but I also expect to be able to process3D array
, is it my idea is wrong, orpybind11
provides built-in functions.Below is the function I expect.
English is not my native language; please excuse typing errors.
Beta Was this translation helpful? Give feedback.
All reactions