< Python Programming

Numpy is a numeric library for python.

Installation

It's provided with the main Linux distribution, however it can be installed through the Debian package python-numpy. On Windows, it can be downloaded on http://sourceforge.net/projects/numpy/files/.

Then, once the .zip unpacked, the installation is done by entering into the console:

python setup.py install

In case of error:

Histogram

import numpy
mydata = [numpy.random.normal(0,1) for i in range(10000) ]
h, n = numpy.histogram( mydata , 100, (-5,5) )

See also

This article is issued from Wikibooks. The text is licensed under Creative Commons - Attribution - Sharealike. Additional terms may apply for the media files.