Skip to content

Commit

Permalink
changes to xcorr and begining of unit tests
Browse files Browse the repository at this point in the history
  • Loading branch information
bouromain committed Oct 17, 2023
1 parent 45012ed commit b89f080
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions tests/test_sigtool.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
# %% Import
import warnings
from hippocampy import sig_tool
import unittest
import numpy as np


# %%
class TestLabel(unittest.TestCase):
def test_xcorr(self):
# test boolean vector
x = np.array([0, 0, 0, 1, 1, 1, 0, 1, 0, 0, 1])
out = sig_tool.xcorr(a)
assert all(out == np.array([1, 0, 2, 2, 0, 3]))

0 comments on commit b89f080

Please sign in to comment.