| 235 | } |
| 236 | |
| 237 | ndarray 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 | |
| 246 | ndarray zeros(int nd, Py_intptr_t const * shape, dtype const & dt) |
| 247 | { |
no test coverage detected