-
Notifications
You must be signed in to change notification settings - Fork 356
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Don't overwrite default numpy bindings from liglow in record.io #4525
Conversation
Changed to not include any bindings that numpy doesn't already define (so, adds |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good to me. Only stylistic comment is why to use variable names preceded by an underscore for the internal variables in the dict-comprehension?
@spxiwh I was thinking these variables might be left over in the |
…tro#4525) * Don't overwrite default numpy bindings from liglow in record.io * Change to not include any bindings that numpy already defines
…tro#4525) * Don't overwrite default numpy bindings from liglow in record.io * Change to not include any bindings that numpy already defines
…tro#4525) * Don't overwrite default numpy bindings from liglow in record.io * Change to not include any bindings that numpy already defines
…tro#4525) * Don't overwrite default numpy bindings from liglow in record.io * Change to not include any bindings that numpy already defines
Currently, if you import the record module in
pycbc.io
, it will cause numpy to start castingfloat
andint
tofloat32
andint32
respectively. The default in numpy is to castfloat
andint
to 64 bit scalars. The cause of this is due to the numpyscTypeDict
being updated with ligolw bindings inrecord.py
. In ligolw,float
is cast tofloat32
andint
toint32
. This patch fixes that by not including thefloat
andint
mappings from ligolw. This will cause single precision values to be cast to double when reading a ligolw xml file, but that should only result in some meaningless extra digits being added to values.