当前位置:网站首页>pycharm中numpy的安装与使用
pycharm中numpy的安装与使用
2022-06-10 02:00:00 【看星河的兔子】
NUMPY的安装
首先你有安装pycharm,然后点开File
点开Settings
之后如下图点击开进行操作
在这里你可以搜索你要安装的库,比如我要安装numpy,直接搜索numpy,再点击左下角的install package即可下载包
导入numpy,发现可以使用
NUMPY的简单使用
##算术运算
import numpy as np
x=np.array([1.0,2.0,3.0])
y=np.array([2.0,4.0,6.0])
print(x+y)
print(x-y)
print(x*y)
print(x/y)
D:\pythonProject2\venv\Scripts\python.exe D:/pythonProject2/main.py
[3. 6. 9.]
[-1. -2. -3.]
[ 2. 8. 18.]
[0.5 0.5 0.5]
Process finished with exit code 0
##多维运算
import numpy as np
A=np.array([[3,0],[0,6]])
B=np.array([[3,0],[0,6]])
print(A+B)
print(A*B)
import numpy as np
A=np.array([[3,0],[0,6]])
B=np.array([[3,0],[0,6]])
print(A+B)
print(A*B)
##访问
import numpy as np
A=np.array([[3,0],[0,6]])
print(A)
print(A[0])
print(A[0][1])
import numpy as np
A=np.array([[3,0],[0,6]])
print(A)
print(A[0])
print(A[0][1])
边栏推荐
- 2022 Shanghai safety officer C certificate examination simulation 100 questions and simulation examination
- "Unable to access you may not have permission to use network resources" solution
- Notepad++ advanced method of adding right-click menu
- Web server-side technical test question bank
- 机智云轻网关服务,提升生产管理效率
- Deepin runs Cherrytree and reports an error. The module gtksourceview2 cannot be found
- Hoo Hufu Research Institute | houlang in the coin circle - gamefi like baokemeng: evoverses
- 【LeetCode】114. Expand binary tree into linked list
- wps 调整文字间距
- “无法访问 您可能没有权限使用网络资源”解决办法
猜你喜欢

Leetcode 530: minimum absolute difference of binary search tree

副业收入是我做程序员的3倍,工作外的B面人生是怎样的?

剑指 Offer 10- II. 青蛙跳台阶问题

機智雲輕網關服務,提昇生產管理效率

MDK 5.37 error: unknown register name 'control' and error: c9932e: cannot obtain license for compiler

机智云轻网关服务,提升生产管理效率

Inftnews | the future of NFT in Web3 economy

LABVIEW_课堂笔记 随机(十三)子VI

How to take a screenshot of the drop-down menu of the software
![[no title] 416 Split equal sum subset](/img/23/b45eab1be07dea23bcf6aed75e6b2e.png)
[no title] 416 Split equal sum subset
随机推荐
[untitled]
投资新手买收益率多少的理财产品合适?
PAT (Advanced Level) Practice 1001 A+B Format (模拟)
机智云轻网关服务,提升生产管理效率
3. NLP model
起薪1800,三年来手头只积攒一万块,裸辞奔赴一线城市月薪达3万
Operation of simulated examination platform of recurrent training question bank for operation of refrigeration and air conditioning equipment in 2022
(w10)Prtsc截图键无法正常使用——解决办法
ZMQ communication
能源项目管理面临的挑战有哪些?成功管理能源项目的技巧和工具
iNFTnews | NFT在Web3經濟裏的未來
WebRTC 的音频弱网对抗之 NACK
28. How much do you know about subject management?
CSP 202112-1 sequence query (detailed explanation)
[group planning final review iv] input / output system
[no title] 416 Split equal sum subset
Can write a desktop digital hour clock program without programming, which can be easily realized in only 3 steps
Allan方差定義與計算方法簡介
Hoo Hufu Research Institute | houlang in the coin circle - gamefi like baokemeng: evoverses
Low code analysis and inventory: two misunderstandings need to be avoided in the application of low code in the banking industry