ml-andrewng-python icon indicating copy to clipboard operation
ml-andrewng-python copied to clipboard

TypeError : iteration over 0-d array

Open shreykhetrapal opened this issue 7 years ago • 0 comments

Line number 123 , the usage of size

s = np.array(data.size)

Returns the number of the elements whereas only the elements of column 'size' are required .

It is giving the error - TypeError : iteration over 0-d array

So it is better to change the argument name on line number 122 to anything other than size.

data = pd.read_csv("ex1data2.txt",names=["size","bedrooms","price"])

shreykhetrapal avatar Oct 14 '18 06:10 shreykhetrapal