https://miro.medium.com/v2/resize:fit:640/format:webp/1*vLmCE-IMC2Pq-K26MctH6g.png

NumPy

NumPy is a library or package in Python specifically designed for scientific computing. The main focus of NumPy is the use of multidimensional array objects and providing a collection of operations for efficient processing of arrays. The name "NumPy" itself stands for "Numeric Python", which describes that this library was developed for mathematical and numerical processes.

NumPy is commonly used in conjunction with other libraries such as Pandas to perform numerical operations in data analysis and scientific processing. With its multidimensional array capabilities and wide array of mathematical functions provided, NumPy is one of the most important libraries in the Python programming environment for scientific purposes and data analysis.

A. Operations

  1. Mathematical and logical operations.
  2. The operation is closely related to linear albajar, and has built-in functions to perform linear algebra operations and generate numbers randomly.
  3. Advanced operations, such as fourier transform.

B. Relationship with Machine Learning

NumPy has a very close relationship with machine learning. This is because, the operations that exist in NumPy must be used to build machine learning algorithms.

In addition, the computational process contained in NumPy can be run with a very fast time and with smaller memory. We can say that NumPy is an important element if we want to create machine learning effectively, optimally, and quickly.

NumPy then Array

The most important object defined by NumPy isthe N-dimensional array type commonly referred to as ndarray.

NumPy flow. Source: NumPy

NumPy flow. Source: NumPy

The picture above illustrates a collection of items of the same type. This collection allows access to each item using a zero-based index. The main advantage of ndarray is that each item in this collection has the same block size in memory, so operations on NumPy are faster and more efficient.

In addition, the speed of the process on NumPy is also due to the homogeneity of the elements in the ndarray. Each element in the ndarray is an object of a data-type object commonly referred to as a dtype. This advantage makes NumPy an ideal choice for numeric and scientific computing in the Python programming environment.