numpy.histogram

numpy.histogram(a, bins=10, range=None, normed=False, weights=None, density=None)

Compute the histogram of a set of data.

Parameters :

a : array_like

Input data. The histogram is computed over the flattened array.

bins : int or sequence of scalars, optional

If bins is an int, it defines the number of equal-width bins in the given range (10, by default). If bins is a sequence, it defines the bin edges, including the rightmost edge, allowing for non-uniform bin widths.

range : (float, float), optional

The lower and upper range of the bins. If not provided, range is simply (a.min(), a.max()). Values outside the range are ignored.

normed : bool, optional

This keyword is deprecated in Numpy 1.6 due to confusing/buggy behavior. It will be removed in Numpy 2.0. Use the density keyword instead. If False, the result will contain the number of samples in each bin. If True, the result is the value of the probability density function at the bin, normalized such that the integral over the range is 1. Note that this latter behavior is known to be buggy with unequal bin widths; use density instead.

weights : array_like, optional

An array of weights, of the same shape as a. Each value in a only contributes its associated weight towards the bin count (instead of 1). If normed is True, the weights are normalized, so that the integral of the density over the range remains 1

density : bool, optional

If False, the result will contain the number of samples in each bin. If True, the result is the value of the probability density function at the bin, normalized such that the integral over the range is 1. Note that the sum of the histogram values will not be equal to 1 unless bins of unity width are chosen; it is not a probability mass function. Overrides the normed keyword if given.

Returns :

hist : array

The values of the histogram. See normed and weights for a description of the possible semantics.

bin_edges : array of dtype float

Return the bin edges (length(hist)+1).

最新文章

  1. mac 键盘映射 karabiner
  2. javascript 创建 div
  3. C++ --- Hellowrod
  4. js中的undefined与null、空值的比较
  5. Light OJ 1019 - Brush (V)(图论-dijkstra)
  6. Uncaught RangeError: Maximum call stack size exceeded解决思路
  7. input 字符限制
  8. c++11 内存模型解读
  9. hdu2025查找最大元素
  10. bzoj 3207 花神的嘲讽计划Ⅰ(哈希法+主席树)
  11. 【nodemailer】之 work with mustache
  12. Protocol Buffer和JSON性能比较
  13. POJ1613 147/思维题
  14. python之串口操作
  15. Linux进程-进程的创建
  16. 三、CSS样式——列表
  17. awk知识点总结
  18. #509. 「LibreOJ NOI Round #1」动态几何问题
  19. SpringCloud+Feign环境下文件上传与form-data同时存在的解决办法(2)
  20. HDU 1495 非常可乐【BFS】

热门文章

  1. VirtualBox 桥接
  2. oracle——存储过程参数
  3. bash shell笔记1 脚本基础知识
  4. Android 模拟MotionEvent事件 触发输入法
  5. js 事件冒泡、事件捕获及事件委托
  6. PyGrub
  7. InvocationtargetException 类型转换异常
  8. python之连接oracle数据库
  9. jqgrid控件列分组
  10. Open Message Queue 集群问题