xnd-project / numba-xnd

Integrating xnd into numba
https://xnd.io/
5 stars 1 forks source link

Allow lowering constants of ndt/xnd #8

Open saulshanabrook opened 6 years ago

saulshanabrook commented 6 years ago

Users should be able to add constant xnd/ndt types, like this:

t = ndtypes.ndt("float64")

@numba.njit
def hi():
    return t

However, this might be more trouble than it's worth, not supported by numba (see). So instead we could add lower_constant to python or C types, and serialize them from Python. Maybe that is most straightforward.