A numpy matrix can be reshaped into a vector using reshape function with parameter -1. But I don't know w