C/C++ Integrate
文章平均质量分 75
Life Is Beautiful
XJTU BEng in Automation;
SUST RA
展开
-
pybind11 Eigen + STL Containers + Numpy
Pybind11梳理一下 Pybind11 中 Eigen 和 STL 容器与 Python 交互的方式。需要先了解Functions章节中关于返回值和调用的规则。STL 容器Pybind11 已经自动支持 std::vector<>/std::deque<>/std::list<>/std::array<>/std::valarray<>, std::set<>/std::unordered_set<>, and s原创 2021-08-18 20:11:06 · 1239 阅读 · 0 评论 -
Python Bytes
文章目录字节操作字节类Bytes ClassBytearray ClassCommon Operations转换NumpyStructFormat字节操作字节类python 中处理字节有两种类型,bytes 和 bytearray 类。两者都是序列,前者类似元组(不可更改),后者类似列表。Bytes Classbytes 与 str 类相似。创建方法:由字符创建(ASCII 码),b'{text here}'From an iterable of integers: bytes(range(原创 2021-02-24 10:57:22 · 140 阅读 · 0 评论 -
Cython
Cython编译运行Use setup.py filefrom setuptools import setupfrom Cython.Build import cythonizefrom Cython.Compiler import OptionsOptions.docstring = Falsesetup( name='Hello world app', ext_modules=cythonize("hello.pyx", compiler_directives={'原创 2021-02-20 11:27:42 · 141 阅读 · 0 评论