mirror of
https://github.com/fjosw/pyerrors.git
synced 2025-05-15 03:53: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
|
||||
|
||||
def print(self, level=1):
|
||||
"""Print basic properties of the Obs."""
|
||||
if level == 0:
|
||||
print(self)
|
||||
else:
|
||||
warnings.warn("Method 'print' renamed to 'details'", DeprecationWarning)
|
||||
self.details(level)
|
||||
|
||||
def details(self, level=1):
|
||||
"""Output detailed properties of the Obs."""
|
||||
if self.value == 0.0:
|
||||
percentage = np.nan
|
||||
else:
|
||||
|
|
|
@ -223,9 +223,8 @@ def test_overloaded_functions():
|
|||
|
||||
def test_utils():
|
||||
my_obs = pe.pseudo_Obs(1.0, 0.5, 't')
|
||||
my_obs.print(0)
|
||||
my_obs.print(1)
|
||||
my_obs.print(2)
|
||||
my_obs.details(1)
|
||||
my_obs.details(2)
|
||||
assert not my_obs.is_zero_within_error()
|
||||
my_obs.plot_tauint()
|
||||
my_obs.plot_rho()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue