Skip to content

Extract scalar value from pint.quantity #2926

Answered by dopplershift
Marston asked this question in Q&A
Discussion options

You must be logged in to vote

From the user's guide->Unit Tutorial->"Dropping Units":

x.magnitude

Or you can write that really succinctly as x.m.

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@Marston
Comment options

Answer selected by dopplershift
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants