Selaa lähdekoodia

Merge pull request #1045 from ScottSWu/master

Fix division changing dtype to float in python3
Neal Wu 8 vuotta sitten
vanhempi
commit
6373c6f4cf
1 muutettua tiedostoa jossa 1 lisäystä ja 1 poistoa
  1. 1 1
      compression/encoder.py

+ 1 - 1
compression/encoder.py

@@ -92,7 +92,7 @@ def main(_):
   int_codes = np.asarray([x.astype(np.int8) for x in results])
 
   # Convert int codes to binary.
-  int_codes = (int_codes + 1)/2
+  int_codes = (int_codes + 1)//2
   export = np.packbits(int_codes.reshape(-1))
 
   output = io.BytesIO()