Skip to content

Instantly share code, notes, and snippets.

@jj-github-jj
Last active September 3, 2022 04:49
Show Gist options
  • Save jj-github-jj/cfcec015447fbac6edbfd201cd0ddae9 to your computer and use it in GitHub Desktop.
Save jj-github-jj/cfcec015447fbac6edbfd201cd0ddae9 to your computer and use it in GitHub Desktop.
basic quantiphy usage
from IPython.core.interactiveshell import InteractiveShell
InteractiveShell.ast_node_interactivity = "all"
from quantiphy import Quantity
a=Quantity('30MHz')
print (a) # 30 MHz
a.as_tuple()[0]
a.render() # '30 MHz'
float(a) # 30000000.0
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment