Skip to content

Commit

Permalink
Fixed call to warning.warn to warnings.warn.
Browse files Browse the repository at this point in the history
  • Loading branch information
blakeaw committed Mar 15, 2020
1 parent 6606436 commit 8184ece
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions gleipnir/pysb_utilities/nestedsample_it.py
Original file line number Diff line number Diff line change
Expand Up @@ -154,12 +154,12 @@ def add_all_kinetic_params(self, pysb_model):
try:
self.__call__(rule.rate_forward)
except:
warning.warn('Ignoring kinetic rate defined as a PySB Expression.')
warnings.warn('Ignoring kinetic rate defined as a PySB Expression.')
if rule.rate_reverse:
try:
self.__call__(rule.rate_reverse)
except:
warning.warn('Ignoring kinetic rate defined as a PySB Expression.')
warnings.warn('Ignoring kinetic rate defined as a PySB Expression.')
return

def add_all_nonkinetic_params(self, pysb_model):
Expand Down Expand Up @@ -500,15 +500,15 @@ def __call__(self, ns_version='built-in',
#print(param)
parameters.append([param,'f'])
except:
warning.warn('Ignoring kinetic rate defined as a PySB Expression.')
warnings.warn('Ignoring kinetic rate defined as a PySB Expression.')
if rule.rate_reverse:
try:
pvalue = rule.rate_reverse.value
param = rule.rate_reverse
#print(param)
parameters.append([param, 'r'])
except:
warning.warn('Ignoring kinetic rate defined as a PySB Expression.')
warnings.warn('Ignoring kinetic rate defined as a PySB Expression.')
#print(no_sample)
parameters = prune_no_samples(parameters, no_sample)
parameters = update_with_Keq_samples(parameters, Keq_sample)
Expand Down

0 comments on commit 8184ece

Please sign in to comment.