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
Certain types cannot be used as numpy array element types in method signatures. Specifically:
PyObject
bf16
bool
f16
i16
isize
usize
I came across this issue while trying to use numpy::PyArray1<bool>:
error[E0277]: the trait bound `bool: pyo3_stub_gen::stub_type::numpy::NumPyScalar` is not satisfied
|
279 | ) -> PyResult<Bound<'py, PyArray1<bool>>> {
| ^^^^^^^^^^^^^^^^^^^^^^^^^^ the trait `pyo3_stub_gen::stub_type::numpy::NumPyScalar` is not implemented for `bool`, which is required by `pyo3::Bound<'_, numpy::PyArray<bool, numpy::ndarray::Dim<[usize; 1]>>>: pyo3_stub_gen::PyStubType`
The text was updated successfully, but these errors were encountered:
Certain types cannot be used as numpy array element types in method signatures. Specifically:
I came across this issue while trying to use
numpy::PyArray1<bool>
:The text was updated successfully, but these errors were encountered: