Skip to content
murmot

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

  • numpy.org

    Array API — NumPy v2.1 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 quickstart — NumPy v2.2 Manual

    For example, you can create an array from a regular Python list or tuple using the array function.The NumPy histogram function applied to an array returns a pair of vectors: the histogram of the array and a vector of the bin edges.

  • numpy.org

    Array creation routines — NumPy v2.5 Manual

    Return an array copy of the given object. frombuffer(buffer[, dtype, count, offset, like]). Interpret a buffer as a 1-dimensional array.fromfunction(function, shape, *[, dtype, like]). Construct an array by executing a function over each coordinate.

  • 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.arange — NumPy v2.1 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

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

  • numpy.org

    numpy.fromfunction — NumPy v2.2 Manual

    Shape of the output array, which also determines the shape of the coordinate arrays passed to function. ... If function returns a scalar value, the shape ...