Skip to content

Commit d98a8e5

Browse files
committed
typ: annotations for truncate, left/right_shift
1 parent eb57101 commit d98a8e5

File tree

3 files changed

+14
-0
lines changed

3 files changed

+14
-0
lines changed

src/flint/types/fmpq_poly.pyi

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -68,6 +68,10 @@ class fmpq_poly(flint_poly[fmpq]):
6868
def __rdivmod__(self, other: ifmpq_poly, /) -> tuple[fmpq_poly, fmpq_poly]: ...
6969
def __pow__(self, exp: int | ifmpz, /) -> fmpq_poly: ...
7070

71+
def left_shift(self, n: int, /) -> fmpq_poly: ...
72+
def right_shift(self, n: int, /) -> fmpq_poly: ...
73+
def truncate(self, n: int, /) -> fmpq_poly: ...
74+
7175
def gcd(self, other: ifmpq_poly, /) -> fmpq_poly: ...
7276
def resultant(self, other: ifmpq_poly, /) -> fmpq: ...
7377
def xgcd(self, other: ifmpq_poly, /) -> tuple[fmpq_poly, fmpq_poly, fmpq_poly]: ...

src/flint/types/fmpz_poly.pyi

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,11 @@ class fmpz_poly(flint_poly[fmpz]):
5555
def __divmod__(self, other: ifmpz_poly, /) -> tuple[fmpz_poly, fmpz_poly]: ...
5656
def __rdivmod__(self, other: ifmpz, /) -> tuple[fmpz_poly, fmpz_poly]: ...
5757
def __pow__(self, other: int, /) -> fmpz_poly: ...
58+
59+
def left_shift(self, n: int, /) -> fmpz_poly: ...
60+
def right_shift(self, n: int, /) -> fmpz_poly: ...
61+
def truncate(self, n: int, /) -> fmpz_poly: ...
62+
5863
def gcd(self, other: ifmpz_poly, /) -> fmpz_poly: ...
5964
def content(self) -> fmpz: ...
6065
def resultant(self, other: ifmpz_poly, /) -> fmpz: ...

src/flint/typing.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -119,6 +119,11 @@ def __rmod__(self, other: _Tscalar | ifmpz, /) -> Self: ...
119119
def __divmod__(self, other: _Tscalar | ifmpz | Self, /) -> tuple[Self, Self]: ...
120120
def __rdivmod__(self, other: _Tscalar | ifmpz, /) -> tuple[Self, Self]: ...
121121
def __pow__(self, other: int, /) -> Self: ...
122+
123+
def left_shift(self, other: int, /) -> Self: ...
124+
def right_shift(self, other: int, /) -> Self: ...
125+
def truncate(self, n: int, /) -> Self: ...
126+
122127
def is_zero(self) -> bool: ...
123128
def is_one(self) -> bool: ...
124129
def is_constant(self) -> bool: ...

0 commit comments

Comments
 (0)