test RDM based model creation
@@ -24,3 +24,13 @@ class test_ModelFixed(unittest.TestCase):
pred = m.predict()
assert np.all(pred == rdm)
+ def test_creation_rdm(self):
+ from pyrsa.rdm import RDMs
+ rdm = np.array(np.ones(6))
+ rdm_obj = RDMs(np.array([rdm]))
+ m = model.ModelFixed('Test Model', rdm_obj)
+ m.fit(rdm_obj)
+ pred = m.predict()
+ assert np.all(pred == rdm)
+ pred_obj = m.predict_rdm()
+ assert isinstance(pred_obj, RDMs)
