You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Move the _is_provably_positive helpers out of tensor/subtensor.py #2404
_is_provably_positive and _is_provably_non_negative are general graph predicates that just happen to live in pytensor/tensor/subtensor.py. The module does use them itself for slice canonicalization, but five others import them from there — rewriting/subtensor.py, rewriting/math.py, rewriting/linalg/summary.py, assumptions/elemwise.py, and assumptions/positive_definite.py — so math rewrites and the assumptions system both pull in the indexing module just to ask whether a variable is non-negative.
No obvious destination. assumptions/ already holds two of the callers, but importing it from pytensor/tensor inverts the current direction.
Activity
Move _is_provably_positive and _is_provably_non_negative to tensor.pr…
Move _is_provably_positive and _is_provably_non_negative to tensor.pr…