cupy.broadcast#

class cupy.broadcast(*arrays)[source]#

Object that performs broadcasting.

CuPy actually uses this class to support broadcasting in various operations. Note that this class does not provide an iterator.

Parameters:

arrays (tuple of arrays) – Arrays to be broadcasted.

Variables:
  • ~broadcast.shape (tuple of ints) – The broadcasted shape.

  • nd (int) – Number of dimensions of the broadcasted shape.

  • ~broadcast.size (int) – Total size of the broadcasted shape.

  • values (list of arrays) – The broadcasted arrays.

See also

numpy.broadcast

Methods

__eq__(value, /)#

Return self==value.

__ne__(value, /)#

Return self!=value.

__lt__(value, /)#

Return self<value.

__le__(value, /)#

Return self<=value.

__gt__(value, /)#

Return self>value.

__ge__(value, /)#

Return self>=value.

Attributes

nd#
shape#
size#
values#