A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://github.com/pandas-dev/pandas/issues/3033 below:

convert from `ndarray.take` to internal takes, remove platform int <-> int64 conversions? · Issue #3033 · pandas-dev/pandas · GitHub

just throwing this out there, spliting off from discussion at #2892... right now index arrays are constantly being converted back and forth between platform int and int64 on 32-bit platforms, since ndarray.take requires the former but the cython routines use the latter

this can probably be removed if all ndarray.take usages can be converted to use cython routines, simplifying things considerably and probably improving performance (due to avoiding the conversions, and also since ndarray.take is generic and isn't specialized to handle 1-d and 2-d arrays or particular types efficiently)

the only caveats are that take_nd doesn't allow normal negative indices and uses promotion/fill behavior by default, the latter can be turned off with allow_fill=False but that might get pretty redundant if it's used everywhere; probably best to write a helper which does it. as for the former, there might not be any more cases of places where normal negative indicies are required anymore after #3027...not really sure


RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4