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

Function array_from_pyobj

numpy/f2py/src/fortranobject.c:1102–1116  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1100}
1101
1102extern PyArrayObject *
1103array_from_pyobj(const int type_num,
1104 npy_intp *dims,
1105 const int rank,
1106 const int intent,
1107 PyObject *obj) {
1108 /*
1109 Same as ndarray_from_pyobj but with elsize determined from type,
1110 if possible. Provided for backward compatibility.
1111 */
1112 PyArray_Descr* descr = PyArray_DescrFromType(type_num);
1113 int elsize = descr->elsize;
1114 Py_DECREF(descr);
1115 return ndarray_from_pyobj(type_num, elsize, dims, rank, intent, obj, NULL);
1116}
1117
1118/*****************************************/
1119/* Helper functions for array_from_pyobj */

Callers 1

fortran_setattrFunction · 0.85

Calls 1

ndarray_from_pyobjFunction · 0.85

Tested by

no test coverage detected