Turn 2D NumPy array into 1D array for plotting a histogram

Viewed 25731

I'm trying to plot a histogram with matplotlib. I need to convert my one-line 2D Array

[[1,2,3,4]] # shape is (1,4)

into a 1D Array

[1,2,3,4] # shape is (4,)

How can I do this?

5 Answers
Related