Форум сайта python.su
Python 3.8.5, numpy 1.19.2, numba 0.51.2
Мне надо сконвертировать в datetime, для чего я использую официальную справку:
import numpy as np import numba as nb @nb.jit(nopython=True) def get_date_time(current): s = current['YEAR'] + '-' + current['MONTH'] + '-' + current['DAY'] + 'T' + current['TIME'] #d = np.datetime64(s) #ERROR: Cannot cast unicode_type to datetime64[] #d = nb.types.NPDatetime(s) #ERROR: Unknown attribute 'NPDatetime' of type Module(<module 'numba.core.types' #d = nb.types.NPDatetime(Y=current['YEAR'], M=current['MONTH'], D=current['DAY']) #ERROR: Unknown attribute 'NPDatetime' of type Module(<module 'numba.core.types' d = nb.NPDatetime(s) #ERROR: module 'numba' has no attribute 'NPDatetime' return d
Офлайн