Re: Looking for better explanations of zero-dimensional and empty arrays. Marc Nieper-Wißkirchen (16 Jun 2022 11:02 UTC)
Re: Looking for better explanations of zero-dimensional and empty arrays. Bradley Lucier (16 Jun 2022 16:46 UTC)

Re: Looking for better explanations of zero-dimensional and empty arrays. Bradley Lucier 16 Jun 2022 16:46 UTC

On 6/16/22 12:26 PM, Jens Axel Søgaard wrote:
> Conceptually a zero-dimensional array is a scalar.
> In Numpy this works as expected:
>
>>>> A=numpy.array(2)
>
>>>> B=numpy.array([[1,2],[3,4]])
>
>>>> A*B
>
> array([[2, 4],
>
> [6, 8]])
>
>
> Even this works:
>
>>>> 3*A
>
> 6
>
>
> /Jens Axel

Thanks.  I think punning scalars and zero-dimensional arrays is a
separate issue that I'd prefer not to get into in this SRFI.

Brad