-
Notifications
You must be signed in to change notification settings - Fork 186
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
IndexError: index 4 is out of bounds for axis 0 with size 4 #38
Comments
Okay I was able to find a solution by reducing the noff parameter to only 5. Any value greater than 5 gave me back the same error |
I am also getting this error, but changing noff doesn't fix the issue for me. I'm using a geodataframe with dimension (515,20) and the following DECLUS inputs: weights, cell_sizes, dmeans = geostats.declus(ddf,'X','Y','dZ', The problematic dataframe can be downloaded here (link to download gpkg from box). I've tried resetting the dataframe index, using a different subset of rows/columns, converting to a standard Dataframe, varying the values for iminmax/noff/ncell/cmin/cmax but I haven't been able to isolate the cause. Here is the specific error message I am getting:
|
I am trying to implement the declustering function on my dataframe which consists of longitude, latitude, and sediment accumulation variables, but I am getting an out of index error. I am having trouble fixing this error myself, could someone help me figure this out? Below is the traceback:
Traceback (most recent call last):
File "", line 1, in
File "C:\Users\etachen\AppData\Local\JetBrains\PyCharm 2021.2.2\plugins\python\helpers\pydev_pydev_bundle\pydev_umd.py", line 198, in runfile
pydev_imports.execfile(filename, global_vars, local_vars) # execute the script
File "C:\Users\etachen\AppData\Local\JetBrains\PyCharm 2021.2.2\plugins\python\helpers\pydev_pydev_imps_pydev_execfile.py", line 18, in execfile
exec(compile(contents+"\n", file, 'exec'), glob, loc)
File "C:/Users/etachen/PycharmProjects/ai_algo_tests/declustering_medium_test.py", line 21, in
W, Csize, Dmean = geostat.declus(df,'Longitude', 'Latitude', 'Average Accretion (mm)',
File "C:\Users\etachen\Anaconda3\envs\ai_algo_tests\lib\site-packages\geostatspy\geostats.py", line 1607, in declus
cellwt[icell] = cellwt[icell] + 1.0
IndexError: index 4 is out of bounds for axis 0 with size 4
The text was updated successfully, but these errors were encountered: