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

Method names

src/dtype.rs:387–395  ·  view source on GitHub ↗
(&self)

Source from the content-addressed store, hash-verified

385 }
386
387 fn names(&self) -> Option<Vec<String>> {
388 if !self.has_fields() {
389 return None;
390 }
391 let names = unsafe {
392 Borrowed::from_ptr(self.py(), PyDataType_NAMES(self.py(), self.as_dtype_ptr()))
393 };
394 names.extract().ok()
395 }
396
397 fn get_field(&self, name: &str) -> PyResult<(Bound<'py, PyArrayDescr>, usize)> {
398 if !self.has_fields() {

Callers

nothing calls this directly

Calls 3

has_fieldsMethod · 0.80
as_dtype_ptrMethod · 0.80
extractMethod · 0.45

Tested by

no test coverage detected