Skip to content
murmot

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

  • numpy.org

    numpy.meshgrid — NumPy v2.5 Manual

    When all coordinates are used in an expression, broadcasting still leads to a fully-dimensional result array. ... return non-contiguous arrays. Furthermore ...

  • numpy.org

    How to extend NumPy — NumPy v1.15 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.array — NumPy v2.5 Manual

    An array, any object exposing the array interface, an object whose __array__ method returns an array, or any (nested) sequence. If object is a scalar, a 0-dimensional array containing object is returned.

  • numpy.org

    numpy.polyfit — NumPy v2.5 Manual

    Fit a polynomial p[0] * x**deg + ... + p[deg] of degree deg to points (x, y). Returns a vector of coefficients p that minimises the squared error in the ...

  • 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.ravel — NumPy v2.5 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

    How to extend NumPy — NumPy v1.20 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

    Data types — NumPy v2.5 Manual

    Array types and conversions between types#. NumPy supports a much greater variety of numerical types than Python does. This section shows which are ...

  • numpy.org

    Indexing on ndarrays — NumPy v2.5 Manual

    For example, x[1:10:5, ::-1] can also be implemented as obj = (slice(1, 10, 5), slice(None, None, -1)); x[obj] . This can be useful for constructing generic code that works on arrays of arbitrary dimensions. See Dealing with variable numbers of indices within programs for more information.

  • numpy.org

    NumPy reference — NumPy v2.5 Manual

    Jun 28, 2026 · NumPy reference # Release: 2.5 Date: June 28, 2026 This reference manual details functions, modules, and objects included in NumPy, describing what they are and what they do. For learning how to use NumPy, see the complete documentation. Python API #

  • numpy.org

    numpy.mean — NumPy v2.2 Manual

    If out=None, returns a new array containing the mean values, otherwise a reference to the output array is returned. ... example below). Specifying a higher ...

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