cupy.ufunc

class cupy.ufunc

Universal function.

Variables:
  • name (str) – The name of the universal function.
  • nin (int) – Number of input arguments.
  • nout (int) – Number of output arguments.
  • nargs (int) – Number of all arguments.

Methods

__call__(self, *args, **kwargs)

Applies the universal function to arguments elementwise.

Parameters:
  • args – Input arguments. Each of them can be a cupy.ndarray object or a scalar. The output arguments can be omitted or be specified by the out argument.
  • out (cupy.ndarray) – Output array. It outputs to new arrays default.
  • dtype – Data type specifier.
Returns:

Output array or a tuple of output arrays.

Attributes

types

A list of type signatures.

Each type signature is represented by type character codes of inputs and outputs separated by ‘->’.