(self)
| 2104 | assert_raises(TypeError, np.searchsorted, a, 1) |
| 2105 | |
| 2106 | def test_complex64_alignment(self): |
| 2107 | # Issue gh-2668 (trac 2076), segfault on sparc due to misalignment |
| 2108 | dtt = np.complex64 |
| 2109 | arr = np.arange(10, dtype=dtt) |
| 2110 | # 2D array |
| 2111 | arr2 = np.reshape(arr, (2, 5)) |
| 2112 | # Fortran write followed by (C or F) read caused bus error |
| 2113 | data_str = arr2.tobytes('F') |
| 2114 | data_back = np.ndarray(arr2.shape, |
| 2115 | arr2.dtype, |
| 2116 | buffer=data_str, |
| 2117 | order='F') |
| 2118 | assert_array_equal(arr2, data_back) |
| 2119 | |
| 2120 | def test_structured_count_nonzero(self): |
| 2121 | arr = np.array([0, 1]).astype('i4, (2)i4')[:1] |
nothing calls this directly
no test coverage detected