home / github / issue_comments

Menu
  • Search all tables
  • GraphQL API

issue_comments: 601411557

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/3868#issuecomment-601411557 https://api.github.com/repos/pydata/xarray/issues/3868 601411557 MDEyOklzc3VlQ29tbWVudDYwMTQxMTU1Nw== 6815844 2020-03-19T20:53:30Z 2020-03-19T20:53:30Z MEMBER

How about passing an Index instead of just a simple integer to the pad method? ```python In [4]: da = xr.DataArray([0.5, 1.5, 2.5], dims=['x'], coords={'x': [0, 1, 2]})

In [5]: da
Out[5]: <xarray.DataArray (x: 3)> array([0.5, 1.5, 2.5]) Coordinates: * x (x) int64 0 1 2

In [8]: da.pad(x=([-1, -2], 0))
Out[8]: <xarray.DataArray (x: 5)> array([nan, nan, 0.5, 1.5, 2.5]) Coordinates: * x (x) int64 -1 -2 0 1 2 ```

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