- Timestamp:
- Apr 2, 2015, 3:11:36 PM (10 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/anuga_core/anuga/utilities/quantity_setting_functions.py
r9679 r9719 509 509 number_of_ip = ip.sum() 510 510 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) 511 522 512 523 if(number_of_ip < default_k_nearest_neighbours): … … 531 542 if( min(isSet) != 1): 532 543 print 'Some points remain as nan, which is not allowed' 533 unset_inds = (isSet !=1).nonzero()[0]544 unset_inds = (isSet != 1).nonzero()[0] 534 545 lui = min(5, len(unset_inds)) 535 546 print 'There are ', len(unset_inds), ' such points' 536 547 print 'Here are a few:' 537 548 for i in range(lui): 538 print x[unset_inds[i]] +xll, y[unset_inds[i]]+yll549 print x[unset_inds[i]] + xll, y[unset_inds[i]] + yll 539 550 raise Exception('It seems the input data needs to be fixed') 540 551
Note: See TracChangeset
for help on using the changeset viewer.