Skip to content

Commit f9cf0fc

Browse files
committed
Merge branch 'master' of https://github.com/phisgroup/labfis.py into development
2 parents 3e958ea + 2e5fec5 commit f9cf0fc

File tree

3 files changed

+61
-9
lines changed

3 files changed

+61
-9
lines changed
Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
---
2+
name: Bug report
3+
about: Create a report to help us improve
4+
title: 'BUG: '
5+
labels: bug
6+
assignees: ''
7+
8+
---
9+
10+
**Describe the bug**
11+
A clear and concise description of what the bug is.
12+
13+
**To Reproduce**
14+
Steps to reproduce the behavior:
15+
1. ...
16+
2. ...
17+
3. ...
18+
19+
**Expected behavior**
20+
A clear and concise description of what you expected to happen.
21+
22+
**Additional context**
23+
Add any other context about the problem here.
24+
25+
**Screenshots**
26+
If applicable, add screenshots, gifs, or videos to help explain your problem.
27+
28+
**Environment details:**
29+
Run the following commands on the environment where you are running the tests, and paste it in this section:
30+
31+
pip install -U helpdev
32+
helpdev --packages="labfis,numpy" --os --distributions
Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
---
2+
name: Feature request
3+
about: Suggest an idea for this project
4+
title: 'FEA: '
5+
labels: enhancement
6+
assignees: ''
7+
8+
---
9+
10+
**Is your feature request related to a problem? Please describe.**
11+
A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]
12+
13+
**Describe the solution you'd like**
14+
A clear and concise description of what you want to happen.
15+
16+
**Describe alternatives you've considered**
17+
A clear and concise description of any alternative solutions or features you've considered.
18+
19+
**Additional context**
20+
Add any other context or screenshots about the feature request here.

labfis/uncertainty.py

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -102,16 +102,16 @@ def format(self):
102102
else:
103103
r = -i
104104
r += 1
105-
for j in range(len(su)):
106-
if su[j] == "0":
105+
for digit in su:
106+
if digit == "0":
107107
r += 1
108-
elif su[j+1] == "9" and r > 0:
109-
m = round(self._mean, r-1)
110-
u = round(self._uncertainty, r)
111-
return((m, u))
112-
elif su[j] != ".":
113-
m = round(self._mean, r)
114-
u = round(self._uncertainty, r)
108+
elif digit == "9" and "1" in str(round(self.uncertainty,r)):
109+
m = round(self.mean, r-1)
110+
u = round(self.uncertainty, r)
111+
return((m,u))
112+
elif digit != ".":
113+
m = round(self.mean, r)
114+
u = round(self.uncertainty, r)
115115
return((m, u))
116116

117117
m = round(self._mean, r)

0 commit comments

Comments
 (0)