> Date: Thu, 26 Oct 2017 17:27:33 -0400 > From: Marten van Kerkwijk > > That sounds somewhat puzzling as units cannot really propagate without > them somehow telling how they would change! (e.g., the outcome of > sin(a) is possible only for angular units and then depends on that > unit). But in any case, the mailing list is probably not the best case > to discuss this - rather, I look forward to -- and will most happily > give feedback on -- a NEP or other more detailed explanation! >
So whilst it’s true that trigonometric functions only make sense for dimensionless quantities, you might still want to compute them for dimensional quantities for reasons of computational efficiency. Taking your example of sin(a) in a spectral density identity: log(cos(ka) + i sin(ka)) = k log(cos(a) + i sin(a)) so if you are computing the LHS for many k and a single a (i.e k the wavenumber and ka dimensionless) then you might prefer the RHS, which actually uses sin(a). Peter _______________________________________________ NumPy-Discussion mailing list NumPy-Discussion@python.org https://mail.python.org/mailman/listinfo/numpy-discussion