Skip to content

Commit c9a04c6

Browse files
committed
numpy DeprecationWarning product -> prod
1 parent adadb4e commit c9a04c6

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

modules/textual_inversion/image_embedding.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ def lcg(m=2**32, a=1664525, c=1013904223, seed=0):
4343

4444
def xor_block(block):
4545
g = lcg()
46-
randblock = np.array([next(g) for _ in range(np.product(block.shape))]).astype(np.uint8).reshape(block.shape)
46+
randblock = np.array([next(g) for _ in range(np.prod(block.shape))]).astype(np.uint8).reshape(block.shape)
4747
return np.bitwise_xor(block.astype(np.uint8), randblock & 0x0F)
4848

4949

0 commit comments

Comments
 (0)