Merge pull request #15547 from AUTOMATIC1111/numpy-DeprecationWarning-product---prod

numpy DeprecationWarning product -> prod
This commit is contained in:
AUTOMATIC1111 2024-04-21 07:23:38 +03:00 committed by GitHub
commit d74fc56fa5
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 1 additions and 1 deletions

View File

@ -47,7 +47,7 @@ def lcg(m=2**32, a=1664525, c=1013904223, seed=0):
def xor_block(block): def xor_block(block):
g = lcg() g = lcg()
randblock = np.array([next(g) for _ in range(np.product(block.shape))]).astype(np.uint8).reshape(block.shape) randblock = np.array([next(g) for _ in range(np.prod(block.shape))]).astype(np.uint8).reshape(block.shape)
return np.bitwise_xor(block.astype(np.uint8), randblock & 0x0F) return np.bitwise_xor(block.astype(np.uint8), randblock & 0x0F)