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

Method raw_array

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

Create array from any object -- always returns a new reference

Source from the content-addressed store, hash-verified

1364
1365 /// Create array from any object -- always returns a new reference
1366 static PyObject *raw_array(PyObject *ptr, int ExtraFlags = 0) {
1367 if (ptr == nullptr) {
1368 set_error(PyExc_ValueError, "cannot create a pybind11::array from a nullptr");
1369 return nullptr;
1370 }
1371 return detail::npy_api::get().PyArray_FromAny_(
1372 ptr, nullptr, 0, 0, detail::npy_api::NPY_ARRAY_ENSUREARRAY_ | ExtraFlags, nullptr);
1373 }
1374};
1375
1376template <typename T, int ExtraFlags = array::forcecast>

Callers

nothing calls this directly

Calls 2

set_errorFunction · 0.85
getFunction · 0.85

Tested by

no test coverage detected