Exemple #1
0
 static void CopyInto(py::array dst, py::array src) {
     if (0 != PyArray_SIZE((PyArrayObject *) dst.ptr()) && 0 != PyArray_SIZE((PyArrayObject *) src.ptr())) {
         int ret = PyArray_CopyInto((PyArrayObject *) dst.ptr(), (PyArrayObject *) src.ptr());
         if (-1 == ret) { throw py::error_already_set(); }
     }
 }
Exemple #2
0
 static int        NDIM (py::array arr) { return PyArray_NDIM ((PyArrayObject *) arr.ptr()); }