Skip to content

Commit 590795b

Browse files
Merge pull request #50 from CosmoStat/develop
v0.1.3
2 parents 1dd27b6 + ad82ce9 commit 590795b

2 files changed

Lines changed: 10 additions & 2 deletions

File tree

cs_util/plots.py

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88
99
"""
1010

11+
import matplotlib
1112
import matplotlib.pylab as plt
1213
import numpy as np
1314

@@ -52,6 +53,13 @@ def savefig(fname, close_fig=True):
5253
plt.close()
5354

5455

56+
def show():
57+
backend = matplotlib.get_backend()
58+
if 'inline' in backend.lower() or 'nbagg' in backend.lower():
59+
plt.show() # Works in notebooks
60+
plt.close()
61+
62+
5563
def dx(idx, nx=3, fx=1.025, log=True):
5664
"""Dx.
5765

pyproject.toml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,13 @@
11
[tool.poetry]
22
name = "cs_util"
3-
version = "0.1.2"
3+
version = "0.1.3"
44
description = "Utility library for CosmoStat"
55
authors = ["Martin Kilbinger <martin.kilbinger@cea.fr>"]
66
readme = "README.md"
77

88
[tool.poetry.dependencies]
99
python = ">=3.9,<3.13"
1010
astropy = "^5.0"
11-
camb = "1.5.4"
1211
datetime = "^5.5"
1312
numpy = "^1.26.4"
1413
matplotlib = "^3.8.4"
@@ -17,6 +16,7 @@ scipy = "^1.13.0"
1716
vos = "^3.6.1"
1817
keyring = "^25.2.0"
1918
pyccl = "^3.0.2"
19+
camb = "^1.5.9"
2020

2121
[tool.poetry.dev-dependencies]
2222
pytest = "^6.2.5"

0 commit comments

Comments
 (0)