ufunc API — NumPy v2.6.dev0 Manual

numpy.org

Tin mới

NumPy v2.6.dev0 Manual - Home

NumPy v2.6.dev0 Manual - Home

Building from source

NumPy’s module structure

Universal functions (ufunc)

Routines and objects by topic

Typing (numpy.typing)

Python types and C-structures

System configuration

Array iterator API

Generalized universal function API

NumPy core math library

C API deprecations

Memory management in NumPy

Array API standard compatibility

CPU/SIMD optimizations

Global Configuration Options

Testing guidelines

Status of numpy.distutils and migration advice

NPY_BEGIN_THREADS_DEF

Used in universal function code to only release the Python GIL if loop->obj is not true (i.e. this is not an OBJECT array loop). Requires use of NPY_BEGIN_THREADS_DEF in variable declaration area.

Type casting rules

The bit-width names can also be used (e.g. NPY_INT32, NPY_COMPLEX128 ) if desired.