netsiphd/netrd

DistributionalNBD: use more descriptive exception

sdmccabe opened this issue · 4 comments

If there is no 2-core, DistributionalNBD raises an Exception instead of something more descriptive. The error is in shave(), so this might also be true for NBD.

If there is no 2-core, the graph is a forest and all its eigenvalues are zero. So there is not much sense in comparing two graphs when one of them is a forest. I'd say we should raise NotImplementedError.

I'm fine with a NotImplementedError but my instinct was to raise a ValueError.

Either is fine.

nbd.py should probably raise a similar error to the one in distributional_nbd.py, since it's the same concern (an empty 2-core).