Python Programming – NumPy Installation
Numpy installation
This section discusses the simple installation approaches of NumPy in different operating system.
Windows
By default, NumPy is not shipped with official Python installer. But one can download (from website link: http://sourceforge.net/projects/numpy/files/NumPy/) the executable file of NumPy (recent version 1.8.1) followed by installing it. Before installing NumPy, please make sure that Python is already installed. NumPy is already included in Python(x,y) package, so one does not have to install NumPy separately, if the programmer is using Python(x,y).
Linux
One can install NumPy in Ubuntu (Linux) operating system by executing the following commands in the terminal (as shown in figure 6-1).
sudo apt-get install python-numpy
Data types
Some of the data types supported by NumPy are given in table 6-1.
Data type |
Description |
bool_ | Boolean (True or False) stored as a byte. |
intS | Byte (ranging from -128 to 127). |
intl6 | Integer (ranging from -32768 to 32767). |
int32 | Integer (ranging from -2147483648 to 2147483647). |
int64 | Integer (ranging from -9223372036854775808 to 9223372036854775807). |
uint8 | Unsigned integer (ranging from 0 to 255). |
uintl6 | Unsigned integer (ranging from 0 to 65535). |
uint32 | Unsigned integer (ranging from 0 to 4294967295). |
uint64 | Unsigned integer (ranging from 0 to 18446744073709551615). |
float_ | Shorthand for float64. |
floatl6 | Half precision float: sign bit, 5 bits exponent, 10 bits mantissa. |
float32 | Single precision float: sign bit, 8 bits exponent, 23 bits mantissa. |
float64 | Double precision float: sign bit, 11 bits exponent, 52 bits mantissa. |
complex_ | Shorthand for complexl28. |
complex64 | Complex number, represented by two 32-bit floats (real and imaginary components). |
complexl28 | Complex number, represented by two 64-bit floats (real and imaginary components). |
In this Page, We are Providing Python Programming – Numpy Installation. Students can visit for more Detail and Explanation of Python Handwritten Notes Pdf.
Top comments (0)