Skip to content
murmot

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

  • 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

    Python types and C-structures — NumPy v2.1 Manual

    A pointer to a function that returns a standard Python object from a single element of the array object arr pointed to by data. This function must be able to deal with “misbehaved “(misaligned and/or swapped) arrays correctly.

  • 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

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

    Array objects — NumPy v2.5 Manual

    An item extracted from an array, e.g., by indexing, is represented by a Python object whose type is one of the array scalar types built in NumPy. The array scalars allow easy manipulation of also more complicated arrangements of data.

  • numpy.org

    numpy.ravel — NumPy v2.5 Manual

    ... returned array will have the same type as the input array. (for example, a masked array will be returned for a masked array input). Parameters: aarray_like.

  • numpy.org

    The array interface protocol — NumPy v2.5 Manual

    version: 3 The array interface (sometimes called array protocol) was created in 2005 as a means for array-like Python objects to reuse each other’s data buffers intelligently whenever possible. The homogeneous N-dimensional array interface is a default mechanism for objects to share N-dimensional array memory and information. The interface consists of a Python-side and a C-side using two ...

  • 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

    Using F2PY bindings in Python — NumPy v2.3 Manual

    In general, a scalar argument for a F2PY generated wrapper function can be an ordinary Python scalar (integer, float, complex number) as well as an arbitrary sequence object (list, tuple, array, string) of scalars.

  • numpy.org

    String functionality — NumPy v2.5 Manual

    String functionality # The numpy.strings module provides a set of universal functions operating on arrays of type numpy.str_ or numpy.bytes_. For example, Try it in your browser!

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

  • numpy.org

    Using F2PY bindings in Python — NumPy v1.25 Manual

    In general, a scalar argument for a F2PY generated wrapper function can be an ordinary Python scalar (integer, float, complex number) as well as an arbitrary sequence object (list, tuple, array, string) of scalars.

  • numpy.org

    Subclassing ndarray — NumPy v2.5 Manual

    The slice is a view onto the original c_arr data. So, when we take a view from the ndarray, we return a new ndarray, of the same class, that points to the data in the original. There are other points in the use of ndarrays where we need such views, such as copying arrays (c_arr.copy ()), creating ufunc output arrays (see also __array_wrap__ for ufuncs and other functions), and reducing methods ...

  • numpy.org

    Subclassing ndarray — NumPy v2.6.dev0 Manual

    New from template - creating a new instance from a template instance. Examples include returning slices from a subclassed array, creating return types from ufuncs, and copying arrays. See Creating new from template for more details The last two are characteristics of ndarrays - in order to support things like array slicing.

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