Skip to content

Commit

Permalink
numpy_questions.py
Browse files Browse the repository at this point in the history
  • Loading branch information
EyaJlassi695 authored Dec 20, 2024
1 parent 4c007fb commit fed416d
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions numpy_questions.py
Original file line number Diff line number Diff line change
Expand Up @@ -44,8 +44,7 @@ def max_index(X):
raise ValueError("Input must be a numpy array.")
if X.ndim != 2:
raise ValueError("Input array must be 2D.")

(i,j) = np.unravel_index(np.argmax(X, axis=None), X.shape)
(i, j) = np.unravel_index(np.argmax(X, axis=None), X.shape)
return i, j


Expand Down

0 comments on commit fed416d

Please sign in to comment.