code: def test_dd_sum():
      X = np.random.random((100, 3))
      v = np.random.random(100)
  
      sum1, edges1 = binned_statistic_dd(X, v, "sum", bins=3)
      sum2, edges2 = np.histogramdd(X, bins=3, weights=v)
  
      assert_array_almost_equal(sum1, sum2)
      assert_array_almost_equal(edges1, edges2)
  
file_path: astroML/astroML/stats/tests/test_binned_statistic.py
imports: import numpy
  from numpy.testing import assert_array_almost_equal
  from astroML.stats import binned_statistic, binned_statistic_2d, binned_statistic_dd
label_desc: Use image node_id 10 for calling a global function with example usage: test_dd_sum() without return types