Skip to content

Commit

Permalink
resize#10764.1 (ivy-llc#10814)
Browse files Browse the repository at this point in the history
Co-authored-by: nathzi1505 <[email protected]>
  • Loading branch information
ranjua and p3jitnath authored Feb 26, 2023
1 parent ba38a76 commit f72ee5e
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,9 @@
def reshape(x, /, newshape, order="C"):
return ivy.reshape(x, shape=newshape, order=order)

@to_ivy_arrays_and_back
def resize(x, /, newshape, refcheck=True):
return ivy.resize(x, newshape=newshape, refcheck=refcheck)

@to_ivy_arrays_and_back
def broadcast_to(array, shape, subok=False):
Expand Down
3 changes: 3 additions & 0 deletions ivy/functional/frontends/numpy/ndarray/ndarray.py
Original file line number Diff line number Diff line change
Expand Up @@ -115,6 +115,9 @@ def reshape(self, newshape, /, *, order="C"):
else:
return np_frontend.reshape(self._ivy_array, newshape, order="C")

def resize(self, newshape, /, *, refcheck=True):
return np_frontend.resize(self._ivy_array, newshape, refcheck)

def transpose(self, axes, /):
if axes and isinstance(axes[0], tuple):
axes = axes[0]
Expand Down

0 comments on commit f72ee5e

Please sign in to comment.