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

"getting started" documentation is misleading #37

Open
bnordgren opened this issue Sep 23, 2014 · 0 comments
Open

"getting started" documentation is misleading #37

bnordgren opened this issue Sep 23, 2014 · 0 comments

Comments

@bnordgren
Copy link

The Getting Started documentation presents the creation of new units as if new quantities were being created. Even the text in the exception raised in the example speaks of quantities.

Specifically, the following examples need to be changed to be less misleading:

       from scimath.units.length import foot, inch, meter
       3 * foot
       0.9144000000000001*m
       foot / inch
       12.0
       foot / meter
       0.3048

However, adding incompatible units raises an IncompatibleUnits exception:

       from scimath.units.electromagnetism import volt
       from scimath.units.mass import kilogram
       1 * volt + 2 * kilogram
       Traceback (most recent call last):
       File "", line 1, in
       File "scimath/units/unit.py", line 62, in add
       raise IncompatibleUnits("add", self, other)
       scimath.units.unit.IncompatibleUnits: Cannot add quanitites with units of 'm**2*kg*s**-3*A**-1' and 'kg'
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