Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 6 additions & 1 deletion pycircstat/decorators.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
from __future__ import absolute_import

from functools import wraps
from inspect import getfullargspec
import sys
import numpy as np
from . import CI
from decorator import decorator
Expand Down Expand Up @@ -36,7 +38,10 @@ def wrapper(f, *args, **kwargs):


def get_var(f, varnames, args, kwargs):
fvarnames = f.__code__.co_varnames
if sys.version_info[0] > 2:
fvarnames = getfullargspec(f).args
else:
fvarnames = f.__code__.co_varnames

var_idx = []
kwar_keys = []
Expand Down
7 changes: 6 additions & 1 deletion pycircstat/descriptive.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,9 @@

from functools import wraps
import itertools
import sys
from decorator import decorator
from inspect import getfullargspec

import numpy as np
from scipy import stats
Expand Down Expand Up @@ -34,7 +36,10 @@ def __init__(self, no_bootstrap, scale='linear'):
self.scale = scale

def _get_var(self, f, what, default, args, kwargs, remove=False):
varnames = f.__code__.co_varnames
if sys.version_info[0] > 2:
varnames = getfullargspec(f).args
else:
varnames = f.__code__.co_varnames

if what in varnames:
what_idx = varnames.index(what)
Expand Down