Matrix multiplication part II
Let's put your matrix multiplication skills to the test.
Questo esercizio fa parte del corso
Building Recommendation Engines with PySpark
Istruzioni dell'esercizio
- Use the
.shapeattribute to understand the dimensions of matricesCandD, and determine whether these two matrices can be multiplied together or not. - If they can be multiplied, use the
np.matmul()method to multiply them. If not, setC_times_DtoNone.
Esercizio pratico interattivo
Prova a risolvere questo esercizio completando il codice di esempio.
# Print the dimensions of C
print(____.____)
# Print the dimensions of D
print(____.____)
# Can C and D be multiplied together?
C_times_D = ____