home / github / issue_comments

Menu
  • GraphQL API
  • Search all tables

issue_comments: 748483357

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/4714#issuecomment-748483357 https://api.github.com/repos/pydata/xarray/issues/4714 748483357 MDEyOklzc3VlQ29tbWVudDc0ODQ4MzM1Nw== 14808389 2020-12-19T14:41:47Z 2020-12-19T14:41:47Z MEMBER

reindex does not have to be changed since we can just call e.g. ffill with the dim parameter for this to work: python arr.reindex(...).ffill(dim="dim")

This really depends on how you intend to use the result of the indexing. For example, if you don't really need the big matrix, you could just convert the DataArray to a Dataset where the sensor dimension is the names of the variables (using to_dataset(dim="sensor"), or construct it that way). If you do need the matrix, this might be slightly better (you still end up allocating a T * (S + n) array): python arr.reindex(sensor=["A", "B", "C"]).sel({"sensor": ..., "time": ...}, method="ffill") but if you really care about the memory allocated at once, you might be better off using dask: python arr.chunk({"time": 100}).reindex(...).sel(...)

If all of that is not an option, I guess we might be able add a method_kwargs parameter (not sure if there is a better option, though).

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