How do I change the dimension of an array
You have only one element in the array because you didn't but "," between your numbers. Try it like this: array=[1.16, 2.51, 1.15, 1.52, 1.11, 1.84, 1.07, 3, 2, 1.71, 0.48, 1.85, 1.32, 1.17, 1.48, 2.59]. If this isn't what you wanted, describe your problem a bit more.
I am trying to use sklearn Linear Regression, however whenever I run my code it comes up with an error: Expected 2D array, got 1D array instead:
array=[1.16 2.51 1.15 1.52 1.11 1.84 1.07 3.   2.   1.71 0.48 1.85 1.32 1.17
1.48 2.59].
Anyone know How I can fix this?