Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit dfad800

Browse filesBrowse files
committed
fix for parser and new version of matplotlib
1 parent 1df7282 commit dfad800
Copy full SHA for dfad800

File tree

3 files changed

+8
-8
lines changed
Filter options

3 files changed

+8
-8
lines changed

‎bayesloop/core.py

Copy file name to clipboardExpand all lines: bayesloop/core.py
+4-5Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,7 @@
1212
import matplotlib.pyplot as plt
1313
from mpl_toolkits.mplot3d import Axes3D
1414
from scipy.optimize import minimize
15-
from scipy.special import factorial
16-
from scipy.special import logsumexp
15+
from scipy.special import factorial, logsumexp
1716
from scipy.special import beta as beta_func
1817
import sympy.abc as abc
1918
from sympy import Symbol
@@ -996,7 +995,7 @@ def getParameterDistributions(self, name, plot=False, density=True, **kwargs):
996995
cmap = createColormap('b')
997996

998997
plt.imshow(marginalPosteriorSequence.T,
999-
origin=0,
998+
origin='lower',
1000999
cmap=cmap,
10011000
extent=[self.formattedTimestamps[0], self.formattedTimestamps[-1]] + self.boundaries[paramIndex],
10021001
aspect='auto')
@@ -1054,7 +1053,7 @@ def plotParameterEvolution(self, name, color='b', gamma=0.5, **kwargs):
10541053
marginalPosteriorSequence[marginalPosteriorSequence < pmax*(10**-20)] = 0
10551054

10561055
plt.imshow(marginalPosteriorSequence.T**gamma,
1057-
origin=0,
1056+
origin='lower',
10581057
cmap=createColormap(color),
10591058
extent=[self.formattedTimestamps[0], self.formattedTimestamps[-1]] + self.boundaries[paramIndex],
10601059
aspect='auto')
@@ -2888,7 +2887,7 @@ def plotHyperParameterEvolution(self, name, color='b', gamma=0.5, **kwargs):
28882887
marginalDistribution[marginalDistribution < pmax * (10 ** -20)] = 0
28892888

28902889
plt.imshow(marginalDistribution.T ** gamma,
2891-
origin=0,
2890+
origin='lower',
28922891
cmap=createColormap(color),
28932892
extent=[self.formattedTimestamps[0], self.formattedTimestamps[-1]] +
28942893
[uniqueValues[0], uniqueValues[-1]],

‎bayesloop/observationModels.py

Copy file name to clipboardExpand all lines: bayesloop/observationModels.py
+1-2Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,7 @@
1212
from sympy import lambdify
1313
from sympy.stats import density
1414
from .jeffreys import getJeffreysPrior
15-
from scipy.special import factorial
16-
from scipy.special import iv
15+
from scipy.special import iv, factorial
1716
from .exceptions import ConfigurationError, PostProcessingError
1817
from .helper import cint, oint, freeSymbols
1918
from inspect import getargspec

‎bayesloop/parser.py

Copy file name to clipboardExpand all lines: bayesloop/parser.py
+3-1Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -376,7 +376,9 @@ def __call__(self, query, t=None, silent=False):
376376
if len(splitQuery) == 1:
377377
reducedQuery = query
378378
elif len(splitQuery) == 2:
379-
reducedQuery = '-'.join(splitQuery)
379+
# last arithmetic may be omitted in some cases if right side is appended to the left, needs to come first
380+
#reducedQuery = '-'.join(splitQuery)
381+
reducedQuery = '-1*('+splitQuery[1]+')+'+splitQuery[0]
380382
else:
381383
raise ConfigurationError('Use exactly one operator out of (<, >, <=, >=, ==) to obtain probability value, '
382384
'or none to obtain derived distribution.')

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.