Closed rimajj closed 2 years ago
Hi rimajj, thanks for reporting and supplying the test function. I fixed the issue in pyunicorn/core/interacting_networks.py The test function works now and prints out results. Let me know if the new code works for you.
Hi lenas95, I tested the new code with several data sets. No errors occurred. Thank you for fixing the problem!
The following functions produce traceback error when called after constructing climate network with climate.coupled_tsonis.CoupledTsonisClimateNetwork(). net.cross_local_clustering() cross_global_clustering() cross_average_path_length() net.cross_closeness()
For example, when calling cross_global_clustering(): Traceback (most recent call last): File "/home/.../testing_pyunicorn.py", line 171, in
clustering = net.cross_global_clustering()
File "/home/.../python39/lib/python3.9/site-packages/pyunicorn/climate/coupled_climate_network.py", line 402, in cross_global_clustering
cc_12 = InteractingNetworks.cross_global_clustering(
File "/home/.../python39/lib/python3.9/site-packages/pyunicorn/core/interacting_networks.py", line 761, in cross_global_clustering
cc = self.cross_local_clustering(node_list1, node_list2)
TypeError: cross_local_clustering() takes 1 positional argument but 3 were given
Other functions, e.g. cross_degree() work fine with the same network.
I tested with different .nc data as input.
I attach my code as .txt file. testing_pyunicorn.txt