question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Add missing parameters to the `nan<x>` functions

See original GitHub issue

Rel. #6198.

NumPy 1.22 added missing parameters for some nan<x> functions.

A number of the nan<x> functions previously lacked parameters that were present in their <x>-based counterpart, e.g. the where parameter was present in numpy.mean but absent from numpy.nanmean.

https://numpy.org/devdocs/release/1.22.0-notes.html#missing-parameters-have-been-added-to-the-nan-x-functions

  • nanmin: initial & where
  • nanmax: initial & where
  • nanargmin: keepdims & out
  • nanargmax: keepdims & out
  • nansum: initial & where
  • nanprod: initial & where
  • nanmean: where
  • nanvar: where
  • nanstd: where

Issue Analytics

  • State:open
  • Created 2 years ago
  • Reactions:4
  • Comments:10 (7 by maintainers)

github_iconTop GitHub Comments

1reaction
takagicommented, Aug 8, 2022

how would you pass the identity variable to the create_reduction_func

We have two options:

  • Change the reduction kernel to take identity at runtime
  • Create another reduction kernel instance when it takes initial other than the default

I think the latter is acceptable.

Also, keepdims is already a supported argument, just undocumented.

👍

As for where, is it just a simple change of using cupy.where as I believe create_reduction_func does not support where argument just yet?

It currently doesn’t support it. We may use cupy.where together, but it needs extra memory to have the result of where. cupy.ufunc internally supports _where keyword parameter, and its code may help you.

https://github.com/cupy/cupy/blob/9395dbe22ddb591df6e3d044c8b6877fcbbf7b99/cupy/_core/_kernel.pyx#L973-L978

1reaction
takagicommented, Jun 3, 2022

Please go ahead as no progress for months, @praburocking!

Read more comments on GitHub >

github_iconTop Results From Across the Web

22.3.3. Formatted Output to Character Streams
Formatted output is performed not only by the format function itself but by ... 1988 (FORMAT-COMMA-INTERVAL) to add a fourth parameter, the commainterval....
Read more >
How can I find the missing parameters in a C# function call?
When a named parameter in a C# function is missing, the compiler only prints the number of arguments that are missing instead of...
Read more >
223-2007: The Basics of the PRX Functions - SAS Support
There are optional parameters you can use in the CALL PRXCHANGE function. However, since the parameters are not named, you have to add...
Read more >
A HUGE PSYCH ENGINE TUTORIAL (PART 1) - YouTube
https://github.com/ShadowMario/FNF-PsychEngine/wikiPART 2- coming soon0:00- Introduction7:16- Custom Week24:20- Custom Character48:28- ...
Read more >
Problems with adding NOT NULL columns or making nullable ...
This can happen when you try to add a new column that can't accept NULL values, or to change an existing, nullable column...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found