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

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.

主站蜘蛛池模板: 南华县| 榆林市| 茌平县| 浦北县| 永福县| 潼南县| 临高县| 石首市| 抚松县| 宜兰县| 南漳县| 班玛县| 上思县| 绥江县| 仪陇县| 章丘市| 高雄县| 峡江县| 新疆| 嘉义市| 苍山县| 轮台县| 丹江口市| 金湖县| 南宁市| 长治市| 东平县| 美姑县| 老河口市| 三亚市| 资阳市| 元朗区| 承德县| 无极县| 盘山县| 安吉县| 赣榆县| 惠安县| 高邮市| 黑山县| 大同县|