def cprod(arrays, dtype = None, ignore_nan = False):
"""
CUDA-enabled product of a stream of arrays. Arrays are multiplied
along the streaming axis for performance reasons.
Parameters
----------
arrays : iterable
Arrays to be multiplied.
dtype : numpy.dtype, optional
The type of the yielded array and of the accumulator in which the elements
are summed. The dtype of a is used by default unless a has an integer dtype
of less precision than the default platform integer. In that case, if a is
signed then the platform integer is used while if a is unsigned then an
unsigned integer of the same precision as the platform integer is used.
ignore_nan : bool, optional
If True, NaNs are ignored. Default is propagation of NaNs.
Yields
------
online_prod : ndarray
"""
return cuda_inplace_reduce(arrays, operator = imul, dtype = dtype,
ignore_nan = ignore_nan, identity = 1)
评论列表
文章目录