boostorg / boostorg/python

stride units in numpy::from_data

未关闭
#143 3 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看
numpy
主要语言
C++
星标
537
派生
223
平均合并
11 小时 22 分钟
30 天内合并 PR
2

描述

Answering https://github.com/boostorg/python/issues/142, I notice that the `np::from_data` functions require strides to be counted in units of bytes, rather than elements. Is there any particular reason for that choice ? Given that the function also takes a `dtype` argument, which provides a `get_itemsize()` method, it seems plausible (and a bit more convenient) for callers to not have to use `sizeof(value_type)` explicitly.

@TallJimbo, any thoughts ?

贡献指南

这个仓库没有索引到贡献指南

评估

这个 Issue 还没有评估数据。

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。