Skip to content Skip to sidebar Skip to footer

Making Bigger Matrices Out Of Smaller Matrices In Python

I have a problem making a bigger matrix out of smaller matrixs. Lets suppose i have the matrices: 1 2 3 A= 4 5 6 7 8 9 and 1 0 0 B= 0 1 0 0 0 1 The

Solution 1:

try using np.hstack:

C = np.hstack((A,B))

or np.concanenate:

C = np.concatenate((A,B),axis=1)

Post a Comment for "Making Bigger Matrices Out Of Smaller Matrices In Python"