Skip to content

Commit c09b9fd

Browse files
committed
another fix to uncertainquantity.sum
update the layout.html template
1 parent 50e5070 commit c09b9fd

3 files changed

Lines changed: 15 additions & 20 deletions

File tree

.eric4project/quantities.e4t

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -29,15 +29,6 @@
2929
<Linenumber>14</Linenumber>
3030
</Resource>
3131
</Task>
32-
<Task priority="1" completed="False" bugfix="False">
33-
<Summary>TODO: what is an appropriate value?</Summary>
34-
<Description></Description>
35-
<Created>2009-02-22, 13:41:45</Created>
36-
<Resource>
37-
<Filename>quantities/uncertainquantity.py</Filename>
38-
<Linenumber>15</Linenumber>
39-
</Resource>
40-
</Task>
4132
<Task priority="1" completed="False" bugfix="False">
4233
<Summary>TODO: uncomment once np.fix behaves itself</Summary>
4334
<Description></Description>
@@ -65,4 +56,13 @@
6556
<Linenumber>288</Linenumber>
6657
</Resource>
6758
</Task>
59+
<Task priority="1" completed="False" bugfix="False">
60+
<Summary>TODO: what is an appropriate value?</Summary>
61+
<Description></Description>
62+
<Created>2009-04-01, 14:44:18</Created>
63+
<Resource>
64+
<Filename>quantities/uncertainquantity.py</Filename>
65+
<Linenumber>15</Linenumber>
66+
</Resource>
67+
</Task>
6868
</Tasks>

doc/source/_templates/layout.html

Lines changed: 4 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,12 @@
11
{% extends "!layout.html" %}
22

33
{% block rootrellink %}
4-
<li><a href="{{ pathto('index') }}">Quantities home </a> |&nbsp;</li>
5-
<li><a href="{{ pathto('contents') }}">Documentation </a> &raquo;</li>
4+
<li><a href="{{ pathto('index') }}">Quantities home </a>&nbsp|&nbsp;</li>
5+
<li><a href="{{ pathto('contents') }}">Documentation </a>&raquo;</li>
66
{% endblock %}
77

8-
{% block relbar1 %}
8+
{% block header %}
99
<div style="background-color: white; text-align: left; padding: 10px 10px 15px 15px">
10-
<img src="{{ pathto("_static/quantities.png", 1) }}" />
10+
<img src="{{ pathto("_static/quantities.png", 1) }}" alt="Quantities logo"/>
1111
</div>
12-
{{ super() }}
1312
{% endblock %}
14-
15-
{# put the sidebar before the body #}
16-
{% block sidebar1 %}{{ sidebar() }}{% endblock %}
17-
{% block sidebar2 %}{% endblock %}

quantities/uncertainquantity.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -193,11 +193,11 @@ def __str__(self):
193193
return s.replace('+/-', '±').replace(' sigma', 'σ')
194194
return s
195195

196-
@with_doc(numpy.ndarray.sum)
196+
@with_doc(np.ndarray.sum)
197197
def sum(self, axis=None, dtype=None, out=None):
198198
return UncertainQuantity(
199199
self.magnitude.sum(axis, dtype, out),
200200
self.dimensionality,
201-
(sum(self.uncertainty.magnitude**2, axis))**0.5,
201+
(np.sum(self.uncertainty.magnitude**2, axis))**0.5,
202202
copy=False
203203
)

0 commit comments

Comments
 (0)