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
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
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,