Comece agoraComece grátis

Matrix multiplication part II

Let's put your matrix multiplication skills to the test.

Este exercicio faz parte do curso

Building Recommendation Engines with PySpark

Ver curso

Instruções do exercicio

  • Use the .shape attribute to understand the dimensions of matrices C and D, 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, set C_times_D to None.

exercicio interativo prático

Tente este exercicio 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 = ____
Editar e Executar Código