mirror of
https://github.com/AUTOMATIC1111/stable-diffusion-webui.git
synced 2024-11-21 03:11:40 +08:00
numpy DeprecationWarning product -> prod
This commit is contained in:
parent
adadb4e3c7
commit
63fd38a04f
@ -43,7 +43,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)
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user