pyml.exceptions.excpetions.ShapeError#
- exception ShapeError(*args)[source]#
Exception raised when performing a matrix/vector operation on two objects with non-compatible sizes
Examples
>>> from pyml.neighbors import kNNClassifier >>> model = kNNClassifier() >>> x = np.random.randn(2, 3) >>> y = np.random.randn(3, 4) >>> model._compute_distance(x, y) The matrix operations for objects of the size (2,3), (3,2) can not be computed.