INNER CODE UNIT · Rust

extract_u64_1d

RyanCodrai/turbovec · turbovec-python/src/lib.rs:65

fn extract_u64_1d<'py>(
    name: &str,
    obj: &Bound<'py, PyAny>,
) -> PyResult<PyReadonlyArray1<'py, u64>> {
    obj.extract()
        .map_err(|_| array_type_err(name, "1-D uint64", obj))
}

/// Extract a 1-D bool array; see [`extract_f32_2d`].
///
/// **The elements of the returned array must not be read as `bool`.**
/// Building this wrapper only validates the dtype and registers a
/// borrow; it does not touch the buffer. Use [`mask_bytes`] to read it —
/// see there for why.
fn extract_bool_1d<'py>(
    name: &str,
    obj: &Bound<'py, PyAny>,
) -> PyResult<PyReadonlyArray1<'py, bool>> {

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…