Skip to content

Creating a frame with wrong index length doesn't raise an error #49

@michcio1234

Description

@michcio1234

This code doesn't raise an error while it should:

>>> a = (np.random.rand(100,4)>0.9).astype(int)
>>> sf = SparseFrame(a, index=list('ABCD'))

But what's interesting, error is raised in __repr__:

>>> sf
...
ValueError: Shape of passed values is (4, 5), indices imply (4, 4)

And this error still looks odd: shape of passed data was (100,4), not (4,5).

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions