Monthly Archives: March 2016

Benchmarking Python fancy indexing vs. taken

I recently discovered that fancy indexing is not that fast in Python. If you do a lot of it, it can eat up some valuable computational time. So I benchmarked the different approaches I know: Just extracting the vectors using a True-False vector Using the np.where command on the True-False vector Using the np.take command […]