Skip to content
murmot

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

  • 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.

  • numpy.org

    numpy.source — NumPy v1.25 Manual

    Print or write to a file the source code for a NumPy object. The source code is only returned for objects written in Python. Many functions and classes are ...

  • numpy.org

    Array API — NumPy v2.1 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 quickstart — NumPy v2.5 Manual

    There are several ways to create arrays. For example, you can create an array from a regular Python list or tuple using the array function. The type of the ...

  • numpy.org

    Array API — NumPy v2.6.dev0 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

    Array creation — NumPy v2.5 Manual

    There are 6 general mechanisms for creating arrays: Conversion from other Python structures (i.e. lists and tuples). Intrinsic NumPy array creation functions ( ...

  • numpy.org

    How to extend NumPy — NumPy v2.6.dev0 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.savez — NumPy v2.6.dev0 Manual

    Save several arrays into a single file in uncompressed .npz format. Provide arrays as keyword arguments to store them under the corresponding name in the output file: savez(fn, x=x, y=y).

  • numpy.org

    Array API — NumPy v2.5 Manual

    Sets the memory location item of dtype descr to value . The function is equivalent to setting a single array element with a Python assignment. Returns 0 on ...