Skip to content

Conversation

@jokasimr
Copy link
Contributor

@jokasimr jokasimr commented May 8, 2024

Fix bugs in the curve_fit function.

  1. When all points are masked, the input might have too few data points to estimate the parameters. Scipy raises in that case, but we might want to continue anyway.
  2. Masks were not transferred correctly to the output data arrays.

@jokasimr jokasimr requested a review from SimonHeybrock May 8, 2024 13:08
@jokasimr jokasimr changed the title fix: handle case when no data points + bug in mask handling fix: (curve_fit) handle no data points + bug in mask handling May 8, 2024
Copy link
Member

@SimonHeybrock SimonHeybrock left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

As 2 things were fixed, I would expect at least 2 new tests?

@jokasimr jokasimr force-pushed the curve-fit-empty-data branch from 0f4e004 to 8771f73 Compare May 15, 2024 12:35
@jokasimr jokasimr enabled auto-merge (squash) May 15, 2024 12:35
@jokasimr jokasimr requested a review from SimonHeybrock May 16, 2024 05:24
@jokasimr jokasimr merged commit 30799e2 into main May 16, 2024
@jokasimr jokasimr deleted the curve-fit-empty-data branch May 16, 2024 06:07
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

Successfully merging this pull request may close these issues.

3 participants