def _scalar_tester(norm_instance, vals):
 scalar_result = [norm_instance(float(v)) for v in vals]
 assert_array_almost_equal(scalar_result, norm_instance(vals))

def _scalar_tester ( norm_instance , vals ) : scalar_result = [ norm_instance ( float ( v ) ) for v in vals ] assert_array_almost_equal ( scalar_result , norm_instance ( vals ) )
checks if scalars and arrays are handled the same way .