docstr: Test firwin2 for calculating Type IV filters
docstr_tok: ["Test","firwin2","for","calculating","Type","IV","filters"]
code: def test05(self):
      """Test firwin2 for calculating Type IV filters"""
      ntaps = 1500
  
      freq = [0.0, 1.0]
      gain = [0.0, 1.0]
      taps = firwin2(ntaps, freq, gain, window=None, antisymmetric=True)
      assert_array_almost_equal(
          taps[: ntaps // 2], -taps[ntaps // 2 :][::-1]
      )
  
      freqs, response = freqz(taps, worN=2048)
      assert_array_almost_equal(abs(response), freqs / np.pi, decimal=4)
  
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 6 for calling the TestFirwin2 obj's underlying member method code with example usage: obj.test05() without return types