home / github / issues

Menu
  • Search all tables
  • GraphQL API

issues: 207317762

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
207317762 MDU6SXNzdWUyMDczMTc3NjI= 1266 Coordinate type changing from string to object 7441788 open 0     2 2017-02-13T19:38:16Z 2020-10-27T16:33:46Z   CONTRIBUTOR      

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' ```

{
    "url": "https://api.github.com/repos/pydata/xarray/issues/1266/reactions",
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
    13221727 issue

Links from other tables

  • 0 rows from issues_id in issues_labels
  • 2 rows from issue in issue_comments
Powered by Datasette · Queries took 75.732ms · About: xarray-datasette