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
Copy file name to clipboardExpand all lines: src/dtype.rs
+2Lines changed: 2 additions & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -126,6 +126,8 @@ impl PyArrayDescr {
126
126
/// as only the data type can be checked during downcasting, but not the dynamic type of each element stored in the array.
127
127
/// This is not possible as the elements and hence their dynamic type could be changed later on via aliasing Python references to the array.
128
128
/// Therefore, the only safe type to store in object arrays is `Py<PyAny>` also known as `PyObject`.
129
+
///
130
+
/// You can however create `ndarray::Array<Py<T>, D>` and turn that into a NumPy array safely and efficiently using [`from_owned_object_array`][crate::PyArray::from_owned_object_array].
129
131
pubunsafetraitElement:Clone + Send{
130
132
/// Flag that indicates whether this type is trivially copyable.
0 commit comments