metrolopy 1.0.0__py3-none-any.whl → 1.0.2__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- metrolopy/gummy.py +28 -21
- metrolopy/nummy.py +16 -22
- metrolopy/tests/test_complex.py +22 -0
- metrolopy/tests/test_create.py +3 -0
- metrolopy/tests/test_gummy.py +88 -0
- metrolopy/tests/test_misc.py +3 -1
- metrolopy/tests/test_operations.py +55 -0
- metrolopy/tests/test_ubreakdown.py +3 -0
- metrolopy/ummy.py +7 -3
- metrolopy/version.py +1 -1
- {metrolopy-1.0.0.dist-info → metrolopy-1.0.2.dist-info}/METADATA +6 -6
- {metrolopy-1.0.0.dist-info → metrolopy-1.0.2.dist-info}/RECORD +16 -16
- {metrolopy-1.0.0.dist-info → metrolopy-1.0.2.dist-info}/WHEEL +0 -0
- {metrolopy-1.0.0.dist-info → metrolopy-1.0.2.dist-info}/licenses/LICENSE +0 -0
- {metrolopy-1.0.0.dist-info → metrolopy-1.0.2.dist-info}/top_level.txt +0 -0
- {metrolopy-1.0.0.dist-info → metrolopy-1.0.2.dist-info}/zip-safe +0 -0
metrolopy/gummy.py
CHANGED
|
@@ -561,7 +561,6 @@ class gummy(Quantity,metaclass=MetaGummy):
|
|
|
561
561
|
|
|
562
562
|
if isinstance(x,gummy):
|
|
563
563
|
self._value = nummy(x.value)
|
|
564
|
-
self._value._fp = self._get_p
|
|
565
564
|
self._unit = x._unit
|
|
566
565
|
self._U = self._value.u
|
|
567
566
|
self._value._name = x._value._name
|
|
@@ -580,7 +579,6 @@ class gummy(Quantity,metaclass=MetaGummy):
|
|
|
580
579
|
|
|
581
580
|
if isinstance(x,ummy):
|
|
582
581
|
self._value = nummy(x)
|
|
583
|
-
self._value._fp = self._get_p
|
|
584
582
|
self._U = self._value.u
|
|
585
583
|
self._k = 1
|
|
586
584
|
self._pm = None
|
|
@@ -659,7 +657,6 @@ class gummy(Quantity,metaclass=MetaGummy):
|
|
|
659
657
|
u = u/type(u)(self._k)
|
|
660
658
|
|
|
661
659
|
self._value = nummy(x,u=u,dof=dof,utype=utype,name=name)
|
|
662
|
-
self._value._fp = self._get_p
|
|
663
660
|
|
|
664
661
|
self._U = None
|
|
665
662
|
self._set_U(self._k,uunit)
|
|
@@ -704,10 +701,23 @@ class gummy(Quantity,metaclass=MetaGummy):
|
|
|
704
701
|
Returns `True` if the gummy is an independent variable. That is the
|
|
705
702
|
ummy has u > 0 and was not correlated with any other gummy's when it was
|
|
706
703
|
created or is perfectly correlated or anti-correlated (correlation
|
|
707
|
-
coefficeint 1 or -1) with such an ummy.
|
|
704
|
+
coefficeint 1 or -1) with such an ummy.
|
|
708
705
|
"""
|
|
709
706
|
|
|
710
707
|
return self.value.isindependent
|
|
708
|
+
|
|
709
|
+
@property
|
|
710
|
+
def independent(self):
|
|
711
|
+
"""
|
|
712
|
+
`bool`, read-only
|
|
713
|
+
|
|
714
|
+
Returns `True` if the gummy is an independent variable. That is the
|
|
715
|
+
ummy has u > 0 and was not correlated with any other gummy's when it was
|
|
716
|
+
created or is perfectly correlated or anti-correlated (correlation
|
|
717
|
+
coefficeint 1 or -1) with such an ummy. Identical to the
|
|
718
|
+
isindependent property.
|
|
719
|
+
"""
|
|
720
|
+
return self.value.isindependent
|
|
711
721
|
|
|
712
722
|
@property
|
|
713
723
|
def U(self):
|
|
@@ -839,7 +849,7 @@ class gummy(Quantity,metaclass=MetaGummy):
|
|
|
839
849
|
`k` properties will affect `Usym`.
|
|
840
850
|
"""
|
|
841
851
|
if not isinstance(self._U,Quantity):
|
|
842
|
-
return self._value.Usim
|
|
852
|
+
return self._value.Usim(self.p)
|
|
843
853
|
|
|
844
854
|
if self.uunit_is_rel:
|
|
845
855
|
x = self.xsim
|
|
@@ -892,7 +902,7 @@ class gummy(Quantity,metaclass=MetaGummy):
|
|
|
892
902
|
but changing the `p`, `k`, or `cimethod` properties will affect the return
|
|
893
903
|
value.
|
|
894
904
|
"""
|
|
895
|
-
return self._value.cisim
|
|
905
|
+
return self._value.cisim(self.p)
|
|
896
906
|
|
|
897
907
|
@property
|
|
898
908
|
def cimethod(self):
|
|
@@ -925,7 +935,7 @@ class gummy(Quantity,metaclass=MetaGummy):
|
|
|
925
935
|
value = value.lower().strip()
|
|
926
936
|
if value not in ['shortest','symmetric']:
|
|
927
937
|
raise ValueError('cimethod ' + str(value) + ' is not recognized')
|
|
928
|
-
self.value.
|
|
938
|
+
self.value.cimethod = value
|
|
929
939
|
|
|
930
940
|
@property
|
|
931
941
|
def simdata(self):
|
|
@@ -963,17 +973,7 @@ class gummy(Quantity,metaclass=MetaGummy):
|
|
|
963
973
|
|
|
964
974
|
Returns ``0.5*(gummy.Usim[0] + gummy.Usim[1])/gummy.usim``
|
|
965
975
|
"""
|
|
966
|
-
return self.value.ksim
|
|
967
|
-
|
|
968
|
-
@property
|
|
969
|
-
def independent(self):
|
|
970
|
-
"""
|
|
971
|
-
`bool`, read-only
|
|
972
|
-
|
|
973
|
-
Returns `False` if the owning gummy was created from a operation involving
|
|
974
|
-
other gummys or has zero uncertainty and `True` otherwise.
|
|
975
|
-
"""
|
|
976
|
-
return self.value.isindependent
|
|
976
|
+
return self.value.ksim(self.p)
|
|
977
977
|
|
|
978
978
|
@property
|
|
979
979
|
def name(self):
|
|
@@ -1039,6 +1039,7 @@ class gummy(Quantity,metaclass=MetaGummy):
|
|
|
1039
1039
|
Quantity.unit.fset(self,u)
|
|
1040
1040
|
self._U = None
|
|
1041
1041
|
self._set_U()
|
|
1042
|
+
self._value.clear()
|
|
1042
1043
|
|
|
1043
1044
|
@property
|
|
1044
1045
|
def uunit(self):
|
|
@@ -2757,14 +2758,18 @@ class gummy(Quantity,metaclass=MetaGummy):
|
|
|
2757
2758
|
x = self.x
|
|
2758
2759
|
|
|
2759
2760
|
xd = _to_decimal(x,max_digits=self.max_digits)
|
|
2760
|
-
with localcontext(prec=nsig + 2):
|
|
2761
|
+
#with localcontext(prec=nsig + 2):
|
|
2762
|
+
with localcontext() as ctx:
|
|
2763
|
+
ctx.prec = nsig + 2
|
|
2761
2764
|
ud = _to_decimal(u)*_to_decimal(self._k)
|
|
2762
2765
|
|
|
2763
2766
|
elip = ''
|
|
2764
2767
|
uexp = 0
|
|
2765
2768
|
xexp = 0
|
|
2766
2769
|
dp = 0
|
|
2767
|
-
with localcontext(prec=self.max_digits):
|
|
2770
|
+
#with localcontext(prec=self.max_digits):
|
|
2771
|
+
with localcontext() as ctx:
|
|
2772
|
+
ctx.prec = self.max_digits
|
|
2768
2773
|
if ud == 0 or not ud.is_finite():
|
|
2769
2774
|
if style != 'xf':
|
|
2770
2775
|
style = 'x'
|
|
@@ -2869,7 +2874,9 @@ class gummy(Quantity,metaclass=MetaGummy):
|
|
|
2869
2874
|
style = 'pmi'
|
|
2870
2875
|
return tuple([style,xret] + uret)
|
|
2871
2876
|
|
|
2872
|
-
with localcontext(prec=nsig + 2):
|
|
2877
|
+
#with localcontext(prec=nsig + 2):
|
|
2878
|
+
with localcontext() as ctx:
|
|
2879
|
+
ctx.prec = nsig + 2
|
|
2873
2880
|
if sim:
|
|
2874
2881
|
u = abs(_to_decimal(self.cisim[1] - self.cisim[0]))
|
|
2875
2882
|
else:
|
metrolopy/nummy.py
CHANGED
|
@@ -111,7 +111,6 @@ class nummy(ummy):
|
|
|
111
111
|
|
|
112
112
|
_cimethod = 'shortest'
|
|
113
113
|
_bayesian = False # see the gummy bayesian property
|
|
114
|
-
_fp = None
|
|
115
114
|
_nsim = None
|
|
116
115
|
|
|
117
116
|
def __init__(self,x,u=0,dof=float('inf'),utype=None,name=None):
|
|
@@ -299,38 +298,35 @@ class nummy(ummy):
|
|
|
299
298
|
def xsim(self):
|
|
300
299
|
if not isinstance(self._dist,Distribution):
|
|
301
300
|
return self._dist
|
|
302
|
-
return self.distribution.mean
|
|
301
|
+
return float(self.distribution.mean)
|
|
303
302
|
|
|
304
303
|
@property
|
|
305
304
|
def usim(self):
|
|
306
305
|
if not isinstance(self._dist,Distribution):
|
|
307
306
|
return 0
|
|
308
|
-
return self.distribution.stdev
|
|
307
|
+
return float(self.distribution.stdev)
|
|
309
308
|
|
|
310
|
-
|
|
311
|
-
def cisim(self):
|
|
309
|
+
def cisim(self,p):
|
|
312
310
|
if not isinstance(self._dist,Distribution):
|
|
313
311
|
return [self._dist,self._dist]
|
|
314
312
|
if self._cimethod == 'shortest':
|
|
315
|
-
return self.distribution.ci(
|
|
313
|
+
return [float(i) for i in self.distribution.ci(p)]
|
|
316
314
|
else:
|
|
317
|
-
return self.distribution.cisym(
|
|
315
|
+
return [float(i) for i in self.distribution.cisym(p)]
|
|
318
316
|
|
|
319
|
-
|
|
320
|
-
def Usim(self):
|
|
317
|
+
def Usim(self,p):
|
|
321
318
|
if not isinstance(self._dist,Distribution):
|
|
322
319
|
return 0
|
|
323
320
|
x = self.distribution.mean
|
|
324
321
|
|
|
325
322
|
if self._cimethod == 'shortest':
|
|
326
|
-
ci = self.distribution.ci(
|
|
323
|
+
ci = self.distribution.ci(p)
|
|
327
324
|
else:
|
|
328
|
-
ci = self.distribution.cisym(
|
|
325
|
+
ci = self.distribution.cisym(p)
|
|
329
326
|
|
|
330
|
-
return (ci[1]-x,x-ci[0])
|
|
327
|
+
return (float(ci[1]-x),float(x-ci[0]))
|
|
331
328
|
|
|
332
|
-
|
|
333
|
-
def ksim(self):
|
|
329
|
+
def ksim(self,p):
|
|
334
330
|
"""
|
|
335
331
|
read-only
|
|
336
332
|
|
|
@@ -338,7 +334,8 @@ class nummy(ummy):
|
|
|
338
334
|
"""
|
|
339
335
|
if self.usim == 0 or not isinstance(self._dist,Distribution):
|
|
340
336
|
return float('inf')
|
|
341
|
-
|
|
337
|
+
usm = self.Usim(p)
|
|
338
|
+
return 0.5*(usm[0] + usm[1])/self.usim
|
|
342
339
|
|
|
343
340
|
@property
|
|
344
341
|
def isindependent(self):
|
|
@@ -385,12 +382,9 @@ class nummy(ummy):
|
|
|
385
382
|
if value not in ['shortest','symmetric']:
|
|
386
383
|
raise ValueError('cimethod ' + str(value) + ' is not recognized')
|
|
387
384
|
self._cimethod = value
|
|
388
|
-
|
|
389
|
-
|
|
390
|
-
|
|
391
|
-
if self._fp is None:
|
|
392
|
-
return 0.68268949213708585
|
|
393
|
-
return self._fp()
|
|
385
|
+
if isinstance(self.distribution,Distribution):
|
|
386
|
+
self.distribution._ci = {}
|
|
387
|
+
self.distribution._cisym = {}
|
|
394
388
|
|
|
395
389
|
@staticmethod
|
|
396
390
|
def set_seed(seed):
|
|
@@ -564,7 +558,7 @@ class nummy(ummy):
|
|
|
564
558
|
See the method `gummy.covariance(g)` for the corresponding result based
|
|
565
559
|
on first order error propagation.
|
|
566
560
|
"""
|
|
567
|
-
return self._dist.covsim(g._dist)
|
|
561
|
+
return float(self._dist.covsim(g._dist))
|
|
568
562
|
|
|
569
563
|
def correlation_sim(self,g):
|
|
570
564
|
"""
|
metrolopy/tests/test_complex.py
CHANGED
|
@@ -78,6 +78,10 @@ def make_immy(prnt=False):
|
|
|
78
78
|
|
|
79
79
|
|
|
80
80
|
class TestComplex(unittest.TestCase):
|
|
81
|
+
"""
|
|
82
|
+
Tests for the `immy` and `jummy` classes. Basic operations and
|
|
83
|
+
instance creation are tested using random values.
|
|
84
|
+
"""
|
|
81
85
|
def assert_ummy_close(self,u1,u2):
|
|
82
86
|
self.assertTrue(abs(u1.correlation(u2)) > 1 - 1e-4)
|
|
83
87
|
u1x = max(u1.x,u1.u,u2.x,u2.u)
|
|
@@ -94,6 +98,9 @@ class TestComplex(unittest.TestCase):
|
|
|
94
98
|
self.assert_ummy_close(i1.imag,i2.imag)
|
|
95
99
|
|
|
96
100
|
def test_immy_init(self,n=1000,prnt=False):
|
|
101
|
+
"""
|
|
102
|
+
Test immy creation using the real,imag,r and phi keywords.
|
|
103
|
+
"""
|
|
97
104
|
for m in range(n):
|
|
98
105
|
x,xr,xi = make_immy(prnt=prnt)
|
|
99
106
|
|
|
@@ -175,6 +182,9 @@ class TestComplex(unittest.TestCase):
|
|
|
175
182
|
self.assert_immy_close(c,cn)
|
|
176
183
|
|
|
177
184
|
def test_immy_add(self,n=1000,prnt=False):
|
|
185
|
+
"""
|
|
186
|
+
Test immy addition.
|
|
187
|
+
"""
|
|
178
188
|
self._test_immy_bop(lambda a,b: a + b,np.add,n,prnt)
|
|
179
189
|
|
|
180
190
|
for m in range(10):
|
|
@@ -183,6 +193,9 @@ class TestComplex(unittest.TestCase):
|
|
|
183
193
|
self.assertTrue(0 + i == i)
|
|
184
194
|
|
|
185
195
|
def test_immy_sub(self,n=1000,prnt=False):
|
|
196
|
+
"""
|
|
197
|
+
Test immy subtraction.
|
|
198
|
+
"""
|
|
186
199
|
self._test_immy_bop(lambda a,b: a - b,np.subtract,n,prnt)
|
|
187
200
|
|
|
188
201
|
for m in range(10):
|
|
@@ -191,6 +204,9 @@ class TestComplex(unittest.TestCase):
|
|
|
191
204
|
self.assertTrue(0 - i == -i)
|
|
192
205
|
|
|
193
206
|
def test_immy_mul(self,n=1000,prnt=False):
|
|
207
|
+
"""
|
|
208
|
+
Test immy multiplication.
|
|
209
|
+
"""
|
|
194
210
|
self._test_immy_bop(lambda a,b: a*b,np.multiply,n,prnt)
|
|
195
211
|
|
|
196
212
|
for m in range(10):
|
|
@@ -203,6 +219,9 @@ class TestComplex(unittest.TestCase):
|
|
|
203
219
|
self.assertTrue(immy(1)*i == i)
|
|
204
220
|
|
|
205
221
|
def test_immy_div(self,n=1000,prnt=False):
|
|
222
|
+
"""
|
|
223
|
+
Test immy division.
|
|
224
|
+
"""
|
|
206
225
|
self._test_immy_bop(lambda a,b: a/b,np.divide,n,prnt,allow_small=False)
|
|
207
226
|
|
|
208
227
|
for m in range(10):
|
|
@@ -210,6 +229,9 @@ class TestComplex(unittest.TestCase):
|
|
|
210
229
|
self.assertTrue(i/1 == i)
|
|
211
230
|
|
|
212
231
|
def test_immy_pow(self,n=1000,prnt=False):
|
|
232
|
+
"""
|
|
233
|
+
Test immy exponentiation.
|
|
234
|
+
"""
|
|
213
235
|
#_test_immy_bop(lambda a,b: a**b,np.power,n,prnt,allow_small=False)
|
|
214
236
|
|
|
215
237
|
for m in range(10):
|
metrolopy/tests/test_create.py
CHANGED
metrolopy/tests/test_gummy.py
CHANGED
|
@@ -28,6 +28,9 @@ import numpy as np
|
|
|
28
28
|
import unittest
|
|
29
29
|
|
|
30
30
|
class TestGummy(unittest.TestCase):
|
|
31
|
+
"""
|
|
32
|
+
Various unit tests of gummy properties and methods.
|
|
33
|
+
"""
|
|
31
34
|
def test_ku(self):
|
|
32
35
|
from metrolopy.gummy import _ku
|
|
33
36
|
from decimal import Decimal
|
|
@@ -36,6 +39,10 @@ class TestGummy(unittest.TestCase):
|
|
|
36
39
|
self.assertTrue(_ku(2.1,Decimal(3.3)) == Decimal(float(2.1))*Decimal(3.3))
|
|
37
40
|
|
|
38
41
|
def test_meta_properties(self):
|
|
42
|
+
"""
|
|
43
|
+
Test class properties.
|
|
44
|
+
|
|
45
|
+
"""
|
|
39
46
|
a = uc.gummy.cimethod
|
|
40
47
|
self.assertTrue(isinstance(a,str))
|
|
41
48
|
uc.gummy.cimethod = 'symmetric'
|
|
@@ -123,6 +130,9 @@ class TestGummy(unittest.TestCase):
|
|
|
123
130
|
uc.gummy.thousand_spaces = ts
|
|
124
131
|
|
|
125
132
|
def test_init(self):
|
|
133
|
+
"""
|
|
134
|
+
Test gummy creation
|
|
135
|
+
"""
|
|
126
136
|
g = uc.gummy(1.2,3.4)
|
|
127
137
|
self.assertTrue(g.x == 1.2)
|
|
128
138
|
self.assertTrue(g.u == 3.4)
|
|
@@ -223,6 +233,9 @@ class TestGummy(unittest.TestCase):
|
|
|
223
233
|
self.assertTrue(gg.name == 'def')
|
|
224
234
|
|
|
225
235
|
def test_U(self):
|
|
236
|
+
"""
|
|
237
|
+
Test expanded uncertainty.
|
|
238
|
+
"""
|
|
226
239
|
a = uc.gummy(1.1,2.2)
|
|
227
240
|
self.assertTrue(a.U == 2.2)
|
|
228
241
|
b = uc.gummy(3,4.4)
|
|
@@ -240,6 +253,9 @@ class TestGummy(unittest.TestCase):
|
|
|
240
253
|
self.assertTrue(abs(c.U[1] - 4.4*1.1/3**2) < 1e-12)
|
|
241
254
|
|
|
242
255
|
def test_set_U(self):
|
|
256
|
+
"""
|
|
257
|
+
Additional tests for expanded uncertainty.
|
|
258
|
+
"""
|
|
243
259
|
g = uc.gummy(1.0,1.0,k=2,unit='cm',uunit='mm')
|
|
244
260
|
self.assertTrue(g.U == 1)
|
|
245
261
|
self.assertTrue(g.uunit is uc.unit('mm'))
|
|
@@ -254,6 +270,9 @@ class TestGummy(unittest.TestCase):
|
|
|
254
270
|
self.assertTrue(c.U[1] == 4.4)
|
|
255
271
|
|
|
256
272
|
def test_iset_U(self):
|
|
273
|
+
"""
|
|
274
|
+
Additional tests for expanded uncertainty.
|
|
275
|
+
"""
|
|
257
276
|
g = uc.gummy(1)
|
|
258
277
|
self.assertTrue(g._iset_U() == 0)
|
|
259
278
|
self.assertTrue(g._iset_U(unit='m').unit is uc.unit('m'))
|
|
@@ -284,6 +303,9 @@ class TestGummy(unittest.TestCase):
|
|
|
284
303
|
self.assertTrue(g._iset_U(k=2) == 2)
|
|
285
304
|
|
|
286
305
|
def test_Usim(self):
|
|
306
|
+
"""
|
|
307
|
+
Test the gummy.Usim property
|
|
308
|
+
"""
|
|
287
309
|
g = uc.gummy(-8.5,1,unit='m')
|
|
288
310
|
g.sim()
|
|
289
311
|
self.assertTrue(abs(g.Usim[0] - 1) < 0.5)
|
|
@@ -352,16 +374,25 @@ class TestGummy(unittest.TestCase):
|
|
|
352
374
|
self.assertTrue(g.simsorted[i+1] >= g.simsorted[i])
|
|
353
375
|
|
|
354
376
|
def test_distribution(self):
|
|
377
|
+
"""
|
|
378
|
+
Test gummy.distribution
|
|
379
|
+
"""
|
|
355
380
|
g = uc.gummy(1,1)
|
|
356
381
|
self.assertTrue(isinstance(g.distribution,uc.Distribution))
|
|
357
382
|
|
|
358
383
|
def test_ksim(self):
|
|
384
|
+
"""
|
|
385
|
+
Test gummy.ksim
|
|
386
|
+
"""
|
|
359
387
|
g = uc.gummy(1,1)
|
|
360
388
|
g.p = 0.9545
|
|
361
389
|
g.sim()
|
|
362
390
|
self.assertTrue(abs(g.ksim - 2) < 0.1)
|
|
363
391
|
|
|
364
392
|
def test_independent(self):
|
|
393
|
+
"""
|
|
394
|
+
Test gummy.independant
|
|
395
|
+
"""
|
|
365
396
|
a = uc.gummy(1,1)
|
|
366
397
|
b = uc.gummy(-2,2)
|
|
367
398
|
c = a + b
|
|
@@ -371,6 +402,9 @@ class TestGummy(unittest.TestCase):
|
|
|
371
402
|
self.assertTrue(not d.independent)
|
|
372
403
|
|
|
373
404
|
def test_name(self):
|
|
405
|
+
"""
|
|
406
|
+
Test setting and getting gummy.name
|
|
407
|
+
"""
|
|
374
408
|
g = uc.gummy(1,1)
|
|
375
409
|
self.assertTrue(g.name is None)
|
|
376
410
|
g.name = 'abc'
|
|
@@ -415,6 +449,9 @@ class TestGummy(unittest.TestCase):
|
|
|
415
449
|
pass
|
|
416
450
|
|
|
417
451
|
def test_unit(self):
|
|
452
|
+
"""
|
|
453
|
+
Test setting and getting gummy.unit
|
|
454
|
+
"""
|
|
418
455
|
g = uc.gummy(1,1,unit='m')
|
|
419
456
|
self.assertTrue(g.unit is uc.unit('m'))
|
|
420
457
|
self.assertTrue(str(g.unit) == 'm')
|
|
@@ -428,6 +465,9 @@ class TestGummy(unittest.TestCase):
|
|
|
428
465
|
self.assertTrue(g.u == 1000)
|
|
429
466
|
|
|
430
467
|
def test_uunit(self):
|
|
468
|
+
"""
|
|
469
|
+
Test setting and getting gummy.uunit
|
|
470
|
+
"""
|
|
431
471
|
g = uc.gummy(1,1)
|
|
432
472
|
self.assertTrue(g.uunit is None)
|
|
433
473
|
g = uc.gummy(1,1,unit='m',uunit='cm')
|
|
@@ -446,6 +486,9 @@ class TestGummy(unittest.TestCase):
|
|
|
446
486
|
self.assertTrue(g.uunit is None)
|
|
447
487
|
|
|
448
488
|
def test_uunit_is_rel(self):
|
|
489
|
+
"""
|
|
490
|
+
Test gummy.uunit_is_rel
|
|
491
|
+
"""
|
|
449
492
|
g = uc.gummy(1,1)
|
|
450
493
|
self.assertTrue(not g.uunit_is_rel)
|
|
451
494
|
g.uunit='%'
|
|
@@ -459,6 +502,9 @@ class TestGummy(unittest.TestCase):
|
|
|
459
502
|
self.assertTrue(g.uunit_is_rel)
|
|
460
503
|
|
|
461
504
|
def test_k(self):
|
|
505
|
+
"""
|
|
506
|
+
Test setting and getting gummy.k
|
|
507
|
+
"""
|
|
462
508
|
g = uc.gummy(1)
|
|
463
509
|
self.assertTrue(g.k is None)
|
|
464
510
|
|
|
@@ -479,6 +525,9 @@ class TestGummy(unittest.TestCase):
|
|
|
479
525
|
self.assertTrue(abs(g.k - 1.96) < 0.01)
|
|
480
526
|
|
|
481
527
|
def test_p(self):
|
|
528
|
+
"""
|
|
529
|
+
Test setting and getting gummy.p
|
|
530
|
+
"""
|
|
482
531
|
uc.gummy.p_method = None
|
|
483
532
|
g = uc.gummy(1,1)
|
|
484
533
|
g.p = 0.95
|
|
@@ -498,6 +547,9 @@ class TestGummy(unittest.TestCase):
|
|
|
498
547
|
pass
|
|
499
548
|
|
|
500
549
|
def test_correlation(self):
|
|
550
|
+
"""
|
|
551
|
+
Test gummy.correlation
|
|
552
|
+
"""
|
|
501
553
|
a = uc.gummy(1,1)
|
|
502
554
|
b = uc.gummy(1,2)
|
|
503
555
|
c = a + b
|
|
@@ -510,6 +562,9 @@ class TestGummy(unittest.TestCase):
|
|
|
510
562
|
self.assertTrue(a.correlation(a) == 1)
|
|
511
563
|
|
|
512
564
|
def test_covariance(self):
|
|
565
|
+
"""
|
|
566
|
+
Test gummy.covariance
|
|
567
|
+
"""
|
|
513
568
|
a = uc.gummy(1,1)
|
|
514
569
|
b = uc.gummy(1,2)
|
|
515
570
|
c = a + b
|
|
@@ -523,6 +578,9 @@ class TestGummy(unittest.TestCase):
|
|
|
523
578
|
self.assertTrue(b.covariance(b) == 4)
|
|
524
579
|
|
|
525
580
|
def test_correlation_sim(self):
|
|
581
|
+
"""
|
|
582
|
+
Test gummy.correlation_sim
|
|
583
|
+
"""
|
|
526
584
|
a = uc.gummy(1,1)
|
|
527
585
|
b = uc.gummy(1,2)
|
|
528
586
|
c = a + b
|
|
@@ -535,6 +593,9 @@ class TestGummy(unittest.TestCase):
|
|
|
535
593
|
self.assertTrue(abs(a.correlation_sim(a) - 1) < 1e-6)
|
|
536
594
|
|
|
537
595
|
def test_covariance_sim(self):
|
|
596
|
+
"""
|
|
597
|
+
Test gummy.covariance_sim
|
|
598
|
+
"""
|
|
538
599
|
a = uc.gummy(1,1)
|
|
539
600
|
b = uc.gummy(1,2)
|
|
540
601
|
c = a + b
|
|
@@ -548,6 +609,9 @@ class TestGummy(unittest.TestCase):
|
|
|
548
609
|
self.assertTrue(abs(b.covariance_sim(b) - 4) < 1e-1)
|
|
549
610
|
|
|
550
611
|
def test_correlation_matrix(self):
|
|
612
|
+
"""
|
|
613
|
+
Test gummy.correlation_matrix
|
|
614
|
+
"""
|
|
551
615
|
a = uc.gummy(1,1)
|
|
552
616
|
b = uc.gummy(1,2)
|
|
553
617
|
c = a + b
|
|
@@ -564,6 +628,9 @@ class TestGummy(unittest.TestCase):
|
|
|
564
628
|
self.assertTrue((m[1][2] - 2/c.u) < 1e-1)
|
|
565
629
|
|
|
566
630
|
def test_covariance_matrix(self):
|
|
631
|
+
"""
|
|
632
|
+
Test gummy.covariance_matrix
|
|
633
|
+
"""
|
|
567
634
|
a = uc.gummy(1,1)
|
|
568
635
|
b = uc.gummy(1,2)
|
|
569
636
|
c = a + b
|
|
@@ -580,10 +647,16 @@ class TestGummy(unittest.TestCase):
|
|
|
580
647
|
self.assertTrue((m[1][2] - 4) < 1e-1)
|
|
581
648
|
|
|
582
649
|
def test_finfo(self):
|
|
650
|
+
"""
|
|
651
|
+
Test gummy.finfo
|
|
652
|
+
"""
|
|
583
653
|
a = uc.gummy(1,1)
|
|
584
654
|
self.assertTrue(a.finfo.rel_u == 0)
|
|
585
655
|
|
|
586
656
|
def test_real(self):
|
|
657
|
+
"""
|
|
658
|
+
Test gummy.real
|
|
659
|
+
"""
|
|
587
660
|
a = uc.gummy(1.1,0.3)
|
|
588
661
|
b = a.real
|
|
589
662
|
self.assertTrue(not a is b)
|
|
@@ -592,6 +665,9 @@ class TestGummy(unittest.TestCase):
|
|
|
592
665
|
self.assertTrue(a.correlation(b) == 1)
|
|
593
666
|
|
|
594
667
|
def test_conjugate(self):
|
|
668
|
+
"""
|
|
669
|
+
Test gummy.conjugate
|
|
670
|
+
"""
|
|
595
671
|
a = uc.gummy(1.1,0.3)
|
|
596
672
|
b = a.conjugate()
|
|
597
673
|
self.assertTrue(not a is b)
|
|
@@ -600,16 +676,25 @@ class TestGummy(unittest.TestCase):
|
|
|
600
676
|
self.assertTrue(a.correlation(b) == 1)
|
|
601
677
|
|
|
602
678
|
def test_angle(self):
|
|
679
|
+
"""
|
|
680
|
+
Test gummy.angle
|
|
681
|
+
"""
|
|
603
682
|
self.assertTrue(uc.gummy(1.1,0.3).angle() == 0)
|
|
604
683
|
self.assertTrue(abs(abs(uc.gummy(-1.1,0.3).angle()) - np.pi) < 1e-10)
|
|
605
684
|
|
|
606
685
|
def test_utype(self):
|
|
686
|
+
"""
|
|
687
|
+
Test gummy.utype
|
|
688
|
+
"""
|
|
607
689
|
a = uc.gummy(1.2,1,1,utype='A')
|
|
608
690
|
self.assertTrue(a.utype == 'A')
|
|
609
691
|
b = uc.gummy(1.2,1,1,utype='xyz')
|
|
610
692
|
self.assertTrue(b.utype == 'xyz')
|
|
611
693
|
|
|
612
694
|
def test_ufrom(self):
|
|
695
|
+
"""
|
|
696
|
+
Test gummy.ufrom
|
|
697
|
+
"""
|
|
613
698
|
a = uc.gummy(1.2,0.2,utype='A')
|
|
614
699
|
b = uc.gummy(3.2,0.5,utype='A')
|
|
615
700
|
c = uc.gummy(0.9,0.2,utype='B')
|
|
@@ -620,6 +705,9 @@ class TestGummy(unittest.TestCase):
|
|
|
620
705
|
self.assertTrue(d.ufrom(c) == 0.2)
|
|
621
706
|
|
|
622
707
|
def test_dof_from(self):
|
|
708
|
+
"""
|
|
709
|
+
Test gummy.doffrom
|
|
710
|
+
"""
|
|
623
711
|
a = uc.gummy(1.2,0.2,dof=5,utype='A')
|
|
624
712
|
b = uc.gummy(3.2,0.5,dof=7,utype='A')
|
|
625
713
|
c = uc.gummy(0.9,0.2,utype='B')
|
metrolopy/tests/test_misc.py
CHANGED
|
@@ -28,6 +28,10 @@ from metrolopy.tests.common import rand,make_gummy,make_number
|
|
|
28
28
|
|
|
29
29
|
|
|
30
30
|
class TestOperations(unittest.TestCase):
|
|
31
|
+
"""
|
|
32
|
+
Tests checking basic operations with `gummy` instances using random
|
|
33
|
+
values.
|
|
34
|
+
"""
|
|
31
35
|
def binary_func(self,f,df,sim=False,exp=None,fionly=False,uexp=-6,allowazero=True,
|
|
32
36
|
allowbzero=True,allowlargeu=True):
|
|
33
37
|
if sim:
|
|
@@ -104,6 +108,9 @@ class TestOperations(unittest.TestCase):
|
|
|
104
108
|
self.assertTrue(abs((g.correlation_sim(b)-g.correlation(b))/g.correlation(b)) < 0.1)
|
|
105
109
|
|
|
106
110
|
def test_add(self,n=1000,sim=False):
|
|
111
|
+
"""
|
|
112
|
+
Test gummy addition.
|
|
113
|
+
"""
|
|
107
114
|
def f(a,b):
|
|
108
115
|
return a + b
|
|
109
116
|
def df(ax,bx):
|
|
@@ -112,6 +119,9 @@ class TestOperations(unittest.TestCase):
|
|
|
112
119
|
self.binary_func(f,df,sim=sim)
|
|
113
120
|
|
|
114
121
|
def test_sub(self,n=1000,sim=False):
|
|
122
|
+
"""
|
|
123
|
+
Test gummy subtraction.
|
|
124
|
+
"""
|
|
115
125
|
def f(a,b):
|
|
116
126
|
return a - b
|
|
117
127
|
def df(ax,bx):
|
|
@@ -120,6 +130,9 @@ class TestOperations(unittest.TestCase):
|
|
|
120
130
|
self.binary_func(f,df,sim=sim)
|
|
121
131
|
|
|
122
132
|
def test_mul(self,n=1000,sim=False):
|
|
133
|
+
"""
|
|
134
|
+
Test gummy multiplication.
|
|
135
|
+
"""
|
|
123
136
|
def f(a,b):
|
|
124
137
|
return a*b
|
|
125
138
|
def df(ax,bx):
|
|
@@ -128,6 +141,9 @@ class TestOperations(unittest.TestCase):
|
|
|
128
141
|
self.binary_func(f,df,sim=sim)
|
|
129
142
|
|
|
130
143
|
def test_div(self,n=1000,sim=False):
|
|
144
|
+
"""
|
|
145
|
+
Test gummy division.
|
|
146
|
+
"""
|
|
131
147
|
def f(a,b):
|
|
132
148
|
return a/b
|
|
133
149
|
def df(ax,bx):
|
|
@@ -140,6 +156,9 @@ class TestOperations(unittest.TestCase):
|
|
|
140
156
|
self.binary_func(f,df,sim=sim,allowbzero=False,allowlargeu=lu)
|
|
141
157
|
|
|
142
158
|
def test_pow(self,n=1000,sim=False):
|
|
159
|
+
"""
|
|
160
|
+
Test gummy exponentiation.
|
|
161
|
+
"""
|
|
143
162
|
def f(a,b):
|
|
144
163
|
return abs(a)**b
|
|
145
164
|
def df(ax,bx):
|
|
@@ -153,6 +172,9 @@ class TestOperations(unittest.TestCase):
|
|
|
153
172
|
self.binary_func(f,df,sim=sim,exp=0,allowazero=False,allowlargeu=lu)
|
|
154
173
|
|
|
155
174
|
def test_mod(self,n=1000,sim=False):
|
|
175
|
+
"""
|
|
176
|
+
Test gummy mod.
|
|
177
|
+
"""
|
|
156
178
|
def f(a,b):
|
|
157
179
|
return a%b
|
|
158
180
|
def df(ax,bx):
|
|
@@ -161,6 +183,9 @@ class TestOperations(unittest.TestCase):
|
|
|
161
183
|
self.binary_func(f,df,sim=sim,fionly=True,allowazero=False)
|
|
162
184
|
|
|
163
185
|
def test_abs(self,n=1000,sim=False):
|
|
186
|
+
"""
|
|
187
|
+
Test gummy abs.
|
|
188
|
+
"""
|
|
164
189
|
def f(a,b):
|
|
165
190
|
return abs(a)*abs(b)
|
|
166
191
|
def df(ax,bx):
|
|
@@ -174,6 +199,9 @@ class TestOperations(unittest.TestCase):
|
|
|
174
199
|
allowbzero=lu)
|
|
175
200
|
|
|
176
201
|
def test_neg(self,n=1000,sim=False):
|
|
202
|
+
"""
|
|
203
|
+
Test gummy neg.
|
|
204
|
+
"""
|
|
177
205
|
def f(a,b):
|
|
178
206
|
return (-a)*b
|
|
179
207
|
def df(ax,bx):
|
|
@@ -182,6 +210,9 @@ class TestOperations(unittest.TestCase):
|
|
|
182
210
|
self.binary_func(f,df,sim=sim)
|
|
183
211
|
|
|
184
212
|
def test_pos(self,n=1000,sim=False):
|
|
213
|
+
"""
|
|
214
|
+
Test gummy pos.
|
|
215
|
+
"""
|
|
185
216
|
def f(a,b):
|
|
186
217
|
return (+a)*b
|
|
187
218
|
def df(ax,bx):
|
|
@@ -190,6 +221,9 @@ class TestOperations(unittest.TestCase):
|
|
|
190
221
|
self.binary_func(f,df,sim=sim)
|
|
191
222
|
|
|
192
223
|
def test_sincos(self,n=1000,sim=False):
|
|
224
|
+
"""
|
|
225
|
+
Test gummy metrolopy.sin + metrolopy.cos.
|
|
226
|
+
"""
|
|
193
227
|
def f(a,b):
|
|
194
228
|
return uc.sin(a) + uc.cos(b)
|
|
195
229
|
def df(ax,bx):
|
|
@@ -198,6 +232,9 @@ class TestOperations(unittest.TestCase):
|
|
|
198
232
|
self.binary_func(f,df,sim=sim)
|
|
199
233
|
|
|
200
234
|
def test_npsincos(self,n=1000,sim=False):
|
|
235
|
+
"""
|
|
236
|
+
Test gummy numpy.sin + numpy.cos.
|
|
237
|
+
"""
|
|
201
238
|
def f(a,b):
|
|
202
239
|
return np.sin(a) + np.cos(b)
|
|
203
240
|
def df(ax,bx):
|
|
@@ -206,6 +243,9 @@ class TestOperations(unittest.TestCase):
|
|
|
206
243
|
self.binary_func(f,df,sim=sim,fionly=True)
|
|
207
244
|
|
|
208
245
|
def test_ap1sincos(self,n=1000,sim=False):
|
|
246
|
+
"""
|
|
247
|
+
Test gummy.apply(numpy.sin) + gummy.apply(numpy.cos).
|
|
248
|
+
"""
|
|
209
249
|
def f(a,b):
|
|
210
250
|
return uc.gummy.apply(np.sin,np.cos,a) + uc.gummy.napply(np.cos,b)
|
|
211
251
|
def df(ax,bx):
|
|
@@ -214,6 +254,9 @@ class TestOperations(unittest.TestCase):
|
|
|
214
254
|
self.binary_func(f,df,sim=sim,fionly=True,exp=0,allowlargeu=False)
|
|
215
255
|
|
|
216
256
|
def test_ap2sincos(self,n=1000,sim=False):
|
|
257
|
+
"""
|
|
258
|
+
Test gummy.apply(numpy.sin + numpy.cos).
|
|
259
|
+
"""
|
|
217
260
|
def ff(a,b):
|
|
218
261
|
return np.sin(a) + np.cos(b)
|
|
219
262
|
def df(ax,bx):
|
|
@@ -225,6 +268,9 @@ class TestOperations(unittest.TestCase):
|
|
|
225
268
|
self.binary_func(f,df,sim=sim,fionly=True)
|
|
226
269
|
|
|
227
270
|
def test_apnsincos(self,n=1000,sim=False):
|
|
271
|
+
"""
|
|
272
|
+
Test gummy.napply(numpy.sin + numpy.cos).
|
|
273
|
+
"""
|
|
228
274
|
def ff(a,b):
|
|
229
275
|
return np.sin(a) + np.cos(b)
|
|
230
276
|
def df(ax,bx):
|
|
@@ -236,6 +282,9 @@ class TestOperations(unittest.TestCase):
|
|
|
236
282
|
self.binary_func(f,df,sim=sim,fionly=True,exp=0,allowlargeu=False)
|
|
237
283
|
|
|
238
284
|
def test_addxmul(self,n=1000):
|
|
285
|
+
"""
|
|
286
|
+
Check that x+x+x+...+x == n*x for gummy values.
|
|
287
|
+
"""
|
|
239
288
|
def f(*x):
|
|
240
289
|
r = x[0]
|
|
241
290
|
for i in range(len(x)-1):
|
|
@@ -283,6 +332,9 @@ class TestOperations(unittest.TestCase):
|
|
|
283
332
|
self.assertTrue(abs(d.correlation(b) - 1) < 1e-14)
|
|
284
333
|
|
|
285
334
|
def test_mulxpow(self,n=1000):
|
|
335
|
+
"""
|
|
336
|
+
Check that x*x*x*...*x == x**n for gummy values.
|
|
337
|
+
"""
|
|
286
338
|
def f(*x):
|
|
287
339
|
r = x[0]
|
|
288
340
|
for i in range(len(x)-1):
|
|
@@ -336,6 +388,9 @@ class TestOperations(unittest.TestCase):
|
|
|
336
388
|
|
|
337
389
|
|
|
338
390
|
def test_mulxnpow(self,n=1000):
|
|
391
|
+
"""
|
|
392
|
+
Check that (1/x)*(1/x)*(1/x)*...*(1/x) == x**-n for gummy values.
|
|
393
|
+
"""
|
|
339
394
|
def f(*x):
|
|
340
395
|
r = 1/x[0]
|
|
341
396
|
for i in range(len(x)-1):
|
|
@@ -28,6 +28,9 @@ from metrolopy.tests.common import rand,make_gummy
|
|
|
28
28
|
|
|
29
29
|
class TestUbreakdown(unittest.TestCase):
|
|
30
30
|
def test_ubreakdown(self,n=None,prnt=False,budget=False):
|
|
31
|
+
"""
|
|
32
|
+
Test gummy.ubreakdown and the budget class.
|
|
33
|
+
"""
|
|
31
34
|
uc.gummy.p_method = None
|
|
32
35
|
|
|
33
36
|
if n is None:
|
metrolopy/ummy.py
CHANGED
|
@@ -152,7 +152,9 @@ def _to_decimal(x,max_digits=None):
|
|
|
152
152
|
elif isinstance(x,Rational):
|
|
153
153
|
if max_digits is None:
|
|
154
154
|
max_digits = ummy.max_digits
|
|
155
|
-
with localcontext(prec=max_digits):
|
|
155
|
+
#with localcontext(prec=max_digits):
|
|
156
|
+
with localcontext() as ctx:
|
|
157
|
+
ctx.prec = max_digits
|
|
156
158
|
try:
|
|
157
159
|
xd = Decimal(x.numerator)/Decimal(x.denominator)
|
|
158
160
|
except:
|
|
@@ -627,7 +629,7 @@ class ummy(Dfunc,PrettyPrinter,Number,metaclass=MetaUmmy):
|
|
|
627
629
|
"""
|
|
628
630
|
Returns the variance-covariance matrix of a list or array of ummys.
|
|
629
631
|
"""
|
|
630
|
-
return [[b.covariance(a) if isinstance(b,ummy) else 0 for b in gummys]
|
|
632
|
+
return [[float(b.covariance(a)) if isinstance(b,ummy) else 0 for b in gummys]
|
|
631
633
|
for a in gummys]
|
|
632
634
|
|
|
633
635
|
@classmethod
|
|
@@ -754,7 +756,9 @@ class ummy(Dfunc,PrettyPrinter,Number,metaclass=MetaUmmy):
|
|
|
754
756
|
dp = 0
|
|
755
757
|
xd = _to_decimal(self._x,max_digits=self.max_digits)
|
|
756
758
|
ud = _to_decimal(self.u)
|
|
757
|
-
with localcontext(prec=self.max_digits):
|
|
759
|
+
#with localcontext(prec=self.max_digits):
|
|
760
|
+
with localcontext() as ctx:
|
|
761
|
+
ctx.prec = self.max_digits
|
|
758
762
|
if ud == 0 or not ud.is_finite():
|
|
759
763
|
if xd.is_finite():
|
|
760
764
|
nm = False
|
metrolopy/version.py
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: metrolopy
|
|
3
|
-
Version: 1.0.
|
|
3
|
+
Version: 1.0.2
|
|
4
4
|
Summary: tools for dealing with measured quantities: uncertainty propagation and unit conversion
|
|
5
5
|
Home-page: http://nrc-cnrc.github.io/MetroloPy/
|
|
6
6
|
Author: Harold Parks, National Research Council Canada
|
|
@@ -41,7 +41,7 @@ tools for dealing with physical quantities: uncertainty propagation and unit co
|
|
|
41
41
|
|
|
42
42
|
---
|
|
43
43
|
|
|
44
|
-
MetroloPy is a pure python package and requires Python 3.
|
|
44
|
+
MetroloPy is a pure python package and requires Python 3.6 or later and the SciPy stack (NumPy, SciPy and Pandas). It looks best in a Jupyter Notebook.
|
|
45
45
|
|
|
46
46
|
Install MetroloPy with `pip install metrolopy` or
|
|
47
47
|
`conda install -c conda-forge metrolopy`.
|
|
@@ -67,8 +67,8 @@ Physical quantities can then be represented in Python as `gummy` objects with an
|
|
|
67
67
|
|
|
68
68
|
MetroloPy can do much more including Monte-Carlo uncertainty propagation, generating uncertainty budget tables, and curve fitting. It can also handle expanded uncertainties, degrees of freedom, correlated quantities, and complex valued quantities. See:
|
|
69
69
|
|
|
70
|
-
* [a tutorial](https://nrc-cnrc.github.io/MetroloPy/_build/html/_static/tutorial.html) (or <a href="https://nrc-cnrc.github.io/MetroloPy/_build/html/_downloads/tutorial.ipynb"
|
|
71
|
-
* [the documentation](https://nrc-cnrc.github.io/MetroloPy/)
|
|
70
|
+
* [a tutorial](https://nrc-cnrc.github.io/MetroloPy/_build/html/_static/tutorial.html) (or <a href="https://nrc-cnrc.github.io/MetroloPy/_build/html/_downloads/tutorial.ipynb" target="_blank"> download the tutorial as Jupyter notebook</a>)
|
|
71
|
+
* [the documentation](https://nrc-cnrc.github.io/MetroloPy/_build/html/index.html)
|
|
72
72
|
* [the issues page on GitHub](https://github.com/nrc-cnrc/Metrolopy/issues)
|
|
73
73
|
* [a list of the units built into MetroloPy](https://nrc-cnrc.github.io/MetroloPy/_static/units.html)
|
|
74
74
|
* [a list of the physical constants built into MetroloPy](https://nrc-cnrc.github.io/MetroloPy/_static/constants.html)
|
|
@@ -79,14 +79,14 @@ MetroloPy can do much more including Monte-Carlo uncertainty propagation, genera
|
|
|
79
79
|
previous versions, in a multi-step calculation, the effective degree of freedom
|
|
80
80
|
were calculated at each step based on the degrees of freedom calculated for the
|
|
81
81
|
previous step (using a modified Welch-Satterthwaite approximation). Now
|
|
82
|
-
effective degrees of freedom are
|
|
82
|
+
effective degrees of freedom are always calculated directly from the independent
|
|
83
83
|
variables using the Welch-Satterthwaite equation.
|
|
84
84
|
|
|
85
85
|
* CODATA 2022 values instead of 2018 values are used in the Constants module.
|
|
86
86
|
|
|
87
87
|
* The significance value in budget table has been redefined from
|
|
88
88
|
(sensitivity coefficient * standard uncertainty/combined uncertainty) to the
|
|
89
|
-
square of that value so that the significance
|
|
89
|
+
square of that value so that the significance values in a budget sum to one.
|
|
90
90
|
|
|
91
91
|
* Units can now be raised to a fractional power and many other bug fixes.
|
|
92
92
|
|
|
@@ -9,37 +9,37 @@ metrolopy/distributions.py,sha256=rh5qRRocXn9_JZ1zmhxCy2O3kwy6XtYIyPHyNxdqefo,48
|
|
|
9
9
|
metrolopy/exceptions.py,sha256=N9IvZvNRBNLtKV-t-zYIpOj6SuKpnd6lZUckL8LEBuY,1774
|
|
10
10
|
metrolopy/fit.py,sha256=cocdQjj13fIrj70cnibFcVYliqKbaGUr95-eAWDLNXY,101174
|
|
11
11
|
metrolopy/functions.py,sha256=PIZ1nQwMzOunT6qjDr2Al26Robr8AE7NGGHnkEL_p2c,10057
|
|
12
|
-
metrolopy/gummy.py,sha256=
|
|
12
|
+
metrolopy/gummy.py,sha256=4zbOmhsid2sziOqy3ynMDJue3xGMCrH1R86iR7n7l3A,141759
|
|
13
13
|
metrolopy/indexed.py,sha256=29Ev_S6noFLDem9jti_kiBWv_96WIShVhYNN_l-q2aI,8534
|
|
14
14
|
metrolopy/license.txt,sha256=hOKIMVY_W-ijJs8Q2Xo7gf2LE_r88c7eYO3-n0FYyFs,33041
|
|
15
15
|
metrolopy/logunit.py,sha256=Ap7HoJhWrByO9lEHboibubsXTwjFGgM044IQ_bA9nrQ,7468
|
|
16
16
|
metrolopy/mean.py,sha256=l6thmupfEF2PGswAzEQBpgsluko9OK7YLiUeP4h507k,13185
|
|
17
17
|
metrolopy/miscunits.py,sha256=4okSOTKFsXce1yQgVK1jy5s4VGCUGkm1ObBJ1R19YJE,20432
|
|
18
18
|
metrolopy/nonlinearunit.py,sha256=lWImZ_dJRwP_uJGFRQgWeLDEIL_7PetgrJDgExJDSuc,8394
|
|
19
|
-
metrolopy/nummy.py,sha256=
|
|
19
|
+
metrolopy/nummy.py,sha256=AokskJHQl3hzj9IB77YoH6LlY-FcUhebgXV8IGAyAvU,27690
|
|
20
20
|
metrolopy/offsetunit.py,sha256=a8Y6njKImJpHcvNX4-mv2ZKnA1sy-5pz08LJBh0Bbzg,4096
|
|
21
21
|
metrolopy/pmethod.py,sha256=pcMBFhP_6QzCqsHiLM_ADsoxMoTX733w038L6eaFU20,4033
|
|
22
22
|
metrolopy/prefixedunit.py,sha256=rsG_AKWIignQVIrOsahjw0kgOA6NvC3iafu_tKoO7yM,10392
|
|
23
23
|
metrolopy/printing.py,sha256=I_TVH3CWcwWxm82ER44v0_IP9oPUSYHTYR5pfWRdRNo,8993
|
|
24
24
|
metrolopy/relunits.py,sha256=fPuzkx352bnI1_mCTDDVbKHZ1ifsvdgR0gBZ1s9uYfI,2174
|
|
25
25
|
metrolopy/siunits.py,sha256=9eFc8N6namSeZCyqiMrkIcUvatFHiFwr4v05TKRMm5I,8611
|
|
26
|
-
metrolopy/ummy.py,sha256=
|
|
26
|
+
metrolopy/ummy.py,sha256=Qx2pcqNsfxbb5ZuN9rCfdZ6ZAGevHa3kBrRB1_PwiqI,76985
|
|
27
27
|
metrolopy/unit.py,sha256=_UF8WSHFbOyPZbyebW73jSHD2jO_RKg2_Z60smBhinM,64514
|
|
28
28
|
metrolopy/unitparser.py,sha256=L-eCt_ubIy0rQEG9uttNnkBa3-BpkSnkHW9scHSHKmg,9015
|
|
29
29
|
metrolopy/unitutils.py,sha256=2lw1JWo-xPgE42zIJP3fTsZIOtwDJqnq3Si9CTsIEuY,13802
|
|
30
30
|
metrolopy/usunits.py,sha256=R1BdlW24DMdeq7YUpKgBk83YAibHEkWsu9ylMEW2qmU,11249
|
|
31
|
-
metrolopy/version.py,sha256=
|
|
31
|
+
metrolopy/version.py,sha256=mlx2kVkFVNnPS7nZ_M0Day_5iZSrF7YA59Fm9PBBc38,829
|
|
32
32
|
metrolopy/tests/__init__.py,sha256=8xPi7YxTaZ1Z7AJwxsTgY82iOj9Ysv7VqU8gOWoF92E,259
|
|
33
33
|
metrolopy/tests/common.py,sha256=-AUUXiz5vuORxpYDKdUkUG9j6jLRVp5fBGRlRTKI0kE,3474
|
|
34
|
-
metrolopy/tests/test_complex.py,sha256=
|
|
35
|
-
metrolopy/tests/test_create.py,sha256=
|
|
36
|
-
metrolopy/tests/test_gummy.py,sha256=
|
|
37
|
-
metrolopy/tests/test_misc.py,sha256=
|
|
38
|
-
metrolopy/tests/test_operations.py,sha256=
|
|
39
|
-
metrolopy/tests/test_ubreakdown.py,sha256=
|
|
40
|
-
metrolopy-1.0.
|
|
41
|
-
metrolopy-1.0.
|
|
42
|
-
metrolopy-1.0.
|
|
43
|
-
metrolopy-1.0.
|
|
44
|
-
metrolopy-1.0.
|
|
45
|
-
metrolopy-1.0.
|
|
34
|
+
metrolopy/tests/test_complex.py,sha256=D3pn1BMI4rvYXHDrEyTvAWfqHUe2-8cVDSB49VyUCp0,8388
|
|
35
|
+
metrolopy/tests/test_create.py,sha256=gAo57tUYQh1p8DjB9dqBzXllTXDaZxfOIGp68WV3uA4,18007
|
|
36
|
+
metrolopy/tests/test_gummy.py,sha256=Euejbmz2tA6m0wQbwsAajJYBgL8rhICZmEvUj7l27n0,23480
|
|
37
|
+
metrolopy/tests/test_misc.py,sha256=YGMyJwAlCaggVDesvpzy9VPa4KnfhXBvdsJkoOc_mXY,4402
|
|
38
|
+
metrolopy/tests/test_operations.py,sha256=O7v22xyS6pIUr57PiLAwTIULR8qNtjFgVoPKrRXmAJ4,14247
|
|
39
|
+
metrolopy/tests/test_ubreakdown.py,sha256=xABI5N31jZ9aJMae85tUFPnGCowXnnuvwML5_v3ziPM,13768
|
|
40
|
+
metrolopy-1.0.2.dist-info/licenses/LICENSE,sha256=IwGE9guuL-ryRPEKi6wFPI_zOhg7zDZbTYuHbSt_SAk,35823
|
|
41
|
+
metrolopy-1.0.2.dist-info/METADATA,sha256=GQIPXZjnVcqsMjGuSVvoJe3H-iGzhfhiuW3TJ_4FcWA,5495
|
|
42
|
+
metrolopy-1.0.2.dist-info/WHEEL,sha256=zaaOINJESkSfm_4HQVc5ssNzHCPXhJm0kEUakpsEHaU,91
|
|
43
|
+
metrolopy-1.0.2.dist-info/top_level.txt,sha256=TTY_Gf2M3yWScmUStgI-RYOc0YKVcr108GaTl4sedSo,10
|
|
44
|
+
metrolopy-1.0.2.dist-info/zip-safe,sha256=frcCV1k9oG9oKj3dpUqdJg1PxRT2RSN_XKdLCPjaYaY,2
|
|
45
|
+
metrolopy-1.0.2.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|