How to Create a 0-D NumPy Array Or Scalar


In this example we will show how to create a 0-D NumPy array or Scalar in Python.

Source Code

import numpy as np

n = np.array(8)

print(n)

print(type(n))

Output:

8
Subscribe
Notify of
guest
0 Comments
Inline Feedbacks
View all comments