Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PYTHON

Python NumPy squeeze function Example with axis=1

# welcome to softhunt.net
# Python program explaining
# numpy.squeeze function
import numpy as geek
in_arr = geek.arange(9).reshape(1, 3, 3)

print ("Input array : 
", in_arr)
out_arr = geek.squeeze(in_arr, axis = 1)

print ("output array : 
", out_arr)
print("The shapes of Input and Output array : ",in_arr.shape, out_arr.shape)
Source by softhunt.net #
 
PREVIOUS NEXT
Tagged: #Python #NumPy #squeeze #function #Example
ADD COMMENT
Topic
Name
7+3 =