title: I have a trouble when trying to calculate weight sum
body: <p>Here is my code:</p>
  <pre><code>class StudentMarkList(Student,Course):   
      smList = []
      def studentMarkCount(m):
          m.count = int (input (&quot;How many student marks/courses do you want to enter? &quot;))
          return m.count
  
      def getMark(m):
          m.mark = math.floor(float(input(&quot;Enter marks: &quot;)))
          return m.mark
      
      def studentMarkDetail(m):
          for i in range(m.count):
              m.sName = input (&quot;Student name: &quot;)
              m.cID = input (&quot;Course id: &quot;)
              m.getMark()
              m.smList.append((copy.copy(m)))
  
      def markList(m):
          for l in m.smList:
              print(f&quot;Student {l.sName} got {l.mark} points&quot;)
      
      def getGPA(m):
          markMatrix = []
          creditMatrix = []
          for m.student in m.students:
              markMatrix.append((m.smList[m.mark][m.sID]for m.mark in m.smList)) 
              
          for m.course in m.courses: 
              creditMatrix.append(m.smList) 
              
          markMatrix = np.matrix(markMatrix)
          creditMatrix = np.matrix(creditMatrix)  
          weightSum= np.matmul(markMatrix,creditMatrix)
          average = np.true_divide(weightSum,np.sum(creditMatrix))
          average = np.array(average)
          return average 
      
      def display_w_mark(m):
          print(m.studentList()+',Average:'+ m.getGPA())
  </code></pre>
  <p>I create a class name &quot;StudentMarkList&quot; and use multiple inheritance with class &quot;Student&quot; and class &quot;Course&quot; (you can see 2 of them in my previous question).I want to try to calculate the weight sum of credits and marks problem is when i run the code on the terminal,it has a value error:</p>
  <p>ValueError: matmul: Input operand 1 has a mismatch in its core dimension 0, with gufunc signature (n?,k),(k,m?)-&gt;(n?,m?) (size 2 is different from 1)</p>
  <p>I tried several times but still can't fix it. Hope everyone can help me</p>