Any way to dot arrays of different type?

Aberta
#1,067 4 comentários 1 reação 0 responsáveis Ver no GitHub

Ninguém assumiu esta issue ainda.

Avaliação

Dificuldade
5/5
Tempo estimado
Mais de uma semana
Facilidade para iniciantes
30/100
Tipo de issue
Funcionalidade
Clareza
Razoavelmente clara
Status de atividade
Estagnada
Stack de tecnologia
rust
Domínio
data

Direção de pesquisa

Start with the Dot trait documentation linked in the issue and inspect its current type and scalar bounds. Determine whether mixed-element dot products are supported by the existing API; done means a documented, accepted approach or a clearly scoped API change with tests.

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

Descrição

enhancement

As far as I understand it, the current implementation of the Dot Trait does not allow the user to dot Arrays containing different data types. Why is that and is there any way to get around this limitation?

To be clear, what i need is something like this:

impl<A, B, S, S2> Dot<ArrayBase<S2, Dim<[usize; 2]>>> for ArrayBase<S, Ix2> where
    S: Data<Elem = A>,
    S2: Data<Elem = B>,
    A: LinalgScalar, 
    B: LinalgScalar + Add<Rhs = A> + Mul<Rhs = A>,

As long as the Add and Mul trait bounds are satisfied, it should be possible to use the two data types in a dot operation, right?
Sorry if I am missing something obvious here.

Linguagem predominante
Rust
Estrelas
4.3k
Forks
391
Métricas de merge de PRs
Nenhum PR com merge em 30d

Guia de contribuição

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

Primeiros passos

  1. Leia a issue inteira e depois o guia de contribuição do projeto.
  2. Comente na issue dizendo que vai assumir — evita que duas pessoas façam o mesmo trabalho.
  3. Faça um fork do repositório e trabalhe em uma branch.
  4. Abra um pull request que referencie o número da issue.

Mais de rust-ndarray/ndarray

Todas as issues de rust-ndarray/ndarray

Issues semelhantes

Mais issues de Rust

Receba novas issues na sua caixa de entrada

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