Q:

Write a NumPy program to convert a list of numeric value into a one-dimensional NumPy array

0

Write a NumPy program to convert a list of numeric value into a one-dimensional NumPy array

All Answers

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

import numpy as np
l = [12.23, 13.32, 100, 36.32]
print("Original List:",l)
a = np.array(l)
print("One-dimensional NumPy array: ",a)

Sample Output:
Original List: [12.23, 13.32, 100, 36.32]                               
One-dimensional NumPy array:  [  12.23   13.32  100.     36.32]

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

total answers (1)

Similar questions


need a help?


find thousands of online teachers now