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

Reading manual pages

When we are in IPython's pylab mode ($ ipython –pylab), we can open manual pages for NumPy functions with the help command. It is not necessary to know the name of a function. We can type a few characters and then let tab completion do its work. Let's, for instance, browse the available information for the arange() function.

We can browse the available information in either of the following two ways:

  • Calling the help function: Call the help command. Type in a few characters of the function and press the Tab key.
  • Querying with a question mark: Another option is to append a question mark to the function name. You will then, of course, need to know the function name, but you don't have to type help, for example:
    In [3]: arange?
    

    Tab completion is dependent on readline, so you need to make sure that it is installed. It can be installed with setuptools with one of the following commands:

    $ easy_install readline
    $ pip install readline
    

    The question mark gives you information from docstrings.

主站蜘蛛池模板: 华阴市| 三门县| 潞城市| 柘荣县| 楚雄市| 开化县| 富宁县| 柞水县| 佛坪县| 泽普县| 大悟县| 沭阳县| 永丰县| 孝感市| 临夏市| 从江县| 杭州市| 吴堡县| 焦作市| 天气| 宣化县| 沈阳市| 壤塘县| 淳安县| 晋中市| 宜州市| 酉阳| 德保县| 宣化县| 什邡市| 吉安市| 普兰店市| 侯马市| 长治县| 建阳市| 瓮安县| 东海县| 定结县| 潜山县| 招远市| 若羌县|