mikhalit

Fortran module from Python

Apr 19th, 2011
101
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.29 KB | None | 0 0
  1. from mod_arstats import ar_stats as arstats
  2. import numpy as np
  3. import pylab as pl
  4.  
  5.  
  6. a = np.ones((2800,2800)) * np.arange(2800)
  7. s = 2
  8. b = np.ones((a.shape[0]/s, a.shape[1]/s))
  9.  
  10. arstats.wm = a
  11. arstats.scf = s
  12. arstats.new_wm = b
  13.  
  14. arstats.mean()
  15.  
  16. pl.imshow(arstats.new_wm)
  17. pl.show()
  18.  
  19. exit
Advertisement
Add Comment
Please, Sign In to add comment