Any way to dot arrays of different type?

Abierto
#1,067 4 comentarios 1 reacción 0 asignados Ver en GitHub

Nadie ha tomado este issue todavía.

Evaluación

Dificultad
5/5
Tiempo estimado
Más de una semana
Aptitud para principiantes
30/100
Tipo de issue
Nueva funcionalidad
Claridad
Bastante claro
Estado de actividad
Estancado
Stack tecnológico
rust
Área
data

Línea de trabajo

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.

Escrito por el modelo de indexación a partir del texto del issue.

Descripción

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.

Lenguaje dominante
Rust
Estrellas
4.3k
Forks
391
Métricas de merge de PR
Sin PR fusionados en 30 d

Guía de contribución

No hay ninguna guía de contribución indexada para este repositorio

Primeros pasos

  1. Lee el issue completo y luego la guía de contribución del proyecto.
  2. Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
  3. Haz un fork del repositorio y trabaja en una rama.
  4. Abre un pull request que haga referencia al número del issue.

Más de rust-ndarray/ndarray

Todos los issues de rust-ndarray/ndarray

Issues similares

Más issues de Rust

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.