MCPcopy Create free account
hub / github.com/numpy/numpy / test_ragged_shape_object

Method test_ragged_shape_object

numpy/core/tests/test_multiarray.py:1158–1170  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

1156 assert_equal(a.dtype, object)
1157
1158 def test_ragged_shape_object(self):
1159 # The ragged dimension of a list is turned into an object array
1160 a = self._ragged_creation([[1, 1], [2], [3]])
1161 assert_equal(a.shape, (3,))
1162 assert_equal(a.dtype, object)
1163
1164 a = self._ragged_creation([[1], [2, 2], [3]])
1165 assert_equal(a.shape, (3,))
1166 assert_equal(a.dtype, object)
1167
1168 a = self._ragged_creation([[1], [2], [3, 3]])
1169 assert a.shape == (3,)
1170 assert a.dtype == object
1171
1172 def test_array_of_ragged_array(self):
1173 outer = np.array([None, None])

Callers

nothing calls this directly

Calls 2

_ragged_creationMethod · 0.95
assert_equalFunction · 0.90

Tested by

no test coverage detected