Skip to content

Commit

Permalink
[pre-commit.ci] auto fixes from pre-commit.com hooks
Browse files Browse the repository at this point in the history
for more information, see https://pre-commit.ci
  • Loading branch information
pre-commit-ci[bot] committed Jul 29, 2022
1 parent 53a258f commit f5809f3
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions python/taichi/types/quantized_types.py
Original file line number Diff line number Diff line change
Expand Up @@ -48,9 +48,9 @@ def fixed(bits, signed=True, max_value=1.0, compute=None, scale=None):
underlying_type = int(bits=bits, signed=signed, compute=i32)
if scale is None:
if signed:
scale = max_value / 2 ** (bits - 1)
scale = max_value / 2**(bits - 1)
else:
scale = max_value / 2 ** bits
scale = max_value / 2**bits
return _type_factory.get_quant_fixed_type(underlying_type, compute, scale)


Expand Down

0 comments on commit f5809f3

Please sign in to comment.