mirror of
https://github.com/fjosw/pyerrors.git
synced 2025-05-15 12:03:42 +02:00
float special method added to pyerrors
This commit is contained in:
parent
be4d9f722e
commit
dc4514e8d0
1 changed files with 3 additions and 0 deletions
|
@ -472,6 +472,9 @@ class Obs:
|
||||||
with open(file_name, 'wb') as fb:
|
with open(file_name, 'wb') as fb:
|
||||||
pickle.dump(self, fb)
|
pickle.dump(self, fb)
|
||||||
|
|
||||||
|
def __float__(self):
|
||||||
|
return self.value
|
||||||
|
|
||||||
def __repr__(self):
|
def __repr__(self):
|
||||||
return 'Obs[' + str(self) + ']'
|
return 'Obs[' + str(self) + ']'
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue