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 path attenuation example returns an error for the gain computation:
File "pathattenuation.py", line 32, in
axes[0, 1].plot(_freqs, (-total_atten).to(cnv.dimless).value, linestyle, label=label)
File "/home/lghizoni/.local/lib/python3.6/site-packages/astropy/units/function/core.py", line 574, in array_ufunc
.format(function.name))
astropy.units.core.UnitTypeError: Cannot use ufunc 'negative' with function quantities
The problem seems to be the "(-total_atten)"
The text was updated successfully, but these errors were encountered:
This appears to be a problem of the astropy.units package, which is used for physical units support (in particular logarithmic units). What astropy version do you have installed? On recent versions of astropy the problem disappeared (at least on my machine). A (nasty) work-around has always been to force the unit to the linear-scale first, e.g.,
The path attenuation example returns an error for the gain computation:
File "pathattenuation.py", line 32, in
axes[0, 1].plot(_freqs, (-total_atten).to(cnv.dimless).value, linestyle, label=label)
File "/home/lghizoni/.local/lib/python3.6/site-packages/astropy/units/function/core.py", line 574, in array_ufunc
.format(function.name))
astropy.units.core.UnitTypeError: Cannot use ufunc 'negative' with function quantities
The problem seems to be the "(-total_atten)"
The text was updated successfully, but these errors were encountered: