Question: a) Consider the numpy arrays a and b defined in the code below. a=nparray([4,2,7,5]),reshape(2,2)b=nparray([num2fornumina]).reshape(2,2) Match each line of code to its output below. ## (a)

a) Consider the numpy arrays a and b defined in the code below. a=nparray([4,2,7,5]),reshape(2,2)b=nparray([num2fornumina]).reshape(2,2) Match each line of code to its output below. \#\# (a) print (np.concatenate ( (a, b ) ) , " ") \#\# (b) print (np.concatenate ( (a,b), axis=0)," ") \#\# (c) print (np.concatenate( (a,b), axis=1)," ") \#\# (d) print (np. concatenate ( (b, a ) ), " ") \#\# (e) print (np.concatenate ( (b,a), axis=0), " ") \#\# (f) print (np.concatenate ( (b,a), axis=1), " ") (1) [42] [75] [164] [4925] (2) [16442][492575] (3) (4) [ [ 1616 [4925] [42] [75]
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
