boostorg / boostorg/python

stride units in numpy::from_data

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

Beschreibung

Answering https://github.com/boostorg/python/issues/142, I notice that the `np::from_data` functions require strides to be counted in units of bytes, rather than elements. Is there any particular reason for that choice ? Given that the function also takes a `dtype` argument, which provides a `get_itemsize()` method, it seems plausible (and a bit more convenient) for callers to not have to use `sizeof(value_type)` explicitly.

@TallJimbo, any thoughts ?

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.