Got rid .dot in bfgs.py