Alex Goodman created CLIMATE-910:
------------------------------------

             Summary: Throw an exception for inconsistent temporal reshaping / 
rebinning operatations
                 Key: CLIMATE-910
                 URL: https://issues.apache.org/jira/browse/CLIMATE-910
             Project: Apache Open Climate Workbench
          Issue Type: Bug
    Affects Versions: 1.1.0
            Reporter: Alex Goodman
            Assignee: Alex Goodman
             Fix For: 1.2.0


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.



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)

Reply via email to