Change warning category for force_type to DeprecationWarning
Closes #156
This commit is contained in:
@@ -285,7 +285,8 @@ class _matrix:
|
||||
" properly anyway. If you want to force floating-point or"
|
||||
" interval computations, use the respective methods from `fp`"
|
||||
" or `mp` instead, e.g., `fp.matrix()` or `iv.matrix()`."
|
||||
" If you want to truncate values to integer, use .apply(int) instead.")
|
||||
" If you want to truncate values to integer, use .apply(int) instead.",
|
||||
DeprecationWarning)
|
||||
if isinstance(args[0], (list, tuple)):
|
||||
if isinstance(args[0][0], (list, tuple)):
|
||||
# interpret nested list as matrix
|
||||
|
||||
@@ -251,3 +251,7 @@ def test_interval_matrix_mult_bug():
|
||||
assert mp.mpf('1.00000000000001998401444325291756783368705994138804689654') in C[0, 0]
|
||||
# the following caused an error before the bug was fixed
|
||||
assert iv.matrix(mp.eye(2)) * (iv.ones(2) + mpi(1, 2)) == iv.matrix([[mpi(2, 3), mpi(2, 3)], [mpi(2, 3), mpi(2, 3)]])
|
||||
|
||||
def test_issue_156():
|
||||
with pytest.deprecated_call():
|
||||
matrix([[1, 2], [3, 4]], force_type=float)
|
||||
|
||||
Reference in New Issue
Block a user