These are chat archives for numpy/numpy

12th
Oct 2017
Tasos Varoudis
@varoudis
Oct 12 2017 12:48
probably a stupid question... how do I reshape a (30000, 64, 64) to a (30000, 1, 64, 64)?? Cant say Im an numpy master
Denis Lisov
@tanriol
Oct 12 2017 12:49
arr[:, np.newaxis, :, :]
Tasos Varoudis
@varoudis
Oct 12 2017 12:51
thanks a lot @tanriol
Nick R. Papior
@zerothi
Oct 12 2017 14:18
@two_jays_twitter see about the function wherewhich does what you want
Nathan Goldbaum
@ngoldbaum
Oct 12 2017 18:12
fun fact: np.newaxis is just an alias to None
Denis Lisov
@tanriol
Oct 12 2017 20:35
@ngoldbaum ...but np.newaxis is better at self-documenting :-)