Skip to main content
8 events
when toggle format what by license comment
Mar 18, 2017 at 17:05 comment added Gabriel Here's a nice tutorial on numpy's broadcasting.
Mar 18, 2017 at 16:50 comment added hpaulj More about increasing performance with numpy: codereview.stackexchange.com/questions/17702/…
Mar 18, 2017 at 16:48 comment added hpaulj Because it replaces Python loops with compiled numpy code. Sorry. I normally answer on SO where this kind of numpy 'vectorization' is an everyday question.
Mar 18, 2017 at 16:41 comment added Vogel612 okay ... nice that this is faster, but ... WHY???
Mar 18, 2017 at 9:59 comment added Graipher You can get another few percent faster by replacing sum(np.log(sum_N)) with np.log(sum_N).sum() or np.sum(np.log(sum_N)).
Mar 17, 2017 at 21:54 vote accept Gabriel
Mar 17, 2017 at 21:54 comment added Gabriel Excellent! This code is between 80-100 times faster in my machine, thank you very much hpaulj!
Mar 17, 2017 at 21:45 history answered hpaulj CC BY-SA 3.0