Q.5 How do you create a 1-D array in numpy?

Ans. You can create a 1-D array in numpy as follows:

x = np.array([1,2,3,4])

Where numpy is imported as np


Posted

in

by

Tags:

Comments

Leave a Reply

Your email address will not be published. Required fields are marked *