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

Function PyArray_Reshape

numpy/core/src/multiarray/shape.c:300–312  ·  view source on GitHub ↗

NUMPY_API * Reshape */

Source from the content-addressed store, hash-verified

298 * Reshape
299 */
300NPY_NO_EXPORT PyObject *
301PyArray_Reshape(PyArrayObject *self, PyObject *shape)
302{
303 PyObject *ret;
304 PyArray_Dims newdims;
305
306 if (!PyArray_IntpConverter(shape, &newdims)) {
307 return NULL;
308 }
309 ret = PyArray_Newshape(self, &newdims, NPY_CORDER);
310 npy_free_cache_dim_obj(newdims);
311 return ret;
312}
313
314
315static void

Callers 2

array_shape_setFunction · 0.85
__New_PyArray_StdFunction · 0.85

Calls 3

PyArray_IntpConverterFunction · 0.85
PyArray_NewshapeFunction · 0.85
npy_free_cache_dim_objFunction · 0.85

Tested by

no test coverage detected