Skip to content

Commit

Permalink
try to fix l1_normalize's attribute error by replace flatten(not exis…
Browse files Browse the repository at this point in the history
…t for list) with reshape
  • Loading branch information
Daniel4078 authored Sep 1, 2023
1 parent 99d084b commit a1db98a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion ivy/functional/backends/numpy/experimental/norms.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ def l1_normalize(
out: Optional[np.ndarray] = None,
) -> np.ndarray:
if axis is None:
norm = np.sum(np.abs(x.flatten()))
norm = np.sum(np.abs(np.reshape(x, -1)))
denorm = norm * np.ones_like(x)
else:
norm = np.sum(np.abs(x), axis=axis, keepdims=True)
Expand Down

0 comments on commit a1db98a

Please sign in to comment.