当前位置:   article > 正文

Numpy 和 Matplotlib 基础_numpy~=1.19.2 matplotlib 什么版本匹配

numpy~=1.19.2 matplotlib 什么版本匹配

运行环境:win32,python3.6,IDLE

Numpy 和 Matplotlib安装

Numpy :pip install numpy

matplotlib: 下载预Matplotlib编译的安装包,注意选择Python的版本和系统的位数 使用pip包管理器安装,在命令行中输入:pip install 下载安装包的完整路径 打开Python

如果import maplotlib和import numpy可以正常载入,则表明安装成功。

使用help命令查看两个函数库的描述如下:

DESCRIPTION
NumPy
=====
Provides
1. An array object of arbitrary homogeneous items
2. Fast mathematical operations over arrays
3. Linear Algebra, Fourier Transforms, Random Number Generation


NAME
matplotlib.pyplot - Provides a MATLAB-like plotting framework.

DESCRIPTION
:mod:~matplotlib.pylab combines pyplot with numpy into a single namespace.
This is convenient for interactive work, but for programming it
is recommended that the namespaces be kept separate, e.g.:

    import numpy as np
    import matplotlib.pyplot as plt
    #
    x = np.arange(0, 5, 0.1);
    y = np.sin(x)
    plt.plot(x, y)
  • 1
  • 2
  • 3
  • 4
  • 5
  • 6

help()查看常用函数

np.arange()

help(np.arange)

arange(...)
    arange([start,] stop[, step,], dtype=None)

    Return evenly sp
  • 1
  • 2
  • 3
  • 4
  • 5
  • 6
声明:本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有侵权的内容,请联系我们。转载请注明出处:【wpsshop博客】
推荐阅读
相关标签
  

闽ICP备14008679号