MCPcopy Create free account
hub / github.com/PyO3/rust-numpy / mod_name

Function mod_name

src/npyffi/array.rs:45–53  ·  view source on GitHub ↗
(py: Python<'_>)

Source from the content-addressed store, hash-verified

43}
44
45pub(crate) fn mod_name(py: Python<'_>) -> PyResult<&'static str> {
46 static MOD_NAME: PyOnceLock<String> = PyOnceLock::new();
47 MOD_NAME
48 .get_or_try_init(py, || {
49 let numpy_core = numpy_core_name(py)?;
50 Ok(format!("{numpy_core}.multiarray"))
51 })
52 .map(String::as_str)
53}
54
55const CAPSULE_NAME: &str = "_ARRAY_API";
56

Callers 2

getMethod · 0.70
get_array_moduleFunction · 0.50

Calls 1

numpy_core_nameFunction · 0.85

Tested by

no test coverage detected