Description
Recently we added monotonically_increasing and monotonically_decreasing attributes to UnaryScalarOP and this brought about a discussion around non-unary scalar operations that may be monotonic like Add/Max.
The two options that I can think off are:
1). move the attributes up onto ScalarOP and keep default as FALSE
2). Define special cases of non-unary scalar ops to have the attributes
I think that option one has the advantage that all ScalarOPS would be consistent with these attributes and would avoid a potential attribute error when something like op.scalar_op.monotonic_increasing is called on a Mul op. The disadvantage being how we define and use monotonicity, will it be monotonic in every input while holding the others fixed?
Option two I think would simpler, but would still require a definition of monotonicity for a non-unary operation.
Resolution to this topic would facilitate the completion of pymc-devs/pymc#8259
Description
Recently we added
monotonically_increasingandmonotonically_decreasingattributes toUnaryScalarOPand this brought about a discussion around non-unary scalar operations that may be monotonic likeAdd/Max.The two options that I can think off are:
1). move the attributes up onto ScalarOP and keep default as
FALSE2). Define special cases of non-unary scalar ops to have the attributes
I think that option one has the advantage that all ScalarOPS would be consistent with these attributes and would avoid a potential attribute error when something like
op.scalar_op.monotonic_increasingis called on aMulop. The disadvantage being how we define and use monotonicity, will it be monotonic in every input while holding the others fixed?Option two I think would simpler, but would still require a definition of monotonicity for a non-unary operation.
Resolution to this topic would facilitate the completion of pymc-devs/pymc#8259