html_url,issue_url,id,node_id,user,created_at,updated_at,author_association,body,reactions,performed_via_github_app,issue https://github.com/pydata/xarray/pull/2015#issuecomment-375927133,https://api.github.com/repos/pydata/xarray/issues/2015,375927133,MDEyOklzc3VlQ29tbWVudDM3NTkyNzEzMw==,10050469,2018-03-24T21:45:31Z,2018-03-24T21:45:31Z,MEMBER,"> I am curious why this test is failing in appveyor. > The casting rule of numpy should not depend on the operating system. I'm curious too, but I don't have a windows machine to test it. The tests are green with the float64 casting though","{""total_count"": 0, ""+1"": 0, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,308284379 https://github.com/pydata/xarray/pull/2015#issuecomment-375914656,https://api.github.com/repos/pydata/xarray/issues/2015,375914656,MDEyOklzc3VlQ29tbWVudDM3NTkxNDY1Ng==,10050469,2018-03-24T18:30:17Z,2018-03-24T18:30:17Z,MEMBER,"The problem comes from a weird numpy casting behavior. Consider: ```python In [1]: import numpy as np In [2]: (np.int32(2) * np.int64(2)).dtype Out[2]: dtype('int64') In [3]: (np.array(np.int32(2)) * np.int64(2)).dtype Out[3]: dtype('int64') In [4]: (np.array([np.int32(2)]) * np.int64(2)).dtype Out[4]: dtype('int32') ``` In the offending line: ```python flat_num_dates * _NS_PER_TIME_DELTA[delta] ``` ``flat_num_dates`` is an array of dtype ``int32`` and ``_NS_PER_TIME_DELTA[delta]`` is a scalar of dtype ``int64``. Is there a way to make sure this line casts to a secure dtype better than my proposed solution to cast everything to a ``float64`` first? ","{""total_count"": 0, ""+1"": 0, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,308284379