Skip to content
murmot

Results for “function return python array example output code set site:numpy.org object”

  • numpy.org

    Array API — NumPy v2.6.dev0 Manual

    Return an ndarray object from a Python object that exposes the __array__ method. The third-party implementations of __array__ must accept dtype positionally and copy as a keyword argument. context is unused.

  • numpy.org

    numpy.i: a SWIG interface file for NumPy — NumPy v2.0 Manual

    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.

  • numpy.org

    NumPy C code explanations

    ... output array is constructed with the special NPY_ARRAY_WRITEBACKIFCOPY flag set. ... output array when PyArray_ResolveWritebackIfCopy is called at function ...

  • numpy.org

    How to extend NumPy — NumPy v1.14 Manual

    The following example shows how you might write a wrapper that accepts two input arguments (that will be converted to an array) and an output argument (that must be an array). The function returns None and updates the output array.

  • numpy.org

    numpy.fromfunction — NumPy v2.2 Manual

    Data-type of the coordinate arrays passed to function. By default, dtype is float. likearray_like, optional. Reference object to allow the creation of arrays ...

  • numpy.org

    How to extend NumPy — NumPy v1.13 Manual

    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.The function returns None and updates the output array.

  • numpy.org

    How to extend NumPy — NumPy v1.16 Manual

    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.The function returns None and updates the output array.

  • numpy.org

    NumPy quickstart — NumPy v2.5 Manual

    To create sequences of numbers, NumPy provides the arange function which is analogous to the Python built-in range , but returns an array. >>> np.arange(10, 30 ...