Ndarray views of numpy arrays

未關閉
#137 15 則留言 2 個 reaction 已指派 0 人 在 GitHub 檢視

還沒有人認領這個 Issue。

評估

難度
5/5
預估耗時
一週以上
新手友好度
25/100
Issue 類型
功能
描述清晰度
需要釐清
活躍度
停滯
技術堆疊
numpy, r, rust

研究方向

Start by reviewing the scirust commit linked in the issue and the current ndarray APIs for constructing views from external data. Define what dtype, dimensions, strides, and safety checks are required for NumPy arrays and R matrices, then identify tests that demonstrate accepted and rejected inputs.

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

描述

help wanted

I write numerical code in Rust, but use Python and sometimes R to drive them (e.g., plot graphs comparing performance for different algorithms). This involves exporting an extern function that accepts pointers to (parts of) numpy arrays or R matrices, then treating these as Rusty datastructures (I implemented a basic version of for scirust in [1]).

As a user it would be great to have a function to which I pass a pointer to the raw Numpy array object (without doing any conversions in Python), and get back a view I can use safely. This involves looking at the Numpy array for the dtype, dimension, strides etc. Since ndarray encodes some of these in the type, a generic function that merely tests that the NP array passed conforms to its expectations (or panics with highly informative debug information) seems best.

Same applies to R, with different particulars of course.

Or is there a way to do this already?

[1] https://github.com/daniel-vainsencher/scirust/commit/48c9109abae32db06217576f03c22a18ad39e5d6 which doesn't compile on current nightly rust, sadly.

主要語言
Rust
星號
4.3k
分支
391
PR 合併指標
30 天內沒有已合併 PR

貢獻指南

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

從這裡開始

  1. 先讀完整個 Issue,再讀專案的貢獻指南。
  2. 在 Issue 下留言說明你要接手 —— 這能避免兩個人做同樣的事。
  3. Fork 儲存庫,在一個分支上完成修改。
  4. 送出 Pull Request,並在描述裡引用這個 Issue 編號。

rust-ndarray/ndarray 的其他 Issue

查看 rust-ndarray/ndarray 的全部 Issue

相似的 Issue

更多 Rust Issue

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

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