-
Notifications
You must be signed in to change notification settings - Fork 27
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
tnet.T incorrect when tnet is sparse and starttime!=0 #61
Comments
I believe the problem comes from the |
Sorry for taking over a month top get back to you on this. Nice catch. And the fix would work quite well. But I think the following would be a slightly better solution:
Because, so in the case if there is [100, 100, 102, 102, 103], I think it would be better to display T=4, instead of T=3. Mainly because T would be 4 if this was converted into a numpy array. Feel free to submit a PR if you want to. Otherwise I'll add this in the next version I release. |
It took me way longer to reply, oops. One more question, though: this does not work for decimal times, e.g. [100, 100.2, 100.3], which would yield T=1.3. Related: as far as I understand it, teneto assumes a constant time step. So if I data that corresponds to times non uniformly distributed, there is no natural way to deal with them in teneto, si that right? For example times like [10, 11, 20, 30, 100], teneto would enforce a timestep of 1 and add lots of unexisting timepoints. If this is the case I can raise an issue for an enhancement for example, but I wanted to make sure. |
I've never got round to making non-discrete temporal networks. some functions may break if you include decimals in the time stamps (i have not tested this though) timelabels is a possible option for you - this will just be a list (e.g. [100, 100.1, 100.2, 100.3]) that then map to the timepoints [0, 1, 2, 3] in figure functions. In some functions there is the option of adding the sampling frequency. But that has not been included in TemporalNetwork class yet as other functions got prioritized. |
It's generally designed to use uniform timepoints in many functions. But it is fine if the time-stamps are non-uniform as well. If something breaks, let me know. However, it will be better than to ensure that the network is sparse ( I think all this functionality would be wonderful! It's all about time to implement it all. |
Thanks for the clarifications! |
Running
displays 104, even when specifying
starttime=100
at the creation of the network. From the documentation, T isso that it should be 4.
The text was updated successfully, but these errors were encountered: