numpy - 将二维列数组输入二维numpy数组
问题描述
将 2d 列向量输入到 2d numpy 数组(实际的 2d 数组)的“pythonic”方式是什么?下面的示例问题:
mu = np.array([[1, 2]]).T
sigma_points = np.zeros((2, 2))
sigma_points[:, 0] = mu
编辑:
找到了:
sigma_points[:, [0]] = mu
解决方案
找到了:
sigma_points[:, [0]] = mu
推荐阅读
- python - sklearn train_test_split 在 3 维数组列表上
- laravel - Laravel 常量验证
- android - Android 包名称使用相同的单词?
- ldap - WSO2 Identity Server(5.9.0) - 是否可以使用嵌入式只读 ldap 从 jdbc 用户存储访问用户?
- python - 如何将列表中的值分类
- react-native - 如何在 graphql Apollo 客户端中实现基于光标的分页?
- ios - VNDocumentCameraViewController 的自定义视图
- azure-application-insights - 如何从 Application Insights 获取图表类型
- python - 在 Python 中创建 X 个变量名
- odoo - 负责显示枢轴日/周/月/..的xml文件的路径?