Join GitHub today
GitHub is home to over 20 million developers working together to host and review code, manage projects, and build software together.
TODO: convert from `ndarray.take` to internal takes, remove platform int <-> int64 conversions? #3033
Comments
|
I'm strongly +1 on getting rid of all the platform int conversions. Fused types (fuse at minimum int32_t, int64_t) can alleviate some of the hurting. Was the bane of my existence for a long period of time |
jreback
referenced
this issue
Mar 19, 2013
Merged
PERF: added convert=boolean to take to enable negative index conversion #3093
|
@stephenwlin any interest still in this? |
jreback
modified the milestone: 0.15.0, 0.14.0
Mar 11, 2014
jreback
modified the milestone: 0.16.0, 0.17.0
Jan 26, 2015
This was referenced Sep 13, 2015
jreback
modified the milestone: 0.19.0, Next Major Release
Aug 17, 2016
jreback
closed this
in 0780443
Aug 17, 2016
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
stephenwlin commentedMar 13, 2013
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.takerequires the former but the cython routines use the latterthis can probably be removed if all
ndarray.takeusages can be converted to use cython routines, simplifying things considerably and probably improving performance (due to avoiding the conversions, and also sincendarray.takeis generic and isn't specialized to handle 1-d and 2-d arrays or particular types efficiently)the only caveats are that
take_nddoesn't allow normal negative indices and uses promotion/fill behavior by default, the latter can be turned off withallow_fill=Falsebut 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