Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PYTHON

Using np.unravel_index on argmax output

import numpy as np
a = np.arange(6).reshape(2,3) + 10
print(a)

index = np.unravel_index(np.argmax(a), a.shape)
print(index)
print(a[index])
Source by itsmycode.com #
 
PREVIOUS NEXT
Tagged: #Using #argmax #output
ADD COMMENT
Topic
Name
9+7 =