- 1

Swap row and column and return output create copy of array

def function19(): #Create variable "X" from 1,25 (both are included) range values #Convert "X" variable dimension into 5 rows and 5 columns #Create one more variable "W" copy of "X" #Swap "W" row and column axis (like transpose) # then create variable "b" with value equal to 5 # Now return output as "(X*W)+b X = #Write your code here W = # Write your code here b = # Write your code here output = # Write your code here return output #expected output """ array([[ 6, 17, 38, 69, 110], [ 17, 54, 101, 158, 225], [ 38, 101, 174, 257, 350], [ 69, 158, 257, 366, 485], [110, 225, 350, 485, 630]]) """

28th Dec 2020, 4:00 PM
SAADAT ALI
4 Respostas
+ 2
Post your attempt first
28th Dec 2020, 4:08 PM
Alphin K Sajan
Alphin K Sajan - avatar
+ 2
SAADAT ALI You need to Post your attempt first to get help from the community .I was talking about Sololearns rules . Don't worry , Simply post your try even if its wrong /have errors .Then only we r supposed to help :)
28th Dec 2020, 4:16 PM
Alphin K Sajan
Alphin K Sajan - avatar
0
I did not get you i tried it but new to numpy
28th Dec 2020, 4:13 PM
SAADAT ALI
0
Thanx i have did it in jupyter notebook i will update it
28th Dec 2020, 4:21 PM
SAADAT ALI