- Timestamp:
- Sep 10, 2013, 8:12:49 AM (11 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/anuga_core/source/anuga/fit_interpolate/interpolate2d.py
r8967 r8969 142 142 143 143 # Identify elements that are outside interpolation domain or NaN 144 oldset = numpy.seterr(invalid='ignore') # Suppress comparison with nan warning 144 145 outside = (xi < x[0]) + (eta < y[0]) + (xi > x[-1]) + (eta > y[-1]) 145 146 outside += numpy.isnan(xi) + numpy.isnan(eta) 146 147 numpy.seterr(**oldset) # Restore warnings 148 147 149 # Restrict interpolation points to those that are inside the grid 148 150 inside = -outside # Invert boolean array to find elements inside … … 271 273 272 274 if bounds_error: 273 xi0 = min(xi)274 xi1 = max(xi)275 eta0 = min(eta)276 eta1 = max(eta)275 xi0 = numpy.nanmin(xi) 276 xi1 = numpy.nanmax(xi) 277 eta0 = numpy.nanmin(eta) 278 eta1 = numpy.nanmax(eta) 277 279 278 280 msg = ('Interpolation point xi=%f was less than the smallest '
Note: See TracChangeset
for help on using the changeset viewer.