Skip to content

Commit 31c30dc

Browse files
Adding function for mutable coords (#6515)
* adding function for mutable coords * Added coords_mutable * add coords_mutable * Make `coords_mutable` an explicit kwarg * Remove reference to undefined variable * Adding an if block --------- Co-authored-by: Michael Osthege <[email protected]>
1 parent c2ce47f commit 31c30dc

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

pymc/model.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -550,6 +550,7 @@ def __init__(
550550
coords=None,
551551
check_bounds=True,
552552
*,
553+
coords_mutable=None,
553554
pytensor_config=None,
554555
model=None,
555556
):
@@ -586,6 +587,9 @@ def __init__(
586587
self._coords = {}
587588
self._dim_lengths = {}
588589
self.add_coords(coords)
590+
if coords_mutable is not None:
591+
for name, values in coords_mutable.items():
592+
self.add_coord(name, values, mutable=True)
589593

590594
from pymc.printing import str_for_model
591595

0 commit comments

Comments
 (0)