Skip to content

tensor.scale does not follow type hint #456

@dmdunla

Description

@dmdunla

The dims parameter of tensor.scale currently has the following type hint in the method signature:

dims: float | np.ndarray

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    invalidThis doesn't seem right

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions