Skip to content

Commit 654159f

Browse files
committed
hotfix rad and mag
1 parent d0e07c8 commit 654159f

File tree

3 files changed

+4
-4
lines changed

3 files changed

+4
-4
lines changed

intvalpy/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,4 +3,4 @@
33
from .nonlinear import *
44
from .models import *
55

6-
__version__ = '1.6.4'
6+
__version__ = '1.6.5'

intvalpy/kernel/utils.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -121,7 +121,7 @@ def _rad(x):
121121
if isinstance(x, ARITHMETICS):
122122
return x.rad
123123
else:
124-
return float(x)
124+
return 0.0
125125

126126
if hasattr(x, '__iter__'):
127127
if isinstance(x, INTERVAL_CLASSES):
@@ -166,7 +166,7 @@ def _mag(x):
166166
if isinstance(x, ARITHMETICS):
167167
return x.mag
168168
else:
169-
return float(x)
169+
return float(abs(x))
170170

171171
if hasattr(x, '__iter__'):
172172
if isinstance(x, INTERVAL_CLASSES):

setup.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717

1818
setup(
1919
name='intvalpy',
20-
version='1.6.4',
20+
version='1.6.5',
2121
description='IntvalPy - a Python interval computation library',
2222
long_description=README,
2323
long_description_content_type='text/markdown',

0 commit comments

Comments
 (0)