Any way to dot arrays of different type?

オープン
#1,067 コメント 4 件 リアクション 1 件 担当者 0 名 GitHub で見る

まだ誰も着手していません。

評価

難易度
5/5
見積もり時間
1週間以上
初心者へのやさしさ
30/100
issue の種類
機能追加
明瞭さ
おおむね明確
活発さ
停滞
技術スタック
rust
領域
data

調査の方向性

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.

索引モデルが issue の本文から書いたものです。

説明

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.

主要言語
Rust
スター
4.3k
フォーク
391
PR マージ指標
30日以内にマージされた PR はありません

コントリビューションガイド

このリポジトリのコントリビューションガイドは索引されていません

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

rust-ndarray/ndarray のほかの issue

rust-ndarray/ndarray の issue をすべて見る

似ている issue

Rust の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。