Skip to content

Commit

Permalink
Sage 10.1 compatibility: fix to sage_link
Browse files Browse the repository at this point in the history
  • Loading branch information
NathanDunfield committed Jun 11, 2023
1 parent 534b8c4 commit 946ee3e
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
7 changes: 5 additions & 2 deletions spherogram_src/links/invariants.py
Original file line number Diff line number Diff line change
Expand Up @@ -779,8 +779,11 @@ def sage_link(self):
if SageKnot is None:
raise ValueError('Your SageMath does not seem to have a native link type')
sage_type = SageKnot if len(self.link_components) == 1 else SageLink
# Sage's PD_code lists strands *clockwise* not our *anticlockwise*.
code = [[x[0], x[3], x[2], x[1]] for x in self.PD_code(min_strand_index=1)]
# Sage's PD_code lists strands *clockwise* not our
# *anticlockwise* prior to Sage 10.1.
code = self.PD_code(min_strand_index=1)
if sage_pd_clockwise:
code = [[x[0], x[3], x[2], x[1]] for x in code]
return sage_type(code)

@sage_method
Expand Down
2 changes: 1 addition & 1 deletion spherogram_src/version.py
Original file line number Diff line number Diff line change
@@ -1 +1 @@
version = '2.2'
version = '2.2.1'

0 comments on commit 946ee3e

Please sign in to comment.