Skip to content

Commit

Permalink
test: restrict numbers for model fitting
Browse files Browse the repository at this point in the history
  • Loading branch information
hollandjg committed Nov 20, 2023
1 parent b294f1d commit 8e70ee8
Showing 1 changed file with 11 additions and 6 deletions.
17 changes: 11 additions & 6 deletions tests/strategies.py
Original file line number Diff line number Diff line change
Expand Up @@ -188,14 +188,19 @@ def model_strategy(draw):
allow_nan=False,
# Include some reasonable extreme values. Values near the upper limit of the float
# ~10**308 broke the fitting
min_value=-1e100,
max_value=1e100,
# min_magnitude and max_magnitude didn't work
min_value=-1e5,
max_value=1e5,
min_magnitude=1e-3,
)
X = draw(
st_np.arrays(float, shape=(n_measurements, n_x), elements=elements, unique=True)
)
y = draw(
st_np.arrays(float, shape=(n_measurements, n_y), elements=elements, unique=True)
)
X = draw(st_np.arrays(float, shape=(n_measurements, n_x), elements=elements))
y = draw(st_np.arrays(float, shape=(n_measurements, n_y), elements=elements))

result = model().fit(X, y)
result = model().fit(X, y.ravel())
# print(X, y)
return result


Expand Down

0 comments on commit 8e70ee8

Please sign in to comment.