Skip to content
Snippets Groups Projects

Iter bliss data stop index

Open Edgar Gutierrez requested to merge iter_bliss_data_stop_index into main
2 unresolved threads

Merge request reports

Loading
Loading

Activity

Filter activity
  • Approvals
  • Assignees & reviewers
  • Comments (from bots)
  • Comments (from users)
  • Commits & branches
  • Edits
  • Labels
  • Lock status
  • Mentions
  • Merge request status
  • Tracking
119 120 :param Number retry_timeout: timeout when it cannot access the data for `retry_timeout` seconds
120 121 :param Number retry_period: interval in seconds between data access retries
121 122 :param Integral start_index: start iterating from this scan point index
123 :param Integral stop_index: stop iterating at this scan point index
122 124 :yields tuple: scan index, data
123 125 """
124 126 if start_index is None:
125 127 start_index = 0
128 if stop_index is None:
129 stop_index = INFINITY
  • 133 137 **options,
    134 138 )
    135 139 ):
    136 if index >= start_index:
    140 if stop_index > index >= start_index:
  •         if start_index is None and stop_index is None:
                names = list(datasets.keys())
                for values in zip(*datasets.values()):
                    yield dict(zip(names, values))
            elif start_index is None and stop_index is not None:
                names = list(datasets.keys())
                for i, values in enumerate(1, zip(*datasets.values())):
                    yield dict(zip(names, values))
                    if i == stop_index:
                        break
            elif start_index is not None and stop_index is None:
                raise NotImplementedError
            else:
                for i in range(start_index, stop_index):
                    yield {name: dset[i] for name, dset in datasets.items()}
  • Please register or sign in to reply
    Loading