wesm / pandas2

Design documents and code for the pandas 2.0 effort.
https://pandas-dev.github.io/pandas2/
306 stars 41 forks source link

Adding operator+[=] and operator/[=] for FloatingArray and IntegerArray. #58

Closed joshuastorck closed 7 years ago

joshuastorck commented 8 years ago

This includes a design change that obviates the need for an ArrayView. Instead, every array has an internal offset. Shallow copy is achieved by copy constructor, though the current set of copy constructors don't yet support a slice. Deep copy is still achieved through the Copy virtual function.

More detailed explanation of the changes:

wesm commented 7 years ago

There's a bunch of bits here that can be extracted and merged as useful utilities. I want to wait on pulling in operator implementations until the operator interface has been thought through some more: https://docs.google.com/document/d/1YmsV48iO6YNSxCIC84Xig5z-i9g4g7rzYTmCgUAxKRk/edit#heading=h.pzfqkdqgusm7

I'd like to take a crack at implementing some operators in a way that can evaluated either in single- or multi-threaded mode (without excessive code duplication -- so the code that runs things in parallel won't be too knowledgeable about the details of the operator except how invoke their virtual functions

wesm commented 7 years ago

I cherry-picked some of this as https://github.com/pandas-dev/pandas2/commit/a7f2a82a88d57e373419f796dc9a66430cc400ed

I'm going to do a little prototyping on operator evaluation generally, so will return to this hopefully soon