The dims parameter of tensor.scale currently has the following type hint in the method signature:
However, the first couple of lines provide conversions for dims of other types:
if isinstance(dims, list):
dims = np.array(dims)
elif isinstance(dims, (float, int, np.generic)):
dims = np.array([dims])
Suggestion: Either allow lists and update the type hint or remove ability to pass a list for dims.