numpy.testing.all_close or something similar may be better