Skip to content

Commit

Permalink
fix: Fix Ivy Failing Test: numpy - manipulation.swapaxes (#28042)
Browse files Browse the repository at this point in the history
  • Loading branch information
sgalpha01 authored Feb 5, 2024
1 parent d382882 commit 345322a
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion ivy/functional/backends/numpy/manipulation.py
Original file line number Diff line number Diff line change
@@ -1,12 +1,14 @@
# global
import math
from numbers import Number
from typing import Union, Tuple, Optional, List, Sequence
from typing import List, Optional, Sequence, Tuple, Union

import numpy as np

# local
import ivy
from ivy.func_wrapper import with_unsupported_dtypes

from . import backend_version


Expand Down Expand Up @@ -233,6 +235,8 @@ def swapaxes(
copy: Optional[bool] = None,
out: Optional[np.ndarray] = None,
) -> np.ndarray:
if copy:
x = x.copy()
return np.swapaxes(x, axis0, axis1)


Expand Down

0 comments on commit 345322a

Please sign in to comment.