convenient functions in numpy
来源:互联网 发布:如何把淘宝店铺关闭 编辑:程序博客网 时间:2024/06/03 19:33
import numpy as npimport scipy.stats as st
np.random.rand(d0, d1, …, dn)
仅表示服从
>>> np.random.rand(2, 3)array([[ 0.33265357, 0.03494197, 0.02490148], [ 0.95236337, 0.98037261, 0.83386163]])
st.norm()
st.norm():表示标准正太分布;
st.norm().pdf(x):表示标准正太分布的概率密度函数;
标准正态分布的概率密度函数也即:
>>> st.norm().pdf(0)0.3989422804014327
np.r_, np.c_
两者均不是函数;
np.r_:Translates slice objects to concatenation along the first axis.在第一个轴上(axis=0)进行拼接,
np.r_[np.array([1, 2, 3]), 0, 0, np.array([4, 5, 6])]array([1, 2, 3, 0, 0, 4, 5, 6])
np.c_:Translates slice objects to concatenation along the second axis.在第二个轴上(axis=1)进行拼接
>>> np.c_[np.array([[1,2,3]]), 0, 0, np.array([[4,5,6]])]array([[1, 2, 3, 0, 0, 1, 2, 3]])
0 0
- convenient functions in numpy
- Numpy Mathematical functions 数学函数
- some functions in assembly
- Useful functions in PHP
- python build-in functions
- Inline Functions in C++
- Callback Functions in JavaScript
- Functions in R
- Overloading Functions in C
- Built-in Functions
- Python Built-in Functions
- awk built-in functions
- [Built-in Functions] - A
- [Built-in Functions] - B
- [Built-in Functions] - C
- [Built-in Functions] - D
- [Built-in Functions] - E
- [Built-in Functions] - F
- 解决ckeditor在bootstrap中modal中弹框无法输入问题
- 仲恺acm 1003:A+B 输入输出练习IV【java】
- 1013 3的幂的和
- linux中的通配符学习小结
- 数据库第三章
- convenient functions in numpy
- ubuntu gcc/g++ 升级到4.8 支持C++11
- Several ports (8005, 8080, 8009) required by Tomcat v7.0 Server at localhost are already in use
- 【Android进阶】如何写一个很屌的动画(2)---动画的好帮手们
- $.extend()和$.fn.extend()区别
- Java基础问题(一)
- Web测试最容易遗漏的地方
- android service
- 迷