code: def test_median():
      for dtype in NUMERIC_TYPES:
          for shape in ((10,), (10, 11), (10, 11, 12)):
              X = (100 * (np.random.random(shape) - 0.5)).astype(dtype)
              for a in range(X.ndim):
                  assert_array_equal(
                      _median(X, axis=a).squeeze(),
                      np_median(X.astype(np.float64), axis=a),
                  )
  
file_path: nipy/nipy/algorithms/statistics/tests/test_quantile.py
imports: import numpy
  from numpy import median
  from numpy.testing import assert_array_almost_equal, assert_array_equal
  from scipy.stats import scoreatpercentile
  from .._quantile import _median, _quantile
label_desc: Use image node_id 2 for calling a global function with example usage: test_median() without return types