[][src]Trait numpy::Element

pub trait Element: Clone {
    const DATA_TYPE: DataType;

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

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

Represents that a type can be an element of PyArray.

Associated Constants

const DATA_TYPE: DataType

DataType corresponding to this type.

Loading content...

Required methods

fn is_same_type(dtype: &PyArrayDescr) -> bool

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

Loading content...

Provided methods

fn npy_type() -> NPY_TYPES

Returns the corresponding Enumerated Type.

fn get_dtype(py: Python<'_>) -> &PyArrayDescr

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...