From 2752a4d1712991bd00595078509508b1c5cae1e0 Mon Sep 17 00:00:00 2001 From: Anatoly Rubanov Date: Mon, 25 Mar 2024 19:51:53 +0300 Subject: [PATCH] add _moment function for bacward backward compatibility --- pymc/distributions/distribution.py | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/pymc/distributions/distribution.py b/pymc/distributions/distribution.py index 0d3aee8862..22ed4d3400 100644 --- a/pymc/distributions/distribution.py +++ b/pymc/distributions/distribution.py @@ -535,6 +535,14 @@ def support_point(rv: TensorVariable) -> TensorVariable: return _support_point(rv.owner.op, rv, *rv.owner.inputs).astype(rv.dtype) +def _moment(op, rv, *rv_inputs) -> TensorVariable: + warnings.warn( + "The moment() method is deprecated. Use support_point() instead.", + DeprecationWarning, + ) + return _support_point(op, rv, *rv_inputs) + + def moment(rv: TensorVariable) -> TensorVariable: warnings.warn( "The moment() method is deprecated. Use support_point() instead.",