Skip to content

Commit 9613299

Browse files
committed
wrap results into a named tuple
1 parent 188076b commit 9613299

File tree

1 file changed

+6
-2
lines changed
  • pymc_experimental/distributions/multivariate

1 file changed

+6
-2
lines changed

pymc_experimental/distributions/multivariate/r2d2m2cp.py

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@
1313
# limitations under the License.
1414

1515

16+
from collections import namedtuple
1617
from typing import Sequence, Tuple, Union
1718

1819
import numpy as np
@@ -222,6 +223,9 @@ def _phi(
222223
return phi
223224

224225

226+
R2D2M2CPOut = namedtuple("R2D2M2CPOut", ["eps", "beta"])
227+
228+
225229
def R2D2M2CP(
226230
name: str,
227231
output_sigma: pt.TensorLike,
@@ -236,7 +240,7 @@ def R2D2M2CP(
236240
positive_probs: Union[pt.TensorLike, None] = 0.5,
237241
positive_probs_std: Union[pt.TensorLike, None] = None,
238242
centered: bool = False,
239-
) -> tuple[pt.TensorVariable, pt.TensorVariable]:
243+
) -> R2D2M2CPOut:
240244
"""R2D2M2CP Prior.
241245
242246
Parameters
@@ -441,4 +445,4 @@ def R2D2M2CP(
441445
psi_mask=mask,
442446
)
443447
resid_sigma = (1 - r2) ** 0.5 * output_sigma
444-
return resid_sigma, beta
448+
return R2D2M2CPOut(resid_sigma, beta)

0 commit comments

Comments
 (0)