Skip to content

Commit f0631b4

Browse files
twieckimaresb
authored andcommitted
Change type checks to use is rather than =
1 parent 99d16be commit f0631b4

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

tests/backends/fixtures.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -180,7 +180,7 @@ def setup_class(cls):
180180
cls.expected_stats[0].append(stats)
181181
cls.expected_stats[1].append(stats)
182182
for key, dtype in vars.items():
183-
if dtype == bool:
183+
if dtype is bool:
184184
stats[key] = np.zeros(cls.draws, dtype=dtype)
185185
else:
186186
stats[key] = np.arange(cls.draws, dtype=dtype)

tests/variational/test_inference.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -189,10 +189,10 @@ def test_fit_start(inference_spec, simple_model):
189189
mu_sigma_init = 13
190190

191191
with simple_model:
192-
if type(inference_spec()) == ASVGD:
192+
if type(inference_spec()) is ASVGD:
193193
# ASVGD doesn't support the start argument
194194
return
195-
elif type(inference_spec()) == ADVI:
195+
elif type(inference_spec()) is ADVI:
196196
has_start_sigma = True
197197
else:
198198
has_start_sigma = False

0 commit comments

Comments
 (0)