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).

numpy.histogram 官方手册的更多相关文章

  1. grub2详解(翻译和整理官方手册)

    翻译了grub2官方手册的绝大部分内容,然后自己整理了一下.因为内容有点杂,所以章节安排上可能不是太合理,敬请谅解. 本文目录: 1.1 基础内容 1.2 安装grub2 1.3 grub2配置文件 ...

  2. 翻译:CREATE FUNCTION语句(已提交到MariaDB官方手册)

    本文为mariadb官方手册:CREATE FUNCTION的译文. 原文:https://mariadb.com/kb/en/library/create-function/我提交到MariaDB官 ...

  3. MariaDB官方手册翻译

    MariaDB官方手册 翻译:create database语句(已提交到MariaDB官方手册) 翻译:rename table语句(已提交到MariaDB官方手册) 翻译:alter table语 ...

  4. 翻译:SET PASSWORD语句(已提交到MariaDB官方手册)

    本文为mariadb官方手册:SET PASSWORD的译文. 原文:https://mariadb.com/kb/en/library/set-password/我提交到MariaDB官方手册的译文 ...

  5. XtraDB/InnoDB的文件格式(已提交到MariaDB官方手册)

    本文为mariadb官方手册:XtraDB/InnoDB File Format的译文. 原文:https://mariadb.com/kb/en/library/xtradbinnodb-file- ...

  6. 翻译:SET Variable(已提交到MariaDB官方手册)

    本文为mariadb官方手册:SET Variable的译文. 原文:https://mariadb.com/kb/en/set-variable/我提交到MariaDB官方手册的译文:https:/ ...

  7. 翻译:赋值操作符(:=)(已提交到MariaDB官方手册)

    本文为mariadb官方手册:赋值操作符(:=)的译文. 原文:https://mariadb.com/kb/en/assignment-operator/ 我提交到MariaDB官方手册的译文:ht ...

  8. 翻译:last_value()函数(已提交到MariaDB官方手册)

    本文为mariadb官方手册:LAST_VALUE()的译文. 原文:https://mariadb.com/kb/en/last_value/我提交到MariaDB官方手册的译文:https://m ...

  9. 翻译:group_concat()函数(已提交到MariaDB官方手册)

    本文为mariadb官方手册:group_concat()函数的译文. 原文:https://mariadb.com/kb/en/group_concat/ 我提交到MariaDB官方手册的译文:ht ...

随机推荐

  1. leetcode905

    vector<int> sortArrayByParity(vector<int>& A) { vector<int> EVEN;//偶数 vector&l ...

  2. django -- url 的 name 属性

    在html的form中使用给url定义的name值,可以在修改url时不用在修改form的src. urls.py from django.conf.urls import url from myte ...

  3. centos 中没有 ifcfg-eth0 配置文件的解决办法

    用 CentOS-6.5-i386-LiveDVD.iso 镜像安装好CentOS 6.5系统后(已经把系统写入硬盘),发现ip在每次重启后都会还原,用ifconfig查看是有eth0网卡的(也有可能 ...

  4. 【HDU4301】Divide Chocolate

    题意 有一块n*2的巧克力,将它分成k块,问有多少种方法. 分析 emmm是dp没错了. 最容易想到的状态定义是f[i][j],意思是前i行,分成j块的方案数.但是发现没法转移.(后面会说一下为什么· ...

  5. 优化tomcat配置(从内存、并发、缓存3个方面)优化

    Tomcat有很多方面,我从内存.并发.缓存三个方面介绍优化方法. 一.Tomcat内存优化 Tomcat内存优化主要是对 tomcat 启动参数优化,我们可以在 tomcat 的启动脚本 catal ...

  6. 记一篇Python学习的简易版教程

    廖雪峰的教学博客https://www.liaoxuefeng.com/wiki/0014316089557264a6b348958f449949df42a6d3a2e542c000/00143178 ...

  7. Win10系统优化/设置脚本

    Win10系统优化/设置脚本 用了很长时间win10了,用的过程中,发现了一些问题,关于系统基本的优化,和个人的使用习惯设置等等,做成了一个脚本,可以一键设置win10的系统设置,结合DWS对Win1 ...

  8. Linux中IO监控命令的使用分析

    一篇不错的有关linux io监控命令的介绍和使用. 1.系统级IO监控 iostat iostat -xdm 1    # 个人习惯 %util         代表磁盘繁忙程度.100% 表示磁盘 ...

  9. 截取utf8中文字符串

    英文直接截取即可. 中文应字节长度会乱码,应先转unicode截取. 如下: #-*- coding:utf8 -*- s = u'截取中文' s.decode('utf8')[0:3].encode ...

  10. Yii2视频

    Yii2 视频分享 需要的小伙伴看过来链接: https://pan.baidu.com/s/1sl4H0RV 密码: nknx  (有问题请留言)