Follow

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use
Contact

What is the "peak to peak" analogy refrenced by numpy's .ptp function?

The np.ptp function returns the range between minimum and maximum values along a specified axis. The numpy docs state that the "ptp" name is an acronym for "peak to peak". Can someone explain this analogy?

I would have thought this function would have been named "valley to peak".

MEDevel.com: Open-source for Healthcare and Education

Collecting and validating open-source software for healthcare, education, enterprise, development, medical imaging, medical records, and digital pathology.

Visit Medevel

>Solution :

This is a common
term
in any electrical engineering text.

If you have a
DC
voltage source referenced to some ground point,
it is easy to report the voltage
and predict how much a large-valued resistor would
heat up, that is, to predict dissipated power.

If you have an
AC
voltage source, things are more complicated.
The simplest case tends to be a sinusoidal waveform,
which admits of analytic solutions for
RMS
power dissipation.
But in general, an AC source might not be a perfect sinusoid.
It might be clipped, or have harmonics, or be approximately a square wave.
For all such cases we can accurately report the
peak-to-peak
voltage, even in an instance where an exotic waveform would make it a challenge
to predict what power would be dissipated by an attached load.

Add a comment

Leave a Reply

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use

Discover more from Dev solutions

Subscribe now to keep reading and get access to the full archive.

Continue reading