Skip to content

TypeError : iteration over 0-d array #1

@shreykhetrapal

Description

@shreykhetrapal

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"])

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions