A wrapper around standard bool() which doesn't throw on NumPy arrays
(val)
| 1449 | |
| 1450 | |
| 1451 | def _bool(val): |
| 1452 | "A wrapper around standard bool() which doesn't throw on NumPy arrays" |
| 1453 | try: |
| 1454 | return bool(val) |
| 1455 | except ValueError: # val is likely to be a numpy array with many elements |
| 1456 | return False |
| 1457 | |
| 1458 | |
| 1459 | def _normalize_tabular_data(tabular_data, headers, showindex="default"): |
no outgoing calls
no test coverage detected