Skip to content

ValueError in descriptive.py/moment #80

@mk-mccann

Description

@mk-mccann

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions