+ 1
Playing with NumPy
https://code.sololearn.com/cfEGBBQKlJb4/?ref=app What is a[None]? Why it is [[1 2 3 4 5]]? Code: import numpy as np a = np.array(range(6)) print(a) print(a[None]) Output: [1 2 3 4 5] [[1 2 3 4 5]]
2 ответов
0
It's so simple! a[None] is a[None, :, :]!
But it seemed really strange and unclear last night, when I was sleeppy ;)