(self)
| 1142 | return np.array(seq, dtype=object) |
| 1143 | |
| 1144 | def test_ragged_ndim_object(self): |
| 1145 | # Lists of mismatching depths are treated as object arrays |
| 1146 | a = self._ragged_creation([[1], 2, 3]) |
| 1147 | assert_equal(a.shape, (3,)) |
| 1148 | assert_equal(a.dtype, object) |
| 1149 | |
| 1150 | a = self._ragged_creation([1, [2], 3]) |
| 1151 | assert_equal(a.shape, (3,)) |
| 1152 | assert_equal(a.dtype, object) |
| 1153 | |
| 1154 | a = self._ragged_creation([1, 2, [3]]) |
| 1155 | assert_equal(a.shape, (3,)) |
| 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 |
nothing calls this directly
no test coverage detected