Open kreczko opened 6 years ago
One of the last outstanding issues is
def _expand_lumi_ranges(lumi_ranges):
'''
Expands `[[1,4], [10,12]` to `[1,2,3,4,10,11,12]`
'''
result = np.array(map(_expand_lumi_range, lumi_ranges))
> return np.concatenate(result).ravel()
E TypeError: len() of unsized object
Turns out that map(_expand_lumi_range, lumi_ranges)
is a generator in Python 3 and numpy.array
will not resolve it, but
result = list(map(_expand_lumi_range, lumi_ranges))
return np.concatenate(result).ravel()
works
It seems I will have to revise the target. Starting January 2019 pandas, numpy and matplotlib will be dropping Python 2 support. Since we depend on them it would be good to go a similar path
Python 2.7 tests are now dropped on the dev
branch.
As CMS is preparing to support Python 3, so should we.
The first culprit is
→ https://github.com/cms-l1t-offline/cms-l1t-analysis/blob/master/bin/get_l1Analysis#L117