File tree Expand file tree Collapse file tree 1 file changed +8
-5
lines changed Expand file tree Collapse file tree 1 file changed +8
-5
lines changed Original file line number Diff line number Diff line change @@ -107,11 +107,14 @@ impl PyArrayDescr {
107
107
///
108
108
/// # Safety
109
109
///
110
- /// A type `T` that implements this trait should be safe when managed in numpy array,
111
- /// thus implementing this trait is marked unsafe.
112
- /// This means that all data types except for `DataType::Object` are assumed to be trivially copyable.
113
- /// Furthermore, it is assumed that for `DataType::Object` the elements are pointers into the Python heap
114
- /// and that the corresponding `Clone` implemenation will never panic as it only increases the reference count.
110
+ /// A type `T` that implements this trait should be safe when managed in numpy
111
+ /// array, thus implementing this trait is marked unsafe. Data types that don't
112
+ /// contain Python objects (i.e., either the object type itself or record types
113
+ /// containing object-type fields) are assumed to be trivially copyable, which
114
+ /// is reflected in the `IS_COPY` flag. Furthermore, it is assumed that for
115
+ /// the object type the elements are pointers into the Python heap and that the
116
+ /// corresponding `Clone` implemenation will never panic as it only increases
117
+ /// the reference count.
115
118
///
116
119
/// # Custom element types
117
120
///
You can’t perform that action at this time.
0 commit comments