home / github / issues

Menu
  • GraphQL API
  • Search all tables

issues: 264209937

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
264209937 MDU6SXNzdWUyNjQyMDk5Mzc= 1620 repr of class methods 10050469 closed 0     5 2017-10-10T12:32:10Z 2017-10-12T09:02:55Z 2017-10-12T09:02:55Z MEMBER      

Some live news from the classroom. A student (who is learning python and xarray at the same time) wanted to compute the minimum of an array and forgot the parenthesis (quite a common mistake).

The printout in the notebook in that case is:

```python

ds.toa_sw_all_mon.min <bound method ImplementsArrayReduce._reduce_method.\<locals>.wrapped_func of \<xarray.DataArray 'toa_sw_all_mon' (month: 12, lat: 180, lon: 360)> [777600 values with dtype=float32] Coordinates: * month (month) float32 1.0 2.0 3.0 4.0 5.0 6.0 7.0 8.0 9.0 10.0 11.0 12.0 * lat (lat) float32 -89.5 -88.5 -87.5 -86.5 -85.5 -84.5 -83.5 -82.5 ... * lon (lon) float32 -179.5 -178.5 -177.5 -176.5 -175.5 -174.5 -173.5 ... Attributes: long_name: Top of The Atmosphere Shortwave Flux, Monthly Means, All-... standard_name: TOA Shortwave Flux - All-Sky CF_name: toa_outgoing_shortwave_flux IPCC_name: none units: W m-2 valid_min: 0.00000 valid_max: 600.000> ```

which, I had to agree, is hard to identify as being a function. It's a detail, but is it necessary to print the entire repr of the array/dataset in the function repr?

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

Links from other tables

  • 0 rows from issues_id in issues_labels
  • 5 rows from issue in issue_comments
Powered by Datasette · Queries took 0.597ms · About: xarray-datasette