code: def test_top_n_numpy(self):
      data = np.array([-10, -0.1, 0.0, 0, 3.4, 1.5])
  
      # ============== Without replace value, descending
      # Top 1
      modified_data, idxes = filtering.filter_top_k(data, 1)
      np.testing.assert_equal(modified_data, np.array([3.4]))
      np.testing.assert_equal(idxes, np.array([4]))
      # Top 2
      modified_data, idxes = filtering.filter_top_k(data, 2)
      np.testing.assert_equal(modified_data, np.array([3.4, 1.5]))
      np.testing.assert_equal(idxes, np.array([4, 5]))
  
      # ============== Without replace value, ascending
      # Top 1
      modified_data, idxes = filtering.filter_top_k(
          data, 1, ascending=True
      )
      np.testing.assert_equal(modified_data, np.array([3.4]))
      np.testing.assert_equal(idxes, np.array([4]))
      # Top 2
      modified_data, idxes = filtering.filter_top_k(
          data, 2, ascending=True
      )
      np.testing.assert_equal(modified_data, np.array([1.5, 3.4]))
      np.testing.assert_equal(idxes, np.array([5, 4]))
      # FIXME: Not yet handle
      # # Top same length
      # modified_data, idxes = filter_top_n(data, len(data))
      # np.testing.assert_equal(modified_data, np.array([-10, -0.1, 0., 0., 1.5, 3.4]))
      # np.testing.assert_equal(idxes, np.array([5, 4, 3, 2, 1, 0]))
      # FIXME: Not yet handle
      # # Top 100
      # modified_data = filtering.top_n(data, 100)
      # self.assert_lists(modified_data, data)
  
      # ============== With replace value
      modified_data, idxes = filtering.filter_top_k(
          data, 1, replace=-99
      )
      np.testing.assert_equal(
          modified_data, np.array([-99, -99, -99, -99, 3.4, -99])
      )
      np.testing.assert_equal(idxes, np.array([4]))
      modified_data, idxes = filtering.filter_top_k(
          data, 2, replace=-99
      )
      np.testing.assert_equal(
          modified_data, np.array([-99, -99, -99, -99, 3.4, 1.5])
      )
      np.testing.assert_equal(idxes, np.array([5, 4]))
  
file_path: nlpaug/test/util/selection/test_filtering.py
imports: import unittest
  import numpy
  import nlpaug.util.selection.filtering
label_desc: Use image node_id 3 for calling the TestFiltering obj's underlying member method code with example usage: obj.test_top_n_numpy() without return types