Spaces:
Paused
Paused
File size: 400 Bytes
5716801 | 1 2 3 4 5 6 7 8 9 10 11 12 13 | from typing import Iterable
from chemprop.utils import pretty_shape
class InvalidShapeError(ValueError):
def __init__(self, var_name: str, received: Iterable[int], expected: Iterable[int]):
message = (
f"arg '{var_name}' has incorrect shape! "
f"got: `{pretty_shape(received)}`. expected: `{pretty_shape(expected)}`"
)
super().__init__(message)
|