Skip to content

group aggregates using std over integer arrays break #193

@gdementen

Description

@gdementen
>>> arr = ndrange('year=2014..2016')
>>> arr
year | 2014 | 2015 | 2016
     |    0 |    1 |    2
>>> arr.std([2014, 2015])
TypeError                                 Traceback (most recent call last)
...
TypeError: ufunc 'sqrt' output (typecode 'd') could not be coerced to provided output parameter (typecode 'l') according to the casting rule ''same_kind''

This is most likely because of the test at https://github.com/liam2/larray/blob/master/larray/core.py#L5659:

res_dtype = res.dtype if op not in (np.mean, np.nanmean) else float

which should include np.percentile, np.median, np.var and np.std (and their nan* variant)

Metadata

Metadata

Assignees

Labels

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions