Python Forum
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
itertools vs purity
#3
(Oct-14-2017, 02:18 PM)buran Wrote: if the list has random numbers, formula will not help

Makes sense. The truth of the matter is I saw the formula flash by on a TV show and I wondered if it was real or just some gibberish they put on to make people think it was a real formula.  When I compared the result to that of 'accumulate' I was surprised to see it actually worked. Then I wondered how fast each one was, but all I got from 'by_formula' was zeros, even when I changed the list size to 10,000,000 and the accuracy to 100 decimal places.  So I'm glad to see you got an actual 'time'. I didn't even think of 'sum', so thanks for pointing that out.

My apologies to the author of the formula, they said your name but I thought that too was fake, so I forgot it as soon as they said it.
If it ain't broke, I just haven't gotten to it yet.
OS: Windows 10, openSuse 42.3, freeBSD 11, Raspian "Stretch"
Python 3.6.5, IDE: PyCharm 2018 Community Edition
Reply


Messages In This Thread
itertools vs purity - by sparkz_alot - Oct-14-2017, 01:57 PM
RE: itertools vs purity - by buran - Oct-14-2017, 02:18 PM
RE: itertools vs purity - by sparkz_alot - Oct-14-2017, 09:10 PM
RE: itertools vs purity - by buran - Oct-14-2017, 09:14 PM
RE: itertools vs purity - by sparkz_alot - Oct-14-2017, 09:27 PM
RE: itertools vs purity - by buran - Oct-14-2017, 09:29 PM
RE: itertools vs purity - by sparkz_alot - Oct-15-2017, 12:44 PM

Possibly Related Threads…
Thread Author Replies Views Last Post
  itertools and amazing speed Pedroski55 8 2,354 Nov-11-2022, 01:20 PM
Last Post: Gribouillis
  What happens to a <itertools.permutations object at 0x7fe3cc66af68> after it is read? Pedroski55 3 2,648 Nov-29-2020, 08:35 AM
Last Post: DeaD_EyE
  Making lists using itertools and eliminating duplicates. mike3891 2 2,389 Oct-26-2020, 05:39 PM
Last Post: bowlofred
  Python3 itertools.groupby printing the key august 1 2,191 Aug-17-2020, 05:46 AM
Last Post: bowlofred
  Generate Cartesian Products with Itertools Incrementally CoderMan 2 1,970 Jun-04-2020, 04:51 PM
Last Post: CoderMan
  itertools.zip_shortest() fo unequal iterators Skaperen 10 7,180 Dec-27-2019, 12:17 AM
Last Post: Skaperen
  can itertools compact a list removing all of some value? Skaperen 6 3,384 Sep-02-2019, 03:19 AM
Last Post: Skaperen
  Help with itertools jarrod0987 1 1,916 Jun-10-2019, 02:41 AM
Last Post: Larz60+
  ImportError: No module named jaraco.itertools in Python manhnt 0 3,090 Nov-08-2018, 11:41 AM
Last Post: manhnt
  Need help with itertools.islice() Charles1 2 2,966 Sep-19-2018, 10:32 AM
Last Post: Charles1

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020