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
The warnings in the sigfig library are reporting the location of the warning call within the sigfig library, like
/usr/lib/python3.11/site-packages/sigfig/sigfig.py:586: UserWarning: warning: 3 significant figures requested from number with only 1 significant figures
This makes it hard to find out what was the call to sigfig.roud that actually triggered this error. Instead, if we use the stacklevel argument to warn, like
warn("warning: %d significant figures requested from number with only %d significant figures" % (given['sigfigs'], len(num.map)), stacklevel=2)
the error message is like
/my/calling/code.py:270: UserWarning: warning: 3 significant figures requested from number with only 1 significant figures
Can we add the stacklevel argument to all the warning calls?
The text was updated successfully, but these errors were encountered:
The warnings in the sigfig library are reporting the location of the warning call within the sigfig library, like
This makes it hard to find out what was the call to sigfig.roud that actually triggered this error. Instead, if we use the stacklevel argument to warn, like
the error message is like
Can we add the stacklevel argument to all the warning calls?
The text was updated successfully, but these errors were encountered: