User:Ammarh1234/NumPy

= My Contributions =


 * Added a Applications section which describes the uses of NumPy as well as real world applications that have resulted from its use.
 * Added pictures to support the text
 * reworded and added bits and pieces to article as mentioned
 * linking certain words to their corresponding Wikipedia articles (for example: pointers, COVID-19, etc.)

= Original Article =

The ndarray data structure
The core functionality of NumPy is its "ndarray", for n-dimensional array, data structure. These arrays are strided views on memory. In contrast to Python's built-in list data structure, these arrays are homogeneously typed: all elements of a single array must be of the same type.

Such arrays can also be views into memory buffers allocated by C/C++, Cython, and Fortran extensions to the CPython interpreter without the need to copy data around, giving a degree of compatibility with existing numerical libraries. This functionality is exploited by the SciPy package, which wraps a number of such libraries (notably BLAS and LAPACK). NumPy has built-in support for memory-mapped ndarrays.

= My Additions =

The ndarray data structure
The core functionality of NumPy is its "ndarray", for n-dimensional array, data structure. These arrays are strided views on memory. In contrast to Python's built-in list data structure, these arrays are homogeneously typed: all elements of a single array must be of the same type. This is due to the nature of variable types, which result in them not being comparable to each other in most operations.

Such arrays can also be views into memory buffers (also known as pointers) allocated by C/C++, Cython, and Fortran extensions to the CPython interpreter without the need to copy data around, giving a degree of compatibility with existing numerical libraries. This functionality is exploited by the SciPy package, which wraps a number of such libraries (notably BLAS and LAPACK). NumPy has built-in support for memory-mapped ndarrays.

Note: the previous text was text that has been slightly edited. The following content is purely my addition.

Applications
NumPy has been used in a variety of real world applications. Most of the applications are within the STEM fields.

Quantum Computing
Creating complex numbers/equations along with vectors is one of the core functionalities of the ndarray data structure. Harmonic oscillators can be modeled using this function, which are commonly used in physics simulations.

To help write and run quantum programs, there exists a pyQuil library which allows users to simulate a quantum program within a quantum virtual machine (QVM).

Pandas
pandas is an open source sub-library within NumPy that acts as a data analysis/manipulation tool. Its core functions revolve around the DataFrame object, which allows NumPy to store variables in a two-dimensional tabular form. It aids in data visualization (through graphs, charts, etc.) and is most commonly used in data science fields to project and extrapolate business data.

Pandemic Simulations
NumPy has been used alongside other libraries like Matplotlib and SciPy to simulate effects, response times, and spread of pandemics that have been caused by viral diseases. In 2020, it was used by QuantEcon to simulate the transmission and recovery rate of COVID-19.

Cognitive Psychology (PsychoPy)
PsychoPy is an open source library that facilitates data manipulation and experimental data collection in behavioral science studies. It uses NumPy to create ndarrays that accurately time and calibrate the effects of certain factors (varies depending on the experiment). Eye tracking is often used in these studies so scientists can deduce the effects of a specific visual cue on a subject's brain.