1. Learn
  2. /
  3. 课程
  4. /
  5. NumPy 入门

Connected

道练习

添加行

研究团队发现有两棵树没有被记录到 tree_census 中。您的任务是将包含这两棵新树数据的行添加到 tree_census 数组的末尾。这些新树的数据保存在名为 new_trees 的二维数组中:

new_trees = np.array([[1211, 227386, 20, 0], [1212, 227386, 8, 0]])

已将 numpy 以 np 导入,tree_census 和 new_trees 数组已可用。

说明 1 / 共 2 个

undefined XP
    1
    2
  • 打印 tree_census 和 new_trees 的形状,确认它们可以进行拼接。