Skip to content

Commit

Permalink
Update botorch/optim/utils/numpy_utils.py
Browse files Browse the repository at this point in the history
  • Loading branch information
saitcakmak authored Nov 6, 2024
1 parent 49a65d9 commit 29b81cf
Showing 1 changed file with 0 additions and 2 deletions.
2 changes: 0 additions & 2 deletions botorch/optim/utils/numpy_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -126,9 +126,7 @@ def set_tensors_from_ndarray_1d(
vals = array[index : index + size] if tnsr.ndim else array[index]
tnsr.copy_(
torch.as_tensor(vals, device=tnsr.device, dtype=tnsr.dtype)
.to(tnsr)
.view(tnsr.shape)
.to(tnsr)
)
index += size
except Exception as e:
Expand Down

0 comments on commit 29b81cf

Please sign in to comment.