enp.batch_dot#
- etils.enp.batch_dot(x0: etils.enp.array_types.typing.FloatArray, x1: etils.enp.array_types.typing.FloatArray, *, keepdims: bool = False, xnp: Any = Ellipsis) etils.enp.array_types.typing.FloatArray [source]#
Dot product on the last dimension, with broadcasting support.
Contrary to np.dot, the behavior is consistent for 1-dim vs n-dim (while dot act as matmul). First dimensions are always broadcasted.
- Parameters:
x0 – Vector array
x1 – Vector array
keepdims – If True, returns FloatArray[’… 1’]
xnp – Numpy module to use
- Returns:
The dot product along the last axis.