Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
有没有办法计算沿矩阵的列或行的原始元素的平均值,以便我们获得具有平均值的向量?
例如,让
A = [[1, 2, 3],[4, 5, 6]]
成为一个2x3矩阵。列平均值将在 3 元素向量中检索,例如[2.5, 3.5, 4.5],而行平均值将在 2 元素向量中检索,例如[2, 5]。
2x3
[2.5, 3.5, 4.5]
[2, 5]
Numpy 和 Matlab 提供了这个功能,我想知道 ojAlgo 中是否有这样的可用性。当然,这将排除使用循环,这在我们的例子中是需要的。
不,目前你必须自己做一些循环,但请在 GitHub 上为此打开一个问题。
https://github.com/optimatika/ojAlgo/issues
(将实施。)