Routines¶
The following pages describe NumPy-compatible routines. These functions cover a subset of NumPy routines.
- Array Creation Routines
- Array Manipulation Routines
- Binary Operations
- Data Type Routines
- FFT Functions
- Functional programming
- Indexing Routines
- cupy.c_
- cupy.r_
- cupy.nonzero
- cupy.where
- cupy.indices
- cupy.ix_
- cupy.ravel_multi_index
- cupy.unravel_index
- cupy.take
- cupy.take_along_axis
- cupy.choose
- cupy.compress
- cupy.diag
- cupy.diag_indices
- cupy.diag_indices_from
- cupy.diagonal
- cupy.extract
- cupy.select
- cupy.lib.stride_tricks.as_strided
- cupy.place
- cupy.put
- cupy.putmask
- cupy.fill_diagonal
- cupy.flatiter
- Input and Output
- Linear Algebra
- Logic Functions
- Mathematical Functions
- Padding
- Polynomials
- Random Sampling (
cupy.random
) - Sorting, Searching, and Counting
- Statistical Functions
- CuPy-specific Functions
CUB/cuTENSOR backend for reduction routines¶
Some CuPy reduction routines, including sum()
, amin()
, amax()
,
argmin()
, argmax()
, and other functions built on top of them, can be
accelerated by switching to the CUB or cuTENSOR backend. These backends can be enabled
by setting CUPY_ACCELERATORS
environement variable as documented here.
Note that while in general the accelerated reductions are faster, there could be exceptions
depending on the data layout. We recommend users to perform some benchmarks to determine
whether CUB/cuTENSOR offers better performance or not.