Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

for some versions of scipy, need a guard around sig = scipy.stats.pearsonr([d[2] for d in datapoints], [d[3] for d in datapoints]) #2

Open
hughperkins opened this issue Apr 19, 2021 · 0 comments

Comments

@hughperkins
Copy link

hughperkins commented Apr 19, 2021

for some versions of scipy, need a guard around sig = scipy.stats.pearsonr([d[2] for d in datapoints], [d[3] for d in datapoints]) ... otherwise scipy throws an exception about need at least one point.

The following guard prevents this issue:

    if len(datapoints) > 1:
        sig = scipy.stats.pearsonr([d[2] for d in datapoints], [d[3] for d in datapoints])
        print(template % (i, train_acc, test_acc, train_acc - test_acc, comp, sig))

(Note: in comm.ipynb)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant