[Numpy-discussion] (no subject)

Hänel Nikolaus Valentin valentin.haenel@epfl...
Fri Jan 20 04:25:36 CST 2012


Hi,

I would like to make a sanity test to check that calling the same
function with different parameters actually gives different results.

I am currently using::

    try:
        npt.assert_almost_equal(numpy_result, result)
    except AssertionError:
        assert True
    else:
        assert False

But maybe you have a better way? I couldn't find a 'assert_not_equal'
and the above just feels stupid.

thanks for your advice.

V-

-- 
Valentin Hänel
Scientific Software Developer
Blue Brain Project http://bluebrain.epfl.ch/


More information about the NumPy-Discussion mailing list