Array API — NumPy v2.5 Manual
Return -1 if an error occurs or 0 on success. Note. In general, prefer the use of PyArray_Pack when handling arbitrary Python objects. Setitem is for example ...
Return -1 if an error occurs or 0 on success. Note. In general, prefer the use of PyArray_Pack when handling arbitrary Python objects. Setitem is for example ...
A number of functions, supplied by numpy.i, are called to make and check the (possible) conversion from a generic Python object to a NumPy array. These functions are explained in the section Helper Functions, but hopefully their names are self-explanatory.
A number of functions, supplied by numpy.i, are called to make and check the (possible) conversion from a generic Python object to a NumPy array. These functions are explained in the section Helper Functions, but hopefully their names are self-explanatory.
A number of functions, supplied by numpy.i, are called to make and check the (possible) conversion from a generic Python object to a NumPy array. These functions are explained in the section Helper Functions, but hopefully their names are self-explanatory.
If multiple objects should be returned then you need to return a tuple. The Py_BuildValue (format_string, c_variables…) function makes it easy to build tuples of Python objects from C variables.