DistributionalNBD: use more descriptive exception
sdmccabe opened this issue · 4 comments
sdmccabe commented
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.
leotrs commented
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
.
sdmccabe commented
I'm fine with a NotImplementedError
but my instinct was to raise a ValueError
.
leotrs commented
Either is fine.
sdmccabe commented
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).