bavla / TQ

Python library for temporal network analysis based on temporal quantities
7 stars 2 forks source link

UnboundLocalError in clusCoef; also, NoneType not callable #1

Open skynx opened 7 years ago

skynx commented 7 years ago

At line 608 of TQ.py, in the definition of clusCoef, the variable old is undefined in one branch and not callable in the other.

It looks like that's just because of the old = TQ.semiring(); in the branch corresponding to corrected clustering coefficient. Maybe this can be fixed by changing that to old = TQ.semiring; and moving it outside the conditional? Doing so gives the expected output.

bavla commented 7 years ago

On 10-08-2017 01:50, skynx wrote:

thanks,

Vlado

At line 608 of TQ.py, in the definition of clusCoef, the variable old is undefined in one branch and not callable in the other.

It looks like that's just because of the old = TQ.semiring(); in the branch corresponding to corrected clustering coefficient. Maybe this can be fixed by changing that to old = TQ.semiring; and moving it outside the conditional? Doing so gives the expected output.

-- You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub [1], or mute the thread [2].

*

Links:

[1] https://github.com/bavla/TQ/issues/1 [2] https://github.com/notifications/unsubscribe-auth/ATTn03eM8pd_OeAJCX7yxYmH-zgW_ilrks5sWkXMgaJpZM4Oyx1B

-- Vladimir Batagelj   IMFM - Institute of Mathematics, Physics and Mechanics   Jadranska 19, 1000 Ljubljana, Slovenia and   University of Primorska, Andrej Marušič Institute, Koper T: +386 1 4766 672 W: http://vladowiki.fmf.uni-lj.si/doku.php?id=vlado