ENH: apply_where: add kwargs support#624
Conversation
97cceae to
1acee7a
Compare
|
I took a second look through this, and I don't see anything I want to change. Turned out quite clean, and it will make some dependent code much nicer. |
lucascolley
left a comment
There was a problem hiding this comment.
all seems fine to me. Want to take a look @crusaderky ?
|
|
||
| temp1 = f1(*(arr[cond] for arr in args)) | ||
| temp1 = f1( | ||
| *(arr[cond] for arr in args), **{key: val[cond] for key, val in kwargs.items()} |
There was a problem hiding this comment.
This could be enhanced to allow for non-array kwargs.
The workaround without it, which requires a bit of expertise to figure out, is to hide the non-array kwargs with functools.partial.
This is a strict enhancement suggestion and not blocking for this PR.
|
Thanks @crusaderky. Implemented all suggestions except non-array |
|
thanks both! |
|
Thanks! @lucascolley do we need to wait for a release to get this in SciPy, or can I just update the commit of the submodule now? |
|
we don't need to wait, feel to to update the submodule in a PR. I do prefer keeping submodules at tagged commits if possible though, let me see whether now would be a decent time for a release. |
|
Thanks. I'll prepare the PR, but merge can wait until there's a tag. |
Closes gh-612