Skip to content

Commit

Permalink
Fix flaky doctest with NUMBER doctest option from pytest (pydata#7893)
Browse files Browse the repository at this point in the history
Co-authored-by: Marton Gunyho <[email protected]>
  • Loading branch information
mgunyho and Marton Gunyho authored Jun 9, 2023
1 parent 25b9ec8 commit 3459e6f
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions xarray/core/dataarray.py
Original file line number Diff line number Diff line change
Expand Up @@ -6258,9 +6258,11 @@ def curvefit(
Fit the exponential decay function to the data along the ``time`` dimension:
>>> fit_result = da.curvefit("time", exp_decay)
>>> fit_result["curvefit_coefficients"].sel(param="time_constant")
>>> fit_result["curvefit_coefficients"].sel(
... param="time_constant"
... ) # doctest: +NUMBER
<xarray.DataArray 'curvefit_coefficients' (x: 3)>
array([1.05692036, 1.73549639, 2.94215771])
array([1.0569203, 1.7354963, 2.9421577])
Coordinates:
* x (x) int64 0 1 2
param <U13 'time_constant'
Expand Down

0 comments on commit 3459e6f

Please sign in to comment.