Creating a Vector using Numpy in Python

Creating a Vector using Numpy in Python – Create a one-dimensional array:

  • Example How to Create a one-dimensional array
    import numpy as np 
    
    # Create a vector as a row 
    vector_row = np.array([4, 5, 6]) 
    
    # Create a vector as a column 
    vector_column = np.array([[4], [5], [6]])