|
4 | 4 | import ctypes.util
|
5 | 5 | import dataclasses
|
6 | 6 | import fnmatch
|
| 7 | +import itertools |
7 | 8 | import logging
|
8 | 9 | import lzma
|
9 | 10 | import os
|
10 | 11 | import os.path
|
11 | 12 | import struct
|
12 | 13 | import typing
|
13 | 14 |
|
14 |
| -from itertools import accumulate, permutations |
15 | 15 | from types import TracebackType
|
16 | 16 | from typing import BinaryIO, Callable, Dict, List, Optional, Tuple, Type, Union
|
17 | 17 |
|
@@ -172,7 +172,7 @@ def init_ppp48_idx() -> Tuple[List[List[List[int]]], List[int], List[int], List[
|
172 | 172 | i, j, k = ITOSQ[x] - 8, ITOSQ[y] - 8, ITOSQ[z] - 8
|
173 | 173 |
|
174 | 174 | if idx_is_empty(ppp48_idx[i][j][k]):
|
175 |
| - for ii, jj, kk in permutations((i, j, k)): |
| 175 | + for ii, jj, kk in itertools.permutations((i, j, k)): |
176 | 176 | ppp48_idx[ii][jj][kk] = idx
|
177 | 177 | ppp48_sq_x[idx], ppp48_sq_y[idx], ppp48_sq_z[idx] = i, j, k
|
178 | 178 | idx += 1
|
@@ -204,7 +204,7 @@ def init_aaidx() -> Tuple[List[int], List[List[int]]]:
|
204 | 204 | def init_aaa() -> Tuple[List[int], List[List[int]]]:
|
205 | 205 | # Get aaa_base.
|
206 | 206 | comb = [a * (a - 1) // 2 for a in range(64)]
|
207 |
| - aaa_base = list(accumulate(comb)) |
| 207 | + aaa_base = list(itertools.accumulate(comb)) |
208 | 208 |
|
209 | 209 | # Get aaa_xyz.
|
210 | 210 | aaa_xyz = [[x, y, z] for z in range(64) for y in range(z) for x in range(y)]
|
|
0 commit comments