question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Add a more meaningful "ptp"

See original GitHub issue

The peak-to-peak function, ptp(), is a simple and handy function to use, but it confuses the PEP20 suggestions a bit. See this discussion for reference: http://d.pr/i/snXG

Based on the discussion, it may be a good idea to make the name more relevant? Some suggestions include span() or valuerange().

Issue Analytics

  • State:closed
  • Created 10 years ago
  • Reactions:1
  • Comments:7 (5 by maintainers)

github_iconTop GitHub Comments

1reaction
mattipcommented, Feb 12, 2020

Closing. This is more appropriate for scipy.

0reactions
WarrenWeckessercommented, Oct 18, 2019

FWIW: Over in ufunclab, I created a function called peaktopeak as an exercise in creating generalized ufuncs. peaktopeak makes two imrovements over ptp:

  • It makes a single pass over the data, so it will usually be faster than ptp.
  • For arrays of signed integers, peaktopeak returns an unsigned integer result. ptp returns a negative value with arrays of signed integers when the peak-to-peak value exceeds the maximum signed integer of the array’s dtype (e.g. np.array([-100, 0, 100], dtype=np.int8).ptp() returns -56).
Read more comments on GitHub >

github_iconTop Results From Across the Web

Chapter 20. Configuring PTP Using ptp4l Red Hat Enterprise ...
This chapter documents common options and more information is available in the ptp4l(8) manual page. In the [chronyd] section, add any command line...
Read more >
Configuring Precision Time Protocol (PTP) - Cisco
To ensure clock synchronization, PTP requires an accurate measurement of the communication path delay between the time source (master ) and the receiver...
Read more >
PTP Best Practices for Media and Entertainment and ...
Some PTP distribution networks are more scalable than others, and others can be more complex to configure. Ultimately, the goal is to ensure...
Read more >
Publicly traded partnerships: Tax treatment of investors
PTPs are by default treated as corporations; however, if the gross income of a PTP consists of 90% or more of certain types...
Read more >
Synchronizing Time with Linux* PTP
Introduction¶ · ptp4l: daemon that synchronizes the PTP Hardware Clock (PHC) from the NIC; · phc2sys: daemon that synchronizes the PHC and the...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found