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

Importing NumPy

Once you start a new IPython or Jupyter session, you can import the NumPy module and verify its version as follows:

In [1]: import numpy
In [2]: numpy.__version__
Out[2]: '1.11.3'
Recall that in the Jupyter Notebook you can hit Ctrl + Enter to execute a cell once you have typed the command. Alternatively, Shift + Enter executes the cell and automatically inserts or selects the cell below it. Check out all the keyboard shortcuts by clicking on Help > Keyboard Shortcut, or take a quick tour by clicking on Help > User Interface Tour.

For the pieces of the package discussed here, I would recommend using NumPy version 1.8 or later. By convention, you'll find that most people in the scientific Python world will import NumPy using np as an alias:

In [3]: import numpy as np
In [4]: np.__version__
Out[4]: '1.11.3'

Throughout this chapter, and the rest of the book, we will stick to the same convention.

主站蜘蛛池模板: 高青县| 宝兴县| 达孜县| 于田县| 鹤岗市| 兴山县| 筠连县| 沙雅县| 沙洋县| 天气| 庐江县| 富锦市| 新龙县| 陇川县| 剑阁县| 平果县| 白水县| 庆云县| 长岭县| 翁源县| 香格里拉县| 广昌县| 呼和浩特市| 天台县| 阳西县| 雷山县| 邹城市| 昌乐县| 讷河市| 双柏县| 玉树县| 德江县| 乌兰察布市| 祥云县| 林甸县| 逊克县| 新邵县| 天祝| 上虞市| 宝应县| 三门峡市|