From ff3535ab06f7c2ebd118dcce6bfa48b715e9c8b6 Mon Sep 17 00:00:00 2001
From: Dominique Benielli <dominique.benielli@lis-lab.fr>
Date: Thu, 16 Jan 2020 14:36:35 +0100
Subject: [PATCH] test passed

---
 README.rst                         | 8 +++-----
 multimodal/datasets/data_sample.py | 7 +++++--
 2 files changed, 8 insertions(+), 7 deletions(-)

diff --git a/README.rst b/README.rst
index e2bc4c4..7a2c3a1 100644
--- a/README.rst
+++ b/README.rst
@@ -58,7 +58,7 @@ Testing
 
 **pytest** and **pytest-cov** are required to run the **test suite** with::
 
-  cd multiconfusion
+  cd multimodal
   pytest
 
 A code coverage report is displayed in the terminal when running the tests.
@@ -141,7 +141,5 @@ Copyright © 2017-2018 AMU, CNRS, UTLN
 License
 ~~~~~~~
 
-**multiconfusion** is free software: you can redistribute it and/or modify
-it under the terms of the **GNU Lesser General Public License** as published by
-the Free Software Foundation, either **version 3** of the License, or
-(at your option) any later version.
+**scikit-multimodallearn** is free software: you can redistribute it and/or modify
+it under the terms of the **New BSD License**
diff --git a/multimodal/datasets/data_sample.py b/multimodal/datasets/data_sample.py
index 7894518..a50c567 100644
--- a/multimodal/datasets/data_sample.py
+++ b/multimodal/datasets/data_sample.py
@@ -355,8 +355,11 @@ class MultiModalArray(np.ndarray, MultiModalData):
                     view_ind = np.array([0, new_data.shape[1]])
             except  Exception as e:
                 raise ValueError('Reshape your data')
-
-            if new_data.ndim < 2 or new_data.shape == (1, 1) or view_ind[-1] > new_data.shape[1]:
+            if new_data.ndim < 2 :
+                raise ValueError('Reshape your data')
+            if  new_data.ndim > 1 and new_data.shape == (1, 1):
+                raise ValueError('Reshape your data')
+            if view_ind.ndim < 2 and new_data.ndim <2 and view_ind[-1] > new_data.shape[1]:
                 raise ValueError('Reshape your data')
 
             # view_ind_self = view_ind
-- 
GitLab