haor commited on
Commit
2e8cc5c
1 Parent(s): a45bc86

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +1 -1
app.py CHANGED
@@ -11,7 +11,7 @@ import requests
11
 
12
  def binary_array_to_hex(arr: np.ndarray) -> str:
13
  """Convert a binary array to a hex string."""
14
- bit_string = ''.join(str(b) for b in arr.flatten())
15
  width = int(np.ceil(len(bit_string) / 4))
16
  return '{:0>{width}x}'.format(int(bit_string, 2), width=width)
17
 
 
11
 
12
  def binary_array_to_hex(arr: np.ndarray) -> str:
13
  """Convert a binary array to a hex string."""
14
+ bit_string = ''.join(str(int(b)) for b in arr.flatten())
15
  width = int(np.ceil(len(bit_string) / 4))
16
  return '{:0>{width}x}'.format(int(bit_string, 2), width=width)
17