{"action":"created","issue":{"url":"https://api.github.com/repos/pydata/xarray/issues/837","repository_url":"https://api.github.com/repos/pydata/xarray","labels_url":"https://api.github.com/repos/pydata/xarray/issues/837/labels{/name}","comments_url":"https://api.github.com/repos/pydata/xarray/issues/837/comments","events_url":"https://api.github.com/repos/pydata/xarray/issues/837/events","html_url":"https://github.com/pydata/xarray/pull/837","id":151483622,"number":837,"title":"Fixed a bug that showed when trying to establish equivalence of two a…","user":{"login":"maciekswat","id":5384661,"avatar_url":"https://avatars.githubusercontent.com/u/5384661?v=3","gravatar_id":"","url":"https://api.github.com/users/maciekswat","html_url":"https://github.com/maciekswat","followers_url":"https://api.github.com/users/maciekswat/followers","following_url":"https://api.github.com/users/maciekswat/following{/other_user}","gists_url":"https://api.github.com/users/maciekswat/gists{/gist_id}","starred_url":"https://api.github.com/users/maciekswat/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/maciekswat/subscriptions","organizations_url":"https://api.github.com/users/maciekswat/orgs","repos_url":"https://api.github.com/users/maciekswat/repos","events_url":"https://api.github.com/users/maciekswat/events{/privacy}","received_events_url":"https://api.github.com/users/maciekswat/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":5,"created_at":"2016-04-27T20:31:50Z","updated_at":"2016-05-02T19:35:04Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/pydata/xarray/pulls/837","html_url":"https://github.com/pydata/xarray/pull/837","diff_url":"https://github.com/pydata/xarray/pull/837.diff","patch_url":"https://github.com/pydata/xarray/pull/837.patch"},"body":"…rrays that are numpy.recarrays\r\n\r\nThe following code WILL run with the fix but will crash when running current xarray:\r\n\r\nimport numpy as np\r\nimport xarray as xr\r\n\r\np_data = np.array([('John', 180), ('Stacy', 150), ('Dick',200)], dtype=[('name', '|S256'), ('height', int)])\r\np_data_1 = np.array([('John', 180), ('Stacy', 150), ('Dick',200)], dtype=[('name', '|S256'), ('height', int)])\r\n\r\nweights_0 = xr.DataArray([80,56,120], dims=['participant'], coords={'participant':p_data})\r\nweights_1 = xr.DataArray([81,52,115], dims=['participant'], coords={'participant':p_data_1})\r\n\r\nprint weights_1-weights_0"},"comment":{"url":"https://api.github.com/repos/pydata/xarray/issues/comments/216338679","html_url":"https://github.com/pydata/xarray/pull/837#issuecomment-216338679","issue_url":"https://api.github.com/repos/pydata/xarray/issues/837","id":216338679,"user":{"login":"maciekswat","id":5384661,"avatar_url":"https://avatars.githubusercontent.com/u/5384661?v=3","gravatar_id":"","url":"https://api.github.com/users/maciekswat","html_url":"https://github.com/maciekswat","followers_url":"https://api.github.com/users/maciekswat/followers","following_url":"https://api.github.com/users/maciekswat/following{/other_user}","gists_url":"https://api.github.com/users/maciekswat/gists{/gist_id}","starred_url":"https://api.github.com/users/maciekswat/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/maciekswat/subscriptions","organizations_url":"https://api.github.com/users/maciekswat/orgs","repos_url":"https://api.github.com/users/maciekswat/repos","events_url":"https://api.github.com/users/maciekswat/events{/privacy}","received_events_url":"https://api.github.com/users/maciekswat/received_events","type":"User","site_admin":false},"created_at":"2016-05-02T19:35:04Z","updated_at":"2016-05-02T19:35:04Z","body":"I simplified the test - please feel free to do further edits, also added doc string explaining what the test checks for - essentially it checks if DataArray subtraction behaves correctly when dimension is a structured numpy array. "}}