2929# We might as well use this implementation rather than xp.broadcast_shapes()
3030from .test_broadcasting import broadcast_shapes
3131
32+
33+ # When appropiate, this module tests operators alongside their respective
34+ # elementwise methods. We do this by parametrizing a generalised test method
35+ # with every relevant method and operator.
36+ #
37+ # Notable arguments in the parameter:
38+ # - The function object, which for operator test cases is a wrapper that allows
39+ # test logic to be generalised.
40+ # - The argument strategies, which can be used to draw arguments for the test
41+ # case. They may require additional filtering for certain test cases.
42+ # - right_is_scalar (binary parameters), which denotes if the right argument is
43+ # a scalar in a test case. This can be used to appropiately adjust draw
44+ # filtering and test logic.
45+
46+
3247func_to_op = {v : k for k , v in dh .op_to_func .items ()}
48+ all_op_to_symbol = {** dh .binary_op_to_symbol , ** dh .inplace_op_to_symbol }
49+ finite_kw = {"allow_nan" : False , "allow_infinity" : False }
3350
3451unary_argnames = ("func_name" , "func" , "strat" )
3552UnaryParam = Param [str , Callable [[Array ], Array ], st .SearchStrategy [Array ]]
@@ -48,9 +65,6 @@ def make_unary_params(
4865 ]
4966
5067
51- all_op_to_symbol = {** dh .binary_op_to_symbol , ** dh .inplace_op_to_symbol }
52- finite_kw = {"allow_nan" : False , "allow_infinity" : False }
53-
5468binary_argnames = (
5569 "func_name" ,
5670 "func" ,
0 commit comments