mlx_rs::utils

Trait ScalarOrArray

Source
pub trait ScalarOrArray<'a> {
    type Array: AsRef<Array> + 'a;

    // Required method
    fn into_owned_or_ref_array(self) -> Self::Array;
}
Expand description

A trait for a scalar or an array.

Required Associated Types§

Source

type Array: AsRef<Array> + 'a

The reference type of the array.

Required Methods§

Source

fn into_owned_or_ref_array(self) -> Self::Array

Convert to an owned or reference array.

Implementations on Foreign Types§

Source§

impl ScalarOrArray<'static> for bool

Source§

impl ScalarOrArray<'static> for f32

Source§

impl ScalarOrArray<'static> for i32

Implementors§