home / github / issue_comments

Menu
  • GraphQL API
  • Search all tables

issue_comments: 386721846

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/1699#issuecomment-386721846 https://api.github.com/repos/pydata/xarray/issues/1699 386721846 MDEyOklzc3VlQ29tbWVudDM4NjcyMTg0Ng== 6213168 2018-05-04T20:18:48Z 2018-05-04T20:21:10Z MEMBER

The key thing is that for most people it would be extremely elegant and practical to be able to duck-type wrappers around numpy, scipy, and numba kernels that automagically work with Variable, DataArray, and Dataset (see my example above). You'll agree on how ugly my 1-liner above would become: def myfunc(x): if isinstance(x, xarray.Dataset): dtype = x.dtypes else: # DataArray and Variable dtype = x.dtype return apply_ufunc(numpy_kernel, x, dask='parallelized', output_dtypes=[dtype]) If you don't like Dataset.dtype, then maybe we could add both Dataset.dtypes and DataArray.dtypes (which would be just an alias to DataArray.dtype)? I still like the former more though - I find it less confusing.

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