(self, casting)
| 2478 | |
| 2479 | @pytest.mark.parametrize("casting", [None, "unsafe"]) |
| 2480 | def test_simple_int32_inout(self, casting): |
| 2481 | # Test native int32 input with double min/max and int32 out. |
| 2482 | a = self._generate_int32_data(self.nr, self.nc) |
| 2483 | m = np.float64(0) |
| 2484 | M = np.float64(2) |
| 2485 | ac = np.zeros(a.shape, dtype=np.int32) |
| 2486 | act = ac.copy() |
| 2487 | if casting is None: |
| 2488 | with pytest.raises(TypeError): |
| 2489 | self.fastclip(a, m, M, ac, casting=casting) |
| 2490 | else: |
| 2491 | # explicitly passing "unsafe" will silence warning |
| 2492 | self.fastclip(a, m, M, ac, casting=casting) |
| 2493 | self.clip(a, m, M, act) |
| 2494 | assert_array_strict_equal(ac, act) |
| 2495 | |
| 2496 | def test_simple_int64_out(self): |
| 2497 | # Test native int32 input with int32 scalar min/max and int64 out. |
nothing calls this directly
no test coverage detected