You can use NumPy .array() function to make a NumPy array.

The syntax for making an array in NumPy:

np.array([element1, element2, elementn])

The following syntax can be demonstrated using an example in Python:

import numpy as np

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

array_variable

This is how you make an array in Numpy.

In Conclusion

Do you have any problems making a NumPy array? Let us know in the comment section below.

LEAVE A REPLY

Please enter your comment!
Please enter your name here