boostorg / boostorg/python

API enhancement: ndarray constructor with strides argument

未關閉
#222 2 則留言 0 個 reaction 已指派 0 人 在 GitHub 檢視
主要語言
C++
星號
537
分支
223
平均合併
11 小時 22 分鐘
30 天內合併 PR
2

描述

Short: Please add versions of the functions `zeros` and `empty` that accept a `strides` argument.

Long:
The C++ API of `ndarray` does not allow to create an `ndarray` with the functions `zeros` or `empty` with custom strides. I have a use case in [histogram](https://github.com/HDembinski/histogram) where I need custom strides. This is possible with the underlying C-API, so it is merely an extension of the C++ front-end.

I cannot use `from_data`, because I want the ndarray to own the memory.

貢獻指南

這個儲存庫沒有索引到貢獻指南

研究方向

Start by locating the C++ ndarray implementations of `zeros` and `empty`, then compare their signatures with the underlying C API that already supports custom strides. The work is done when both C++ functions accept and apply a `strides` argument while the ndarray retains ownership of its memory; add or update tests for the new overloads.

由索引模型根據 Issue 內容生成。

評估

技術堆疊
cpp
領域
api
Issue 類型
功能
難度
3/5
預估耗時
1-2 天
活躍度
停滯
描述清晰度
基本清楚
新手友好度
35/100

把新 issue 寄到你的電子郵件信箱

精選適合新手參與的 GitHub issue 摘要。