issues: 497823072
This data as json
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 |
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
497823072 | MDU6SXNzdWU0OTc4MjMwNzI= | 3339 | Version 0.13 broke my ufunc | 1872600 | closed | 0 | 5 | 2019-09-24T17:25:09Z | 2019-09-24T20:32:40Z | 2019-09-24T19:56:17Z | NONE | This simple xarray ufunc to calculate wind speed worked under ```python-tracebackValueError Traceback (most recent call last) <ipython-input-4-2ac66965ccfc> in <module> ----> 1 windspeed = xr.ufuncs.sqrt(ds['u-component_of_wind_height_above_ground']2 + ds['v-component_of_wind_height_above_ground']2) /srv/conda/envs/notebook/lib/python3.7/site-packages/xarray/core/dataarray.py in func(self, other) 2495 else f(other_variable, self.variable) 2496 ) -> 2497 coords = self.coords._merge_raw(other_coords) 2498 name = self._result_name(other) 2499 /srv/conda/envs/notebook/lib/python3.7/site-packages/xarray/core/coordinates.py in _merge_raw(self, other) 128 else: 129 # don't align because we already called xarray.align --> 130 variables = expand_and_merge_variables([self.variables, other.variables]) 131 return variables 132 /srv/conda/envs/notebook/lib/python3.7/site-packages/xarray/core/merge.py in expand_and_merge_variables(objs, priority_arg) 380 expanded = expand_variable_dicts(objs) 381 priority_vars = _get_priority_vars(objs, priority_arg) --> 382 variables = merge_variables(expanded, priority_vars) 383 return variables 384 /srv/conda/envs/notebook/lib/python3.7/site-packages/xarray/core/merge.py in merge_variables(list_of_variables_dicts, priority_vars, compat) 202 else: 203 try: --> 204 merged[name] = unique_variable(name, var_list, compat) 205 except MergeError: 206 if compat != "minimal": /srv/conda/envs/notebook/lib/python3.7/site-packages/xarray/core/merge.py in unique_variable(name, variables, compat, equals) 116 out = out.compute() 117 for var in variables[1:]: --> 118 equals = getattr(out, compat)(var) 119 if not equals: 120 break /srv/conda/envs/notebook/lib/python3.7/site-packages/xarray/core/variable.py in broadcast_equals(self, other, equiv) 1574 except (ValueError, AttributeError): 1575 return False -> 1576 return self.equals(other, equiv=equiv) 1577 1578 def identical(self, other): /srv/conda/envs/notebook/lib/python3.7/site-packages/xarray/core/variable.py in equals(self, other, equiv) 1558 try: 1559 return self.dims == other.dims and ( -> 1560 self._data is other._data or equiv(self.data, other.data) 1561 ) 1562 except (TypeError, AttributeError): /srv/conda/envs/notebook/lib/python3.7/site-packages/xarray/core/duck_array_ops.py in array_equiv(arr1, arr2) 200 with warnings.catch_warnings(): 201 warnings.filterwarnings("ignore", "In the future, 'NAT == x'") --> 202 flag_array = (arr1 == arr2) | (isnull(arr1) & isnull(arr2)) 203 return bool(flag_array.all()) 204 /srv/conda/envs/notebook/lib/python3.7/site-packages/dask/array/core.py in eq(self, other) 1740 1741 def eq(self, other): -> 1742 return elemwise(operator.eq, self, other) 1743 1744 def gt(self, other): /srv/conda/envs/notebook/lib/python3.7/site-packages/dask/array/core.py in elemwise(op, args, kwargs) 3765 for a in args 3766 ), -> 3767 *blockwise_kwargs 3768 ) 3769 /srv/conda/envs/notebook/lib/python3.7/site-packages/dask/array/blockwise.py in blockwise(func, out_ind, name, token, dtype, adjust_chunks, new_axes, align_arrays, concatenate, meta, args, kwargs) 143 144 if align_arrays: --> 145 chunkss, arrays = unify_chunks(args) 146 else: 147 arginds = [(a, i) for (a, i) in toolz.partition(2, args) if i is not None] /srv/conda/envs/notebook/lib/python3.7/site-packages/dask/array/core.py in unify_chunks(args, *kwargs) 3034 3035 arginds = [ -> 3036 (asanyarray(a) if ind is not None else a, ind) for a, ind in partition(2, args) 3037 ] # [x, ij, y, jk] 3038 args = list(concat(arginds)) # [(x, ij), (y, jk)] /srv/conda/envs/notebook/lib/python3.7/site-packages/dask/array/core.py in <listcomp>(.0) 3034 3035 arginds = [ -> 3036 (asanyarray(a) if ind is not None else a, ind) for a, ind in partition(2, args) 3037 ] # [x, ij, y, jk] 3038 args = list(concat(arginds)) # [(x, ij), (y, jk)] /srv/conda/envs/notebook/lib/python3.7/site-packages/dask/array/core.py in asanyarray(a) 3609 elif hasattr(a, "to_dask_array"): 3610 return a.to_dask_array() -> 3611 elif hasattr(a, "data") and type(a).module.startswith("xarray."): 3612 return asanyarray(a.data) 3613 elif isinstance(a, (list, tuple)) and any(isinstance(i, Array) for i in a): ValueError: cannot include dtype 'M' in a buffer ``` Is this a bug or a feature that I should be handling differently in my code? Output of
|
{ "url": "https://api.github.com/repos/pydata/xarray/issues/3339/reactions", "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 } |
completed | 13221727 | issue |