Skip to content
murmot

Results for “function return python array java code c pdf example site:numpy.org program”

  • 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

    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

    Using Python as glue — NumPy v2.5.dev0 Manual

    Calling C-code from Python can result in Python crashes if you are not careful.Here is an example of how to set up a Python project that contains a Cython extension. The example uses the meson-python Python build backend and the meson build system.

  • 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

    Using Python as glue — NumPy v1.16 Manual

    Here is another example of a function that filters a two-dimensional array of double precision floating-point numbers using a fixed averaging filter.The f2py program is written in Python and can be run from inside your code to compile Fortran code at runtime, as follows