code: def test_softmax(self):
      df = np.array(
          [
              [2.75021367e10, -8.83772371e-01, -2.20516715e27],
              [-2.10848072e11, 2.35024444e-01, 5.20106536e25],
          ]
      )
      # With a numerically unstable softmax, the output would be something
      # like this:
      # [[  0.   0.  nan]
      # [nan   0.   0.]]
      probas = softmax(df)
      expected = np.array([[1, 0, 0], [0, 0, 1]])
      self.assertTrue((expected == probas).all())
  
      df = np.array([[0.1, 0.6, 0.3], [0.2, 0.3, 0.5]])
      probas = softmax(df)
      expected = np.array(
          [
              [0.25838965, 0.42601251, 0.31559783],
              [0.28943311, 0.31987306, 0.39069383],
          ]
      )
      np.testing.assert_array_almost_equal(expected, probas)
  
imports: import numpy
  from autosklearn.pipeline.implementations.util import softmax
  import unittest
label_desc: Use image node_id 2 for calling the UtilTest obj's underlying member method code with example usage: obj.test_softmax() without return types