Skip to content
Snippets Groups Projects
Commit 951bce18 authored by BRONES Romain's avatar BRONES Romain
Browse files

fix boolean cast from string

* Simply using dtyp of asarray result in all True except for empty
parent 553a4d47
No related branches found
No related tags found
No related merge requests found
......@@ -578,7 +578,11 @@ def _extract_scalar(attribute, method, date1, date2, db, dtype):
# Transform to datetime - value arrays
_value = np.asarray(_value, dtype=dtype)
if dtype is bool:
_value = np.asarray([{"true":True, "false":False}[_a.lower()] for _a in _value])
else:
_value = np.asarray(_value, dtype=dtype)
if len(_date) > 0:
_date = _ArrayTimeStampToDatetime(_date/1000.0)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment