Skip to content

Commit 49959e1

Browse files
committed
BUG: fix dtype handling in full
1 parent ef2e852 commit 49959e1

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

torch_np/_wrapper.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -308,8 +308,7 @@ def full(shape, fill_value, dtype=None, order="C", *, like=None):
308308
_util.subok_not_ok(like)
309309
if order != "C":
310310
raise NotImplementedError
311-
if isinstance(fill_value, ndarray):
312-
fill_value = fill_value.get()
311+
fill_value = asarray(fill_value).get()
313312
if dtype is None:
314313
torch_dtype = asarray(fill_value).get().dtype
315314
else:

0 commit comments

Comments
 (0)