Q:

Create two 2-D arrays and Plot them using matplotlib

belongs to collection: Python NumPy Exercises

0

Create two 2-D arrays and Plot them using matplotlib

All Answers

need an explanation for this answer? contact us directly to get an explanation for this answer

import numpy

print("Printing Original array")
sampleArray = numpy.array([[34,43,73],[82,22,12],[53,94,66]]) 
print (sampleArray)

print("Array after deleting column 2 on axis 1")
sampleArray = numpy.delete(sampleArray , 1, axis = 1) 
print (sampleArray)

arr = numpy.array([[10,10,10]])

print("Array after inserting column 2 on axis 1")
sampleArray = numpy.insert(sampleArray , 1, arr, axis = 1) 
print (sampleArray)

need an explanation for this answer? contact us directly to get an explanation for this answer

total answers (1)

<< Delete the second column from a given array and in...