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
When running the moment function, I get a ValueError: Function moment does not have variable ci. Giving a confidence interval doesn't change the output.
The issue seems to be related to the bootstrapping wrapper; full error is below:
~\AppData\Local\Temp/ipykernel_26892/2463399625.py in <module>
1 data = 2*np.pi*np.random.rand(10)
----> 2 mp = circ.moment(data)
~\Miniconda3\envs\prey_capture\lib\site-packages\decorator.py in fun(*args, **kw)
230 if not kwsyntax:
231 args, kw = fix(args, kw, sig)
--> 232 return caller(func, *(extras + args), **kw)
233 fun.__name__ = func.__name__
234 fun.__doc__ = func.__doc__
~\Miniconda3\envs\prey_capture\lib\site-packages\pycircstat-0.0.2-py3.8.egg\pycircstat\descriptive.py in wrapper(f, *args, **kwargs)
64 def wrapper(f, *args, **kwargs):
65 args = list(args)
---> 66 ci = self._get_var(f, 'ci', None, args, kwargs, remove=True)
67 bootstrap_iter = self._get_var(f, 'bootstrap_iter', None,
68 args, kwargs, remove=True)
~\Miniconda3\envs\prey_capture\lib\site-packages\pycircstat-0.0.2-py3.8.egg\pycircstat\descriptive.py in _get_var(self, f, what, default, args, kwargs, remove)
40 what_idx = varnames.index(what)
41 else:
---> 42 raise ValueError('Function %s does not have variable %s.' %
43 (f.__name__, what))
44
ValueError: Function moment does not have variable ci.
The text was updated successfully, but these errors were encountered:
After a bit of digging, this seems to be related to getting function argument names in Python 3 (in the bootstrap class - descriptive.py, line 18). The method func.__code__.co_varnames is depreciated in Python 3.
I found a solution here using the inspect library: inspect.getfullargspec(func).args yields a list of input arguments.
When running the moment function, I get a
ValueError: Function moment does not have variable ci.
Giving a confidence interval doesn't change the output.The issue seems to be related to the bootstrapping wrapper; full error is below:
The text was updated successfully, but these errors were encountered: