Skip to content
murmot

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

  • numpy.org

    F2PY examples — NumPy v2.6.dev0 Manual

    The memory for all three arrays must be provided by the calling routine. A very basic interface to this routine can be automatically generated by f2py: 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.ravel — NumPy v2.5 Manual

    Return a contiguous flattened array. A 1-D array, containing the elements of the input, is returned. A copy is made only if needed. As of NumPy 1.10, the ...

  • numpy.org

    Using F2PY bindings in Python — NumPy v2.6.dev0 Manual

    The Fortran code expects that the function func has been defined externally. In order to use a Python function for func, it must have an attribute intent(callback) and it must be specified before the external statement. Finally, build an extension module using f2py -c -m foo calculate.f.

  • numpy.org

    numpy.meshgrid — NumPy v2.7.dev0 Manual

    Return a tuple of coordinate matrices from coordinate vectors. Make N-D coordinate arrays for vectorized evaluations of N-D scalar/vector fields over N-D grids, ...

  • numpy.org

    How to extend NumPy — NumPy v1.16 Manual

    There is exactly one function that must be defined in your C-code in order for Python to use it as an extension module. The function must be called init{name} where {name} is the name of the module from Python.The function returns None and updates the output array.

  • numpy.org

    numpy.maximum — NumPy v2.2 Manual

    Functional programming · Input and output · Indexing routines · Linear algebra ... Compare two arrays and return a new array containing the element-wise maxima.

  • numpy.org

    How to extend NumPy — NumPy v2.1 Manual

    Return an ndarray from any Python object, obj, that can be converted to an array.The function returns None and updates the output array. Note the updated use of WRITEBACKIFCOPY semantics for NumPy v1.14 and above.

  • 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

    Array API — NumPy v2.6.dev0 Manual

    This is the main array creation function. Most new arrays are created with this flexible function. The returned object is an object of Python-type subtype, which must be a subtype of PyArray_Type. The array has nd dimensions, described by dims.

  • numpy.org

    numpy.polyfit — NumPy v2.5 Manual

    Returns a vector of coefficients p that minimises the squared error in the order deg, deg-1, … 0. The Polynomial.fit class method is recommended for new code as ...

  • numpy.org

    numpy.append — NumPy v2.5 Manual

    Append values to the end of an array. Parameters: arrarray_like. Values are appended to a copy of this array. valuesarray_like.