GeoscienceAustralia / tcrm

A statistical-parametric model for assessing wind hazard from tropical cyclones
http://geoscienceaustralia.github.io/tcrm
Other
81 stars 52 forks source link

Slice indices error in beta #29

Open CEKrause opened 7 years ago

CEKrause commented 7 years ago

Beta branch pulled from repo. Nosetests run on newly pulled code returns the following error.

ERROR: Test a dataset is correctly reprojected

Traceback (most recent call last): File "c:\Users\u37443\TCRM\tests\test_processMultipliers.py", line 187, in tes t_reprojectDataset_same_nc_img filename=f_img.name) File "c:\Users\u37443\TCRM\ProcessMultipliers\processMultipliers.py", line 154 , in createRaster tempBand.WriteArray(array[::np.sign(dy) * 1]) TypeError: slice indices must be integers or None or have an index method -------------------- >> begin captured logging << -------------------- root: DEBUG: Creating in-memory raster root: DEBUG: Spatial reference system is: root: DEBUG: PROJCS["PRS92 / Philippines zone 3",GEOGCS["PRS92",DATUM["Philippin e_Reference_System_1992",SPHEROID["Clarke 1866",6378206.4,294.9786982139006,AUTH ORITY["EPSG","7008"]],TOWGS84[-127.62,-67.24,-47.04,-3.068,4.903,1.578,-1.06],AU THORITY["EPSG","6683"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["deg ree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4683"]],PROJ ECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["centr al_meridian",121],PARAMETER["scale_factor",0.99995],PARAMETER["false_easting",50 0000],PARAMETER["false_northing",0],UNIT["metre",1,AUTHORITY["EPSG","9001"]],AXI S["X",EAST],AXIS["Y",NORTH],AUTHORITY["EPSG","3123"]] Utilities.nctools: DEBUG: Creating variable lat Utilities.nctools: DEBUG: Creating variable lon root: DEBUG: Creating raster: c:\users\u37443\appdata\local\temp\1\test_processM ultipliersmelnxm.img

CEKrause commented 7 years ago

Line of processMultiplyers throwing up the error

tempBand.WriteArray(array[::np.sign(dy) * 1])

CEKrause commented 7 years ago

dy a float, not an integer.