diff --git a/lappy/core/array.py b/lappy/core/array.py index 8a20567b41a56134259acfe14ba68a00eee1ac74..3c9e95718130d6d80e13162b3523a731e7e277b7 100644 --- a/lappy/core/array.py +++ b/lappy/core/array.py @@ -644,7 +644,8 @@ class Array(LazyObjectBase): raise ValueError( "cannot understand the return value " "of the precondition checker %s" % str(checker)) - except Exception: # noqa: W0703 + except Exception as e: # noqa: W0703 + print(e) failed_checks.append(checker) err_msgs = [] diff --git a/lappy/core/broadcast.py b/lappy/core/broadcast.py index ae0012ffa073839cef8ff0f6c049c05da242446b..11e5fe48414b1e1e366fad1058e76ab22e805070 100644 --- a/lappy/core/broadcast.py +++ b/lappy/core/broadcast.py @@ -93,7 +93,7 @@ class BroadcastResult(object): else: # same name must have the same runtime values # (may have different expressions) - def check_name_valule_consistency(s, context): + def check_name_valule_consistency(context, s): s_val = evaluate(s.expr, context) another_s_val = evaluate( expr_map[var(s.name)], context) @@ -128,7 +128,7 @@ class BroadcastResult(object): # allow symbol == 1 or symbol == constant at runtime assert isinstance(si, str) - def check_broadcast_symbol_val(iaxis, si, context): + def check_broadcast_symbol_val(context, iaxis, si): si_val = evaluate(var(si), context) return si_val in (bshape_pre[iaxis], 1) @@ -150,7 +150,7 @@ class BroadcastResult(object): # allow symbol == 1 or symbol == constant at runtime assert isinstance(bshape_pre[iaxis], Expression) - def check_broadcast_symbol_val(iaxis, context): + def check_broadcast_symbol_val(context, iaxis): lhs_val = evaluate(bshape_pre[iaxis], context) return lhs_val in (bshape_pre[iaxis], 1) @@ -167,7 +167,7 @@ class BroadcastResult(object): assert isinstance(bshape_pre[iaxis], Expression) assert isinstance(si, str) - def check_broadcast_symbol_val(iaxis, si, context): + def check_broadcast_symbol_val(context, iaxis, si): lhs_val = evaluate(bshape_pre[iaxis], context) si_val = evaluate(var(si), context) return (lhs_val == si_val) or ( diff --git a/lappy/core/ufuncs.py b/lappy/core/ufuncs.py index 7fab3c2bac8a389bdcb31bd51e4285689ae7533b..1c8d3220b898d0ddb6a8c451e3bfee82b665c5c3 100644 --- a/lappy/core/ufuncs.py +++ b/lappy/core/ufuncs.py @@ -298,7 +298,7 @@ class BinaryOperation(UFunc): 'bound_arguments': new_bound_arglist, 'intermediaries': new_interm, 'env': new_env, - 'preconditions': a.preconditions + b.preconditions, + 'preconditions': a.preconditions + b.preconditions + bres.preconditions, 'ndim': bres.ndim, 'shape': bres._shape_exprs, 'dtype': new_dtype, 'is_integral': all([