Directed graph weighted harmonic centrality with cutoff

Hi there,

I am using igraph to calculate centrality metrics in large directed road networks weighted by road segment length. To simulate the centrality with respect to typical trip lengths, I am using the cutoff parameter in closeness, betweenness, and harmonic_centrality calculations (and also to improve performance).

This works well with both closeness and betweenness, however I am returned all zeros with harmonic_centrality. I am able to calculate harmonic_centrality with cutoff=None or with weights=None but not both. It appears the cutoff and weights parameters do not work in tandem.

Because the same setup works with closeness I do not believe it should be an error with the network, but am looking for suggestions! Alternatively, I am hoping this issue can be addressed.

Can you show a short, reproducible example that demonstrates the problem? Be sure to use the latest python-igraph version. Do include the value of igraph.__version__ in your response.

See here for guidance: How to create a Minimal, Reproducible Example - Help Center - Stack Overflow

I just remembered this issue, which is already fixed, and will be released with the next version:

It is likely the same problem.

Thank you @szhorvat - I will keep an eye out for the next release!