Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix Out of Index Error for is_upper() and is_upper_hessenberg() #12454

Merged
merged 7 commits into from
Mar 31, 2017

Conversation

mohit3011
Copy link
Contributor

Fixes #12452

@mohit3011
Copy link
Contributor Author

@jksuom , @Upabjojr , @asmeurer , please review this PR . Thanks

@@ -1112,7 +1112,7 @@ def is_upper(self):
"""
return all(self[i, j].is_zero
for i in range(1, self.rows)
for j in range(i))
for j in range(min(i,self.cols)))
Copy link
Member

Choose a reason for hiding this comment

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

There could be a space after comma.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Okay , I will add it.

@mohit3011
Copy link
Contributor Author

@jksuom , please review it now. Thanks

@@ -1225,6 +1225,8 @@ def test_is_upper():
assert a.is_upper is True
a = Matrix([[1], [2], [3]])
assert a.is_upper is False
a = zeros(4,2)
Copy link
Member

Choose a reason for hiding this comment

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

space after comma here, too

Copy link
Member

Choose a reason for hiding this comment

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

It's ready to go after that.

Copy link
Member

Choose a reason for hiding this comment

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

Could you make a similar mod to is_upper_hessenberg and add a test?

@mohit3011 mohit3011 changed the title Fix Out of Index Error for is_upper() Fix Out of Index Error for is_upper() and is_upper_hessenberg() Mar 30, 2017
@mohit3011
Copy link
Contributor Author

@smichr , @jksuom , updated PR , please review. Thanks

@smichr
Copy link
Member

smichr commented Mar 31, 2017

Looks good. It's in.

@smichr smichr merged commit 739e641 into sympy:master Mar 31, 2017
@mohit3011 mohit3011 deleted the Fixes#12452 branch March 31, 2017 21:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants