id,node_id,number,title,user,state,locked,assignee,milestone,comments,created_at,updated_at,closed_at,author_association,active_lock_reason,draft,pull_request,body,reactions,performed_via_github_app,state_reason,repo,type 46022646,MDU6SXNzdWU0NjAyMjY0Ng==,254,order matters when doing comparisons against scalar xray objects,291576,closed,0,,799012,2,2014-10-16T19:03:11Z,2014-10-23T06:43:30Z,2014-10-23T06:43:23Z,CONTRIBUTOR,,,,"Working on some bounding box extraction code, I computed a bounding box by taking mins and maxes of the coordinates from an xray object resulting in a dictionary of scalar xray objects. When comparing an xray DataArray against this scalar xray object, the order seems to matter. This results in problems down the road that wouldn't happen if I just had a scalar value instead of a scalar xray object. ``` >>> bbox {'longitude': ( array(-102.8782), array(-94.6244))} >>> a = bbox['longitude'][0] <= mod['longitude'] >>> b = mod['longitude'] <= bbox['longitude'][1] >>> c = mod['longitude'] >= bbox['longitude'][0] >>> a array([False, False, False, ..., True, True, True], dtype=bool) Coordinates: * longitude (longitude) bool False False False False False False False False False ... >>> b array([ True, True, True, ..., False, False, False], dtype=bool) Coordinates: * longitude (longitude) float32 -129.995 -129.985 -129.975 -129.965 -129.955 ... ``` See that the ""a"" object has a name ""longitude"" while the ""b"" object does not. Therefore... ``` >>> a & b Traceback (most recent call last): File """", line 1, in File ""/nas/home/broot/centos6/lib/python2.7/site-packages/xray/core/dataarray.py"", line 850, in func ds = self.coords.merge(other_coords) File ""/nas/home/broot/centos6/lib/python2.7/site-packages/xray/core/coordinates.py"", line 122, in merge conflicts = self._merge_validate(other) File ""/nas/home/broot/centos6/lib/python2.7/site-packages/xray/core/coordinates.py"", line 80, in _merge_validate raise ValueError('index %r not aligned' % k) ValueError: index 'longitude' not aligned ``` But, if I use the ""c"" object instead which was created flipping the comparison around: ``` >>> c * b array([False, False, False, ..., False, False, False], dtype=bool) Coordinates: * longitude (longitude) float32 -129.995 -129.985 -129.975 -129.965 -129.955 ... >>> ``` everything works as expected. I have a vague idea of why this is happening, but I am not exactly sure how one should go about dealing with this. It is a similar problem elsewhere with subclassed numpy arrays. For now, I am going to have to go with the rule of keeping the xray dataarray object first, but that really isn't going to work in other places where I may not know that I am passing xray objects. ","{""url"": ""https://api.github.com/repos/pydata/xarray/issues/254/reactions"", ""total_count"": 0, ""+1"": 0, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,completed,13221727,issue 29030870,MDU6SXNzdWUyOTAzMDg3MA==,58,Add a DataArray.dropna() method for removing missing values,1217238,closed,0,,799012,0,2014-03-08T21:49:29Z,2014-10-23T04:57:36Z,2014-10-17T20:02:22Z,MEMBER,,,,"This should be patterned off of [pandas.DataFrame.dropna](http://pandas.pydata.org/pandas-docs/stable/generated/pandas.DataFrame.dropna.html). ","{""url"": ""https://api.github.com/repos/pydata/xarray/issues/58/reactions"", ""total_count"": 0, ""+1"": 0, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,completed,13221727,issue 45948310,MDU6SXNzdWU0NTk0ODMxMA==,253,We should ship test data with the source distribution on pypi,1217238,closed,0,,799012,0,2014-10-16T04:57:19Z,2014-10-20T07:32:03Z,2014-10-20T07:32:03Z,MEMBER,,,,"This will make it easier to test xray (e.g., with `nosetests xray`) ","{""url"": ""https://api.github.com/repos/pydata/xarray/issues/253/reactions"", ""total_count"": 0, ""+1"": 0, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,completed,13221727,issue