Skip to content

Commit b87b18b

Browse files
committed
Remove pm.
1 parent 4e13a6b commit b87b18b

File tree

1 file changed

+8
-8
lines changed

1 file changed

+8
-8
lines changed

pymc/model.py

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -473,39 +473,39 @@ def __init__(self, mean=0, sigma=1, name=''):
473473
474474
# 4) this syntax will also work as we are in the
475475
# context of instance itself, names are given as usual
476-
pm.Normal('v2', mu=mean, sigma=sigma)
476+
Normal('v2', mu=mean, sigma=sigma)
477477
478478
# something more complex is allowed, too
479-
half_cauchy = pm.HalfCauchy('sd', beta=10, initval=1.)
480-
pm.Normal('v3', mu=mean, sigma=half_cauchy)
479+
half_cauchy = HalfCauchy('sd', beta=10, initval=1.)
480+
Normal('v3', mu=mean, sigma=half_cauchy)
481481
482482
# Deterministic variables can be used in usual way
483-
pm.Deterministic('v3_sq', self.v3 ** 2)
483+
Deterministic('v3_sq', self.v3 ** 2)
484484
485485
# Potentials too
486-
pm.Potential('p1', at.constant(1))
486+
Potential('p1', at.constant(1))
487487
488488
# After defining a class CustomModel you can use it in several
489489
# ways
490490
491491
# I:
492492
# state the model within a context
493-
with pm.Model() as model:
493+
with Model() as model:
494494
CustomModel()
495495
# arbitrary actions
496496
497497
# II:
498498
# use new class as entering point in context
499499
with CustomModel() as model:
500-
pm.Normal('new_normal_var', mu=1, sigma=0)
500+
Normal('new_normal_var', mu=1, sigma=0)
501501
502502
# III:
503503
# just get model instance with all that was defined in it
504504
model = CustomModel()
505505
506506
# IV:
507507
# use many custom models within one context
508-
with pm.Model() as model:
508+
with Model() as model:
509509
CustomModel(mean=1, name='first')
510510
CustomModel(mean=2, name='second')
511511

0 commit comments

Comments
 (0)