home / github / issues

Menu
  • GraphQL API
  • Search all tables

issues: 115805419

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
115805419 MDExOlB1bGxSZXF1ZXN0NTAwODgwMTY= 648 Rework DataArray internals 1217238 closed 0     12 2015-11-09T06:09:19Z 2015-12-04T20:50:46Z 2015-12-04T20:40:31Z MEMBER   0 pydata/xarray/pulls/648

Fixes #367 Fixes #634 Fixes #649

The internal data model used by DataArray has been rewritten to fix several outstanding issues (#367, #634 and this stackoverflow report). Namely, if a DataArray has the same name as one of its coordinates, the array and the coordinate no longer share the same data.

This means that creating a DataArray with the same name as one of its dimensions no longer automatically uses that array to label the corresponding coordinate. You will now need to provide coordinate labels explicitly. Here's the old behavior:

In [2]: xray.DataArray([4, 5, 6], dims='x', name='x') Out[2]: <xray.DataArray 'x' (x: 3)> array([4, 5, 6]) Coordinates: * x (x) int64 4 5 6

and the new behavior (compare the values of the x coordinate):

In [2]: xray.DataArray([4, 5, 6], dims='x', name='x') Out[2]: <xray.DataArray 'x' (x: 3)> array([4, 5, 6]) Coordinates: * x (x) int64 0 1 2

It's also no longer possible to convert a DataArray to a Dataset with DataArray.to_dataset if it is unnamed. This will now raise ValueError. If the array is unnamed, you need to supply the name argument.

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

Links from other tables

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