When I check the shape of an array using numpy.shape(), I sometimes get (length,1) and sometimes (length,). It looks like the differe
The (length,) array is an array where each element is a number and there are length elements in the array. The (length, 1) array is an array which also has length elements, but each element itself is an array with a single element. For example, the following uses length=3.
>>> import numpy as np
>>> a = np.array( [[1],[2],[3]] )
>>> a.shape
>>> (3, 1)
>>> b = np.array( [1,2,3] )
>>> b.shape
>>> (3,)