Closed wiheto closed 4 years ago
So this works for me with the latest fix on the develop branch. @alberto-bracci could you confirm that it works for you with the code you were running?
Before this would fail, but now it is fixed:
import teneto
tnet_array = teneto.generatenetwork.rand_binomial((3,5), 0.5)
tnet = teneto.TemporalNetwork(from_array=tnet_array, forcesparse=True, nettype='bu')
paths = teneto.networkmeasures.shortest_temporal_path(tnet)
this works. just to understand: forcesparse=True uses HDF5 too? Does forcesparse=True slow down the computation of shortest paths as well?
So there are three types of network representations in teneto:
In regards to memory usage ranks: 3,2,1. In regards to processing speed it ranks 1,2,3 (but all are currently too slow compared to their optimal speed). When introducing 2,3 to improve memory usage (around March-April this year), I compromised on speed. And I haven't had time to fully fix the issues. It has improved a bit, but not completely. Hence the time alotted in December to get to the bottom of this.
The error that you identified here was for both representations 2,3 (that's why I didn't put in hdf5=True).
Sorry if I confused you with the title of the issue.
Mentioned in #52:
File "", line 1, in shortest_paths = tnt.networkmeasures.shortest_temporal_path(t)
File "C:\ProgramData\Anaconda3\lib\site-packages\teneto\networkmeasures\shortest_temporal_path.py", line 201, in shortest_temporal_path network = tnet.get_network_when(ij=list(ij), t=t)
File "C:\ProgramData\Anaconda3\lib\site-packages\teneto\classes\network.py", line 483, in get_network_when return teneto.utils.get_network_when(self, **kwargs)
File "C:\ProgramData\Anaconda3\lib\site-packages\teneto\utils\utils.py", line 993, in get_network_when network['j'].isin(ij))), (network['t'].isin(t)))]
TypeError: and_ expected 2 arguments, got 1