Skip to content

Instantly share code, notes, and snippets.

@akhalsa
Created January 16, 2017 22:04
Show Gist options
  • Save akhalsa/d46022163067192c8274c9d55d5eee8f to your computer and use it in GitHub Desktop.
Save akhalsa/d46022163067192c8274c9d55d5eee8f to your computer and use it in GitHub Desktop.
x = np.array((9,5,8,6,4,11)).reshape(3,2)
>>> x
array([[ 9, 5],
[ 8, 6],
[ 4, 11]])
>>> x.min(axis=0)
array([4, 5])
>>> x.min(axis=1)
array([5, 6, 4])
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment