From 197514fe7bdfe492c349766c7ae0d169b62ed553 Mon Sep 17 00:00:00 2001 From: fasiondog Date: Wed, 12 Jun 2024 03:02:18 +0800 Subject: [PATCH] =?UTF-8?q?=E7=A7=BB=E9=99=A4=E4=B8=8D=E9=9C=80=E8=A6=81?= =?UTF-8?q?=E7=9A=84=E5=87=BD=E6=95=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- hikyuu/data/common.py | 3 --- hikyuu_pywrap/main.cpp | 9 --------- 2 files changed, 12 deletions(-) diff --git a/hikyuu/data/common.py b/hikyuu/data/common.py index b86a54f9..8a9663c2 100644 --- a/hikyuu/data/common.py +++ b/hikyuu/data/common.py @@ -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 diff --git a/hikyuu_pywrap/main.cpp b/hikyuu_pywrap/main.cpp index d060017d..7b311e94 100644 --- a/hikyuu_pywrap/main.cpp +++ b/hikyuu_pywrap/main.cpp @@ -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 c_vector = python_bytes_to_vector(obj); - std::ostringstream sout; - boost::archive::binary_oarchive oa(sout); - oa << BOOST_SERIALIZATION_NVP(c_vector); - return py::bytes(sout.str()); - }); }