alexhsamuel/fixfmt

not enough width for inf

Closed this issue · 0 comments

>>> import fixfmt
>>> a = np.array([3, -np.inf])
>>> f = fixfmt.npfmt.choose_formatter(a)
>>> for x in a:
...  print(f(x))
... 
  3
-in
>>> f
Number(2, -1, pad=' ', sign='-, nan='NaN', inf='inf', point='.', bad='#')

Note that "inf" is truncated.