Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 25df5f1

Browse files
committed
MAINT: add test to test_deprecations
1 parent d4167c2 commit 25df5f1

File tree

1 file changed

+9
-1
lines changed

1 file changed

+9
-1
lines changed

numpy/core/tests/test_deprecations.py

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -542,7 +542,6 @@ def test_deprecate_unparsable_string(self, invalid_str):
542542
res = np.fromstring(x_str, sep=",", count=4)
543543
assert_array_equal(res, x)
544544

545-
546545
class Test_GetSet_NumericOps(_DeprecationTestCase):
547546
# 2018-09-20, 1.16.0
548547
def test_get_numeric_ops(self):
@@ -568,3 +567,12 @@ class TestNonZero(_DeprecationTestCase):
568567
def test_zerod(self):
569568
self.assert_deprecated(lambda: np.nonzero(np.array(0)))
570569
self.assert_deprecated(lambda: np.nonzero(np.array(1)))
570+
571+
572+
class TestRaggedArary(_DeprecationTestCase):
573+
# 2019-11-29 1.18.0
574+
def test_deprecate_ragged_arrays(self):
575+
# NEP 34 deprecated automatic object dtype when creating ragged
576+
# arrays. Also see the "ragged" tests in `test_multiarray`
577+
self.assert_deprecated(np.array, args=([1, [2, 3]],))
578+

0 commit comments

Comments
 (0)