You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When using the Python wrapper jupyter notebook example the following error is raised "OverflowError: Python integer 32768 out of bounds for int16".
I've tracked it down to a possible bug in the file cmsisdsp/fixedpoint.py.
The q15sat function looks like it needs a sign added to the negative saturation logic as shown below and I also think this need to be added to the other saturation functions.
The system was as follows:
Windows 10
Python 3.12.6
cmsisdsp 1.9.9
Numpy 2.0.0
def q15sat(x):
if x > 0x7FFF:
return(np.int16(0x7FFF))
elif x < -0x8000:
return(np.int16(-0x8000))
else:
return(np.int16(x))
The text was updated successfully, but these errors were encountered:
When using the Python wrapper jupyter notebook example the following error is raised "OverflowError: Python integer 32768 out of bounds for int16".
I've tracked it down to a possible bug in the file cmsisdsp/fixedpoint.py.
The q15sat function looks like it needs a sign added to the negative saturation logic as shown below and I also think this need to be added to the other saturation functions.
The system was as follows:
The text was updated successfully, but these errors were encountered: