home / github / issue_comments

Menu
  • GraphQL API
  • Search all tables

issue_comments: 493839144

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/pull/2956#issuecomment-493839144 https://api.github.com/repos/pydata/xarray/issues/2956 493839144 MDEyOklzc3VlQ29tbWVudDQ5MzgzOTE0NA== 1217238 2019-05-20T04:59:16Z 2019-05-20T04:59:16Z MEMBER

This looks like a good start to me. So we can start making progress on this, I think it would make sense to hide this behavior behind an option, e.g., xarray.set_options(enable_experimental_ndarray_subclass_support=True).

I would consider writing some tests with two of the ndarray subclasses that ship with NumPy: - np.matrix - np.ma.MaskedArray

Both of these subclasses violate some important principles of subclassing, namely they aren't substitutable with objects of their parent class. Thus, I think it would be reasonable to explicitly "blacklist" them for use inside in xarray.DataArray. I think we already explicitly convert MaskedArray objects, but perhaps we should also add a check for np.matrix objects.

In terms of operations, one big class that comes to mind are aggregations, e.g., .mean(). It would be good to make sure that these work.

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