Henry Schreiner

Results 2524 comments of Henry Schreiner

The tick issue is even harder for terminals, since you can't move them to find a nice point, there's a small number of preset location they can exist in.

probfit cannot support Python 3.10 without a iMinuit 1 release - iMinuit 1 has no 3.10 wheels and it seems to have a baked-in Cython compile that is from a...

Another powerful tool is a PyTest fixture. You can write: ```python @pytest.fixture(request=constructor_list) def constructor(params): return request.param @pytest.fixture(request=coordinates_list) def coordinates(params): return request.param def test_M2(constructor, coordinates): ... def test_other(constructor, coordinates): ... ```...

Also, this to me looks very much like property-based testing. This might be a good resource: https://www.youtube.com/watch?v=tiy031EoDXo If static types have been added, you might even be able to get...

I would generally use a fixture in all cases except when there is exactly one usage. It's really about the same number of lines, and less if you have several...

I haven't used Hypothesis before, but I think it has extensive tooling for selecting from distributions with special cases. I'm reviewing a SciPy abstract for a talk on Hypothesis, which...

Are there type annotations? If there are no type annotations, it can't infer anything about the functions. In general, I would recommend adding type annotations as-you-go, as it's a bit...

It should support NumPy, it's in the NumPy test suite, in fact adding Hypothesis caught a NumPy bug. :)

PS: You have now used Hypothesis more than I have. :) Though I see several really useful places to put it into histogram test suites. :)

What I've been doing (and would recommend) is setting reasonable limits for Hypothesis (since numerical differences for extreme numbers isn't interesting, and I tend to want to avoid generating NaN...