MCPcopy Create free account
hub / github.com/pybind/pybind11 / check_

Function check_

include/pybind11/numpy.h:1503–1509  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1501 }
1502
1503 static bool check_(handle h) {
1504 const auto &api = detail::npy_api::get();
1505 return api.PyArray_Check_(h.ptr())
1506 && api.PyArray_EquivTypes_(detail::array_proxy(h.ptr())->descr,
1507 dtype::of<T>().ptr())
1508 && detail::check_flags(h.ptr(), ExtraFlags & (array::c_style | array::f_style));
1509 }
1510
1511protected:
1512 /// Create array from any object -- always returns a new reference

Callers 3

loadMethod · 0.85
isinstanceFunction · 0.85
NameFunction · 0.85

Calls 5

getFunction · 0.85
array_proxyFunction · 0.85
check_flagsFunction · 0.85
PyArray_Check_Method · 0.80
ptrMethod · 0.80

Tested by

no test coverage detected