numpy 连接条目在单元格处相交
在 numpy 中,如何加入在单元格处相交的条目?
例如:示例 http://img153.imageshack.us/img153/5162/matd。 png
在示例中,我想将行/列 B 和 F 连接成一行/列 BF,其中每个元素是具有相同颜色的元素的平均值。
In numpy, how can I join the entries that intersects at a cell?
For example: Example http://img153.imageshack.us/img153/5162/matd.png
In the example, I want to join rows/columns B and F into one row/column BF, where each element is the average of the ones with the same color.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
从矩阵的角度来看,您想要做的事情似乎并不简单,因此以“纯 numpy”方式进行可能是不可行的。
我可能会将其分为 2 或 3 个操作:
What you want to do doesn't seem straightforward from a matrix point of view so doing in a "pure numpy" manner is likely unfeasible.
I'd probably break it up into 2 or 3 operations: