jorisvandenbossche commented on pull request #11185: URL: https://github.com/apache/arrow/pull/11185#issuecomment-923941907
> thus introducing a slowdown when something different from a numpy arrays is used as a mask Did you check if it actually gives a noticeable slowdown? (accessing items in a general python sequence is not especially fast compared to arrays) But even then I would say: if you (as user) would care about such a potential slowdown from this, you should not use a python sequence in the first place. > At that point it would probably make sense to just raise a "mask must be a numpy array when data is a numpy array" error and make the user explicitly deal with the overhead That would be fine as well I think, yes (although we generally accept array-likes in most places, so doing an `if mask is not None: mask = asarray(mask)` might be slightly more consistent) -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
