def test_zero(self):
        """Test constant pulse."""
        times = np.linspace(0, 10, 50)
        zero_arr = continuous.zero(times)

        self.assertEqual(zero_arr.dtype, np.complex_)
        np.testing.assert_equal(zero_arr, 0.0)
        self.assertEqual(len(zero_arr), 50)
 def test_zero(self):
     """Test discrete sampled constant pulse."""
     duration = 10
     times = np.arange(0, duration) + 0.5
     zero_ref = continuous.zero(times)
     zero_pulse = pulse_lib.zero(duration)
     self.assertIsInstance(zero_pulse, SamplePulse)
     np.testing.assert_array_almost_equal(zero_pulse.samples, zero_ref)