File tree Expand file tree Collapse file tree 1 file changed +7
-3
lines changed Expand file tree Collapse file tree 1 file changed +7
-3
lines changed Original file line number Diff line number Diff line change @@ -170,13 +170,17 @@ impl DataType {
170
170
171
171
/// Represents that a type can be an element of `PyArray`.
172
172
///
173
+ /// Currently, only integer/float/complex types are supported.
174
+ /// If you come up with a nice implementation for some other types, we're happy to receive your PR :)
175
+ /// You may refer to the [numpy document](https://numpy.org/doc/stable/reference/c-api/dtype.html#enumerated-types)
176
+ /// for all types that numpy supports.
177
+ ///
178
+ /// # Safety
179
+ ///
173
180
/// A type `T` that implements this trait should be safe when managed in numpy array,
174
181
/// thus implementing this trait is marked unsafe.
175
182
/// For example, we don't support `PyObject` because of [an odd segfault](https://github.com/PyO3/rust-numpy/pull/143),
176
183
/// although numpy itself supports it.
177
- ///
178
- /// Also, we lack supports for some other types like unicode.
179
- /// If you come up with a nice implementation, we're happy to receive your PR :)
180
184
pub unsafe trait Element : Clone + Send {
181
185
/// `DataType` corresponding to this type.
182
186
const DATA_TYPE : DataType ;
You can’t perform that action at this time.
0 commit comments