/[escript]/trunk/doc/examples/inversion/plot_netcdf.py
ViewVC logotype

Diff of /trunk/doc/examples/inversion/plot_netcdf.py

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 4322 by caltinay, Mon Mar 11 05:07:39 2013 UTC revision 4323 by jfenwick, Tue Mar 19 00:17:36 2013 UTC
# Line 54  try: Line 54  try:
54      # convert NaN (not-a-number) values to -1000 so the plotting works      # convert NaN (not-a-number) values to -1000 so the plotting works
55      DATA=np.where(np.isnan(DATA[:]), -1000, DATA[:])      DATA=np.where(np.isnan(DATA[:]), -1000, DATA[:])
56    
57      if DATA.dtype.byteorder=='>':      # make sure data is in native format
58          DATA=DATA.byteswap().newbyteorder()      if DATA.dtype.byteorder != '=':
59            DATA=np.array(DATA, dtype=np.float32)
60    
61      f.close()      f.close()
62    

Legend:
Removed from v.4322  
changed lines
  Added in v.4323

  ViewVC Help
Powered by ViewVC 1.1.26