MCPcopy Create free account
hub / github.com/numpy/numpy / npyiter_ndim_get

Function npyiter_ndim_get

numpy/core/src/multiarray/nditer_pywrap.c:1911–1921  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1909}
1910
1911static PyObject *
1912npyiter_ndim_get(NewNpyArrayIterObject *self, void *NPY_UNUSED(ignored))
1913{
1914 if (self->iter == NULL) {
1915 PyErr_SetString(PyExc_ValueError,
1916 "Iterator is invalid");
1917 return NULL;
1918 }
1919
1920 return PyLong_FromLong(NpyIter_GetNDim(self->iter));
1921}
1922
1923static PyObject *
1924npyiter_nop_get(NewNpyArrayIterObject *self, void *NPY_UNUSED(ignored))

Callers

nothing calls this directly

Calls 1

NpyIter_GetNDimFunction · 0.85

Tested by

no test coverage detected