boostorg / boostorg/python

stride units in numpy::from_data

Đang mở
#143 3 bình luận 0 reaction 0 người được giao Xem trên GitHub
numpy
Ngôn ngữ chính
C++
Star
537
Fork
223
Merge trung bình
11 giờ 22 phút
Pull request đã merge (30 ngày)
2

Mô tả

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 ?

Hướng dẫn đóng góp

Chưa lập chỉ mục được hướng dẫn đóng góp cho kho mã nguồn này

Đánh giá

Issue này chưa được đánh giá.

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.