Skip to content
murmot

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

  • numpy.org

    Array API — NumPy v2.6.dev0 Manual

    This function returns a (C-style) contiguous and behaved function array from ... Place before code that needs to call the Python C-API (when it is ...

  • numpy.org

    How to extend NumPy — NumPy v1.15 Manual

    Required subroutine¶. There is exactly one function that must be defined in your C-code in order for Python to use it as an extension module.The function returns None and updates the output array. Note the updated use of WRITEBACKIFCOPY semantics for NumPy v1.14 and above.

  • numpy.org

    Writing custom array containers — NumPy v2.5 Manual

    Both functions return sets of functions that are present in the Numpy public API. User-defined ufuncs or ufuncs defined in other libraries that depend on Numpy are not present in these sets. Refer to the dask source code and cupy source code for more fully-worked examples of custom array containers. See also NEP 18.

  • 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

    Writing your own ufunc — NumPy v2.5 Manual

    Creating a new universal function # Before reading this, it may help to familiarize yourself with the basics of C extensions for Python by reading/skimming the tutorials in Section 1 of Extending and Embedding the Python Interpreter and in How to extend NumPy The umath module is a computer-generated C-module that creates many ufuncs. It provides a great many examples of how to create a ...

  • 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

    How to extend NumPy — NumPy v1.16 Manual

    Required subroutine¶. There is exactly one function that must be defined in your C-code in order for Python to use it as an extension module.The function returns None and updates the output array. Note the updated use of WRITEBACKIFCOPY semantics for NumPy v1.14 and above.

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

  • numpy.org

    How to extend NumPy — NumPy v1.20 Manual

    All array creation functions go through this heavily re-used code. Because of its flexibility, it can be somewhat confusing to use.The function returns None and updates the output array. Note the updated use of WRITEBACKIFCOPY semantics for NumPy v1.14 and above.

  • 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 C code explanations — NumPy v2.5 Manual

    The array scalars offer a hierarchy of Python types that allow a one-to-one correspondence between the datatype stored in an array and the Python-type that is returned when an element is extracted from the array.