Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ValueError in restore_UB #217

Open
gfabbris opened this issue Jun 6, 2022 · 0 comments
Open

ValueError in restore_UB #217

gfabbris opened this issue Jun 6, 2022 · 0 comments

Comments

@gfabbris
Copy link

gfabbris commented Jun 6, 2022

The problem seems to be the comparison between matrix:

In [16]: restore_UB(ori["fourc"], fourc)
---------------------------------------------------------------------------
ValueError                                Traceback (most recent call last)
Input In [16], in <cell line: 1>()
----> 1 restore_UB(ori["fourc"], fourc)

File ~/.conda/envs/bluesky_2022_2/lib/python3.9/site-packages/hkl/util.py:483, in restore_UB(orientation, diffractometer)
    471 """
    472 Restore **UB** matrix from orientation information.
    473 
   (...)
    480     Diffractometer object.
    481 """
    482 _check_geometry(orientation, diffractometer)
--> 483 _smart_signal_update(orientation["UB"], diffractometer.UB)

File ~/.conda/envs/bluesky_2022_2/lib/python3.9/site-packages/hkl/util.py:315, in _smart_signal_update(value, signal)
    313 def _smart_signal_update(value, signal):
    314     """Write value to signal if not equal.  Not a plan."""
--> 315     if signal.get() != value:
    316         signal.put(value)

ValueError: The truth value of an array with more than one element is ambiguous. Use a.any() or a.all()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant