native_neural_network_std 0.2.1

Ergonomic std wrapper for the `native_neural_network` crate (no_std) — std-friendly re-exports and utilities.
Documentation
#[derive(Debug)]
pub enum RopeStdError {
    InvalidShape,
}

impl From<native_neural_network::rope::RopeError> for RopeStdError {
    fn from(e: native_neural_network::rope::RopeError) -> Self {
        match e {
            native_neural_network::rope::RopeError::InvalidShape => RopeStdError::InvalidShape,
        }
    }
}

pub fn apply_rope_in_place(x: &mut [f32], position: usize, theta: f32) -> Result<(), RopeStdError> {
    native_neural_network::rope::apply_rope_in_place(x, position, theta).map_err(|e| e.into())
}

impl core::fmt::Display for RopeStdError {
    fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result {
        write!(f, "RopeStdError::{:?}", self)
    }
}
impl std::error::Error for RopeStdError {}