Skip to content

Commit

Permalink
Fix implementation for validation of np.bool_ based on PR feedback
Browse files Browse the repository at this point in the history
  • Loading branch information
dsleiter committed Jan 13, 2021
1 parent 6744668 commit 92516d6
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
2 changes: 1 addition & 1 deletion src/hdmf/spec/spec.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ class DtypeHelper:
'long': ["int64", "long"],
'utf': ["text", "utf", "utf8", "utf-8"],
'ascii': ["ascii", "bytes"],
'bool': ["bool", "bool_"],
'bool': ["bool"],
'int8': ["int8"],
'uint8': ["uint8"],
'uint16': ["uint16"],
Expand Down
2 changes: 2 additions & 0 deletions src/hdmf/validate/validator.py
Original file line number Diff line number Diff line change
Expand Up @@ -111,6 +111,8 @@ def get_type(data):
if data.size == 0:
raise EmptyArrayError()
return get_type(data[0])
elif isinstance(data, np.bool_):
return 'bool'
if not hasattr(data, '__len__'):
return type(data).__name__
else:
Expand Down

0 comments on commit 92516d6

Please sign in to comment.