Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: Fix Ivy Failing Test: numpy - manipulation.swapaxes #28042

Merged
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading