Skip to content
murmot

Results for “function return python array code c# site:numpy.org error”

  • numpy.org

    Array API — NumPy v1.15 Manual

    Returns an ndarray object from a Python object that exposes the __array_struct__ attribute and follows the array interface protocol. If the object does not contain this attribute then a borrowed reference to Py_NotImplemented is returned.

  • numpy.org

    numpy.array — NumPy v2.5 Manual

    numpy.array # numpy.array(object, dtype=None, *, copy=True, order='K', subok=False, ndmin=0, ndmax=0, like=None) # Create an array. Parameters: objectarray_like An array, any object exposing the array interface, an object whose __array__ method returns an array, or any (nested) sequence. If object is a scalar, a 0-dimensional array containing object is returned. dtypedata-type, optional The ...

  • numpy.org

    NEP 35 — Array creation dispatching with __array_function__

    Oct 15, 2019 · To permit __array_function__ dispatching, one possible implementation is to decorate Python functions with overrides.array_function_dispatch, but C functions have a different requirement, which we shall describe shortly.

  • numpy.org

    Using NumPy C-API — NumPy v2.5 Manual

    Required subroutine Defining functions Functions without keyword arguments Functions with keyword arguments Reference counting Dealing with array objects Converting an arbitrary sequence object Creating a brand-new ndarray Getting at ndarray memory and accessing elements of the ndarray Example Using Python as glue Calling other compiled ...

  • numpy.org

    The array interface protocol — NumPy v2.5 Manual

    The homogeneous N-dimensional array interface is a default mechanism for objects to share N-dimensional array memory and information. The interface consists of a Python-side and a C-side using two attributes. Objects wishing to be considered an N-dimensional array in application code should support at least one of these attributes.

  • numpy.org

    NEP 18 — A dispatch mechanism for NumPy’s high level array ...

    May 25, 2019 · The array function __array_function__ includes only two arguments, func and types, that provide information about the context of the function call. func is part of the protocol because there is no way to avoid it: implementations need to be able to dispatch by matching a function to NumPy’s public API.