Skip to content

Commit cdfa8c0

Browse files
authored
add _moment function for bacward backward compatibility (#7216)
1 parent abe7bc9 commit cdfa8c0

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

pymc/distributions/distribution.py

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -535,6 +535,14 @@ def support_point(rv: TensorVariable) -> TensorVariable:
535535
return _support_point(rv.owner.op, rv, *rv.owner.inputs).astype(rv.dtype)
536536

537537

538+
def _moment(op, rv, *rv_inputs) -> TensorVariable:
539+
warnings.warn(
540+
"The moment() method is deprecated. Use support_point() instead.",
541+
DeprecationWarning,
542+
)
543+
return _support_point(op, rv, *rv_inputs)
544+
545+
538546
def moment(rv: TensorVariable) -> TensorVariable:
539547
warnings.warn(
540548
"The moment() method is deprecated. Use support_point() instead.",

0 commit comments

Comments
 (0)