Posted on:

20 Aug 2024

0

4. squeeze - contradictory explanation

The explanation is contradictory:
4:21 - "however, this output is a 0d array rather than a scalar"
Showing:
matrix_2ds[0:1,0:1].squeeze()
--> array(1)

6:10 - "as we stated earlier, this means that all the outputs of the squeeze method are scalars".
Showing the same thing:
matrix_2ds[0:1,0:1].squeeze().shape
--> ()
So which is it, scalar, 0d array, or both/the same?
0 answers ( 0 marked as helpful)

Submit an answer