Skip to content
murmot

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

  • numpy.org

    F2PY examples — NumPy v2.6.dev0 Manual

    Below are some examples of F2PY usage. This list is not comprehensive, but can be used as a starting point when wrapping your own code.python -m numpy.f2py -m add add.f. This command will produce an extension module named addmodule.c in the current directory.

  • numpy.org

    numpy.array — NumPy v2.5 Manual

    An array object satisfying the specified requirements. See also. empty_like. Return an empty array with shape and type of input.

  • numpy.org

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

    ... array([[0, 1], [0, 1]]). shape(N,) tuple of ints. Shape of the output array, which also determines the shape of the coordinate arrays passed to function.

  • numpy.org

    NumPy quickstart — NumPy v2.7.dev0 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 ...

  • 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

    Array API — NumPy v2.6.dev0 Manual

    For example, a ufunc operation with two input operands and one output ... If the descriptor is already canonical, this function returns a new reference to the ...

  • numpy.org

    Writing your own ufunc — NumPy v1.15 Manual

    Example NumPy ufunc with multiple arguments/return values.An array of type-number signatures (type char ). This array should be of size (nin+nout)*ntypes and contain the data-types for the corresponding 1-d loop. The inputs should be first followed by the outputs.

  • numpy.org

    numpy.ravel — NumPy v2.7.dev0 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

    numpy.select — NumPy v2.6.dev0 Manual

    The list of arrays from which the output elements are taken. It has to be of the same length as condlist. defaultarray_like, optional. The element inserted in ...