boostorg / boostorg/python

API enhancement: ndarray constructor with strides argument

Offen
#222 2 Kommentare 0 Reaktionen 0 zugewiesene Personen Auf GitHub ansehen
Vorherrschende Sprache
C++
Sterne
537
Forks
223
Ø Merge
11 Std. 22 Min.
Gemergte PRs (30 T.)
2

Beschreibung

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.

Beitragsleitfaden

Für dieses Repository ist kein Beitragsleitfaden indexiert

Bewertung

Dieses Issue wurde noch nicht bewertet.

Neue Issues direkt in Ihr Postfach

Eine kurze Übersicht über anfängerfreundliche GitHub-Issues.