Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 1 addition & 6 deletions pyttb/tensor.py
Original file line number Diff line number Diff line change
Expand Up @@ -1366,7 +1366,7 @@ def reshape(self, shape: Shape) -> tensor:
def scale(
self,
factor: np.ndarray | ttb.tensor,
dims: float | np.ndarray,
dims: OneDArray,
) -> tensor:
"""
Scale along specified dimensions for tensors.
Expand Down Expand Up @@ -1398,11 +1398,6 @@ def scale(
[ 1., 4., 7., 10.],
[ 2., 5., 8., 11.]])
"""
if isinstance(dims, list):
dims = np.array(dims)
elif isinstance(dims, (float, int, np.generic)):
dims = np.array([dims])

# TODO update tt_dimscheck overload so I don't need explicit
# Nones to appease mypy
dims, _ = tt_dimscheck(self.ndims, None, dims, None)
Expand Down
Loading