home / github / issues

Menu
  • Search all tables
  • GraphQL API

issues: 1698626185

This data as json

id node_id number title user state locked assignee milestone comments created_at updated_at closed_at author_association active_lock_reason draft pull_request body reactions performed_via_github_app state_reason repo type
1698626185 PR_kwDOAMm_X85P6owK 7821 Implement multidimensional initial guess and bounds for `curvefit` 20118130 closed 0     6 2023-05-06T13:09:49Z 2023-06-01T15:51:40Z 2023-05-31T12:43:07Z CONTRIBUTOR   0 pydata/xarray/pulls/7821
  • [x] Closes #7768
  • [x] Tests added
  • [x] User visible changes (including notable bug fixes) are documented in whats-new.rst

With this PR, it's possible to pass an initial guess to curvefit that is a DataArray, which will be broadcast to the data dimensions. This way, the initial guess can vary with the data coordinates.

I also added examples of using curvefit to the documentation, both a basic example and one with the multidimensional guess.

I have a couple of questions: - Should we change the signature to p0: dict[str, float | DataArray] | None, instead of dict[str, Any] (and same for bounds)? scipy only optimizes over scalars, so I think it would be safe to assume that the values should either be those, or arrays that can be broadcast. - The usage example of curvefit is only in the docstring for DataArray, so now the docs differ between DA and dataset. But the example uses a DataArray only, so this should be ok, right?

{
    "url": "https://api.github.com/repos/pydata/xarray/issues/7821/reactions",
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
    13221727 pull

Links from other tables

  • 1 row from issues_id in issues_labels
  • 6 rows from issue in issue_comments
Powered by Datasette · Queries took 0.686ms · About: xarray-datasette