Repository navigation
fix: raise a clear ValueError when create_dataset gets an empty array - #1779
mayuriphad wants to merge 2 commits into
Conversation
create_dataset read data[0] to detect the data format, so an empty list or numpy array raised IndexError instead of a descriptive ValueError. Signed-off-by: mayuriphad <mayuriphad656@gmail.com>
There was a problem hiding this comment.
Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.
An organization owner can choose the repository organization as the billing source for reviews requested by members with a paid Copilot license. Learn about Copilot code review billing.
|
Hi, just a gentle ping on this PR. It's ready for review whenever you have time, and I'm happy to make any changes you'd like. Thanks! |
There was a problem hiding this comment.
Copilot was unable to review this pull request because the user who requested the review has insufficient remaining quota.
An organization owner can choose the repository organization as the billing source for reviews requested by members with a paid Copilot license. Learn about Copilot code review billing.
Metadata
create_dataset()raisingIndexErrorinstead ofValueErrorfor an empty list or arrayDetails
create_dataset()readdata[0]to detect the data format, so a zero-row list ornumpy.ndarraycrashed withIndexError: index 0 is out of bounds. It now raisesValueError: 'data' must contain at least one row, but it is empty.test_create_invalid_datasetgains an empty-array case. It fails withIndexErrorbefore the change and passes after.