[][src]Trait numpy::Element

pub trait Element: Clone {
    pub const DATA_TYPE: DataType;

    pub fn is_same_type(dtype: &PyArrayDescr) -> bool;

    pub fn npy_type() -> NPY_TYPES { ... }
pub fn get_dtype(py: Python<'_>) -> &PyArrayDescr { ... } }

Represents that a type can be an element of PyArray.

Associated Constants

pub const DATA_TYPE: DataType[src]

DataType corresponding to this type.

Loading content...

Required methods

pub fn is_same_type(dtype: &PyArrayDescr) -> bool[src]

Returns if the give dtype is convertible to Self in Rust.

Loading content...

Provided methods

pub fn npy_type() -> NPY_TYPES[src]

Returns the corresponding Enumerated Type.

pub fn get_dtype(py: Python<'_>) -> &PyArrayDescr[src]

Create dtype.

Loading content...

Implementations on Foreign Types

impl Element for bool[src]

impl Element for i8[src]

impl Element for i16[src]

impl Element for u8[src]

impl Element for u16[src]

impl Element for f32[src]

impl Element for f64[src]

impl Element for usize[src]

impl Element for i32[src]

impl Element for u32[src]

impl Element for i64[src]

impl Element for u64[src]

Loading content...

Implementors

impl Element for c32[src]

impl Element for c64[src]

Loading content...