| 650 | |
| 651 | # Cases for testing arrays with dimensions that can be zero. |
| 652 | class test_zerodim(unittest.TestCase): |
| 653 | def test_zerodim1d(self): |
| 654 | logger.info( 'Zerodim 1D' ) |
| 655 | a0 = np.array([], dtype='int32') |
| 656 | a1 = np.array([], dtype='float64') |
| 657 | |
| 658 | r0 = ne3.evaluate('a0 + a1') |
| 659 | r1 = ne3.evaluate('a0 * a1') |
| 660 | |
| 661 | npt.assert_array_equal(r0, a1) |
| 662 | npt.assert_array_equal(r1, a1) |
| 663 | |
| 664 | def test_zerodim3d(self): |
| 665 | logger.info( 'Zerodim 3D' ) |
| 666 | a0 = np.array([], dtype='int32').reshape(0, 2, 4) |
| 667 | a1 = np.array([], dtype='float64').reshape(0, 2, 4) |
| 668 | |
| 669 | r0 = ne3.evaluate('a0 + a1') |
| 670 | r1 = ne3.evaluate('a0 * a1') |
| 671 | |
| 672 | npt.assert_array_equal(r0, a1) |
| 673 | npt.assert_array_equal(r1, a1) |
| 674 | |
| 675 | |
| 676 | # Tests for threading/multiprocessing/concurrent.futures |
nothing calls this directly
no outgoing calls
no test coverage detected
searching dependent graphs…