docstr: Test firwin2 when window=None.
docstr_tok: ["Test","firwin2","when","window=None","."]
code: def test04(self):
      """Test firwin2 when window=None."""
      ntaps = 5
      # Ideal lowpass: gain is 1 on [0,0.5], and 0 on [0.5, 1.0]
      freq = [0.0, 0.5, 0.5, 1.0]
      gain = [1.0, 1.0, 0.0, 0.0]
      taps = firwin2(ntaps, freq, gain, window=None, nfreqs=8193)
      alpha = 0.5 * (ntaps - 1)
      m = np.arange(0, ntaps) - alpha
      h = 0.5 * sinc(0.5 * m)
      assert_array_almost_equal(h, taps)
  
imports: from __future__ import division, print_function, absolute_import
  import numpy
  from numpy.testing import assert_almost_equal, assert_array_almost_equal, assert_equal, assert_, assert_allclose, assert_warns
  from pytest import raises
  from scipy.special import sinc
  from scipy.signal import kaiser_beta, kaiser_atten, kaiserord, firwin, firwin2, freqz, remez, firls, minimum_phase
label_desc: Use image node_id 5 for calling the TestFirwin2 obj's underlying member method code with example usage: obj.test04() without return types