[英]What is the most efficient way to represent the infinite tape of a Turing machine in Python?
[英]What is the most common way to represent a byte array in C?
我们会使用char
、 signed char
、 unsigned char
还是导入一些 header 作为byte
类型?
我的代码将被其他 C 开发人员看到/使用,我想使用他们最有可能看到的任何标准。
另外,我可能会从 python 为这个 function 分配 memory 作为 Z2EA9510C37F7F62F89E49CB41F7 数组并调用它。 在 numpy 中分配字节数组是否有首选方法?
例如,如果相应的 C 类型是char
, np.zeros(size, dtype=np.byte)
是正常方式吗?
最常见的方法是使用 char 数组。 但是,这实际上取决于代码的需要。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.