We use cookies to ensure you have the best browsing experience on our website. Please read our cookie policy for more information about how we use cookies.
- Prepare
- Python
- Numpy
- Min and Max
- Discussions
Min and Max
Min and Max
Sort by
recency
|
355 Discussions
|
Please Login in order to post a comment
For Python3 Platform
import numpy as np n , m = [int(c) for c in input().split()] nparr = np.empty(shape=(n, m),dtype = 'i4')
print(n ,m)
print(nparr)
for i in range(n): lst = [int(c) for c in input().split()] for j in range(m): nparr[i][j] = lst[j] nparr = np.min(nparr, axis=1) nparr = np.max(nparr) print(nparr)