He Shiming

Shanghai, China

kaoya.com

Age: 32

Creator of Bizble, 雅思听力宝, 考鸭, Toppin'Wiper, MediaMan and Goals.io.

Independent developer of desktop, web, and mobile platforms.

UI designer.

1h
accepted Numpy: calculate based on previous element?
1h
comment Numpy: calculate based on previous element?
Indeed what I wanted is recursive, I didn't realize that and I expect numpy to be capable of this through some magic slicing. Thank you for the explanation. I'll stay with the for loop.
1h
comment Numpy: calculate based on previous element?
Hmm... what I meant is this is the pseudo code, to be converted into numpy. I thought I was clear that I wanted a numpy solution.
1h
revised Numpy: calculate based on previous element?
added 101 characters in body
2h
comment Numpy: calculate based on previous element?
@moose, it's just the pseudo code, not numpy.
2h
revised Numpy: calculate based on previous element?
added 55 characters in body
2h
comment Numpy: calculate based on previous element?
Well, there's an artificial start value of 50.
2h
asked Numpy: calculate based on previous element?
Apr
26
comment Numpy, grouping every N continuous element?
I can confirm the rolling_window method is more than twice as fast as broadcasting. I hope @Divakar don't mind that I selected your answer instead. Thank you both!
Apr
26
accepted Numpy, grouping every N continuous element?
Apr
26
comment Numpy, grouping every N continuous element?
Wow, thanks for the benchmark. I do have a large array, will run some test on my own.
Apr
26
comment Numpy, grouping every N continuous element?
Thank you! This is super elegant.
Apr
26
comment Numpy, grouping every N continuous element?
Thanks, this works!
Apr
26
revised Numpy, grouping every N continuous element?
added 6 characters in body
Apr
26
asked Numpy, grouping every N continuous element?
Mar
27
awarded Autobiographer
Mar
23
awarded Popular Question
Mar
11
awarded Popular Question
Jan
23
awarded Supporter
Jan
18
comment Using filters in Liquid tags
This should be the answer!
1 2 3 4 5