natu.numpyΒΆ

numpy, adapted for use with physical quantities

Many of the functions only accept dimensionless quantities, and they operate on the underlying values—not the values as represented in a particular display unit. To operate on values in a display unit would be to favor a particular unit, which is against the design of the package.

The constants (pi, e) are exactly as they are in numpy.

These functions accept floats, integers, and dimensionless quantities:

  • Hyperbolic functions: arccosh(), arcsinh(), arctanh(), cosh(), sinh(), and tanh()

They functions are the same as those from numpy. The functions cast quantities cast as floats and return floats.

These functions accept angle as a quantity:

  • cos(), sin(), and tan()

These functions accept floats, integers, and dimensionless quantities:

  • acos(), asin(), atan(), and atan2()

They return angles as quantities.

These functions are no longer applicable and have been deleted since angle is a quantity:

  • degrees(), radians(), rad2deg(), and deg2rad()

All other functions are directly imported from numpy. However, some of these need to be adapted (Issue #7).