text: Title: np.median raises AssertionError for empty arrays while numpy returns nan
  Body: ## Reporting a bug
  
  - [x] I have tried using the latest released version of Numba (most recent is
    visible in the release notes
    (https://numba.readthedocs.io/en/stable/release-notes-overview.html).
  - [x] I have included a self contained code sample to reproduce the problem.
    i.e. it's possible to run as 'python bug.py'.
  
  This is a very similar issue to #8451 but here it affects `numpy.median` and setting the error_model does not change the outcome.
  
  ```python
  import unittest
  import numpy as np
  from numba import njit
  
  def median_numpy(arr):
      return np.median(arr)
  
  @njit
  def median_numba(arr):
      return np.median(arr)
  
  class TestCase(unittest.TestCase):
      def test_median_numpy(self):
          self.assertTrue(np.isnan(median_numpy(np.array([], dtype=float))))
          self.assertTrue(np.isnan(median_numpy(np.array([]))))
  
      def test_median_numba(self):
          self.assertTrue(np.isnan(median_numba(np.array([], dtype=float))))
          self.assertTrue(np.isnan(median_numba(np.array([]))))
  
  if __name__ == "__main__":
      unittest.main()
  ```
  
  While numpy returns `nan`, numba raises an AssertionError:
  
  ```
  Failure
  Traceback (most recent call last):
    File "/Users/leo/code/msi/code/tests/unit/misc/test_numpy_util.py", line 88, in test_median_numba
      self.assertTrue(np.isnan(NumpyUtil.median_numba(np.array([], dtype=float))))
                               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    File "/Users/leo/.miniconda3/envs/exp-2023-10/lib/python3.11/site-packages/numba/np/arraymath.py", line 1556, in _select_two
      assert high > low  # by construction
  AssertionError
  ```
  