@@ -244,22 +244,25 @@ def _shear_row_corrections(self, g: int) -> list[list[sp.Expr]]:
244244 return row_corrections
245245
246246 def shear_coboundary (
247- self , g : sp .Rational | int , target_precision : int | None = None
247+ self , shift : sp .Integer | int , target_precision : int | None = None
248248 ) -> tuple [SeriesMatrix , int ]:
249249 """
250250 Applies a shearing transformation S(t) to the series to expose sub-exponential
251- growth, where $S(t) = diag(1, t^g , t^{2g }, \\ dots)$.
251+ growth, where $S(t) = diag(1, t^a , t^{2a }, \\ dots)$ and $a$ is the shift parameter .
252252
253253 Args:
254- g: The shear slope .
254+ shift: Represents a in the above description .
255255 target_precision: If provided, truncates the resulting series to this length,
256256 saving heavy CAS simplification on discarded tail terms.
257257
258258 Returns:
259259 A tuple containing the sheared SeriesMatrix and the integer `h` representing
260260 the overall degree shift (used to adjust the global factorial power).
261261 """
262- row_corrections = self ._shear_row_corrections (g )
262+ if not shift .is_integer :
263+ raise ValueError (f"{ shift = } must be an integer!" )
264+
265+ row_corrections = self ._shear_row_corrections (shift )
263266 power_dict = {}
264267
265268 for m in range (self .precision ):
@@ -269,13 +272,13 @@ def shear_coboundary(
269272 if val_M == sp .S .Zero :
270273 continue
271274
272- shift = int (( j - i ) * g )
275+ current = ( j - i ) * shift
273276 for c in range (self .precision ):
274277 val_C = row_corrections [i ][c ]
275278 if val_C == sp .S .Zero :
276279 continue
277280
278- power = m + c + shift
281+ power = m + c + current
279282 if power not in power_dict :
280283 power_dict [power ] = Matrix .zeros (* self .shape )
281284 power_dict [power ][i , j ] += val_C * val_M
0 commit comments