Skip to content

Commit

Permalink
Update hkl/sample.py
Browse files Browse the repository at this point in the history
Co-authored-by: Padraic Shafer <[email protected]>
  • Loading branch information
prjemian and padraic-shafer authored Dec 13, 2023
1 parent 2854196 commit 045c575
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions hkl/sample.py
Original file line number Diff line number Diff line change
Expand Up @@ -382,6 +382,7 @@ def has_valid_position(pos):
raise TypeError(f"All values must be numeric, received {pos!r}")
return True
elif type(pos).__class__.__name__.startswith("Pos"):
# This is (probably) a calc.Position namedtuple
if False in [isinstance(v, (int, float)) for v in pos]:
raise TypeError(f"All values must be numeric, received {pos!r}")
return True
Expand Down

0 comments on commit 045c575

Please sign in to comment.