home / github / issues

Menu
  • Search all tables
  • GraphQL API

issues: 40536963

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
40536963 MDU6SXNzdWU0MDUzNjk2Mw== 217 Strings are truncated when concatenating Datasets. 2002703 closed 0   740776 0 2014-08-18T21:58:36Z 2014-08-21T05:17:28Z 2014-08-21T05:17:28Z CONTRIBUTOR      

When concatenating Datasets, a variable's string length is limited to the length in the first of the Datasets being concatenated.

```

import xray first = xray.Dataset({'animal': ('animal', ['horse'])}) second = xray.Dataset( {'animal': ('animal', ['aardvark_0'])}) xray.Dataset.concat([first, second], dimension='animal')['animal'] <xray.DataArray 'animal' (animal: 2)> array(['horse', 'aardv'], dtype='|S5') Coordinates: animal: Index([u'horse', u'aardv'], dtype='object') Attributes: Empty ```

(Note the |S5 dtype and the truncated aardv)

I think this is the offending line: https://github.com/xray/xray/blob/master/xray/core/variable.py#L623 May want to use dtype=object for strings to avoid this issue.

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

Links from other tables

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