-
Notifications
You must be signed in to change notification settings - Fork 143
Closed
Labels
Description
Describe the issue:
The function also accepts non-symbolic scalar types such as np.number, float, int, builtins.complex
as well as scalar Variable
s, but it's advertised as Sequence[TensorVariable]
.
Reproducable code example:
pt.stack([1, 2]) # works
Error message:
mypy reports things like
error: Argument 1 to "stack" has incompatible type "Sequence[Union[int, ndarray[Any, Any], Variable[Any, Any]]]"; expected "Sequence[TensorVariable[Any, Any]]"
PyTensor version information:
2.9.1
Context for the issue:
Detected by mypy job in https://github.com/pymc-devs/pymc/actions/runs/3903049911/jobs/6666888669 from pymc-devs/pymc#6431