richvalues 4.1.2__tar.gz → 4.1.4__tar.gz
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.
- {richvalues-4.1.2 → richvalues-4.1.4}/PKG-INFO +1 -1
- {richvalues-4.1.2 → richvalues-4.1.4}/pyproject.toml +1 -1
- {richvalues-4.1.2 → richvalues-4.1.4}/richvalues/__init__.py +10 -7
- {richvalues-4.1.2 → richvalues-4.1.4}/richvalues.egg-info/PKG-INFO +1 -1
- {richvalues-4.1.2 → richvalues-4.1.4}/setup.py +1 -1
- {richvalues-4.1.2 → richvalues-4.1.4}/LICENSE +0 -0
- {richvalues-4.1.2 → richvalues-4.1.4}/README.md +0 -0
- {richvalues-4.1.2 → richvalues-4.1.4}/richvalues.egg-info/SOURCES.txt +0 -0
- {richvalues-4.1.2 → richvalues-4.1.4}/richvalues.egg-info/dependency_links.txt +0 -0
- {richvalues-4.1.2 → richvalues-4.1.4}/richvalues.egg-info/requires.txt +0 -0
- {richvalues-4.1.2 → richvalues-4.1.4}/richvalues.egg-info/top_level.txt +0 -0
- {richvalues-4.1.2 → richvalues-4.1.4}/setup.cfg +0 -0
@@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"
|
|
4
4
|
|
5
5
|
[project]
|
6
6
|
name = "richvalues"
|
7
|
-
version = "4.1.
|
7
|
+
version = "4.1.4"
|
8
8
|
description = "Python library for working with uncertainties and upper/lower limits"
|
9
9
|
license = {file="LICENSE"}
|
10
10
|
authors = [{name="Andrés Megías Toledano"}]
|
@@ -37,7 +37,7 @@ IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
|
37
37
|
POSSIBILITY OF SUCH DAMAGE.
|
38
38
|
"""
|
39
39
|
|
40
|
-
__version__ = '4.1.
|
40
|
+
__version__ = '4.1.4'
|
41
41
|
__author__ = 'Andrés Megías Toledano'
|
42
42
|
|
43
43
|
import copy
|
@@ -2998,7 +2998,7 @@ def less_equiv(x, y, sigmas_interval=None, sigmas_overlap=None):
|
|
2998
2998
|
return output
|
2999
2999
|
|
3000
3000
|
def rich_value(text=None, domain=None, is_int=None, pdf=None,
|
3001
|
-
use_default_extra_sf_lim=False):
|
3001
|
+
consider_intervs=True, use_default_extra_sf_lim=False):
|
3002
3002
|
"""
|
3003
3003
|
Convert the input text to a rich value.
|
3004
3004
|
|
@@ -3016,6 +3016,10 @@ def rich_value(text=None, domain=None, is_int=None, pdf=None,
|
|
3016
3016
|
pdf : function / dict, optional
|
3017
3017
|
Probability density function (PDF) that defines the rich value. It can
|
3018
3018
|
be specified instead of the text representing the rich value.
|
3019
|
+
consider_intervs : bool, optional
|
3020
|
+
If the PDF is given, this variable determines if we consider the
|
3021
|
+
possibility that the rich value is an upper/lower limit or a finite
|
3022
|
+
interval of values. By default, it is True.
|
3019
3023
|
use_default_extra_sf_lim : bool, optional
|
3020
3024
|
If True, the default limit for extra significant figure will be used
|
3021
3025
|
instead of inferring it from the input text. This will reduce the
|
@@ -3027,8 +3031,7 @@ def rich_value(text=None, domain=None, is_int=None, pdf=None,
|
|
3027
3031
|
Resulting rich value.
|
3028
3032
|
"""
|
3029
3033
|
|
3030
|
-
if ('function' in str(type(text)) or type(text) in
|
3031
|
-
(dict, tuple, list, np.ndarray)):
|
3034
|
+
if ('function' in str(type(text)) or type(text) in (dict, tuple, list, np.ndarray)):
|
3032
3035
|
pdf = text
|
3033
3036
|
text = None
|
3034
3037
|
else:
|
@@ -3113,7 +3116,7 @@ def rich_value(text=None, domain=None, is_int=None, pdf=None,
|
|
3113
3116
|
if text.count(')') == 1:
|
3114
3117
|
x, dx = x_dx.split('(')
|
3115
3118
|
dx = dx.split(')')[0]
|
3116
|
-
dx1
|
3119
|
+
dx1 = dx2 = dx
|
3117
3120
|
else:
|
3118
3121
|
x, dx1, dx2 = x_dx.split('(')
|
3119
3122
|
dx1 = dx1[:-1]
|
@@ -3255,7 +3258,7 @@ def rich_value(text=None, domain=None, is_int=None, pdf=None,
|
|
3255
3258
|
distr = sample_from_pdf(pdf_, size=4e4, low=domain[0], high=domain[1])
|
3256
3259
|
if is_int:
|
3257
3260
|
distr = np.round(distr).astype(int)
|
3258
|
-
rvalue = evaluate_distr(distr, domain)
|
3261
|
+
rvalue = evaluate_distr(distr, domain, consider_intervs)
|
3259
3262
|
x1, x2 = rvalue.interval(4.)
|
3260
3263
|
x = np.linspace(x1, x2, int(1e4))
|
3261
3264
|
y = pdf_(x)
|
@@ -5164,4 +5167,4 @@ evaluate_distribution = evaluate_distr
|
|
5164
5167
|
center_and_uncertainties = center_and_uncs
|
5165
5168
|
is_not_a_number = is_nan = isnan
|
5166
5169
|
is_infinite = is_inf = isinf
|
5167
|
-
is_finite = is_finite = isfinite
|
5170
|
+
is_finite = is_finite = isfinite
|
@@ -5,7 +5,7 @@ with open('README.md', 'r') as file:
|
|
5
5
|
|
6
6
|
setuptools.setup(
|
7
7
|
name = 'richvalues',
|
8
|
-
version = '4.1.
|
8
|
+
version = '4.1.4',
|
9
9
|
license = 'BSD-3-Clause',
|
10
10
|
author = 'Andrés Megías Toledano',
|
11
11
|
description = 'Python library for working with uncertainties and upper/lower limits',
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|