[−][src]Trait ndarray_npy::WritableElement
An array element type that can be written to an .npy
or .npz
file.
Required methods
pub fn type_descriptor() -> PyValue
[src]
Returns a descriptor of the type that can be used in the header.
pub fn write<W: Write>(&self, writer: W) -> Result<(), WriteDataError>
[src]
Writes a single instance of Self
to the writer.
pub fn write_slice<W: Write>(
slice: &[Self],
writer: W
) -> Result<(), WriteDataError>
[src]
slice: &[Self],
writer: W
) -> Result<(), WriteDataError>
Writes a slice of Self
to the writer.
Implementations on Foreign Types
impl WritableElement for i8
[src]
pub fn type_descriptor() -> PyValue
[src]
pub fn write<W: Write>(&self, writer: W) -> Result<(), WriteDataError>
[src]
pub fn write_slice<W: Write>(
slice: &[Self],
writer: W
) -> Result<(), WriteDataError>
[src]
slice: &[Self],
writer: W
) -> Result<(), WriteDataError>
impl WritableElement for u8
[src]
pub fn type_descriptor() -> PyValue
[src]
pub fn write<W: Write>(&self, writer: W) -> Result<(), WriteDataError>
[src]
pub fn write_slice<W: Write>(
slice: &[Self],
writer: W
) -> Result<(), WriteDataError>
[src]
slice: &[Self],
writer: W
) -> Result<(), WriteDataError>
impl WritableElement for i16
[src]
pub fn type_descriptor() -> PyValue
[src]
pub fn write<W: Write>(&self, writer: W) -> Result<(), WriteDataError>
[src]
pub fn write_slice<W: Write>(
slice: &[Self],
writer: W
) -> Result<(), WriteDataError>
[src]
slice: &[Self],
writer: W
) -> Result<(), WriteDataError>
impl WritableElement for i32
[src]
pub fn type_descriptor() -> PyValue
[src]
pub fn write<W: Write>(&self, writer: W) -> Result<(), WriteDataError>
[src]
pub fn write_slice<W: Write>(
slice: &[Self],
writer: W
) -> Result<(), WriteDataError>
[src]
slice: &[Self],
writer: W
) -> Result<(), WriteDataError>
impl WritableElement for i64
[src]
pub fn type_descriptor() -> PyValue
[src]
pub fn write<W: Write>(&self, writer: W) -> Result<(), WriteDataError>
[src]
pub fn write_slice<W: Write>(
slice: &[Self],
writer: W
) -> Result<(), WriteDataError>
[src]
slice: &[Self],
writer: W
) -> Result<(), WriteDataError>
impl WritableElement for u16
[src]
pub fn type_descriptor() -> PyValue
[src]
pub fn write<W: Write>(&self, writer: W) -> Result<(), WriteDataError>
[src]
pub fn write_slice<W: Write>(
slice: &[Self],
writer: W
) -> Result<(), WriteDataError>
[src]
slice: &[Self],
writer: W
) -> Result<(), WriteDataError>
impl WritableElement for u32
[src]
pub fn type_descriptor() -> PyValue
[src]
pub fn write<W: Write>(&self, writer: W) -> Result<(), WriteDataError>
[src]
pub fn write_slice<W: Write>(
slice: &[Self],
writer: W
) -> Result<(), WriteDataError>
[src]
slice: &[Self],
writer: W
) -> Result<(), WriteDataError>
impl WritableElement for u64
[src]
pub fn type_descriptor() -> PyValue
[src]
pub fn write<W: Write>(&self, writer: W) -> Result<(), WriteDataError>
[src]
pub fn write_slice<W: Write>(
slice: &[Self],
writer: W
) -> Result<(), WriteDataError>
[src]
slice: &[Self],
writer: W
) -> Result<(), WriteDataError>
impl WritableElement for f32
[src]
pub fn type_descriptor() -> PyValue
[src]
pub fn write<W: Write>(&self, writer: W) -> Result<(), WriteDataError>
[src]
pub fn write_slice<W: Write>(
slice: &[Self],
writer: W
) -> Result<(), WriteDataError>
[src]
slice: &[Self],
writer: W
) -> Result<(), WriteDataError>
impl WritableElement for f64
[src]
pub fn type_descriptor() -> PyValue
[src]
pub fn write<W: Write>(&self, writer: W) -> Result<(), WriteDataError>
[src]
pub fn write_slice<W: Write>(
slice: &[Self],
writer: W
) -> Result<(), WriteDataError>
[src]
slice: &[Self],
writer: W
) -> Result<(), WriteDataError>
impl WritableElement for bool
[src]
pub fn type_descriptor() -> PyValue
[src]
pub fn write<W: Write>(&self, writer: W) -> Result<(), WriteDataError>
[src]
pub fn write_slice<W: Write>(
slice: &[Self],
writer: W
) -> Result<(), WriteDataError>
[src]
slice: &[Self],
writer: W
) -> Result<(), WriteDataError>