Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
P
PyFstat
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
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
David Keitel
PyFstat
Commits
b462feba
Commit
b462feba
authored
7 years ago
by
David Keitel
Browse files
Options
Downloads
Patches
Plain Diff
displayless matplotlib import workaround also in helper_functions.py
parent
26768adf
No related branches found
No related tags found
No related merge requests found
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
pyfstat/helper_functions.py
+10
-3
10 additions, 3 deletions
pyfstat/helper_functions.py
with
10 additions
and
3 deletions
pyfstat/helper_functions.py
+
10
−
3
View file @
b462feba
...
...
@@ -11,12 +11,19 @@ import inspect
import
peakutils
from
functools
import
wraps
from
scipy.stats.distributions
import
ncx2
import
numpy
as
np
import
lal
import
lalpulsar
# workaround for matplotlib on X-less remote logins
if
'
DISPLAY
'
in
os
.
environ
:
import
matplotlib.pyplot
as
plt
else
:
logging
.
info
(
'
No $DISPLAY environment variable found, so importing
\
matplotlib.pyplot with non-interactive
"
Agg
"
backend.
'
)
import
matplotlib
matplotlib
.
use
(
'
Agg
'
)
import
matplotlib.pyplot
as
plt
import
numpy
as
np
def
set_up_optional_tqdm
():
try
:
...
...
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