Remove old pythons and leverage @ operator by bnavigator · Pull Request #679 · python-control/python-control

We should finally let go of Python 2. It will allow us to use the matmul operator @ and make code more readable.

As NumPy has deprecated Python 3.6 support a while ago (NEP 29), Conda recently dropped it and it will also reach end-of-life in the mainline Python this month, let's also stop testing Python 3.6.

There is an important difference to consider when replacing np.dot or ndarray.dot with @:

  • Multiplication by scalars is not allowed, use * instead.
  • Stacks of matrices are broadcast together as if the matrices were elements, respecting the signature (n,k),(k,m)->(n,m):