Skip to content

Commit c4da4e3

Browse files
michaelosthegetwiecki
authored andcommitted
Group initial value related properties and methods
1 parent ff45994 commit c4da4e3

File tree

1 file changed

+10
-10
lines changed

1 file changed

+10
-10
lines changed

pymc3/model.py

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -912,6 +912,16 @@ def independent_vars(self):
912912
"""
913913
return inputvars(self.unobserved_RVs)
914914

915+
@property
916+
def disc_vars(self):
917+
"""All the discrete variables in the model"""
918+
return list(typefilter(self.value_vars, discrete_types))
919+
920+
@property
921+
def cont_vars(self):
922+
"""All the continuous variables in the model"""
923+
return list(typefilter(self.value_vars, continuous_types))
924+
915925
@property
916926
def test_point(self) -> Dict[str, np.ndarray]:
917927
"""Deprecated alias for `Model.initial_point`."""
@@ -935,16 +945,6 @@ def initial_values(self) -> Dict[TensorVariable, np.ndarray]:
935945
"""
936946
return self._initial_values
937947

938-
@property
939-
def disc_vars(self):
940-
"""All the discrete variables in the model"""
941-
return list(typefilter(self.value_vars, discrete_types))
942-
943-
@property
944-
def cont_vars(self):
945-
"""All the continuous variables in the model"""
946-
return list(typefilter(self.value_vars, continuous_types))
947-
948948
def set_initval(self, rv_var, initval):
949949
if initval is not None:
950950
initval = rv_var.type.filter(initval)

0 commit comments

Comments
 (0)