mirror of
https://github.com/fjosw/pyerrors.git
synced 2025-05-15 03:53:41 +02:00
correct idl assigned in dummy observables for matrix multiplication with
non Obs content
This commit is contained in:
parent
bd48cb2def
commit
c11b3ee08d
1 changed files with 2 additions and 1 deletions
|
@ -960,11 +960,12 @@ def derived_observable(func, data, **kwargs):
|
||||||
if isinstance(i_data, Obs):
|
if isinstance(i_data, Obs):
|
||||||
first_name = i_data.names[0]
|
first_name = i_data.names[0]
|
||||||
first_shape = i_data.shape[first_name]
|
first_shape = i_data.shape[first_name]
|
||||||
|
first_idl = i_data.idl[first_name]
|
||||||
break
|
break
|
||||||
|
|
||||||
for i in range(len(raveled_data)):
|
for i in range(len(raveled_data)):
|
||||||
if isinstance(raveled_data[i], (int, float)):
|
if isinstance(raveled_data[i], (int, float)):
|
||||||
raveled_data[i] = Obs([raveled_data[i] + np.zeros(first_shape)], [first_name])
|
raveled_data[i] = Obs([raveled_data[i] + np.zeros(first_shape)], [first_name], idl=[first_idl])
|
||||||
|
|
||||||
n_obs = len(raveled_data)
|
n_obs = len(raveled_data)
|
||||||
new_names = sorted(set([y for x in [o.names for o in raveled_data] for y in x]))
|
new_names = sorted(set([y for x in [o.names for o in raveled_data] for y in x]))
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue