apca-introduction

The missing introduction to APCA  https://p.ce9e.org/apca-introduction/
git clone https://git.ce9e.org/apca-introduction.git

commit
71e0f37534ea7787c61f62e678e1e7d3e16dfedb
parent
fb11a95bb6e48b11365b20cbaff1670a1fc5b69e
Author
Tobias Bengfort <tobias.bengfort@posteo.de>
Date
2022-07-29 10:44
use & instead of * for counting np arrays

Diffstat

M plots/coverage.py 6 +++---

1 files changed, 3 insertions, 3 deletions


diff --git a/plots/coverage.py b/plots/coverage.py

@@ -89,9 +89,9 @@ if __name__ == '__main__':
   89    89 		rows = []
   90    90 		for wcag_lower, wcag_upper in iter_levels(wcag_levels):
   91    91 			rows.append([])
   92    -1 			a = (wcag_lower <= _wcag) * (_wcag < wcag_upper)
   -1    92 			a = (wcag_lower <= _wcag) & (_wcag < wcag_upper)
   93    93 			for apca_lower, apca_upper in iter_levels(APCA_LEVELS):
   94    -1 				b = (apca_lower <= apca) * (apca < apca_upper)
   95    -1 				v = sum(a * b) / size * 100
   -1    94 				b = (apca_lower <= apca) & (apca < apca_upper)
   -1    95 				v = sum(a & b) / size * 100
   96    96 				rows[-1].append(v)
   97    97 		print_table(rows)