Matrix multiplication भाग II
आइए आपकी matrix multiplication स्किल्स को परखते हैं.
यह अभ्यास पाठ्यक्रम का हिस्सा है
PySpark के साथ Recommendation Engines बनाना
अभ्यास निर्देश
.shapeattribute का उपयोग करके matricesCऔरDकी dimensions समझिए, और तय कीजिए कि क्या ये दोनों matrices एक-दूसरे से multiply हो सकती हैं या नहीं.- अगर वे multiply हो सकती हैं, तो
np.matmul()method का उपयोग करके उन्हें multiply कीजिए। अगर नहीं, तोC_times_DकोNoneपर सेट कीजिए.
इंटरैक्टिव व्यावहारिक अभ्यास
इस अभ्यास को इस नमूना कोड को पूरा करके आज़माएँ।
# Print the dimensions of C
print(____.____)
# Print the dimensions of D
print(____.____)
# Can C and D be multiplied together?
C_times_D = ____