numpy refactor

This commit is contained in:
2025-03-13 04:40:45 -05:00
parent facd9ee318
commit f6bf731186
12 changed files with 261 additions and 140 deletions

View File

@@ -9,12 +9,6 @@ def secure_fisher_yates_shuffle(arr: list) -> list:
return arr
def generate_random_nonrepeating_list(list_len: int, min_val: int = 0, max_val: int = 2 ** 16) -> list[int]:
if max_val - min_val < list_len:
raise ValueError("Range of values is less than the list length requested")
return secure_fisher_yates_shuffle(list(range(min_val, max_val)))[:list_len]
def xor_lists(l1: list[int], l2: list[int]):
if len(l1) != len(l2):
raise ValueError("Lists must be of equal length")