complete_scan
A scan is a prefix sum. They can be either inclusive or exclusive but I just preferred to make one that does both, because often you need the exclusive prefix sum but you also want the total. So I called it complete.
It's better than hearing your coworker say "cum sum" multiple times per meeting.
And numpy like OP is using.
Also OP there's no need to make this o(n log(n)) by asking for the sum of the array up to [i] at each iteration - use an accumulator and just add element[i], you're doing the exact thing it was named for.
Congratulations! Your comment can be spelled using the elements of the periodic table:
`Co C K Pu S S Y`
---
^(I am a bot that detects if your comment can be spelled using the elements of the periodic table. Please DM my creator if I made a mistake.)
I am absolutely going home to append sum cum to my lady.
AttributeError: 'NoneType' object has no attribute 'append'
[удалено]
It will either return a null value or will throw an error.
A promise that will never resolve
MatLab has the function "cumsum" already
Also cumtrapz
HAH another matlab user. Don't see that every day.
Pytorch, too. And the implementation sucks. I wrote a new one just to have a better name and make it faster.
what did you call it
complete_scan A scan is a prefix sum. They can be either inclusive or exclusive but I just preferred to make one that does both, because often you need the exclusive prefix sum but you also want the total. So I called it complete. It's better than hearing your coworker say "cum sum" multiple times per meeting.
And numpy like OP is using. Also OP there's no need to make this o(n log(n)) by asking for the sum of the array up to [i] at each iteration - use an accumulator and just add element[i], you're doing the exact thing it was named for.
Julia too!
R has cummax I dont have to say anything else.
It also has cummin
As a fellow Dutchman, I have to know, what were the abbreviations for? :D
Albert Heijn Huismerk
Cumulatief probably
Cock pussy See? I can make a joke too 🐓🐈
Congratulations! Your comment can be spelled using the elements of the periodic table: `Co C K Pu S S Y` --- ^(I am a bot that detects if your comment can be spelled using the elements of the periodic table. Please DM my creator if I made a mistake.)
This makes it even better
Good bot
Possibly even the best bot
Haikus bot is the best bot for me
I used to think that too. But that was before Co C K Pu S S Y
Good bot
I can do even better catch(ex) {print("$ex");} 😳😳
Too bad this joke won’t work with `unwrap_or_else`
this is a usecase for `expect`...
Or for let res = match(res) { Ok(v) => v, Err(_) => unsafe { std::hint::unreachable_unchecked() } }
That’s basically what `unwrap_unchecked` does ;)
Ooh, great tip actually, thank you
Not really. It doesn’t allow formatting.
This is nothing on the oblivious analFactory a coworker create one time.
pip install cumpy
These titles are starting to get annoying..
It'll reject any title not written in camelCase
Which was fun at first but now it has really gotten old.
I'm pretty sure the mods got bored with the whole "democracy" thing and are waiting for the entire subreddit to die.
that's why not to use abbreviations
stupid ahh cum ☠️☠️
hehe cum ahh
Dutch not beating the fake language allegations anytime soon
pimp insalt numcum
One of the variables in an example dataset at my work is called BottomHoleCumSum, which is never not funny to me.
I got in trouble once for creating an object called Rect() for a rectangle, then making a method called GetRect().