Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

nonreduce_axis.push to support more dtypes #349

Open
kefirbandi opened this issue Jul 9, 2020 · 1 comment
Open

nonreduce_axis.push to support more dtypes #349

kefirbandi opened this issue Jul 9, 2020 · 1 comment
Milestone

Comments

@kefirbandi
Copy link

I found that the nonreduce_axis.push only support dtypes compatible with np.nan, or for which np.isnan is supported.
I'd be happy to attempt to extend the range to other types and submit a PR.
But before I do that would like to know whether such a PR will be considered and what else do I need to know?

I came accross this behavior from xarray.ffill, where I wanted to forward fill string-array, but it failed.

@qwhelan
Copy link
Collaborator

qwhelan commented Jul 13, 2020

@kefirbandi Absolutely would be considered given it's already in our API and there's no real equivalent in numpy. I'd suggest benchmarking any solution you have against pandas and make sure we're not slower. We'll want hypothesis testing on a variety of object types to make sure behavior is correct.

You'd want to create an object-variant of this function: https://github.com/pydata/bottleneck/blob/master/bottleneck/src/nonreduce_axis_template.c#L344

And then modify this case to get it called: https://github.com/pydata/bottleneck/blob/master/bottleneck/src/nonreduce_axis_template.c#L718

COVID-19 has meant I'm spending significantly more time on work, including on weekends, hence the lack of activity lately.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants