()
| 3 | import os |
| 4 | |
| 5 | def show_cpu_features(): |
| 6 | from numpy.lib.utils import _opt_info |
| 7 | info = _opt_info() |
| 8 | info = "NumPy CPU features: " + (info if info else 'nothing enabled') |
| 9 | # ASV wrapping stdout & stderr, so we assume having a tty here |
| 10 | if 'SHELL' in os.environ and sys.platform != 'win32': |
| 11 | # to avoid the red color that imposed by ASV |
| 12 | print(f"\033[33m{info}\033[0m") |
| 13 | else: |
| 14 | print(info) |
| 15 | |
| 16 | def dirty_lock(lock_name, lock_on_count=1): |
| 17 | # this lock occurred before each round to avoid duplicate printing |
no test coverage detected