simpeg / discretize

Discretization tools for finite volume and inverse problems.
http://discretize.simpeg.xyz/
MIT License
163 stars 33 forks source link

Add seed argument to check_directive #359

Open santisoler opened 2 months ago

santisoler commented 2 months ago

Add a new seed argument to discretize.tests.check_derivative. Make use of Numpy's random number generator to create random variables in the function. This would help to ensure reproducibility of tests both in discretize and SimPEG.

codecov[bot] commented 2 months ago

Codecov Report

All modified and coverable lines are covered by tests :white_check_mark:

Project coverage is 85.12%. Comparing base (300b64a) to head (2155d87).

Additional details and impacted files ```diff @@ Coverage Diff @@ ## main #359 +/- ## ======================================= Coverage 85.12% 85.12% ======================================= Files 36 36 Lines 8408 8409 +1 ======================================= + Hits 7157 7158 +1 Misses 1251 1251 ```

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.

jcapriot commented 2 months ago

As mentioned in the meeting, I had started a bit on this already. I've opened a draft PR with what I had at #360 . It still needs a bit of work though.