numpy::array

Trait PyArray0Methods

Source
pub trait PyArray0Methods<'py, T>: PyArrayMethods<'py, T, Ix0> {
    // Provided method
    fn item(&self) -> T
       where T: Element + Copy { ... }
}
Expand description

Implementation of functionality for PyArray0<T>.

Provided Methods§

Source

fn item(&self) -> T
where T: Element + Copy,

Get the single element of a zero-dimensional array.

See inner for an example.

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementations on Foreign Types§

Source§

impl<'py, T> PyArray0Methods<'py, T> for Bound<'py, PyArray0<T>>

Implementors§