Open gab23r opened 1 year ago
I can see how to improve this... looks like we should probably add a new (optional) "return_dtype" argument for reduce
(and probably also for fold
et al.) so that the caller can specify the output dtype more precisely when known (and if we can infer it on the Python side - like we could here- and the caller doesn't set it, we can do some additional inference) 🤔
On a semi related note @ion-elgreco made this extension which has levenshtein distance.
@alexander-beedie as long as you're contemplating changes to reduce, is there anything to be done for this issue?
Yes, I was using @ion-elgreco 's plugin (and had a X2 speedup). But this extension is not yet available with the new polars version
@gab23r I'll push a new release tomorrow!
Description
When I use
np.vectorize
, I can give the type of the output usingotypes
. It would be nice if polars could use this inforamtion (if given) to cast to the right type.Here I give otypes=[int] but I get a Utf8 dtype :