When calling xgi.degree_assortativity() with exact=True and an unknown kind, the code raises an UnboundLocalError that is hard to debug.
This PR fixes that behavior.
Unknown kind-s are handled in _choose_degrees, but after #526, when exact=True, _choose_degrees is no longer called.
When calling
xgi.degree_assortativity()
withexact=True
and an unknownkind
, the code raises anUnboundLocalError
that is hard to debug. This PR fixes that behavior.Unknown
kind
-s are handled in_choose_degrees
, but after #526, whenexact=True
,_choose_degrees
is no longer called.I also changed the message from
to
to better describe the error.
(I found this because I made a typo in
kind=
.)