(self)
| 1079 | assert_equal(d.dtype, np.dtype(object)) |
| 1080 | |
| 1081 | def test_false_len_sequence(self): |
| 1082 | # gh-7264, segfault for this example |
| 1083 | class C: |
| 1084 | def __getitem__(self, i): |
| 1085 | raise IndexError |
| 1086 | def __len__(self): |
| 1087 | return 42 |
| 1088 | |
| 1089 | a = np.array(C()) # segfault? |
| 1090 | assert_equal(len(a), 0) |
| 1091 | |
| 1092 | def test_false_len_iterable(self): |
| 1093 | # Special case where a bad __getitem__ makes us fall back on __iter__: |
nothing calls this directly
no test coverage detected