The document outlines a Python lab assignment to write scripts for various NumPy operations, including creating 1D and 2D arrays from lists, extracting elements from arrays, matrix multiplication between 2D arrays, and using broadcasting to add constants to array columns. The assignment contains 8 tasks to work with NumPy arrays and practice common array operations and manipulations.
The document outlines a Python lab assignment to write scripts for various NumPy operations, including creating 1D and 2D arrays from lists, extracting elements from arrays, matrix multiplication between 2D arrays, and using broadcasting to add constants to array columns. The assignment contains 8 tasks to work with NumPy arrays and practice common array operations and manipulations.
The document outlines a Python lab assignment to write scripts for various NumPy operations, including creating 1D and 2D arrays from lists, extracting elements from arrays, matrix multiplication between 2D arrays, and using broadcasting to add constants to array columns. The assignment contains 8 tasks to work with NumPy arrays and practice common array operations and manipulations.
The document outlines a Python lab assignment to write scripts for various NumPy operations, including creating 1D and 2D arrays from lists, extracting elements from arrays, matrix multiplication between 2D arrays, and using broadcasting to add constants to array columns. The assignment contains 8 tasks to work with NumPy arrays and practice common array operations and manipulations.
Lab Code/Theory : 1. Create a 1D NumPy array from the list
SE_ECS_Python Lab(23-24) Roll No:9818
2. Create a 2D NumPy array from the list
3. Create 4 x 4 NumPy array from 1 to 16
SE_ECS_Python Lab(23-24) Roll No:9818
4. Use a tuple [1,2,3,4] to create NumPy array
5. Get the sum of second and third elements of the above array
SE_ECS_Python Lab(23-24) Roll No:9818
6. Create a 7 by 7 NumPy array from 1 to 49. Extract the middle element
7. Create a 4 by 4 NumPy array from 1 to 16 .Extract the last row
SE_ECS_Python Lab(23-24) Roll No:9818
8. Write two 2 D NumPy arrays and perform matrix multiplication
SE_ECS_Python Lab(23-24) Roll No:9818
SE_ECS_Python Lab(23-24) Roll No:9818 A]
B]
SE_ECS_Python Lab(23-24) Roll No:9818
C]
SE_ECS_Python Lab(23-24) Roll No:9818
Post lab : 1. There is an array : [[0,0,0],[1,2,3],[4,5,6]]). Add the elements of the first column by 10, SE_ECS_Python Lab(23-24) Roll No:9818 second column by 20 and third column by 30. Use NumPy broadcasting