Skip to content

Commit

Permalink
compatibility with np_config.enable_numpy_behavior()
Browse files Browse the repository at this point in the history
  • Loading branch information
calad0i committed May 14, 2024
1 parent bb5fe40 commit 8157ad2
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/HGQ/quantizer/quantizer.py
Original file line number Diff line number Diff line change
Expand Up @@ -248,7 +248,7 @@ def get_bits_exact(self, ref=None, pos_only=False):
"""

if ref is None and self.minmax_record:
assert tf.reduce_all(self._min <= self._max), "Some min values are larger than max values. Did you forget to run trace_minmax?" # type: ignore
assert tf.reduce_all(self._max - self._min >= 0), "Some min values are larger than max values. Did you forget to run trace_minmax?" # type: ignore
f = tf.round(self.fbw).numpy() # type: ignore
with np.errstate(divide='ignore'):
if pos_only:
Expand Down

0 comments on commit 8157ad2

Please sign in to comment.