9951 explained code solutions for 126 technologies


python-numpyCreate Numpy horizontal vector


import numpy as np
vector = np.array([1, 2, 3, 4])ctrl + c
import numpy as np

load Numpy module for Python

np.array

declare Numpy array (vector if array is 1-dimensional)

[1, 2, 3, 4]

sample horizontal vector