官术网_书友最值得收藏!

Numpy array

Very often, we deal with more complex data. If you need a matrix with multiple columns or want to perform mathematical operations over all elements in a collection, then numpy is for you:

import numpy as np

We abbreviated numpy to np by convention, keeping our code succinct.

np.array() converts a supported data type, a list in this case, into a Numpy array. To produce a numpy array from our evens list, we do the following:

np.array(evens)
主站蜘蛛池模板: 五原县| 荔浦县| 互助| 吉木萨尔县| 富川| 哈密市| 杭锦后旗| 武城县| 大田县| 平湖市| 德安县| 灵石县| 和政县| 那坡县| 峡江县| 昭苏县| 龙岩市| 平武县| 且末县| 虎林市| 武鸣县| 彩票| 商丘市| 双桥区| 同仁县| 平山县| 大田县| 英德市| 杂多县| 安溪县| 绩溪县| 丹阳市| 黄龙县| 琼结县| 清镇市| 离岛区| 阿拉善左旗| 海宁市| 宁武县| 五家渠市| 石棉县|