Skip to content

Commit

Permalink
fixed paddle.assign
Browse files Browse the repository at this point in the history
  • Loading branch information
ZJay07 committed Mar 12, 2024
1 parent 65f695a commit 8e0f42d
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions ivy/functional/frontends/paddle/creation.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,12 +20,10 @@ def arange(start, end=None, step=1, dtype=None, name=None):
@to_ivy_arrays_and_back
def assign(x, output=None):
if len(ivy.shape(x)) == 0:
x = ivy.reshape(ivy.Array(x), (1,))
if ivy.exists(output):
output = ivy.reshape(ivy.Array(output), (1,))
ret = ivy.copy_array(x, to_ivy_array=False, out=output)
else:
x = ivy.reshape(x, ivy.shape(x))
ret = ivy.copy_array(x, to_ivy_array=False, out=output)
ret = ivy.copy_array(x, to_ivy_array=False, out=output)
return ret


Expand Down

0 comments on commit 8e0f42d

Please sign in to comment.