[Numpy-discussion] Fwd: Numpy for data manipulation

Alex Rogozhnikov alex.rogozhnikov at yandex.ru
Fri Oct 2 03:38:16 EDT 2015


> I would suggest
>
> %matplotlib notebook
>
> It will still have to a nice png, but you get an interactive figure 
> when it is live.

Amazing, thanks. I was using mpld3 for this.
(for some strange reason I need to put %matplotlib notebook before each 
plot)

> The recommendation of inverting a permutation by argsort'ing it, while 
> it works, is suboptimal, as it takes O(n log(n)) time, and you can do 
> it in linear time:
Actually, there is (later in post) a linear solution using bincount, but 
your code is definitely better. Thanks!



More information about the NumPy-Discussion mailing list