当前位置:网站首页>[untitled] numpy learning
[untitled] numpy learning
2022-07-03 10:38:00 【weixin_ forty-three million six hundred and ninety-one thousand】
- Slicing and indexing ( Select rows and columns )t[2] t[3:,:] From the position 3 All lines are selected , Select column t[:,4:] A series of lines : t[2:,3] Discontinuous lines t[[1,3],[2,4]] The choice is (1,2)(3,4) Two positions Indexes t[2,3]
- assignment t[2:,3]=3
- Boolean index t[t>10]=10
- Ternary operator np.where(t>10,20,0) The greater than 10 The replacement of is 20 Replace others with 0
- tailoring t.clip(10,20) The less than 10 The replacement of is 10, about 20 The replacement of is 20
- Transposition t.transform() t.T t.swapaxes(1,0)
- Read local file np.loadtxt(file_file_path ,delimiter,dtype)
- nan and inf inf Express infinite nan It's not a number np.nan!=np.nan np.count_nonzero(na.nan!=np.nan) np.isan(t1) Effects np.nan!=np.nan identical
- Common statistical functions t.sum(axis=0) np.median(t,axis=0) t.mean(axis=0) t.max() t.mean() np.mean() np.ptp The calculation is very poor t.std Standard deviation Reaction data dispersion
Add country information Splice two sets of data
np.loadtxt(us_data,delimiter=",",dytepe=int)
Construct all zero data ,zeros_data=np.zeros()
ones_data=np.data()
Add data
us-data=np.hstack()
Create an array of all zeros , All in one number
np,eyes(5)
Get the maximum , minimum value
np.argmax(t,axis=0)
np.argmin(t,axis=0)
np.random.randint() Given the upper and lower limits, select the random number certificate
.rand()
.randn()
.unifi
np.random.seed()
t=np.random.randint()
边栏推荐
- Synchronous vs asynchronous
- Model evaluation and selection
- 多层感知机(PyTorch)
- Leetcode刷题---1385
- 【吐槽&脑洞】关于逛B站时偶然体验的弹幕互动游戏魏蜀吴三国争霸游戏的一些思考
- Data preprocessing - Data Mining 1
- Content type ‘application/x-www-form-urlencoded; charset=UTF-8‘ not supported
- 六、MySQL之数据定义语言(一)
- Handwritten digit recognition: CNN alexnet
- mysql5.7安装和配置教程(图文超详细版)
猜你喜欢

Multilayer perceptron (pytorch)

神经网络入门之模型选择(PyTorch)

Timo background management system

Leetcode - 706 design hash mapping (Design)*

7、 Data definition language of MySQL (2)

mysql5.7安装和配置教程(图文超详细版)

Judging the connectivity of undirected graphs by the method of similar Union and set search

I really want to be a girl. The first step of programming is to wear women's clothes
![Step 1: teach you to trace the IP address of [phishing email]](/img/a5/c30bc51da560c4da7fc15f434dd384.png)
Step 1: teach you to trace the IP address of [phishing email]

权重衰退(PyTorch)
随机推荐
Timo background management system
ECMAScript -- "ES6 syntax specification # Day1
QT creator uses OpenCV Pro add
Weight decay (pytorch)
神经网络入门之预备知识(PyTorch)
Leetcode刷题---263
实战篇:Oracle 数据库标准版(SE)转换为企业版(EE)
What did I read in order to understand the to do list
High imitation Netease cloud music
Leetcode刷题---217
Automatic derivation of introduction to deep learning (pytoch)
Out of the box high color background system
Softmax regression (pytorch)
Are there any other high imitation projects
8、 Transaction control language of MySQL
Ind yff first week
Leetcode skimming ---977
Neural Network Fundamentals (1)
Leetcode刷题---704
Configure opencv in QT Creator