boostorg / boostorg/python

API enhancement: ndarray constructor with strides argument

Aberta
#222 2 comentários 0 reações 0 responsáveis Ver no GitHub
Linguagem predominante
C++
Estrelas
537
Forks
223
Merge médio
11h 22min
PRs com merge (30d)
2

Descrição

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.

Guia de contribuição

Nenhum guia de contribuição indexado para este repositório

Direção de pesquisa

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.

Escrita pelo modelo de indexação a partir do texto da issue.

Avaliação

Stack de tecnologia
cpp
Domínio
api
Tipo de issue
Funcionalidade
Dificuldade
3/5
Tempo estimado
1-2 dias
Status de atividade
Estagnada
Clareza
Razoavelmente clara
Facilidade para iniciantes
35/100

Receba novas issues na sua caixa de entrada

Um resumo curto de issues do GitHub para quem está começando.