Computer Science, asked by megha20052002agrawal, 1 year ago

Write code to create an ndarray having six zeros in it. Write statements to change 3rd and 5th
elements of this ndarray to 15 and 25 respectively.

Answers

Answered by gaintboy70509000
5

It is common to need to reshape a one-dimensional array into a two-dimensional array with one column and multiple arrays. NumPy provides the reshape() function on the NumPy array object that can be used to reshape the data. The reshape() function takes a single argument that specifies the new shape of the array.

Answered by Anonymous
7

heya...!!

here is ua answer:

✔It is a general approach to import numpy with alias as 'np'. ... To make it easier an alias 'np' is introduced so we can write np.function. ... a = np.array([15,25,14,78,96],dtype ..

hope it helps...!!❤

Similar questions