home / github / issue_comments

Menu
  • Search all tables
  • GraphQL API

issue_comments: 621761051

This data as json

html_url issue_url id node_id user created_at updated_at author_association body reactions performed_via_github_app issue
https://github.com/pydata/xarray/issues/4016#issuecomment-621761051 https://api.github.com/repos/pydata/xarray/issues/4016 621761051 MDEyOklzc3VlQ29tbWVudDYyMTc2MTA1MQ== 14808389 2020-04-30T10:56:03Z 2020-04-30T10:56:03Z MEMBER

you should be able to get this to work by assigning coordinates to x: python In [7]: a = xr.DataArray([0], dims='x', coords={"x": [0]}) ...: b = xr.DataArray([1, 2, 3], dims='x', coords={"x": [0, 1, 2]}) ...: time = pd.DatetimeIndex(['2020-02-14 05:25:10']) ...: a = a.expand_dims("time").assign_coords(time=time) ...: b = b.expand_dims("time").assign_coords(time=time) ...: ...: c = xr.concat([a, b], dim='time') ...: c Out[7]: <xarray.DataArray (time: 2, x: 3)> array([[ 0., nan, nan], [ 1., 2., 3.]]) Coordinates: * x (x) int64 0 1 2 * time (time) datetime64[ns] 2020-02-14T05:25:10 2020-02-14T05:25:10 Note that time does not have unique values which means some operations won't work. Also, xarray can't really do true ragged arrays (i.e. [[0], [1, 2, 3]] is not possible), so we use missing values instead

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  609108666
Powered by Datasette · Queries took 0.571ms · About: xarray-datasette