Horje
python second max in numpy array Code Example
python second max in numpy array
>>> k = np.array([[ 35,  48,  63],
...        [ 60,  77,  96],
...        [ 91, 112, 135]])
>>> flat=k.flatten()
>>> flat.sort()
>>> flat
array([ 35,  48,  60,  63,  77,  91,  96, 112, 135])
>>> flat[-2]
112
>>> flat[-3]
96




Python

Related
how to insert ele in python Code Example how to insert ele in python Code Example
Python create list of empty lists Code Example Python create list of empty lists Code Example
numpy rolling 2d Code Example numpy rolling 2d Code Example
python - concatenate if null Code Example python - concatenate if null Code Example
python define random variables name Code Example python define random variables name Code Example

Type:
Code Example
Category:
Coding
Sub Category:
Code Example
Uploaded by:
Admin
Views:
7