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

arrow((0,0), (0,0), linestyle='dashed') raises list index out of range #35031

Closed
seblabbe opened this issue Feb 8, 2023 · 2 comments · Fixed by #35156
Closed

arrow((0,0), (0,0), linestyle='dashed') raises list index out of range #35031

seblabbe opened this issue Feb 8, 2023 · 2 comments · Fixed by #35156

Comments

@seblabbe
Copy link
Contributor

seblabbe commented Feb 8, 2023

With SageMath version 9.8.beta1, Release Date: 2022-09-29, this works:

sage: arrow((0,0), (0,0))
Launched png viewer for Graphics object consisting of 1 graphics primitive

but this is broken:

sage: arrow((0,0), (0,0), linestyle='dashed')
/home/slabbe/GitBox/sage/src/sage/repl/rich_output/display_manager.py:610: RichReprWarning: Exception in _rich_repr_ while displaying object: list index out of range
  warnings.warn(
Graphics object consisting of 1 graphics primitive
@aniketwdubey
Copy link

aniketwdubey commented Feb 18, 2023

@seblabbe One way to work around this issue is to use the linetypes option instead of linestyle to specify the type of line used for the arrow.
sage: arrow((0,0), (0,0), linetypes=['dashed'])

@videlec
Copy link
Contributor

videlec commented Feb 26, 2023

Are linestyle and linetypes equivalent? I am confused by having two arguments having the same purpose, one broken and the other not...

vbraun pushed a commit that referenced this issue Mar 26, 2023
    
### 📚 Description
We return False if there is no n-th path

Closes #35031

### 📝 Checklist

<!-- Put an `x` in all the boxes that apply. -->
<!-- If your change requires a documentation PR, please link it
appropriately -->
<!-- If you're unsure about any of these, don't hesitate to ask. We're
here to help! -->

- [X] I have made sure that the title is self-explanatory and the
description concisely explains the PR.
- [X] I have linked an issue or discussion.
- [ ] I have created tests covering the changes.
- [ ] I have updated the documentation accordingly.
    
URL: #35156
Reported by: Andrew
Reviewer(s): Sébastien Labbé
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants