0

I'm just getting started with numpy and came across this 'dilemma'.

Suppose I have two matrices m1 and m2. There is numpy.dot(a, b, out=None) function, so I can call numpy.dot(m1, m2). But then there's also ndarray.dot(b, out=None), i.e. I can call m1.dot(m2). So which one should I use? Are there any differences between both methods? Pros/cons?

user3132457
  • 789
  • 2
  • 11
  • 29
  • 1
    This is the same. In fact, if you look at how `ndarray` works, it will fallback on the `numpy.dot`. – Willem Van Onsem Feb 23 '20 at 10:46
  • 2
    https://stackoverflow.com/questions/42517281/difference-between-numpy-dot-and-a-dotb – s.ouchene Feb 23 '20 at 10:52
  • 4
    Does this answer your question? [What is difference between the function numpy.dot(), @, and method .dot() for matrix-matrix multiplication?](https://stackoverflow.com/questions/59416178/what-is-difference-between-the-function-numpy-dot-and-method-dot-for-ma) – F.NiX Feb 23 '20 at 10:53

0 Answers0