[SciPy-Dev] Code review for trapz update
Sturla Molden
sturla.molden at gmail.com
Tue Mar 10 14:08:16 EDT 2015
Eric Moore <ewm at redtetrahedron.org> wrote:
>> This issue arises, for example, in the conversion of spectral quantities
>> from wavenumber (units of inverse length) to wavelength (units of
>> length). When the spectral quantity is inverted, a monotonically
>> increasing sequence becomes a monotonically decreasing sequence, and
>> vice versa. This gives the unexpected result that trapz(<quantity>,
>> <spectrum>) works as expected before conversion, but returns values with
>> the wrong sign after conversion.
>
> I understand why this seems wrong, but the fact that you have to reverse
> the order is actually correct.
Yes.
Sturla
More information about the SciPy-Dev
mailing list