Skip to content

Commit

Permalink
Don't overwrite default numpy bindings from liglow in record.io
Browse files Browse the repository at this point in the history
  • Loading branch information
Collin Capano committed Oct 10, 2023
1 parent ec9221a commit 6311b4a
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion pycbc/io/record.py
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,11 @@
# =============================================================================
#
# add ligolw_types to numpy sctypeDict
numpy.sctypeDict.update(ligolw_types.ToNumPyType)
# but don't including float -> float32 and int -> int32 bindings, so as not
# to change numpy defaults
numpy.sctypeDict.update({_k: _val
for (_k, _val) in ligolw_types.ToNumPyType.items()
if _k != 'float' and _k != 'int'})

# Annoyingly, numpy has no way to store NaNs in an integer field to indicate
# the equivalent of None. This can be problematic for fields that store ids:
Expand Down

0 comments on commit 6311b4a

Please sign in to comment.