Python Programming/numpy
Numpy is a numeric library for python.
Installation
editIt'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:
- ImportError “No Module named Setuptools”, save the file https://bootstrap.pypa.io/ez_setup.py into the Python folder, and install it with:
python ez_setup.py install
.- Microsoft Visual C++ 9.0 is required, download it on https://www.microsoft.com/en-us/download/details.aspx?id=44266
Histogram
editimport numpy
mydata = [numpy.random.normal(0,1) for i in range(10000) ]
h, n = numpy.histogram( mydata , 100, (-5,5) )
This section is a stub. You can help Wikibooks by expanding it. |