You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I've noticed that if you call a function with a wrong ndarray type, the error message can be a bit cryptic:
TypeError: blah(): incompatible function arguments. The following argument types are supported:
1. blah(a: int, b: collections.abc.Sequence[str], c: collections.abc.Sequence[str], d: numpy.ndarray[dtype=float64, shape=(*, *), order='F'], e: numpy.ndarray[dtype=float64, shape=(*), order='C'] | None = None) -> X
Invoked with types: int, list, list, ndarray, ndarray
The actual problem here is the dimensionality of one of the arrays I'm passing in.
I wonder if the error message could be improved to a) give the indices/names of the mistmatching parameters in general and b) in the case of ndarrays, describe which properties are mistmatched?
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
Hi,
I've noticed that if you call a function with a wrong ndarray type, the error message can be a bit cryptic:
The actual problem here is the dimensionality of one of the arrays I'm passing in.
I wonder if the error message could be improved to a) give the indices/names of the mistmatching parameters in general and b) in the case of ndarrays, describe which properties are mistmatched?
Beta Was this translation helpful? Give feedback.
All reactions