I tried to access draw or show methods just like from the tutorial, but I get an error.
Here is minimal reproducible example:
from probfit import gaussian, UnbinnedLH
from iminuit import Minuit
unbinned_likelihood = UnbinnedLH(gaussian, xdata.values)
minuit = Minuit(unbinned_likelihood, mean=0, sigma=5)
unbinned_likelihood.draw(minuit)
And this is the errror I am getting:
AttributeError Traceback (most recent call last)
/var/folders/gj/xpkrsnhd2zl8gs7vsxy72bs40000gn/T/ipykernel_41791/1198878356.py in
1 minuit = Minuit(unbinned_likelihood, mean=0, sigma=5)
----> 2 unbinned_likelihood.draw(minuit)
probfit/costfunc.pyx in probfit.costfunc.UnbinnedLH.draw()
/opt/miniconda3/envs/astrometry/lib/python3.9/site-packages/probfit/plotting.py in draw_ulh(self, minuit, bins, ax, bound, parmloc, nfbins, print_par, grid, args, errors, parts, show_errbars, no_plot)
94 ax = plt.gca() if ax is None and not no_plot else ax
95
---> 96 arg, error = get_args_and_errors(self, minuit, args, errors)
97
98 n, e = np.histogram(self.data, bins=bins, range=bound, weights=self.weights)
/opt/miniconda3/envs/astrometry/lib/python3.9/site-packages/probfit/plotting.py in get_args_and_errors(self, minuit, args, errors)
40 ret_error = None
41 if minuit is not None: # case 1
---> 42 ret_arg = minuit.args
_ 43 ret_error = minuit.errors
44 return ret_arg, ret_error
AttributeError: 'Minuit' object has no attribute 'args'
I tried to access draw or show methods just like from the tutorial, but I get an error.
Here is minimal reproducible example:
from probfit import gaussian, UnbinnedLHfrom iminuit import Minuitunbinned_likelihood = UnbinnedLH(gaussian, xdata.values)minuit = Minuit(unbinned_likelihood, mean=0, sigma=5)unbinned_likelihood.draw(minuit)And this is the errror I am getting:
AttributeError Traceback (most recent call last)
/var/folders/gj/xpkrsnhd2zl8gs7vsxy72bs40000gn/T/ipykernel_41791/1198878356.py in
1 minuit = Minuit(unbinned_likelihood, mean=0, sigma=5)
----> 2 unbinned_likelihood.draw(minuit)
probfit/costfunc.pyx in probfit.costfunc.UnbinnedLH.draw()
/opt/miniconda3/envs/astrometry/lib/python3.9/site-packages/probfit/plotting.py in draw_ulh(self, minuit, bins, ax, bound, parmloc, nfbins, print_par, grid, args, errors, parts, show_errbars, no_plot)
94 ax = plt.gca() if ax is None and not no_plot else ax
95
---> 96 arg, error = get_args_and_errors(self, minuit, args, errors)
97
98 n, e = np.histogram(self.data, bins=bins, range=bound, weights=self.weights)
/opt/miniconda3/envs/astrometry/lib/python3.9/site-packages/probfit/plotting.py in get_args_and_errors(self, minuit, args, errors)
40 ret_error = None
41 if minuit is not None: # case 1
---> 42 ret_arg = minuit.args
_ 43 ret_error = minuit.errors
44 return ret_arg, ret_error
AttributeError: 'Minuit' object has no attribute 'args'