移除不需要的函数

This commit is contained in:
fasiondog 2024-06-12 03:02:18 +08:00
parent ad66419cb5
commit 197514fe7b
2 changed files with 0 additions and 12 deletions

View File

@ -27,7 +27,6 @@ import re
import akshare as ak
import pandas as pd
import datetime
from hikyuu.core import cpp_bytes_to_vector_float_blob
from hikyuu.util import *
@ -244,8 +243,6 @@ def historyfinancialreader(filepath):
cw_info = list(struct.unpack(report_pack_format, info_data))
report_date = int(cw_info[313]) # 财务公告日期
report_date = 19000000 + report_date if report_date > 800000 else 20000000 + report_date
# results.append((modifiy_code(code), report_date, cw_info))
# results.append((file_date, modifiy_code(code), report_date, cpp_bytes_to_vector_float_blob(info_data)))
results.append((file_date, modifiy_code(code), report_date, info_data))
cw_file.close()
return results

View File

@ -171,13 +171,4 @@ PYBIND11_MODULE(core, m) {
:param int end:
:param Query.KType ktype: K 线, 'DAY'|'WEEK'|'MONTH'|'QUARTER'|'HALFYEAR'|'YEAR'|'MIN'|'MIN5'|'MIN15'|'MIN30'|'MIN60'
:param Query.RecoverType recover_type: )");
// 仅供导入历史财务数据时将其转成 cpp 的 blob 格式
m.def("cpp_bytes_to_vector_float_blob", [](const py::bytes& obj) {
vector<float> c_vector = python_bytes_to_vector<float>(obj);
std::ostringstream sout;
boost::archive::binary_oarchive oa(sout);
oa << BOOST_SERIALIZATION_NVP(c_vector);
return py::bytes(sout.str());
});
}