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 negative indices in N-dim arrays #17669

Merged
merged 12 commits into from Oct 1, 2019

Conversation

Upabjojr
Copy link
Contributor

References to other Issues or PRs

Brief description of what is fixed or changed

Other comments

Release Notes

  • tensor
    • fix negative indices access to N-dimensional arrays.

@sympy-bot
Copy link

sympy-bot commented Sep 29, 2019

Hi, I am the SymPy bot (v149). I'm here to help you write a release notes entry. Please read the guide on how to write release notes.

Your release notes are in good order.

Here is what the release notes will look like:

This will be added to https://github.com/sympy/sympy/wiki/Release-Notes-for-1.5.

Note: This comment will be updated with the latest check if you edit the pull request. You need to reload the page to see it.

Click here to see the pull request description that was parsed.

<!-- Your title above should be a short description of what
was changed. Do not include the issue number in the title. -->

#### References to other Issues or PRs
<!-- If this pull request fixes an issue, write "Fixes #NNNN" in that exact
format, e.g. "Fixes #1234". See
https://github.com/blog/1506-closing-issues-via-pull-requests . Please also
write a comment on that issue linking back to this pull request once it is
open. -->


#### Brief description of what is fixed or changed


#### Other comments


#### Release Notes

<!-- Write the release notes for this release below. See
https://github.com/sympy/sympy/wiki/Writing-Release-Notes for more information
on how to write release notes. The bot will check your release notes
automatically to see if they are formatted correctly. -->

<!-- BEGIN RELEASE NOTES -->

* tensor
  * fix negative indices access to N-dimensional arrays.
<!-- END RELEASE NOTES -->

Update

The release notes on the wiki have been updated.

@Upabjojr Upabjojr changed the title Ndim array negative indices Fix negative indices in N-dim arrays Sep 29, 2019
assert test_array[:, 3] == Array([4, 9])
assert test_array[:, 4] == Array([5, 10])

assert raises(ValueError, lambda: test_array[:, -6])
Copy link
Member

Choose a reason for hiding this comment

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

This test is failing.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yeah, raises should be used without assert.

@codecov
Copy link

codecov bot commented Sep 30, 2019

Codecov Report

Merging #17669 into master will increase coverage by 0.006%.
The diff coverage is 100%.

@@              Coverage Diff              @@
##            master    #17669       +/-   ##
=============================================
+ Coverage   74.699%   74.705%   +0.006%     
=============================================
  Files          634       634               
  Lines       165544    165581       +37     
  Branches     38946     38955        +9     
=============================================
+ Hits        123660    123698       +38     
- Misses       36401     36402        +1     
+ Partials      5483      5481        -2

@oscarbenjamin
Copy link
Contributor

Looks good to me if you're done.

@Upabjojr Upabjojr merged commit 1430b82 into sympy:master Oct 1, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants