Skip to content
This repository has been archived by the owner on Jun 21, 2022. It is now read-only.

Commit

Permalink
fixed #127
Browse files Browse the repository at this point in the history
  • Loading branch information
jpivarski committed Jul 10, 2019
1 parent d7f351f commit c5180b0
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
6 changes: 5 additions & 1 deletion awkward/array/jagged.py
Original file line number Diff line number Diff line change
Expand Up @@ -1626,7 +1626,11 @@ def get_mask(array_index):
# find most general type with a tentative sum which implements the right type-promotion,
# except for booleans which would get promoted to integers when summing
def get_dtype(arrays):
dtype = np.dtype(sum([x[0] for x in arrays if len(x) != 0]), False)
ick = [x[0] for x in arrays if len(x) != 0]
if len(ick) == 0:
dtype = np.dtype(arrays[0].dtype)
else:
dtype = np.dtype(sum(ick), False)
allbools = not np.any([a.dtype != np.dtype(bool) for a in arrays])
dtype = np.dtype(bool) if allbools else dtype
return dtype
Expand Down
2 changes: 1 addition & 1 deletion awkward/version.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

import re

__version__ = "0.12.0"
__version__ = "0.12.1"
version = __version__
version_info = tuple(re.split(r"[-\.]", __version__))

Expand Down

0 comments on commit c5180b0

Please sign in to comment.