Fix loop to account for accuracy (for real this time)
This commit is contained in:
parent
04d2d6ef55
commit
6db0132b07
1 changed files with 3 additions and 1 deletions
|
@ -69,7 +69,9 @@ class ImageCog(commands.Cog):
|
||||||
|
|
||||||
accuracy = 0.0
|
accuracy = 0.0
|
||||||
# TODO: Optimize to not run multiple times
|
# TODO: Optimize to not run multiple times
|
||||||
while len(file) > tgt_size or accuracy < 0.50:
|
while len(file) > tgt_size or (
|
||||||
|
len(file) < tgt_size and accuracy < 0.50
|
||||||
|
):
|
||||||
old_file = file
|
old_file = file
|
||||||
|
|
||||||
buffer = np.frombuffer(file, dtype=np.uint8)
|
buffer = np.frombuffer(file, dtype=np.uint8)
|
||||||
|
|
Loading…
Add table
Reference in a new issue