Manipulating NumPy Arrays

Manipulating NumPy Arrays (105 points)

Write a program to provide the following tasks for a 1-D NumPy array:

  1. Create and print a one-dimensional (1-D) with 20 numerical items

  2. Print the dimension of the array

  3. Print the array value for index equal 10

  4. Slice and print the array between 5 and 15 indexes. Include both of the arrays.

  5. Print the data type of the array

  6. Make a copy of the array and print it

  7. Make a view of the array and print it

  8. Print the shape of the array

  9. Reshape the array and print it

SAMPLE ASSIGNMENT

Sample-2

Powered by WordPress