Skip to content
murmot

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

  • numpy.org

    Array API — NumPy v2.6.dev0 Manual

    It should return a -1 on error and 0 otherwise. Data access#. These functions and macros provide easy access to elements of the ndarray from C. These work for ...

  • numpy.org

    Array API — NumPy v1.17 Manual

    Return the bytes of this array in a Python string.The return value of failed converter functions which are called using the “O&” syntax in PyArg_ParseTuple-like functions.

  • 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

    Array API — NumPy v2.1 Manual

    Returns an ndarray object from a Python object that exposes the __array_struct__ attribute and follows the array interface protocol. If the object does not contain this attribute then a borrowed reference to Py_NotImplemented is returned.

  • numpy.org

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

    The __array_struct__ method of an object that supports the rapid array interface protocol should return a PyCapsule that contains a pointer to a PyArrayInterface structure with the relevant details of the array.

  • numpy.org

    numpy.ravel — NumPy v2.5 Manual

    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 returned array will have the same type as ...

  • numpy.org

    NumPy C-API — NumPy v2.5 Manual

    NumPy provides a C-API to enable users to extend the system and get access to the array object for use in other routines. The best way to truly understand the C-API is to read the source code. If you are unfamiliar with (C) source code, however, this can be a daunting experience at first.

  • numpy.org

    NumPy C-API

    Cython translates Python or Cython source into C code, which is then compiled into a native Python extension module. ... set_array_base(arr, self) return arr. The ...

  • numpy.org

    Array API — NumPy v1.15 Manual

    Returns an ndarray object from a Python object that exposes the __array_struct__ attribute and follows the array interface protocol. If the object does not contain this attribute then a borrowed reference to Py_NotImplemented is returned.

  • numpy.org

    numpy.array2string — NumPy v1.13 Manual

    Jun 10, 2017 · This is a very flexible function; array_repr and array_str are using array2string internally so keywords with the same name should work identically in all three functions.

  • 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

    Using NumPy C-API — NumPy v2.5 Manual

    Required subroutine Defining functions Functions without keyword arguments Functions with keyword arguments Reference counting Dealing with array objects Converting an arbitrary sequence object Creating a brand-new ndarray Getting at ndarray memory and accessing elements of the ndarray Example Using Python as glue Calling other compiled ...

  • 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

    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!