PERF: Use take method instead of fancy indexing.