Skip to content

Commit

Permalink
fix: call correct function inside of the bits_to_natural function
Browse files Browse the repository at this point in the history
  • Loading branch information
julianhoever committed Aug 26, 2024
1 parent 535df96 commit 359509c
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion elasticai/creator/nn/fixed_point/number_converter.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

from ._number_conversion import (
bits_to_integer,
bits_to_natural,
bits_to_rational,
convert_rational_to_bit_pattern,
integer_to_bits,
Expand Down Expand Up @@ -38,7 +39,7 @@ def rational_to_bits(self, rational: float) -> str:
)

def bits_to_natural(self, pattern: str) -> int:
return bits_to_rational(pattern, frac_bits=self._fxp_params.frac_bits)
return bits_to_natural(pattern)

def integer_to_bits(self, number: int) -> str:
return integer_to_bits(number, total_bits=self._fxp_params.total_bits)
Expand Down

0 comments on commit 359509c

Please sign in to comment.