Changeset 22104


Ignore:
Timestamp:
09/18/17 14:35:19 (8 years ago)
Author:
kruegern
Message:

NEW: Added misfit.py, translated from misfit.m. Added test123.py, translated from test123.m. Added test124.py, translated from test124.m. Fixed future-warning from runme.py regarding comparison to None

Location:
issm/trunk-jpl
Files:
3 added
1 edited

Legend:

Unmodified
Added
Removed
  • issm/trunk-jpl/test/NightlyRun/runme.py

    r21836 r22104  
    180180                                                # Matlab uses base 1, so use base 1 in labels
    181181                                                archive=np.array(archread(archive_file,archive_name+'_field'+str(k+1)))
    182                                                 if archive == None:
     182                                                #Because np.array is weird (str(np.array(None)) becomes 'None' but np.array(None) is never equal to None, it basically becomes a type of string in an array):
     183                                                if str(archive) == 'None':
    183184                                                        raise NameError("Field name '"+archive_name+'_field'+str(k+1)+"' does not exist in archive file.")
    184185                                                error_diff=np.amax(np.abs(archive-field),axis=0)/(np.amax(np.abs(archive),axis=0)+float_info.epsilon)
Note: See TracChangeset for help on using the changeset viewer.