Skip to content
murmot

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

  • numpy.org

    numpy.arange — NumPy v2.7.dev0 Manual

    For integer arguments the function is roughly equivalent to the Python built-in range , but returns an ndarray rather than a range instance. When using a ...

  • numpy.org

    Indexing on ndarrays — NumPy v2.5 Manual

    Single element indexing works exactly like that for other standard Python sequences. It is 0-based, and accepts negative indices for indexing from the end of the array.

  • numpy.org

    numpy.fromfunction — NumPy v2.5 Manual

    numpy.fromfunction(function, shape, *, dtype=<class 'float'>, like=None, **kwargs) [source] # Construct an array by executing a function over each coordinate. The resulting array therefore has a value fn (x, y, z) at coordinate (x, y, z). Parameters: functioncallable The function is called with N parameters, where N is the rank of shape.

  • numpy.org

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

    Array API — NumPy v1.15 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.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

    Array API — NumPy v1.19 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

    Standard array subclasses — NumPy v2.5 Manual

    The ndarray can be inherited from (in Python or in C) if desired. Therefore, it can form a foundation for many useful classes. Often whether to sub-class the array object or to simply use the core array component as an internal part of a new class is a difficult decision, and can be simply a matter of choice. NumPy has several tools for simplifying how your new object interacts with other ...

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

    NEP 18 — A dispatch mechanism for NumPy’s high level array ...

    May 25, 2019 · The array function __array_function__ includes only two arguments, func and types, that provide information about the context of the function call. func is part of the protocol because there is no way to avoid it: implementations need to be able to dispatch by matching a function to NumPy’s public API.

  • numpy.org

    numpy.maximum — NumPy v2.2 Manual

    Element-wise maximum of array elements. Compare two arrays and return a new array containing the element-wise maxima. If one of the elements being compared is a ...

  • numpy.org

    numpy.asarray — NumPy v2.5 Manual

    Reference object to allow the creation of arrays which are not NumPy arrays. If an array-like passed in as like supports the __array_function__ protocol, the result will be defined by it.

  • numpy.org

    numpy.zeros_like — NumPy v2.1 Manual

    Return an array of zeros with the same shape and type as a given array. Parameters: aarray_like. The shape and data-type of a define these same attributes of ...

  • numpy.org

    Array objects — NumPy v2.5 Manual

    Array iterators Masked arrays The numpy.ma module Using numpy.ma Examples Constants of the numpy.ma module The MaskedArray class MaskedArray methods Masked array operations The array interface protocol Python side C-struct access Type description examples Differences with array interface (version 2) Datetimes and timedeltas Datetime64 ...

  • numpy.org

    numpy.mean — NumPy v2.2 Manual

    Compute the arithmetic mean along the specified axis. Returns the average of the array elements. The average is taken over the flattened array by default, ...