Skip to content

Commit 26de009

Browse files
committed
Remove longest_common_prefix
1 parent ab15e1a commit 26de009

1 file changed

Lines changed: 0 additions & 10 deletions

File tree

src/torchjd/sparse/_diagonal_sparse_tensor.py

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -277,16 +277,6 @@ def get_groupings(pshape: list[int], strides: Tensor) -> list[list[int]]:
277277
return new_columns
278278

279279

280-
def longest_common_prefix(l1: list[int], l2: list[int]) -> list[int]:
281-
prefix = []
282-
for a, b in zip(l1, l2, strict=False):
283-
if a == b:
284-
prefix.append(a)
285-
else:
286-
break
287-
return prefix
288-
289-
290280
def encode_by_order(input: list[int]) -> tuple[list[int], list[int]]:
291281
"""
292282
Encodes values based on the order of their first appearance, starting at 0 and incrementing.

0 commit comments

Comments
 (0)