Skip to content
Snippets Groups Projects

Stats

Merged pmag requested to merge stats into master
2 files
+ 143
2
Compare changes
  • Side-by-side
  • Inline

Files

@@ -134,8 +134,13 @@ class TimeFrame:
def consecutive_qpk(self, qpk_keyed_dict: dict) -> bool:
"Returns True if all (q,p,k) tuple keys are valid and consecutive."
# TODO: here
raise NotImplementedError
# all k intervals have to be consecutive for each (q,p) pair
set_qp = set(qpk[0:2] for qpk in qpk_keyed_dict.keys())
for qp in set_qp:
for k in range(self.number_time_intervals(qp[0])):
if (*qp,k) not in qpk_keyed_dict:
return False
return True
# *************************************************************************
# *************************************************************************
Loading