code: def testFlatSpectrum(self):
      spectrum = [1] * 1025
      mbands = self.InitMelBands(44100, 24, "htkMel", "unit_sum")(
          spectrum
      )
      self.assertEqual(len(mbands), 24)
      self.assert_(not any(numpy.isnan(mbands)))
      self.assert_(not any(numpy.isinf(mbands)))
      self.assertAlmostEqualVector(mbands, [1] * 24, 1e-5)
  
      mbands = self.InitMelBands(44100, 128, "htkMel", "unit_sum")(
          spectrum
      )
      self.assertEqual(len(mbands), 128)
      self.assert_(not any(numpy.isnan(mbands)))
      self.assert_(not any(numpy.isinf(mbands)))
      self.assertAlmostEqualVector(mbands, [1] * 128, 1e-5)
  
      mbands = self.InitMelBands(44100, 24, "slaneyMel", "unit_sum")(
          spectrum
      )
      self.assertEqual(len(mbands), 24)
      self.assert_(not any(numpy.isnan(mbands)))
      self.assert_(not any(numpy.isinf(mbands)))
      self.assertAlmostEqualVector(mbands, [1] * 24, 1e-5)
  
      mbands = self.InitMelBands(44100, 128, "slaneyMel", "unit_sum")(
          spectrum
      )
      self.assertEqual(len(mbands), 128)
      self.assert_(not any(numpy.isnan(mbands)))
      self.assert_(not any(numpy.isinf(mbands)))
      self.assertAlmostEqualVector(mbands, [1] * 128, 1e-5)
  
file_path: essentia/test/src/unittests/spectral/test_melbands.py
imports: from essentia_test import *
  import numpy
label_desc: Use image node_id 2 for calling the TestMelBands obj's underlying member method code with example usage: obj.testFlatSpectrum() without return types