home / github / issue_comments

Menu
  • Search all tables
  • GraphQL API

issue_comments: 702671253

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/4471#issuecomment-702671253 https://api.github.com/repos/pydata/xarray/issues/4471 702671253 MDEyOklzc3VlQ29tbWVudDcwMjY3MTI1Mw== 500246 2020-10-02T11:07:33Z 2020-10-02T11:07:33Z CONTRIBUTOR

The ds.load() prevents the traceback because it means the entire n-d data variable is multiplied with the 1-d scale factor. Similarly, requesting a slice (ds["Rad"][400:402, 300:302]) also prevents a traceback. The traceback occurs if a single value is requested, because then Python will complain about multiplying a scalar with a 1-d array. I'm not entirely sure why, but would be a numpy issue:

``` In [7]: a = np.array(0)

In [8]: b = np.array([0])

In [9]: a * b Out[9]: array([0])

In [10]: a *= b

ValueError Traceback (most recent call last) <ipython-input-10-0d04f348f081> in <module> ----> 1 a *= b

ValueError: non-broadcastable output operand with shape () doesn't match the broadcast shape (1,) ```

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