diff --git a/ivy/functional/frontends/numpy/manipulation_routines/changing_array_shape.py b/ivy/functional/frontends/numpy/manipulation_routines/changing_array_shape.py index 12ec68b574a0c..221cb0a4936c5 100644 --- a/ivy/functional/frontends/numpy/manipulation_routines/changing_array_shape.py +++ b/ivy/functional/frontends/numpy/manipulation_routines/changing_array_shape.py @@ -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): diff --git a/ivy/functional/frontends/numpy/ndarray/ndarray.py b/ivy/functional/frontends/numpy/ndarray/ndarray.py index eac09f82a851e..f7626fb91c8cd 100644 --- a/ivy/functional/frontends/numpy/ndarray/ndarray.py +++ b/ivy/functional/frontends/numpy/ndarray/ndarray.py @@ -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]