diff src/ov-re-mat.cc @ 8999:dc07bc4157b8

allow empty matrices in stream input operators
author Jaroslav Hajek <highegg@gmail.com>
date Fri, 20 Mar 2009 11:39:25 +0100
parents a48fba01e4ac
children 9861b3ec72a6
line wrap: on
line diff
--- a/src/ov-re-mat.cc
+++ b/src/ov-re-mat.cc
@@ -380,20 +380,15 @@
 		{
 		  NDArray tmp(dv);
 
-		  if (tmp.is_empty ())
-		    matrix = tmp;
-		  else
-		    {
-		      is >> tmp;
+                  is >> tmp;
 
-		      if (is)
-			matrix = tmp;
-		      else
-			{
-			  error ("load: failed to load matrix constant");
-			  success = false;
-			}
-		    }
+                  if (is)
+                    matrix = tmp;
+                  else
+                    {
+                      error ("load: failed to load matrix constant");
+                      success = false;
+                    }
 		}
 	      else
 		{