Test rank 1 array for all dtypes.
(self)
| 68 | self._assert_func = assert_array_equal |
| 69 | |
| 70 | def test_generic_rank1(self): |
| 71 | """Test rank 1 array for all dtypes.""" |
| 72 | def foo(t): |
| 73 | a = np.empty(2, t) |
| 74 | a.fill(1) |
| 75 | b = a.copy() |
| 76 | c = a.copy() |
| 77 | c.fill(0) |
| 78 | self._test_equal(a, b) |
| 79 | self._test_not_equal(c, b) |
| 80 | |
| 81 | # Test numeric types and object |
| 82 | for t in '?bhilqpBHILQPfdgFDG': |
| 83 | foo(t) |
| 84 | |
| 85 | # Test strings |
| 86 | for t in ['S1', 'U1']: |
| 87 | foo(t) |
| 88 | |
| 89 | def test_0_ndim_array(self): |
| 90 | x = np.array(473963742225900817127911193656584771) |