URT
URT copied to clipboard
running Python, ADF_d error
After: make USE_OPENMP=1 USE_BLAZE=1 USE_BLAS=1 python setup.py build_ext --inplace --force ...
adf.csv is saved from Example2.cpp
Example2.cpp
...
urt::Vector<double> data = urt::wiener_process<double>(nobs);
urt::WriteToCSV("adf.csv", data);
...
Python code:
adf = pd.read_csv('adf.csv', sep=',', header=None)
test = urt.ADF_d(adf[0].values, lags=10, trend='ct')
test.show()
Result is:
TypeError Traceback (most recent call last)
~/URT/Python/CyURT.pyx in CyURT.ADF_d.init()
TypeError: expected bytes, str found
Head of adf.csv
print(adf[0].head())
0 -0.150035 1 -0.594445 2 -2.272570 3 0.203642 4 -0.325208 Name: 0, dtype: float64
Also, same error:
>python benchmark.py
Traceback (most recent call last):
File "benchmark.py", line 25, in