MCPcopy Create free account
hub / github.com/davisking/dlib / ensure

Method ensure

dlib/external/pybind11/include/pybind11/numpy.h:1319–1325  ·  view source on GitHub ↗

Ensure that the argument is a NumPy array In case of an error, nullptr is returned and the Python error is cleared.

Source from the content-addressed store, hash-verified

1317 /// Ensure that the argument is a NumPy array
1318 /// In case of an error, nullptr is returned and the Python error is cleared.
1319 static array ensure(handle h, int ExtraFlags = 0) {
1320 auto result = reinterpret_steal<array>(raw_array(h.ptr(), ExtraFlags));
1321 if (!result) {
1322 PyErr_Clear();
1323 }
1324 return result;
1325 }
1326
1327protected:
1328 template <typename, typename>

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected