Skip to content

Commit 39edf2d

Browse files
dataselect expression returns a np.bool_ type instead of straight bool. It was tripping a check. Now it accepts both types.
1 parent b8122e6 commit 39edf2d

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

gempy/adlibrary/dataselect.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
from datetime import datetime # leave it in. It is used by the eval.
44

55
from importlib import import_module
6+
import numpy as np
67

78
import astrodata
89
import gemini_instruments
@@ -111,7 +112,7 @@ def evalexpression(ad, expression):
111112
expression - bool
112113
evaluated expression, True or False
113114
"""
114-
if type(eval(expression)) is not type(True):
115+
if type(eval(expression)) not in [type(True), type(np.bool_(True))]:
115116
raise IOError('Expression does not return a boolean value.')
116117
return eval(expression)
117118

0 commit comments

Comments
 (0)