Skip to content

Instantly share code, notes, and snippets.

@ttm
Created March 6, 2013 23:55
Show Gist options
  • Save ttm/5104334 to your computer and use it in GitHub Desktop.
Save ttm/5104334 to your computer and use it in GitHub Desktop.
In [9]: aa=n.random.random((10,15))
In [10]: aa.sum(0)
Out[10]:
array([ 3.64094547, 5.48642567, 3.86113699, 3.83109877, 4.1542245 ,
4.43346198, 4.98849284, 4.44047022, 7.10656863, 4.83044752,
5.07810898, 6.59370274, 7.51975778, 3.9132313 , 5.2115709 ])
In [11]: aa.sum(1)
Out[11]:
array([ 8.94158279, 6.35803515, 6.63083928, 7.5355189 , 7.24503874,
7.98890149, 9.93868832, 6.52181901, 7.03226278, 6.89695783])
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment