Skip to content

Conversation

jnsebgosselin
Copy link
Member

This PR fix a bug that occurs when filling the gaps for dates where all neighboring stations had null data.

Gapfilling data for variable Ptot...
9843
Traceback (most recent call last):
  File "C:\Users\User\climate-data-preprocessing-tool\cdprep\gapfill_data\gapfill_weather_algorithm.py", line 263, in gapfill_data
    A = self.build_mlr_model(X, Y)
  File "C:\Users\User\climate-data-preprocessing-tool\cdprep\gapfill_data\gapfill_weather_algorithm.py", line 406, in build_mlr_model
    A = L1LinearRegression(X, Y)
  File "C:\Users\User\climate-data-preprocessing-tool\cdprep\gapfill_data\gapfill_weather_algorithm.py", line 990, in L1LinearRegression
    BOld[0] += 1e-5
IndexError: index 0 is out of bounds for axis 0 with size 0

@jnsebgosselin jnsebgosselin added the type: bug Something isn't working label Nov 2, 2020
@jnsebgosselin jnsebgosselin added this to the 0.1.1 milestone Nov 2, 2020
@jnsebgosselin jnsebgosselin self-assigned this Nov 2, 2020
@jnsebgosselin jnsebgosselin merged commit fca1375 into master Nov 2, 2020
@jnsebgosselin jnsebgosselin deleted the fix_no_neighbor branch November 2, 2020 16:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type: bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant