boostorg / boostorg/python

API enhancement: ndarray constructor with strides argument

Aperta
#222 2 commenti 0 reazioni 0 assegnatari Vedi su GitHub
Lingua principale
C++
Stelle
537
Fork
223
Merge medio
11h 22m
PR unite (30g)
2

Descrizione

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.

Guida per i contributori

Nessuna guida per i contributori indicizzata per questo repository

Direzione di ricerca

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.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Valutazione

Stack tecnologico
cpp
Ambito
api
Tipo di issue
Funzionalità
Difficoltà
3/5
Tempo stimato
1-2 giorni
Stato di attività
Ferma
Chiarezza
Abbastanza chiara
Idoneità per principianti
35/100

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.