You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi, I have the following error: ValueError: operands could not be broadcast together with shapes (388,100,400) (0,)
Here's the traceback
``ValueError Traceback (most recent call last)
Cell In[18], line 15
13 # parameter plot
14 plt.subplot(212)
---> 15 S.plot('sigma', color='r')
17 plt.xticks([28, 88, 148, 208, 268, 328, 388],
18 ['10am', '11am', '12pm', '1pm', '2pm', '3pm', '4pm'])
19 plt.xlabel('Nov 28, 2016')
File ~\PycharmProjects\StocklMarketFluctuations\venv\lib\site-packages\bayesloop\core.py:2946, in OnlineStudy.plot(self, name, **kwargs)
2944 color = kwargs.pop('color', 'b')
2945 gamma = kwargs.pop('gamma', 0.5)
-> 2946 self.plotParameterEvolution(name, color=color, gamma=gamma, **kwargs)
2948 # parameter distribution plot
2949 elif t is not None and self.storeHistory:
File ~\PycharmProjects\StocklMarketFluctuations\venv\lib\site-packages\bayesloop\core.py:2375, in OnlineStudy.plotParameterEvolution(self, name, color, gamma, **kwargs)
2372 self.posteriorMeanValues = np.array(self.posteriorMeanValues).T
2373 self.posteriorSequence = np.array(self.posteriorSequence)
-> 2375 Study.plotParameterEvolution(self, name, color=color, gamma=gamma, **kwargs)
2377 # re-transform arrays to lists, so online study may continue to append values
2378 self.formattedTimestamps = list(self.formattedTimestamps)
File ~\PycharmProjects\StocklMarketFluctuations\venv\lib\site-packages\bayesloop\core.py:1015, in Study.plotParameterEvolution(self, name, color, gamma, **kwargs)
1003 def plotParameterEvolution(self, name, color='b', gamma=0.5, **kwargs):
1004 """
1005 Extended plot method to display a series of marginal posterior distributions corresponding to a single model
1006 parameter. In contrast to getMarginalParameterDistributions(), this method includes the removal of plotting
(...)
1013 kwargs: all further keyword-arguments are passed to the plot of the posterior mean values
1014 """
-> 1015 if self.posteriorSequence == []:
1016 raise PostProcessingError('Cannot plot posterior sequence as it has not yet been computed. '
1017 'Run complete fit.')
1019 dt = self.formattedTimestamps[1:] - self.formattedTimestamps[:-1]
ValueError: operands could not be broadcast together with shapes (388,100,400) (0,)``
The text was updated successfully, but these errors were encountered:
ricnov
changed the title
Error for example stockmarketfluctuations
Error for example stockmarketfluctuations.ipynb
Sep 2, 2024
Hi, I have the following error: ValueError: operands could not be broadcast together with shapes (388,100,400) (0,)
Here's the traceback
``ValueError Traceback (most recent call last)
Cell In[18], line 15
13 # parameter plot
14 plt.subplot(212)
---> 15 S.plot('sigma', color='r')
17 plt.xticks([28, 88, 148, 208, 268, 328, 388],
18 ['10am', '11am', '12pm', '1pm', '2pm', '3pm', '4pm'])
19 plt.xlabel('Nov 28, 2016')
File ~\PycharmProjects\StocklMarketFluctuations\venv\lib\site-packages\bayesloop\core.py:2946, in OnlineStudy.plot(self, name, **kwargs)
2944 color = kwargs.pop('color', 'b')
2945 gamma = kwargs.pop('gamma', 0.5)
-> 2946 self.plotParameterEvolution(name, color=color, gamma=gamma, **kwargs)
2948 # parameter distribution plot
2949 elif t is not None and self.storeHistory:
File ~\PycharmProjects\StocklMarketFluctuations\venv\lib\site-packages\bayesloop\core.py:2375, in OnlineStudy.plotParameterEvolution(self, name, color, gamma, **kwargs)
2372 self.posteriorMeanValues = np.array(self.posteriorMeanValues).T
2373 self.posteriorSequence = np.array(self.posteriorSequence)
-> 2375 Study.plotParameterEvolution(self, name, color=color, gamma=gamma, **kwargs)
2377 # re-transform arrays to lists, so online study may continue to append values
2378 self.formattedTimestamps = list(self.formattedTimestamps)
File ~\PycharmProjects\StocklMarketFluctuations\venv\lib\site-packages\bayesloop\core.py:1015, in Study.plotParameterEvolution(self, name, color, gamma, **kwargs)
1003 def plotParameterEvolution(self, name, color='b', gamma=0.5, **kwargs):
1004 """
1005 Extended plot method to display a series of marginal posterior distributions corresponding to a single model
1006 parameter. In contrast to getMarginalParameterDistributions(), this method includes the removal of plotting
(...)
1013 kwargs: all further keyword-arguments are passed to the plot of the posterior mean values
1014 """
-> 1015 if self.posteriorSequence == []:
1016 raise PostProcessingError('Cannot plot posterior sequence as it has not yet been computed. '
1017 'Run complete fit.')
1019 dt = self.formattedTimestamps[1:] - self.formattedTimestamps[:-1]
ValueError: operands could not be broadcast together with shapes (388,100,400) (0,)``
The text was updated successfully, but these errors were encountered: