Possible Fix for test_dem2pts failure #22
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Duncan has been getting an error when using an environment with numpy 1.9
ERROR: test_dem2pts_bounding_box_v2 (main.Test_Dem2Pts)
Test conversion from dem in ascii format to native NetCDF format
Traceback (most recent call last):
File "test_dem2pts.py", line 92, in test_dem2pts_bounding_box_v2
verbose=False)
File "/nas/mnh/georisk_models/inundation/sandpits/dgray/anuga_core/anuga/file_conversion/dem2pts.py", line 50, in dem2pts
result = apply(_dem2pts, [name_in], kwargs)
File "/nas/mnh/georisk_models/inundation/sandpits/dgray/anuga_core/anuga/file_conversion/dem2pts.py", line 155, in _dem2pts
dem_elevation_r = num.reshape(dem_elevation, (nrows, ncols))
File "/scratch/anaconda/lib/python2.7/site-packages/numpy/core/fromnumeric.py", line 220, in reshape
return _wrapit(a, 'reshape', newshape, order=order)
File "/scratch/anaconda/lib/python2.7/site-packages/numpy/core/fromnumeric.py", line 45, in _wrapit
result = getattr(asarray(obj), method)(_args, *_kwds)
File "/scratch/anaconda/lib/python2.7/site-packages/numpy/core/numeric.py", line 462, in asarray
return array(a, dtype, copy=False, order=order)
IOError: Index exceeds dimension bound
It might have to do with dem_elevation not being a numpy array. So have removed this problem