Ndarray views of numpy arrays

Abierto
#137 15 comentarios 2 reacciones 0 asignados Ver en GitHub

Nadie ha tomado este issue todavía.

Evaluación

Dificultad
5/5
Tiempo estimado
Más de una semana
Aptitud para principiantes
25/100
Tipo de issue
Nueva funcionalidad
Claridad
Necesita aclaración
Estado de actividad
Estancado
Stack tecnológico
numpy, r, rust

Línea de trabajo

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.

Escrito por el modelo de indexación a partir del texto del issue.

Descripción

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.

Lenguaje dominante
Rust
Estrellas
4.3k
Forks
391
Métricas de merge de PR
Sin PR fusionados en 30 d

Guía de contribución

No hay ninguna guía de contribución indexada para este repositorio

Primeros pasos

  1. Lee el issue completo y luego la guía de contribución del proyecto.
  2. Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
  3. Haz un fork del repositorio y trabaja en una rama.
  4. Abre un pull request que haga referencia al número del issue.

Más de rust-ndarray/ndarray

Todos los issues de rust-ndarray/ndarray

Issues similares

Más issues de Rust

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.