Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
bilby
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Container Registry
Model registry
Operate
Environments
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
lscsoft
bilby
Commits
c8d7341f
Commit
c8d7341f
authored
5 years ago
by
Gregory Ashton
Browse files
Options
Downloads
Patches
Plain Diff
Add astropy
parent
28123e71
No related branches found
Branches containing commit
No related tags found
Tags containing commit
1 merge request
!747
Changes the warning messages to debug messages for gw-related codes
Pipeline
#111308
passed
5 years ago
Stage: test
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
bilby/core/utils.py
+5
-5
5 additions, 5 deletions
bilby/core/utils.py
with
5 additions
and
5 deletions
bilby/core/utils.py
+
5
−
5
View file @
c8d7341f
...
...
@@ -990,7 +990,7 @@ class BilbyJsonEncoder(json.JSONEncoder):
if
isinstance
(
obj
,
units
.
PrefixUnit
):
return
str
(
obj
)
except
ImportError
:
logger
.
info
(
"
Cannot import astropy, cannot write cosmological priors
"
)
logger
.
debug
(
"
Cannot import astropy, cannot write cosmological priors
"
)
if
isinstance
(
obj
,
np
.
ndarray
):
return
{
'
__array__
'
:
True
,
'
content
'
:
obj
.
tolist
()}
if
isinstance
(
obj
,
complex
):
...
...
@@ -1052,8 +1052,8 @@ def decode_astropy_cosmology(dct):
del
dct
[
'
__cosmology__
'
],
dct
[
'
__name__
'
]
return
cosmo_cls
(
**
dct
)
except
ImportError
:
logger
.
info
(
"
Cannot import astropy, cosmological priors may not be
"
"
properly loaded.
"
)
logger
.
debug
(
"
Cannot import astropy, cosmological priors may not be
"
"
properly loaded.
"
)
return
dct
...
...
@@ -1066,8 +1066,8 @@ def decode_astropy_quantity(dct):
del
dct
[
'
__astropy_quantity__
'
]
return
units
.
Quantity
(
**
dct
)
except
ImportError
:
logger
.
info
(
"
Cannot import astropy, cosmological priors may not be
"
"
properly loaded.
"
)
logger
.
debug
(
"
Cannot import astropy, cosmological priors may not be
"
"
properly loaded.
"
)
return
dct
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment