Skip to content
murmot

Results for “function return python array java example site:numpy.org output”

  • numpy.org

    Indexing on ndarrays — NumPy v2.5 Manual

    See Assigning values to indexed arrays for specific examples and explanations on how assignments work. Note that in Python, x[(exp1, exp2, ..., expN)] is equivalent to x[exp1, exp2, ..., expN]; the latter is just syntactic sugar for the former.

  • numpy.org

    numpy.ravel — NumPy v2.5 Manual

    Return a contiguous flattened array. A 1-D array, containing the elements of ... (for example, a masked array will be returned for a masked array input).

  • numpy.org

    How to extend NumPy — NumPy v1.16 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

    Data types — NumPy v2.5 Manual

    Array types and conversions between types#. NumPy supports a much greater variety of numerical types than Python does. This section shows which are ...

  • numpy.org

    Interoperability with NumPy — NumPy v1.24 Manual

    The __array_function__ protocol. 3. Returning foreign objects. Interoperability examples. Example: Pandas Series objects. Example: PyTorch tensors.Example: CuPy arrays#. CuPy is a NumPy/SciPy-compatible array library for GPU-accelerated computing with Python.

  • numpy.org

    How to extend NumPy — NumPy v2.2 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

    F2PY examples — NumPy v2.6.dev0 Manual

    This example shows a function that filters a two-dimensional array of double precision floating-point numbers using a fixed averaging filter. The advantage of using Fortran to index into multi-dimensional arrays should be clear from this example.