circstat / pycircstat

Toolbox for circular statistics with Python
MIT License
157 stars 42 forks source link

error when providing ci in mean calculation #60

Closed Khalilsqu closed 5 years ago

Khalilsqu commented 5 years ago
import pycircstat
a = 180 + np.random.randint(-50, 50, size=60)
a = np.deg2rad(a)

np.rad2deg(pycircstat.mean(a, ci=0.95))

ValueError: setting an array element with a sequence.

But it works fine without ci

np.rad2deg(pycircstat.mean(a))
178.57652847866993

python 3.6 anaconda OS: windows 10 64 bit pycirctats: from pypi

fabiansinz commented 5 years ago

When you specify ci= you get multiple output arguments. np.rad2deg can't deal with that.

Khalilsqu commented 5 years ago

Okay, Thanks, appreciate it, and thank you very much for this amazing library. helped me a lot in my PhD. @fabiansinz

fabiansinz commented 5 years ago

No problem. Glad it's useful to you.