use crate::{Engine, Matrix, Result};
pub fn from_f32(shape: impl Into<Vec<usize>>, values: &[f32]) -> Result<Matrix> {
let shape = shape.into();
from_f32_on(&Engine::current()?, shape, values)
}
pub fn from_f32_on(
engine: &Engine,
shape: impl Into<Vec<usize>>,
values: &[f32],
) -> Result<Matrix> {
Matrix::new_from_f32_on(engine, shape, values)
}
pub fn ones(shape: impl Into<Vec<usize>>) -> Result<Matrix> {
let shape = shape.into();
ones_on(&Engine::current()?, shape)
}
pub fn ones_on(engine: &Engine, shape: impl Into<Vec<usize>>) -> Result<Matrix> {
Matrix::filled_f32(engine, shape, 1.0)
}
pub fn full(shape: impl Into<Vec<usize>>, value: f32) -> Result<Matrix> {
let shape = shape.into();
full_on(&Engine::current()?, shape, value)
}
pub fn full_on(engine: &Engine, shape: impl Into<Vec<usize>>, value: f32) -> Result<Matrix> {
Matrix::filled_f32(engine, shape, value)
}