Skip to content
murmot

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

  • numpy.org

    numpy.arange — NumPy v2.7.dev0 Manual

    For integer arguments the function is roughly equivalent to the Python ... In this case, it ensures the creation of an array object compatible with that passed in ...

  • numpy.org

    NumPy reference — NumPy v2.3 Manual

    NumPy reference#. Release: 2.3. Date: June 09, 2025. This reference manual details functions, modules, and objects included in NumPy, describing what they ...

  • numpy.org

    Indexing on ndarrays — NumPy v2.5 Manual

    See Assigning values to indexed arrays for specific examples and explanations on how assignments work. Note that in Python, x[(exp1, exp2, ..., expN)] is equivalent to x[exp1, exp2, ..., expN]; the latter is just syntactic sugar for the former.

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

    If multiple objects should be returned then you need to return a tuple. The Py_BuildValue (format_string, c_variables…) function makes it easy to build tuples of Python objects from C variables.

  • numpy.org

    numpy.meshgrid — NumPy v2.5 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 Standard Compatibility — NumPy v1.26 Manual

    Array Object Differences. Creation Functions Differences.For example, <int32 array> + 1.0 is not allowed. See the spec rules for mixing arrays and Python scalars. Operators (like +) with Python scalars always return the same dtype as the array.

  • numpy.org

    Data types — NumPy v2.5 Manual

    Array types can also be referred to by character codes, for example: >>> np.array([1, 2, 3], dtype='f') array([1., 2., 3.], dtype=float32) >>> np.array ...

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