Open
Description
I run the test as described in the read me and I get the following error -
======================================================================
ERROR: test_cronbach_alphas (test.StatsTest)
----------------------------------------------------------------------
Traceback (most recent call last):
File "/Users/tomron/code/processRat/tci-stats/test/__init__.py", line 9, in test_cronbach_alphas
self.assertEqual(cronbach_alpha(data), 1)
File "/Users/tomron/code/processRat/tci-stats/tcistats/__init__.py", line 11, in cronbach_alpha
(1 - variance_sum / total_var))
ZeroDivisionError: float division by zero
----------------------------------------------------------------------
It has to do with total_variance=0
. So the solution might be -
if total_variance == 0:
return 1
return ...
Metadata
Metadata
Assignees
Labels
No labels