You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Originally posted on https://groups.google.com/forum/#!topic/xarray/4k8ZAx998UU. I would expect [2], [3], and [4] to produce identical results, with coordinate xyz being of type |S1 (in general |Sn where n is minimal to accommodate the coordinate values), not object. This behavior is observed with xarray versions 0.8.2 and 0.9.1.
Python 2.7.12 (v2.7.12:d33e0cf91556, Jun 27 2016, 15:24:40) [MSC v.1500 64 bit (AMD64)]
Type "copyright", "credits" or "license" for more information.
IPython 5.1.0 -- An enhanced Interactive Python.
? -> Introduction and overview of IPython's features.
%quickref -> Quick reference.
help -> Python's own help system.
object? -> Details about 'object', use 'object??' for extra details.
In [1]: from xarray import DataArray
In [2]: DataArray([1.], dims=('xyz',), coords={'xyz': ['a']}) + \
...: DataArray([5.], dims=('xyz',), coords={'xyz': ['a']})
Out[2]:
<xarray.DataArray (xyz: 1)>
array([ 6.])
Coordinates:
* xyz (xyz) |S1 'a'
In [3]: DataArray([1., 2.], dims=('xyz',), coords={'xyz': ['a', 'b']}) + \
...: DataArray([5.], dims=('xyz',), coords={'xyz': ['a']})
Out[3]:
<xarray.DataArray (xyz: 1)>
array([ 6.])
Coordinates:
* xyz (xyz) object 'a'
In [4]: DataArray([1.], dims=('xyz',), coords={'xyz': ['a']}) + \
...: DataArray([5., 6.], dims=('xyz',), coords={'xyz': ['a', 'b']})
Out[4]:
<xarray.DataArray (xyz: 1)>
array([ 6.])
Coordinates:
* xyz (xyz) object 'a'
The text was updated successfully, but these errors were encountered:
In order to maintain a list of currently relevant issues, we mark issues as stale after a period of inactivity If this issue remains relevant, please comment here; otherwise it will be marked as closed automatically
Originally posted on https://groups.google.com/forum/#!topic/xarray/4k8ZAx998UU. I would expect
[2]
,[3]
, and[4]
to produce identical results, with coordinatexyz
being of type|S1
(in general|Sn
where n is minimal to accommodate the coordinate values), notobject
. This behavior is observed with xarray versions 0.8.2 and 0.9.1.The text was updated successfully, but these errors were encountered: