Ignore:
Timestamp:
Sep 19, 2014, 5:05:42 PM (11 years ago)
Author:
davies
Message:

Slight fix to quantity_setting_functions + work on template scripts

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/anuga_core/source/anuga/utilities/quantity_setting_functions.py

    r9338 r9341  
    198198
    199199            # Get indices fInds of points in pi which are not set
    200             if(pi is 'All'):
     200            if(pi == 'All'):
    201201                fInside=(1-isSet)
    202202                fInds=(fInside==1).nonzero()[0]
    203203            else:
    204                 if(pi is 'Extent' and type(fi) is str and os.path.exists(fi)):
     204                if(pi == 'Extent' and type(fi) is str and os.path.exists(fi)):
    205205                    # Here fi MUST be a gdal-compatible raster
    206206                    # Then we get the extent from the raster itself
     
    250250                isSet[fInds]=1
    251251
    252         if(not min(isSet)==1):
     252        if( min(isSet) != 1):
    253253            raise Exception, 'Some points were not inside any polygon'
    254254
Note: See TracChangeset for help on using the changeset viewer.