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

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.

主站蜘蛛池模板: 嘉善县| 乐至县| 习水县| 南和县| 鄂尔多斯市| 新余市| 芜湖市| 宽甸| 班戈县| 封开县| 桐乡市| 永德县| 公安县| 香港 | 黄浦区| 峡江县| 涡阳县| 晋州市| 荆州市| 绥德县| 依兰县| 蒙自县| 都兰县| 宿迁市| 海伦市| 化州市| 大关县| 密山市| 汤原县| 福鼎市| 莒南县| 壤塘县| 娄底市| 名山县| 固原市| 平山县| 教育| 泗阳县| 乌海市| 景谷| 香港|