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

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)
主站蜘蛛池模板: 苍南县| 青铜峡市| 芜湖市| 安顺市| 尚志市| 巴南区| 丰原市| 峨山| 独山县| 呈贡县| 丰城市| 星子县| 清水河县| 普兰店市| 启东市| 孙吴县| 达孜县| 泰兴市| 永寿县| 泰和县| 资阳市| 衡南县| 马龙县| 临西县| 泗洪县| 阿尔山市| 类乌齐县| 鄱阳县| 英山县| 临高县| 荔波县| 星子县| 丁青县| 东丰县| 澄城县| 云霄县| 天水市| 铜川市| 鄂伦春自治旗| 东至县| 新邵县|