コード例 #1
0
    def test_block_total_size_estimate(self, block):
        _, _, _, total_size = _block_setup([1])
        assert total_size == 1

        _, _, _, total_size = _block_setup([[1]])
        assert total_size == 1

        _, _, _, total_size = _block_setup([[1, 1]])
        assert total_size == 2

        _, _, _, total_size = _block_setup([[1], [1]])
        assert total_size == 2

        _, _, _, total_size = _block_setup([[1, 2], [3, 4]])
        assert total_size == 4
コード例 #2
0
ファイル: test_shape_base.py プロジェクト: ales-erjavec/numpy
    def test_block_total_size_estimate(self, block):
        _, _, _, total_size = _block_setup([1])
        assert total_size == 1

        _, _, _, total_size = _block_setup([[1]])
        assert total_size == 1

        _, _, _, total_size = _block_setup([[1, 1]])
        assert total_size == 2

        _, _, _, total_size = _block_setup([[1], [1]])
        assert total_size == 2

        _, _, _, total_size = _block_setup([[1, 2], [3, 4]])
        assert total_size == 4
コード例 #3
0
 def _block_force_slicing(arrays):
     arrays, list_ndim, result_ndim, _ = _block_setup(arrays)
     return _block_slicing(arrays, list_ndim, result_ndim)
コード例 #4
0
 def _block_force_concatenate(arrays):
     arrays, list_ndim, result_ndim, _ = _block_setup(arrays)
     return _block_concatenate(arrays, list_ndim, result_ndim)
コード例 #5
0
ファイル: test_shape_base.py プロジェクト: ales-erjavec/numpy
 def _block_force_slicing(arrays):
     arrays, list_ndim, result_ndim, _ = _block_setup(arrays)
     return _block_slicing(arrays, list_ndim, result_ndim)
コード例 #6
0
ファイル: test_shape_base.py プロジェクト: ales-erjavec/numpy
 def _block_force_concatenate(arrays):
     arrays, list_ndim, result_ndim, _ = _block_setup(arrays)
     return _block_concatenate(arrays, list_ndim, result_ndim)