Ignore:
Timestamp:
Nov 30, 2011, 10:05:32 AM (13 years ago)
Author:
acolaitis
Message:

PYTHON. Corrected bugs related to contour plots with overlines, and mymath.mean() with no Axis specified. Now working on LES format for pp.py... :)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/UTIL/PYTHON/mymath.py

    r403 r427  
    2626              field.set_fill_value(np.NaN)
    2727              zout=np.ma.array(field).mean(axis=axis)
    28               zout.set_fill_value(np.NaN)
    29               return zout.filled()
     28              if axis is not None:
     29                 zout.set_fill_value(np.NaN)
     30                 return zout.filled()
     31              else:return zout
    3032           elif (np.isnan(np.sum(field)) and (type(field).__name__ not in 'MaskedArray')):
    3133              zout=np.ma.masked_invalid(field).mean(axis=axis)
    32               zout.set_fill_value([np.NaN])
    33               return zout.filled()
     34              if axis is not None:
     35                 zout.set_fill_value([np.NaN])
     36                 return zout.filled()
     37              else:return zout
    3438           else:
    3539              return np.array(field).mean(axis=axis)
Note: See TracChangeset for help on using the changeset viewer.