From 9fc08c92daf9698d09c67ea5fa3524a153121ca4 Mon Sep 17 00:00:00 2001 From: Carsen Stringer Date: Sat, 5 Aug 2023 09:54:08 -0400 Subject: [PATCH] adding test for n_splits > 0 --- tests/test_rastermap.py | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/tests/test_rastermap.py b/tests/test_rastermap.py index 5795149..83aa148 100644 --- a/tests/test_rastermap.py +++ b/tests/test_rastermap.py @@ -8,6 +8,17 @@ def test_rastermap(test_file): model = Rastermap().fit(data=spks) + assert hasattr(model, "embedding") + assert hasattr(model, "isort") + assert hasattr(model, "Usv") + assert hasattr(model, "Vsv") + +def test_rastermap_splits(test_file): + dat = np.load(test_file) + spks = dat["spks"] + + model = Rastermap(n_splits=2, n_clusters=20, nc_splits=10).fit(data=spks) + assert hasattr(model, "embedding") assert hasattr(model, "isort") assert hasattr(model, "Usv")