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/issues/1208#issuecomment-275956940,https://api.github.com/repos/pydata/xarray/issues/1208,275956940,MDEyOklzc3VlQ29tbWVudDI3NTk1Njk0MA==,10050469,2017-01-29T23:56:04Z,2017-01-29T23:56:04Z,MEMBER,"I added a PR in order to allow a dev version of bottleneck to be used, too: https://github.com/pydata/xarray/issues/1235","{""total_count"": 0, ""+1"": 0, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,200908727 https://github.com/pydata/xarray/issues/1208#issuecomment-275955256,https://api.github.com/repos/pydata/xarray/issues/1208,275955256,MDEyOklzc3VlQ29tbWVudDI3NTk1NTI1Ng==,10050469,2017-01-29T23:28:18Z,2017-01-29T23:28:18Z,MEMBER,the tests now pass with bottleneck master.,"{""total_count"": 0, ""+1"": 0, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,200908727 https://github.com/pydata/xarray/issues/1208#issuecomment-275910605,https://api.github.com/repos/pydata/xarray/issues/1208,275910605,MDEyOklzc3VlQ29tbWVudDI3NTkxMDYwNQ==,10050469,2017-01-29T12:26:03Z,2017-01-29T12:26:03Z,MEMBER,"@shoyer nevermind, I found the bug: https://github.com/kwgoodman/bottleneck/issues/161 Quite a tricky one indeed ;-)","{""total_count"": 0, ""+1"": 0, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,200908727 https://github.com/pydata/xarray/issues/1208#issuecomment-275909069,https://api.github.com/repos/pydata/xarray/issues/1208,275909069,MDEyOklzc3VlQ29tbWVudDI3NTkwOTA2OQ==,10050469,2017-01-29T11:53:27Z,2017-01-29T11:53:27Z,MEMBER,"@shoyer there is something very weird going on. See the following example: ```python import numpy as np import bottleneck as bn import xarray as xr da = xr.DataArray(np.ones((10, 20)).astype(np.int), dims=['x', 'y'], coords={'abc':('y', np.array(['a'] * 9 + ['c'] + ['b'] * 10))}) np.testing.assert_allclose(np.sum(da[:, 9:10]), bn.nansum(da[:, 9:10])) # this will allways work np.testing.assert_allclose(da.groupby('abc').reduce(np.sum), da.groupby('abc').sum()) # this won't ``` This will work with bottleneck installed. Now change the ``astype(np.int)`` to ``astype(np.float)`` and the first assertion would still pass, but the second won't! It will fail with: ``` --------------------------------------------------------------------------- AssertionError Traceback (most recent call last) in () 2 coords={'abc':('y', np.array(['a'] * 9 + ['c'] + ['b'] * 10))}) 3 np.testing.assert_allclose(np.sum(da[:, 9:10]), bn.nansum(da[:, 9:10])) ----> 4 np.testing.assert_allclose(da.groupby('abc').reduce(np.sum), da.groupby('abc').sum()) /home/mowglie/.pyvirtualenvs/py3/lib/python3.4/site-packages/numpy/testing/utils.py in assert_allclose(actual, desired, rtol, atol, equal_nan, err_msg, verbose) 1409 header = 'Not equal to tolerance rtol=%g, atol=%g' % (rtol, atol) 1410 assert_array_compare(compare, actual, desired, err_msg=str(err_msg), -> 1411 verbose=verbose, header=header, equal_nan=equal_nan) 1412 1413 /home/mowglie/.pyvirtualenvs/py3/lib/python3.4/site-packages/numpy/testing/utils.py in assert_array_compare(comparison, x, y, err_msg, verbose, header, precision, equal_nan) 794 names=('x', 'y'), precision=precision) 795 if not cond: --> 796 raise AssertionError(msg) 797 except ValueError: 798 import traceback AssertionError: Not equal to tolerance rtol=1e-07, atol=0 (mismatch 33.33333333333333%) x: array([ 90., 100., 10.]) y: array([ 90., 100., 1.]) ``` So the new operation is applied only to the first element of the grouped selection, and I didn't manage to us bottleneck only to replicate this (since the first assertion always passes). Before I dig into this I'd like to have your opinion on this: any idea on what could go wrong here? ","{""total_count"": 0, ""+1"": 0, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,200908727 https://github.com/pydata/xarray/issues/1208#issuecomment-275396760,https://api.github.com/repos/pydata/xarray/issues/1208,275396760,MDEyOklzc3VlQ29tbWVudDI3NTM5Njc2MA==,10050469,2017-01-26T14:10:48Z,2017-01-26T14:10:48Z,MEMBER,I can confirm that - I have the same problems on my pip virtualenv on linux mint (I tried to reproduce it on [travis](https://github.com/pydata/xarray/pull/1222#issuecomment-274188191) without success),"{""total_count"": 0, ""+1"": 0, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,200908727