ascheliga / CYGNSS-GRACE

Estimation of the impact of surface water seasonal-to-subseasonal variability on groundwater storage around reservoirs using CYGNSS and GRACE data
0 stars 0 forks source link

Unknown type checking error #7

Closed ascheliga closed 2 months ago

ascheliga commented 10 months ago

I get the error: "list[tuple[float, float]]" has no attribute "iloc" [attr-defined] when running mypy type-checking for three lines of code. I do not understand what is happening. Ask for clarification.

https://github.com/ascheliga/CYGNSS-GRACE/blob/5d71f2943cfc9b862fca8cf92a4e2dbe55dfc9b0/codebase/area_calcs.py#L149-L151

ascheliga commented 2 months ago

The error is in the km2_data.iloc[0,:] snippet.

ascheliga commented 2 months ago

Fixed by converting km2_data into np.array when assigned.