1 2 3 4 5 ··· 11 下一页
摘要: 参考文档: https://www.cnblogs.com/gxcdream/p/7597865.html https://www.cnblogs.com/muyefeiwu/p/11260366.html https://blog.csdn.net/liangzhaoyang1/article/d 阅读全文
posted @ 2024-07-10 10:55 一枚码农 阅读(1) 评论(0) 推荐(0) 编辑
摘要: 参考文档: 参考1:https://blog.csdn.net/u013044116/article/details/49737585 参考2:https://blog.csdn.net/keneyr/article/details/83747501 算法思想: 对多边形沿y轴从0开始遍历,建立边表 阅读全文
posted @ 2024-07-08 10:27 一枚码农 阅读(1) 评论(0) 推荐(0) 编辑
摘要: 数据类型 # bool 类型 // bool_type_ptactice.pyx cdef bint a = 123 # 非0 为 真 , 0 为假 cdef bint b = -123 cdef bint c = 0 py_a = a # cdef 定义的内容没法直接在python中直接引用 py 阅读全文
posted @ 2024-06-26 23:19 一枚码农 阅读(1) 评论(0) 推荐(0) 编辑
摘要: 文档: https://docs.cython.org/en/latest/src/userguide/language_basics.html#declaring-data-types 阅读全文
posted @ 2024-06-23 14:10 一枚码农 阅读(1) 评论(0) 推荐(0) 编辑
摘要: import os import threading import time from concurrent.futures import ThreadPoolExecutor from functools import wraps ThreadPool = ThreadPoolExecutor(m 阅读全文
posted @ 2024-06-04 17:20 一枚码农 阅读(1) 评论(0) 推荐(0) 编辑
摘要: 参考文档:https://numba.pydata.org/numba-doc/latest/user/pycc.html Compiling code ahead of time(运行之前编译代码) 虽然 numnb 主要是 Just-In-Time(运行时)编译,但也提供了 Ahead-Of-T 阅读全文
posted @ 2024-05-12 22:34 一枚码农 阅读(7) 评论(0) 推荐(0) 编辑
摘要: 参考文档: https://numba.pydata.org/numba-doc/latest/user/cfunc.html cfunc 创建 C/C++回调函数 与 jit 相似,有一个不同点是,cfunc 强制传递一个签名,用来确定 C 回调的可见签名。 cfunc 对象暴漏出编译后的 C 回 阅读全文
posted @ 2024-05-12 17:40 一枚码农 阅读(6) 评论(0) 推荐(0) 编辑
摘要: 参考文档:https://numba.pydata.org/numba-doc/latest/user/jitclass.html# jitclass 对类进行装饰 import numba as nb import numpy as np from numba.experimental impor 阅读全文
posted @ 2024-05-12 16:51 一枚码农 阅读(18) 评论(0) 推荐(0) 编辑
摘要: 参考文档: https://apachecn.github.io/numba-doc-zh/#/docs/17 vectorize装饰器: 允许python函数的标量入参使用 numpy 的 ufuncs。 import numba as nb @nb.vectorize([nb.int32(nb. 阅读全文
posted @ 2024-05-12 12:52 一枚码农 阅读(32) 评论(0) 推荐(0) 编辑
摘要: 点击查看代码 # 读取嵌套型和大小可变的二进制结构 from itertools import chain import struct # 多边形数组 polys = [ [(1.0, 2.1), (2.0, 3.2), (3.0, 4.3)], [(1.1, 2.2), (2.1, 3.3), ( 阅读全文
posted @ 2024-04-27 14:26 一枚码农 阅读(3) 评论(0) 推荐(0) 编辑
1 2 3 4 5 ··· 11 下一页