Low accuracy with logistic regression, desired error not necessarily achieved due to precision loss

been trying to implement coursera's machine learning course in python. I am stuck on recognizing handwritten digits/exercise 3, my accuracy is 84% instead of 94% and I am getting a warnings aswell. Ive been checking the gradient and compute_cost for days but I just cant anymore, I would really, really appreciate any insights.

Here is the link for the code.