This could be avoided by saying numpy.testing.assert_array_equal(result, 1)