mirror of
https://github.com/fjosw/pyerrors.git
synced 2025-03-16 15:20:24 +01:00
fix: workaround for non Obs valued objects in derived_observable now
also works outside of array mode.
This commit is contained in:
parent
525dea0209
commit
67ca53681a
1 changed files with 4 additions and 5 deletions
|
@ -1052,7 +1052,6 @@ def derived_observable(func, data, array_mode=False, **kwargs):
|
||||||
raveled_data = data.ravel()
|
raveled_data = data.ravel()
|
||||||
|
|
||||||
# Workaround for matrix operations containing non Obs data
|
# Workaround for matrix operations containing non Obs data
|
||||||
if array_mode is True:
|
|
||||||
if not all(isinstance(x, Obs) for x in raveled_data):
|
if not all(isinstance(x, Obs) for x in raveled_data):
|
||||||
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)):
|
||||||
|
|
Loading…
Add table
Reference in a new issue