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 {
170170
171171/// Represents that a type can be an element of `PyArray`.
172172///
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+ ///
173180/// A type `T` that implements this trait should be safe when managed in numpy array,
174181/// thus implementing this trait is marked unsafe.
175182/// For example, we don't support `PyObject` because of [an odd segfault](https://github.com/PyO3/rust-numpy/pull/143),
176183/// 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 :)
180184pub unsafe trait Element : Clone + Send {
181185 /// `DataType` corresponding to this type.
182186 const DATA_TYPE : DataType ;
You can’t perform that action at this time.
0 commit comments