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/5857#issuecomment-1243744713,https://api.github.com/repos/pydata/xarray/issues/5857,1243744713,IC_kwDOAMm_X85KIgnJ,35968931,2022-09-12T13:28:35Z,2022-09-12T13:28:35Z,MEMBER,"> np.angle is still not a ufunc Yes it would be nice if this were fixed upstream. (Would you be interested in having a go?) > What is the recommended workaround here for code that depends on xr.ufuncs.angle? Perhaps you could make a custom `angle` function that does behave like a ufunc, maybe like the [example given here](https://github.com/numpy/numpy/issues/12961#issuecomment-979379251)?","{""total_count"": 0, ""+1"": 0, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,1024011835 https://github.com/pydata/xarray/issues/5857#issuecomment-1243695448,https://api.github.com/repos/pydata/xarray/issues/5857,1243695448,IC_kwDOAMm_X85KIUlY,659645,2022-09-12T12:51:16Z,2022-09-12T12:51:16Z,NONE,"While closed, this is still an issue for us. np.angle is still not a ufunc, and when applied to an xr.DataArray will return a np array. I understand the removal of the xr.ufuncs namespace, but we're stuck with xarray 2022.3.0 now because upgrading will break our code. What is the recommended workaround here for code that depends on xr.ufuncs.angle?","{""total_count"": 0, ""+1"": 0, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,1024011835 https://github.com/pydata/xarray/issues/5857#issuecomment-941280214,https://api.github.com/repos/pydata/xarray/issues/5857,941280214,IC_kwDOAMm_X844GsvW,35968931,2021-10-12T18:39:19Z,2021-10-12T19:46:53Z,MEMBER,"> The result of `numpy.angle(xarray.DataArray)` is not a DataArray object, contrary to other numpy operations This is because [`np.angle` is not a ufunc](https://github.com/numpy/numpy/issues/12961) - the cleanest solution to this should be to fix that issue in numpy. EDIT: Of course that doesn't explain why `xarray.ufuncs.angle` is behaving incorrectly - it just means that if we fixed the upstream issue in numpy then no-one need use `xarray.ufuncs.angle`.","{""total_count"": 0, ""+1"": 0, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,1024011835