The functionality to selectively replace ** with power() fails in an edge case when ** is nested within a log function, e.g. log(x ** 2). In replace_power(), the assert that arg is bound by ( and ) fails because the arg is bound by log( and ). This is possibly also true with other similar functions, e.g. exp().
@gseastream
The functionality to selectively replace
**withpower()fails in an edge case when**is nested within alogfunction, e.g.log(x ** 2). Inreplace_power(), theassertthatargis bound by(and)fails because the arg is bound bylog(and). This is possibly also true with other similar functions, e.g.exp().@gseastream