MCPcopy Create free account
hub / github.com/ComodoSecurity/openedr / zeros

Function zeros

edrav2/eprj/boost/libs/python/src/numpy/ndarray.cpp:237–244  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

235}
236
237ndarray zeros(python::tuple const & shape, dtype const & dt)
238{
239 int nd = len(shape);
240 boost::scoped_array<Py_intptr_t> dims(new Py_intptr_t[nd]);
241 for (int n=0; n<nd; ++n) dims[n] = python::extract<Py_intptr_t>(shape[n]);
242 return ndarray(python::detail::new_reference
243 (PyArray_Zeros(nd, dims.get(), detail::incref_dtype(dt), 0)));
244}
245
246ndarray zeros(int nd, Py_intptr_t const * shape, dtype const & dt)
247{

Callers 6

callMethod · 0.50
callMethod · 0.50
mainFunction · 0.50
mainFunction · 0.50
phase_ensembleMethod · 0.50

Calls 3

lenFunction · 0.85
incref_dtypeFunction · 0.85
getMethod · 0.45

Tested by

no test coverage detected