Skip to content

Commit

Permalink
corrects bug with sample_repeat not being an integer, checkerboard fa…
Browse files Browse the repository at this point in the history
…ctory
  • Loading branch information
guillermoaguilar committed Sep 24, 2020
1 parent 1711c53 commit 239e114
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/transparency/checkerboard_factory.py
Expand Up @@ -75,7 +75,7 @@ def find_checkerboard(self, n_checks, reflectances=None, sample_repeat=9,
reflectances = [0.06, 0.11, 0.19, 0.31, 0.46, 0.63, 0.82, 1.05, 1.29, 1.50, 1.67, 1.95, 2.22]

if len(reflectances) * sample_repeat < total_checks:
sample_repeat = np.ceil(total_checks / len(reflectances))
sample_repeat = int(np.ceil(total_checks / len(reflectances)))
warnings.warn('Given value for sample_repeat was too small and has been changed to %d.' % sample_repeat)

# repeated concatenation of reflectances / multiset of values the cells will be sampled from without replacing
Expand Down

0 comments on commit 239e114

Please sign in to comment.