THADOMAL SHAHANI ENGINEERING COLLEGE
DEPARTMENT OF INFORMATION TECHNOLOGY
3. Numpy: LO6
Aim: To study and implement Numpy package in Python.
Theory:
NumPy is a fundamental library in Python used for scientific computing and numerical analysis.
It provides efficient tools for working with large, multi-dimensional arrays and matrices, along
with a wide variety of mathematical functions. NumPy enhances performance and memory
efficiency compared to regular Python lists, making it indispensable for data analysis, machine
learning, and scientific applications.
Common NumPy Commands:
• [Link](): Creates a NumPy array from a list or tuple.
• [Link](): Generates an array with a range of values, similar to Python's range() but
returns a NumPy array.
• [Link](): Creates an array of a specified shape filled with zeros.
• [Link](): Creates an array of a specified shape filled with ones.
• [Link](): Reshapes an existing array to a new shape, changing its dimensions.
• [Link](): Computes the mean (average) of an array along a specified axis.
• [Link](): Returns the sum of the elements in the array, either over all elements or along a
specified axis.
• [Link](): Finds the maximum value in the array.
• [Link](): Finds the minimum value in the array.
• [Link](): Performs the dot product of two arrays, useful for matrix multiplication.
• [Link](): Transposes the array (flips rows and columns in 2D arrays).
DIVYA PATIL (146)
Program with output:
DIVYA PATIL (146)
Conclusion:
In conclusion, NumPy is an essential library for numerical and scientific computing in Python. It
provides efficient tools for working with arrays, performing mathematical operations, and
manipulating large datasets, making it a critical resource in fields like data science, machine
learning, and engineering.
LO6 has been mapped
DIVYA PATIL (146)