Przykład funkcji Python Numpy Squeeze

# welcome to softhunt.net
# Python program explaining
# numpy.squeeze function

import numpy as np

in_arr = np.array([[[1, 2, 3], [4, 5, 6]]])

print ("Input array : \n", in_arr)
print("Shape of input array : ", in_arr.shape)

out_arr = np.squeeze(in_arr)

print ("output squeezed array : \n", out_arr)
print("Shape of output array : ", out_arr.shape)
Outrageous Ostrich