def test_2short_spike_train(self): seq = [1] with self.assertWarns(UserWarning): """ Catches UserWarning: Input size is too small. Please provide an input with more than 1 entry. """ self.assertTrue(math.isnan(statistics.lvr(seq, with_nan=True)))
def test_lvr_refractoriness_kwarg(self): seq = np.array(self.test_seq) with self.assertWarns(UserWarning): assert_array_almost_equal(statistics.lvr(seq, R=5), self.target, decimal=9)
def test_lvr_with_plain_array(self): seq = np.array(self.test_seq) assert_array_almost_equal(statistics.lvr(seq), self.target, decimal=9)
def test_lvr_with_list(self): seq = self.test_seq assert_array_almost_equal(statistics.lvr(seq), self.target, decimal=9)
def test_lvr_with_quantities(self): seq = pq.Quantity(self.test_seq, units='ms') assert_array_almost_equal(statistics.lvr(seq), self.target, decimal=9)