Matrix multiplication part II
Let's put your matrix multiplication skills to the test.
Este exercício faz parte do curso
Building Recommendation Engines with PySpark
Instruções do exercício
- Use the
.shape
attribute to understand the dimensions of matricesC
andD
, 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_D
toNone
.
Exercício interativo prático
Experimente este exercício completando este código de exemplo.
# Print the dimensions of C
print(____.____)
# Print the dimensions of D
print(____.____)
# Can C and D be multiplied together?
C_times_D = ____