fork download
  1. import numpy as np
  2.  
  3. a = np.ones([5,5,5,5,5,5,54,4,4])
  4. c = np.ones([4])
  5. print(np.dot(a,c).shape)
  6. print(np.dot(c,a).shape)
  7.  
  8. a = np.ones([1,1,1,1,1,2,3,4])
  9. c = np.ones([9, 5, 4, 3])
  10. print(np.dot(a, c).shape)
Success #stdin #stdout 0.38s 154660KB
stdin
Standard input is empty
stdout
(5, 5, 5, 5, 5, 5, 54, 4)
(5, 5, 5, 5, 5, 5, 54, 4)
(1, 1, 1, 1, 1, 2, 3, 9, 5, 3)