xnd-project / libxnd

Subsumed into xnd
https://xnd.io/
BSD 3-Clause "New" or "Revised" License
80 stars 12 forks source link

Overloading array behavior #2

Closed datnamer closed 7 years ago

datnamer commented 7 years ago

Can array behavior like slicing be changed/overloaded for user defined subtypes?

skrah commented 7 years ago

The current vision for xnd is to implement one specific fast array type that supports variable dimensions, zero copy sub-arrays, missing values and dimensions, nested arrays, records, etc. If the type has only fixed dimensions, the array should be compatible with NumPy's ndarray. If the type has variable dimensions, the bitmaps and "offset" arrays are Arrow compatible.

On top of that we need to support multidimensional slicing and indexing (which to my knowledge Arrow does not).

These are a lot of requirements. Supporting overloading is IMHO only possible a) if one sacrifices speed and b) uses a completely different approach that would amount to writing a new compiled language.

datnamer commented 7 years ago

@sklam @teoliphant will anything like that (compiled abstract overloadable array interface ) be possible in numba? Xnd can then be plugged in.