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
2 changes: 1 addition & 1 deletion gitgoing/gitgoing.py
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ def cv(x):
cv : float
The coefficient of variation of the entire array
"""
return mean_plus_one(x)/std_plus_one(x)
return std_plus_one(x)/mean_plus_one(x)

def is_neuron_component(component):
return component in NEURON_COMPONENTS
16 changes: 8 additions & 8 deletions tests/test_gitgoing.py
Original file line number Diff line number Diff line change
Expand Up @@ -37,14 +37,14 @@ def test_std_plus_one(x_norm):
true_std = np.std(x_norm) + 1
assert test_std == true_std

# def test_cv_broken(x_norm):
# from gitgoing.gitgoing import std_plus_one, mean_plus_one, cv
#
# test_cv = cv(x_norm)
# true_cv = std_plus_one(x_norm)/mean_plus_one(x_norm)
#
# # This test will fail
# assert test_cv == true_cv
def test_cv_broken(x_norm):
from gitgoing.gitgoing import std_plus_one, mean_plus_one, cv

test_cv = cv(x_norm)
true_cv = std_plus_one(x_norm)/mean_plus_one(x_norm)

# This test will fail
assert test_cv == true_cv

@pytest.fixture(params=['soma', 'axon', 'synapse', 'dendrite',
pytest.mark.xfail('fibroblast')])
Expand Down