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)