I would like to create an array of dates in a Numba function, running in nopython mode.
I can’t see a date type, so I am trying NPDatetime.
My attempted code is:
import numba as nb import numpy as np @nb.jit(nopython=True) def xxx(): return np.empty(10, dtype=nb.types.NPDatetime('D')) print(xxx())
However, the code returns this error:
Unknown attribute 'NPDatetime' of type Module(<module 'numba.types' from '/home/xxx/anaconda3/lib/python3.6/site-packages/numba/types/__init__.py'>)
My numba version is 0.39.0