code: def test_quantiles_shapes():
      a, w = get_data()
      out = quantile(a, 0.5)
      assert out.ndim == 0
      out = quantile(a, 0.5, w)
      assert out.ndim == 0
      out = quantile(a, (0.4, 0.6))
      assert out.ndim == 1
      out = quantile(a, (0.4, 0.6), w)
      assert out.ndim == 1
      out = quantile(a, 0.5, keepdims=True)
      assert out.shape == (1, 1, 1, 1)
      np.testing.assert_allclose(
          out.ravel(), quantile(a, 0.5), rtol=1e-07
      )
      out = quantile(a, 0.5, w, keepdims=True)
      assert out.shape == (1, 1, 1, 1)
      np.testing.assert_allclose(
          out.ravel(), quantile(a, 0.5, w), rtol=1e-07
      )
      out = quantile(a, (0.4, 0.6), keepdims=True)
      assert out.shape == (2, 1, 1, 1, 1)
      np.testing.assert_allclose(
          out.ravel(), quantile(a, (0.4, 0.6)), rtol=1e-07
      )
      out = quantile(a, (0.4, 0.6), w, keepdims=True)
      assert out.shape == (2, 1, 1, 1, 1)
      np.testing.assert_allclose(
          out.ravel(), quantile(a, (0.4, 0.6), w), rtol=1e-07
      )
      out = quantile(a, 0.5, axis=1)
      assert out.shape == (3, 5, 6)
      out = quantile(a, 0.5, w, axis=1)
      assert out.shape == (3, 5, 6)
      out = quantile(a, (0.4, 0.6), axis=1)
      assert out.shape == (2, 3, 5, 6)
      out = quantile(a, (0.4, 0.6), w, axis=1)
      assert out.shape == (2, 3, 5, 6)
      out = quantile(a, 0.5, axis=(1, 2))
      assert out.shape == (3, 6)
      out = quantile(a, 0.5, w, axis=(1, 2))
      assert out.shape == (3, 6)
      out = quantile(a, (0.4, 0.6), axis=(1, 2))
      assert out.shape == (2, 3, 6)
      out = quantile(a, (0.4, 0.6), w, axis=(1, 2))
      assert out.shape == (2, 3, 6)
      out = quantile(a, 0.5, axis=(1, 2), keepdims=True)
      assert out.shape == (3, 1, 1, 6)
      np.testing.assert_allclose(
          out.ravel(), quantile(a, 0.5, axis=(1, 2)).ravel(), rtol=1e-07
      )
      out = quantile(a, 0.5, w, axis=(1, 2), keepdims=True)
      assert out.shape == (3, 1, 1, 6)
      np.testing.assert_allclose(
          out.ravel(),
          quantile(a, 0.5, w, axis=(1, 2)).ravel(),
          rtol=1e-07,
      )
      out = quantile(a, (0.4, 0.6), axis=(1, 2), keepdims=True)
      assert out.shape == (2, 3, 1, 1, 6)
      np.testing.assert_allclose(
          out.ravel(),
          quantile(a, (0.4, 0.6), axis=(1, 2)).ravel(),
          rtol=1e-07,
      )
      out = quantile(a, (0.4, 0.6), w, axis=(1, 2), keepdims=True)
      assert out.shape == (2, 3, 1, 1, 6)
      np.testing.assert_allclose(
          out.ravel(),
          quantile(a, (0.4, 0.6), w, axis=(1, 2)).ravel(),
          rtol=1e-07,
      )
  
file_path: popmon/tests/popmon/stats/test_numpy.py
imports: import itertools
  import numpy
  from scipy import linalg, stats
  from popmon.stats.numpy import mean, probability_distribution_mean_covariance, quantile, std
label_desc: Use image node_id 4 for calling a global function with example usage: test_quantiles_shapes() without return types