在python中,怎么查看numpy模块中的exp函数源代码

用的是spyder 系统

pip install ipython
ipython

一般来说这样就能看到源代码了,不过numpy好像比较特殊,可以参考如下方法:

    安装pipenv,https://docs.pipenv.org/


    用pipenv打开numpy源码

$ pipenv --three
$ python3.6 -c "from pathlib import Path;fn='Pipfile';Path(fn).write_text(Path(fn).read_text().replace('pypi.org', 'mirrors.aliyun.com/pypi'))"
$ pipenv shell
$ pipenv install numpy
$ pipenv open numpy

追问

非常感谢,第二部里面,,,python3.6 后面加了许多代码是什么意思哈?我看了半天文档说明也没看懂,,,如果不输入的话提醒出错。。

温馨提示:答案为网友推荐,仅供参考
相似回答