Question: Create a NumPy array from a Python list.Answer: import numpy as npnmy_list = [1, 2, 3]narr = np.array(my_list) |
保存以便复习
收藏此条目、标记为困难题,或将其加入复习集合。
这有帮助吗? 是 否
用户评价最有帮助的内容:
- How to install NumPy?
- Create a NumPy array from a Python list.
- What is NumPy?
- What is the difference between \'np.zeros()\' and \'np.ones()\' in NumPy?
- What is the purpose of \'np.eye()\' in NumPy?