NumPy and basic stats
NumPy is designed to handle big data swiftly. It includes the following essential components according to the NumPy documentation:
- A powerful n-dimensional array object
- Sophisticated (broadcasting) functions
- Tools for integrating C/C++ and Fortran code
- Useful linear algebra, Fourier transform, and random number capabilities
You will be using NumPy going forward. Instead of using lists, you will use NumPy arrays, which are basic elements of the NumPy package. NumPy arrays are designed to handle arrays of any dimension.
Numpy arrays can be indexed easily and can have many types of data, such as float
, int
, string
, and object
, but the types must be consistent to improve speed.
Exercise 129 – converting lists into NumPy arrays
In this exercise, you will convert a list into a numpy
array. The following steps will enable you to complete this exercise:
- Open a new Jupyter Notebook.
- Then, you need to import
numpy
:import...