Skip to content

Commit

Permalink
Comment on mysterious "dimensionless" casting
Browse files Browse the repository at this point in the history
Requested by @oerc0122
  • Loading branch information
ajjackson committed Sep 6, 2023
1 parent 67a8bd0 commit ae01589
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions euphonic/powder.py
Original file line number Diff line number Diff line change
Expand Up @@ -345,6 +345,7 @@ def _qpts_cart_to_frac(qpts: Quantity,
"""
lattice = crystal.reciprocal_cell()

# Cast 'dimensionless' to ensure length units are cancelled properly
return np.linalg.solve(lattice.T, qpts.T).T.to('dimensionless').magnitude


Expand Down

0 comments on commit ae01589

Please sign in to comment.