Ignore:
Timestamp:
Apr 2, 2015, 3:11:36 PM (10 years ago)
Author:
steve
Message:

Bring svn repo up to date with git repo

File:
1 edited

Legend:

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

    r9679 r9719  
    509509            number_of_ip = ip.sum()
    510510            ip = ip.nonzero()[0]
     511
     512            # Check that none of the ip points has an nan value
     513            nan_ip = (quantityVal[ip] != quantityVal[ip]).nonzero()[0]
     514
     515            if len(nan_ip) > 0:
     516                print len(nan_ip), ' points outside the nan_interpolation_region_polygon have nan values'
     517                print 'This should not happen'
     518                print 'The points have the following coordinates:'
     519                print xy_array_trans[ip,:]
     520                msg = "There are nan points outside of nan_interpolation_region_polygon, even after all fall-through's"
     521                raise Exception(msg)
    511522         
    512523            if(number_of_ip < default_k_nearest_neighbours):
     
    531542        if( min(isSet) != 1):
    532543            print 'Some points remain as nan, which is not allowed'
    533             unset_inds = (isSet!=1).nonzero()[0]
     544            unset_inds = (isSet != 1).nonzero()[0]
    534545            lui = min(5, len(unset_inds))
    535546            print 'There are ', len(unset_inds), ' such points'
    536547            print 'Here are a few:'
    537548            for i in range(lui):
    538                 print x[unset_inds[i]]+xll, y[unset_inds[i]]+yll
     549                print x[unset_inds[i]] + xll, y[unset_inds[i]] + yll
    539550            raise Exception('It seems the input data needs to be fixed')
    540551
Note: See TracChangeset for help on using the changeset viewer.