MCPcopy Index your code
hub / github.com/astanin/python-tabulate / _bool

Function _bool

tabulate/__init__.py:1451–1456  ·  view source on GitHub ↗

A wrapper around standard bool() which doesn't throw on NumPy arrays

(val)

Source from the content-addressed store, hash-verified

1449
1450
1451def _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
1459def _normalize_tabular_data(tabular_data, headers, showindex="default"):

Callers 1

_normalize_tabular_dataFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected