dot#

scikitplot.nc.dot(a: Annotated[numpy.typing.ArrayLike, numpy.float64], b: Annotated[numpy.typing.ArrayLike, numpy.float64]) numpy.typing.NDArray[numpy.float64]#

Compute the dot product between two arrays (1d, 2d) using NumCpp and return NumPy array.

Parameters:
anumpy.ndarray

First input array.

bnumpy.ndarray

Second input array.

Returns:
numpy.ndarray

Dot product of the two arrays as a NumPy array.

Notes

  • Use both NumCpp and Numpy. dpilger26/NumCpp#16

  • Supports 1D or 2D numeric arrays.

  • Supports types: int, unsigned int, float, double, long, unsigned long.

  • Automatically converts NumPy arrays to NumCpp NdArray under the hood.

Examples

>>> import scikitplot.nc as nc
>>> nc.dot([1,2], [3,4])
>>> import numpy as np
>>> a = np.array([[1,2],[3,4]])
>>> b = np.array([[5,6],[7,8]])
>>> nc.dot(a, b)