Traceback (most recent call last):
File "", line 1, in
File "c:\Projects\MA-pyrdf.venv\lib\site-packages\fxpmath\objects.py", line 222, in init
signed, n_word, n_frac, complex_flag = self._parseformatstr(dtype)
File "c:\Projects\MA-pyrdf.venv\lib\site-packages\fxpmath\objects.py", line 348, in _parseformatstr
raise ValueError('unrecognized format string')
ValueError: unrecognized format string
Hello,
I could replicate the bug. The problem is that the dtype string parsing does not support negative numbers.
This will be fixed in next version (v0.4.9).
Thank you for the issue report!
The following code results in unexpected behaviour when trying to specify the same type using alternative formats :
x = Fxp(16, signed=True, n_word=8, n_frac=-2)
-> x.dtype = 'fxp-s8/-2' , okx = Fxp(16, dtype='S10.-2')
-> x.dtype = 'fxp-s10/0' , why? expected x.dtype= 'fxp-s8/-2'x = Fxp(16, dtype='fxp-s8/-2')
-> error message