Skip to content

Commit

Permalink
Fix normalize
Browse files Browse the repository at this point in the history
  • Loading branch information
luisfpereira committed Dec 20, 2024
1 parent 9a50c95 commit 30e8258
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion geomfum/linalg.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ def _prefix_with_ellipsis(string):

def normalize(array, axis=-1):
# TODO: handle norm zero?
return array / np.linalg.norm(array, axis=1, keepdims=True)
return array / np.linalg.norm(array, axis=axis, keepdims=True)


def columnwise_scaling(vec, mat):
Expand Down

0 comments on commit 30e8258

Please sign in to comment.