mirror of
https://github.com/fjosw/pyerrors.git
synced 2025-05-14 19:43:41 +02:00
Obs.print renamed to Obs.details
This commit is contained in:
parent
67fc15e001
commit
a4d29b54d8
2 changed files with 23 additions and 23 deletions
|
@ -379,10 +379,11 @@ class Obs:
|
||||||
return
|
return
|
||||||
|
|
||||||
def print(self, level=1):
|
def print(self, level=1):
|
||||||
"""Print basic properties of the Obs."""
|
warnings.warn("Method 'print' renamed to 'details'", DeprecationWarning)
|
||||||
if level == 0:
|
self.details(level)
|
||||||
print(self)
|
|
||||||
else:
|
def details(self, level=1):
|
||||||
|
"""Output detailed properties of the Obs."""
|
||||||
if self.value == 0.0:
|
if self.value == 0.0:
|
||||||
percentage = np.nan
|
percentage = np.nan
|
||||||
else:
|
else:
|
||||||
|
|
|
@ -223,9 +223,8 @@ def test_overloaded_functions():
|
||||||
|
|
||||||
def test_utils():
|
def test_utils():
|
||||||
my_obs = pe.pseudo_Obs(1.0, 0.5, 't')
|
my_obs = pe.pseudo_Obs(1.0, 0.5, 't')
|
||||||
my_obs.print(0)
|
my_obs.details(1)
|
||||||
my_obs.print(1)
|
my_obs.details(2)
|
||||||
my_obs.print(2)
|
|
||||||
assert not my_obs.is_zero_within_error()
|
assert not my_obs.is_zero_within_error()
|
||||||
my_obs.plot_tauint()
|
my_obs.plot_tauint()
|
||||||
my_obs.plot_rho()
|
my_obs.plot_rho()
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue