@@ -65,17 +65,6 @@ def test_output_length_matches_nbins(nbins: int) -> None:
6565 assert len (result ) == nbins
6666
6767
68- @pytest .mark .parametrize (
69- "non_finite_value" ,
70- [np .inf , np .nan , float ("inf" ), float ("nan" )],
71- ids = ["np-inf" , "np-nan" , "float-inf" , "float-nan" ],
72- )
73- def test_bin_trace_samples_fails_for_non_finite_values (non_finite_value : float ) -> None :
74- err_msg = "The samples array should not contain any infs or NaNs."
75- with pytest .raises (ValueError , match = err_msg ):
76- bin_trace_samples (trace_samples = [* SAMPLES_IN [:- 1 ], non_finite_value ], nbins = NBINS )
77-
78-
7968@pytest .mark .parametrize (
8069 "input_type" ,
8170 [list , tuple , np .asarray ],
@@ -166,23 +155,6 @@ def test_rejects_mismatched_weights_length(samples: list[float], weights: list[f
166155 bin_trace_samples (samples , nbins = 2 , weights = weights )
167156
168157
169- @pytest .mark .parametrize (
170- "non_finite_value" ,
171- [np .inf , np .nan , float ("inf" ), float ("nan" )],
172- ids = ["np-inf" , "np-nan" , "float-inf" , "float-nan" ],
173- )
174- def test_bin_trace_samples_weights_fails_for_non_finite_values (
175- non_finite_value : float ,
176- ) -> None :
177- err_msg = "The weights array should not contain any infs or NaNs."
178- with pytest .raises (ValueError , match = err_msg ):
179- bin_trace_samples (
180- trace_samples = SAMPLES_IN ,
181- nbins = NBINS ,
182- weights = [* WEIGHTS [:- 1 ], non_finite_value ],
183- )
184-
185-
186158# ==============================================================
187159# --- bin_samples()
188160# ==============================================================
0 commit comments