[Numpy-discussion] ENH: Add more default arguments to various functions

2024-06-04 Thread Carlos Martin
Suggestion: Add the following default arguments to the following functions: - https://numpy.org/doc/stable/reference/generated/numpy.zeros.html: shape=() - https://numpy.org/doc/stable/reference/generated/numpy.ones.html: shape=() - https://numpy.org/doc/stable/reference/generated/numpy.empty.html

[Numpy-discussion] Re: ENH: Add more default arguments to various functions

2024-06-04 Thread Rakshit Singh
I am unable to wrap my head around it. Why would we make a zero array which is empty. It can be done by a normal np.array On Wed, Jun 5, 2024, 12:31 AM Carlos Martin wrote: > Suggestion: Add the following default arguments to the following functions: > > - https://numpy.org/doc/stable/reference

[Numpy-discussion] Re: ENH: Add more default arguments to various functions

2024-06-04 Thread Robert Kern
On Tue, Jun 4, 2024 at 3:12 PM Rakshit Singh wrote: > I am unable to wrap my head around it. > > Why would we make a zero array which is empty. It can be done by a normal > np.array > `shape=()` would not be empty, but a scalar. `np.zeros(())` is the same as `np.array(0.0)`, so it is meaningful,