Might be a chance to align code, but might also not be important enough.
This code raises TypeError: "unsupported operand type(s) for -: 'numpy.ndarray' and 'Timestamp'". When replacing 1018 with 2009, the code does work as expected.
import os
import pandas as pd
import hatyan
dir_testdata = r"c:\DATA\hatyan\tests\data_unitsystemtests"
file_dia = os.path.join(dir_testdata,'VLISSGN_obs1.txt')
ts_pd = hatyan.read_dia(file_dia)
# convert to year 1018
ts_pd.index = pd.date_range('1018-01-01 00:00:00+01:00', '1018-12-31 23:00:00+01:00', freq="60min", unit="us")
#prediction
comp = hatyan.analysis(ts=ts_pd, const_list="year")
It happens not immediately and might be avoidable, since this does work (although maybe not on py3.8:
Might be a chance to align code, but might also not be important enough.
This code raises
TypeError: "unsupported operand type(s) for -: 'numpy.ndarray' and 'Timestamp'"
. When replacing 1018 with 2009, the code does work as expected.It happens not immediately and might be avoidable, since this does work (although maybe not on py3.8:
(output is DatetimeIndex, not Index anymore)