[(array([1, 1]), 1), (array([2, 1]), 4), (array([3, 1]), 9), (array([9, 1]), 81), (array([-2, 1]), 4), (array([-6, 1]), 36)]
---------------------------------------------------------------------------
ValueError Traceback (most recent call last)
<ipython-input-5-deba786b46ec> in <module>()
21
22 for i in range(n):
---> 23 x, expected = np.random.choice(training_data)
24 result = np.dot(weights, x)
25 error = expected - unit_step(result)
mtrand.pyx in mtrand.RandomState.choice (numpy/random/mtrand/mtrand.c:10351)()
ValueError: a must be 1-dimensional