code: def test_slices():
      # Slices have EC 1...
      e = intvol.EC3d
      p = intvol.Lips3d
      m = np.zeros((40,) * 3, np.int_)
      D = np.indices(m.shape).astype(np.float64)
      m[10, 10, 10] = 1
      assert_almost_equal(e(m), 1)
      assert_almost_equal(p(D, m), [1, 0, 0, 0])
  
      m = np.zeros((40,) * 3, np.int_)
      m[10, 10:14, 10] = 1
      assert_almost_equal(e(m), 1)
      assert_almost_equal(p(D, m), [1, 3, 0, 0])
  
      m = np.zeros((40,) * 3, np.int_)
      m[10, 10:14, 9:15] = 1
      assert_almost_equal(e(m), 1)
      assert_almost_equal(p(D, m), [1, 8, 15, 0])
  
imports: from itertools import combinations
  import numpy
  import numpy.linalg
  import pytest
  from numpy.testing import assert_almost_equal, assert_array_equal
  from ..None import intvol
label_desc: Use image node_id 24 for calling a global function with example usage: test_slices() without return types