Skip to content
This repository was archived by the owner on Mar 27, 2025. It is now read-only.

Fix minor bug in getmatrix#53

Open
ironmaniiith wants to merge 1 commit intomasterfrom
fix-bug-getmatrix
Open

Fix minor bug in getmatrix#53
ironmaniiith wants to merge 1 commit intomasterfrom
fix-bug-getmatrix

Conversation

@ironmaniiith
Copy link
Copy Markdown
Contributor

@ironmaniiith ironmaniiith commented Jun 23, 2019

The current code fails when count is a multiple of columns. Also the if condition here always evaluates to True and doesn't solve it's purpose as expected here

rows = float(count / columns)
rows = float(count) / columns

if isinstance(rows, float):
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

rows is always an instance of float. Hence this conditional statement doesn't work

@djay
Copy link
Copy Markdown
Member

djay commented Jun 26, 2019

If you find a bug then add a test that detects that bug. It's esp good to checkin the test before fixing the code to show in the CI that the test fails

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants