home / github / issues

Menu
  • Search all tables
  • GraphQL API

issues: 1319621859

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
1319621859 I_kwDOAMm_X85Op9Tj 6837 Clarify difference between `.load()` and `.compute()` 4806877 open 0     8 2022-07-27T14:07:33Z 2022-07-27T22:30:22Z   CONTRIBUTOR      

What is your issue?

I just realized that the difference between .load() and .compute() is that .load() operates inplace and .compute() returns a new xarray object.I have 2 suggestions for how this could be clearer:

  1. Docs: the API docs for each method could reference the other.
  2. Code: this might be too big a change, but maybe .load() should not return anything. Consider this example from pandas: ```python import pandas as pd

df = pd.DataFrame({"air": []}) df.rename({"air": "foo"}, axis=1, inplace=True) # returns None since df is renamed inplace `` this matches the behavior of inplace actions in Python itself likelist.appendordict.update. This would be a major breaking change though, and it might be easier to just remove.load()` entirely.

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

Links from other tables

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