Skip to content

rohitrksingh1920/Python-Assignment-04

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 

Repository files navigation

(a) Key Features of NumPy

1 Fast Numerical Computation : NumPy is written in C and optimized for speed, making mathematical operations significantly faster than Python lists.

2 Multidimensional Arrays : It provides the ndarray object that supports 1D, 2D, and higher-dimensional arrays.

3 Vectorized Operations : Operations are applied on the whole array without loops — cleaner and faster.

4 Memory Efficient : NumPy arrays store elements of the same data type, reducing memory usage.

5 Large Collection of Mathematical Functions : Includes linear algebra, statistics, trigonometry, reshaping, sorting, and more.

6 Supports Broadcasting : Enables operations between arrays of different shapes.

Differences Between NumPy Arrays and Python Lists

Feature NumPy Array Python List
Speed Much faster (C optimized) Slower
Data Type Homogeneous (one type) Heterogeneous (mixed types)
Memory Usage Lower Higher
Operations Element-wise directly Need loops for element-wise
Dimensions Supports multi-dimensional Mostly 1D (nested lists for 2D)
Functions Large scientific function library Limited built-in operations
Screenshot (332) Screenshot (331)

(b) Python program using NumPy to create one-dimensional and two-dimensional arrays and display their shape, dimensions, and data type

Screenshot (333)

Author

Name : Rohit

Roll Number : 2501060098

Section : "A"

Program : BCA(AI & DS

Course : Problem Solving Python

Assignment : 04

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages