Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

pycraf error in scipy1.10 #62

Open
mghorba opened this issue Jan 23, 2023 · 2 comments
Open

pycraf error in scipy1.10 #62

mghorba opened this issue Jan 23, 2023 · 2 comments

Comments

@mghorba
Copy link

mghorba commented Jan 23, 2023

I've tried running examples at (https://bwinkel.github.io/pycraf/latest/pathprof/index.html). When I try with and without "pathprof.SrtmConf.set(interp='spline', spline_opts=(3, 0))", as below, I get the following error at "pathprof.height_map_data(...". I installed pycraf via pycharm packages in addition to dependencies.

Error:
result = evaluate_linear_2d(self.values,
File "_rgi_cython.pyx", line 19, in scipy.interpolate._rgi_cython.__pyx_fused_cpdef
TypeError: No matching signature found

The crash call chain is as follows.
Linear: \utils\decorators.py", line 328 > pathprof\propagation.py", line 738 > pathprof\srtm.py", line 571>scipy\interpolate_rgi.py", line 336

Spline: utils\decorators.py", line 328 > pathprof\propagation.py", line 738 > pycraf\pathprof\helper.py", line 188 > scipy\interpolate_rgi.py", line 336

#-----------------------
#Code snippet from https://bwinkel.github.io/pycraf/latest/pathprof/index.html that generates error
pathprof.SrtmConf.set(download='missing')
pathprof.SrtmConf.set(interp='spline', spline_opts=(3, 0)) #tried without this too

lon_tx, lat_tx = 6.88361 * u.deg, 50.52483 * u.deg
map_size_lon, map_size_lat = 0.5 * u.deg, 0.5 * u.deg
map_resolution = 10. * u.arcsec

freq = 1. * u.GHz
omega = 0. * u.percent # fraction of path over sea
temperature = 290. * u.K
pressure = 1013. * u.hPa
timepercent = 2 * u.percent # see P.452 for explanation
h_tg, h_rg = 50 * u.m, 10 * u.m
G_t, G_r = 0 * cnv.dBi, 0 * cnv.dBi
zone_t, zone_r = pathprof.CLUTTER.UNKNOWN, pathprof.CLUTTER.UNKNOWN
hprof_step = 100 * u.m

hprof_cache = pathprof.height_map_data(lon_tx, lat_tx, map_size_lon, map_size_lat, map_resolution=map_resolution, zone_t=zone_t,
zone_r=zone_r,) # dict-like

results = pathprof.atten_map_fast(freq, temperature, pressure, h_tg, h_rg, timepercent, hprof_cache,)

@bwinkel
Copy link
Owner

bwinkel commented Jan 23, 2023

Thank you very much for reporting this issue @mghorba! I just checked, the latest released pycraf version (which is not that old!) was tested only against scipy 1.9.3. I'm afraid this error might be owing to a backwards incompatible change in scipy. I was going to make a minor new release soon. Until then, the only possible solution might be to downgrade your scipy to version 1.9. Sorry for the inconvenience.

@mghorba
Copy link
Author

mghorba commented Jan 23, 2023

Yes, correct @bwinkel. I changed downgraded scipy version from 1.10 to 1.9.3 and the code runs.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants