home / github / issues

Menu
  • Search all tables
  • GraphQL API

issues: 484097190

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
484097190 MDU6SXNzdWU0ODQwOTcxOTA= 3241 aggregation functions treat duck arrays differently depending on dtype 14808389 closed 0     6 2019-08-22T16:30:56Z 2019-09-02T22:52:47Z 2019-09-02T22:52:47Z MEMBER      

While working on #3238, I tried replacing np.arange with np.linspace to create test arrays: ```python

ureg = pint.UnitRegistry()

with int values

array = np.arange(10).astype(int) * ureg.m np.max(array) <Quantity(9, 'meter')> np.max(xr.DataArray(data=array)) # works as expected <xarray.DataArray ()> <Quantity(9, 'meter')>

now with floats

array = np.arange(10).astype(float) * ureg.m np.max(array) <Quantity(9.0, 'meter')> np.max(xr.DataArray(data=array)) # unit information is lost <xarray.DataArray ()> array(9.) `` Judging by the build logs of #3238, this seems to be the case for all aggregation functions except fromnp.median` and of course those that return booleans or indices.

{
    "url": "https://api.github.com/repos/pydata/xarray/issues/3241/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
  • 6 rows from issue in issue_comments
Powered by Datasette · Queries took 0.611ms · About: xarray-datasette