Python numpy Library Learning

Source: Internet
Author: User

1.numpy.floor (a)

Returns the smallest integer greater than the element

NP.  Array([-1.7-1.5-0.20.21.51.7   2.0])
NP.  Floor(a)array ([ -2., -2., -1., 0., 1., 1., 2.])     

2.np.linspace (0,20,100)
Returns an array of 100 points from 0 to 20

3.hist,bin_edges=np.histogram (A, bins) Note that this function does not necessarily produce exactly the sum of all the hist added and is 1, because bins's group spacing is not necessarily 1. The sum is 1 only if the group spacing is 1.
Here is a workaround for the bug, about why normlized is not equal to 1 confusion.

Http://stackoverflow.com/questions/21532667/numpy-histogram-cumulative-density-does-not-sum-to-1

Python numpy Library Learning

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.