Skip to content

Commit

Permalink
fix: fix min in numpy backend as np.amin throws error when where is…
Browse files Browse the repository at this point in the history
… None and still passed as kw
  • Loading branch information
Ishticode committed Dec 29, 2023
1 parent 0e41f11 commit 0d3f9df
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions ivy/functional/backends/numpy/statistical.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,11 +25,13 @@ def min(
out: Optional[np.ndarray] = None,
) -> np.ndarray:
axis = tuple(axis) if isinstance(axis, list) else axis
return np.asarray(
np.amin(
if where is not None:
ret = np.amin(
a=x, axis=axis, keepdims=keepdims, initial=initial, where=where, out=out
)
)
else:
ret = np.amin(a=x, axis=axis, keepdims=keepdims, initial=initial, out=out)
return np.asarray(ret)


min.support_native_out = True
Expand Down

0 comments on commit 0d3f9df

Please sign in to comment.