Human: turn a matrix into a vector in. Assistant: 
Here is a Python code to turn a matrix into a vector

import numpy as np

def to_vector(m):
    """Turn a matrix into a vector.
    """
    return np.reshape(m, (m.size,))

# Enter the matrix
m = np.array([[1, 2, 3], [4, 5, 6]])

# Calling the function
print((m.shape))
print((to_vector(m)))

#Example Output
# (2, 3)
# [1 2 3 4 5 6]

#Remember to inspect code for bugs.