[go: up one dir, main page]

0% found this document useful (0 votes)
4 views4 pages

Thadomal Shahani Engineering College: Department of Information Technology

The document outlines a program designed to perform basic operations on 1-D and multi-dimensional arrays using NumPy. It covers user input handling, array creation, properties retrieval, slicing, reshaping, arithmetic operations, and statistical analysis, emphasizing the efficiency of NumPy over traditional Python lists. The program demonstrates modular implementation, making it suitable for large datasets in scientific computing and data analysis.

Uploaded by

vedantraje2005
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
4 views4 pages

Thadomal Shahani Engineering College: Department of Information Technology

The document outlines a program designed to perform basic operations on 1-D and multi-dimensional arrays using NumPy. It covers user input handling, array creation, properties retrieval, slicing, reshaping, arithmetic operations, and statistical analysis, emphasizing the efficiency of NumPy over traditional Python lists. The program demonstrates modular implementation, making it suitable for large datasets in scientific computing and data analysis.

Uploaded by

vedantraje2005
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 4

THADOMAL SHAHANI ENGINEERING COLLEGE

DEPARTMENT OF INFORMATION TECHNOLOGY

3.Array Operations : LO2


Aim: To study basic array operations on 1-D and multi-dimensional array

Theory:

User Input Handling: The program takes user input to create arrays dynamically, including a 2D
array and a list of student marks.

1.​ NumPy Array Creation: Lists are converted into NumPy arrays for efficient numerical
operations.
2.​ Array Properties: The program retrieves and displays properties like data type, shape,
size, number of dimensions, and item size.
3.​ Slicing: A portion of the 2D array is extracted using slicing techniques.
4.​ Reshaping: The 2D array is reshaped into a 3D array using NumPy’s reshape() function.
5.​ Arithmetic Operations: Element-wise addition, subtraction, multiplication, division, and
exponentiation are performed on two NumPy arrays.
6.​ Mathematical Functions: Functions like sum(), mean(), max(), min(), and std() are used
for numerical analysis.
7.​ Statistical Analysis: The program computes statistical metrics (mean, median, min, max)
on student marks.
8.​ Efficiency of NumPy: NumPy’s optimized operations enable faster computations
compared to Python lists.
9.​ Modular Implementation: The code is structured into separate sections for handling
arrays, arithmetic operations, and statistical computations.
Program with output:
Conclusion:

This program demonstrates the power and efficiency of NumPy for numerical computing. It
covers array creation, manipulation, arithmetic operations, slicing, reshaping, and statistical
analysis. By utilizing NumPy, the program performs operations much faster than traditional
Python lists, making it ideal for handling large datasets. The structured approach ensures
modularity, allowing easy modifications and scalability. This showcases NumPy’s versatility in
scientific computing and data analysis.

You might also like