mirror of
https://github.com/fjosw/pyerrors.git
synced 2025-03-15 14:50:25 +01:00
idx stored in list again to pass all tests
This commit is contained in:
parent
11aa99ac8a
commit
eef464ec26
1 changed files with 1 additions and 8 deletions
|
@ -78,7 +78,7 @@ class Obs:
|
|||
if len(dc) == 1:
|
||||
self.idl[name] = range(idx[0], idx[-1] + dc[0], dc[0])
|
||||
else:
|
||||
self.idl[name] = np.array(idx, dtype=_type_chooser(len(idx)))
|
||||
self.idl[name] = list(idx)
|
||||
else:
|
||||
raise Exception('incompatible type for idl[%s].' % (name))
|
||||
else:
|
||||
|
@ -1467,10 +1467,3 @@ def merge_obs(list_of_obs):
|
|||
o.is_merged = np.any([oi.is_merged for oi in list_of_obs])
|
||||
o.reweighted = np.max([oi.reweighted for oi in list_of_obs])
|
||||
return o
|
||||
|
||||
|
||||
def _type_chooser(n):
|
||||
for dtype in [np.uint8, np.uint16, np.uint32, np.uint64]:
|
||||
if n <= dtype(-1):
|
||||
return dtype
|
||||
raise Exception('{} is really big!'.format(n))
|
||||
|
|
Loading…
Add table
Reference in a new issue