Skip to content

Commit

Permalink
Fix dtype deserialization
Browse files Browse the repository at this point in the history
  • Loading branch information
danielballan committed Nov 7, 2024
1 parent e26b0d1 commit 6c7c26a
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion databroker/mongo_normalized.py
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,8 @@ def _try_descr(field_metadata):
if descr:
if len(descr) == 1 and descr[0][0] == "":
return None
dtype = StructDtype.from_numpy_dtype(numpy.dtype(descr))
numpy_dtype = numpy.dtype([tuple(field) for field in descr])
dtype = StructDtype.from_numpy_dtype(numpy_dtype)
if dtype.max_depth() > 1:
raise RuntimeError(
"We can not yet cope with multiple nested structured dtypes. "
Expand Down

0 comments on commit 6c7c26a

Please sign in to comment.