Details
-
Bug
-
Status: Resolved
-
Major
-
Resolution: Fixed
-
1.1.0
-
None
-
None
Description
CLIMATE-897 fixed an issue where running ocw with python 3.x and numpy 1.11.x resulted in errors if temporal rebinning / reshaping was done due to the division operator ( / ) always returning floats in python 3.x, and floats being illegal types for array shapes in numpy 1.11.x. These statements were replaced with the floor operator ( // ) to suppress this behavior.
However, CLIMATE-900 and CLIMATE-902 reverted some of these changes for the sake of making sure an error is thrown if the new shapes are inconsistent. For example, rebinning 13 months of data to yearly should throw an error because 12 does not evenly divide into 13, which would be allowed to pass silently when using floor division. However, this resulted in the same errors that CLIMATE-897 was supposed to fix. We will revert to using floor division again with an additional check for divisibility to ensure consistency in the calculated shapes.