From eb3d0150f7188a34ac5d3d038ef4474927124a2e Mon Sep 17 00:00:00 2001 From: Jean-Philippe ARGAUD Date: Tue, 31 Jan 2017 21:40:21 +0100 Subject: [PATCH] Adding control on user defined sparse matrix --- resources/ADAOSchemaCatalog.xml | 1 + 1 file changed, 1 insertion(+) diff --git a/resources/ADAOSchemaCatalog.xml b/resources/ADAOSchemaCatalog.xml index 554069b..dd4bb25 100644 --- a/resources/ADAOSchemaCatalog.xml +++ b/resources/ADAOSchemaCatalog.xml @@ -302,6 +302,7 @@ logging.debug("CREATE Matrix is %s"%matrix) import numpy, logging logging.debug("CREATE Entering in CreateNumpyScalarSparseMatrixFromString") matrix = numpy.matrix(matrix_in_string) +if matrix.size != 1: raise ValueError('\n\n The sparse matrix, declared as a "ScalarSparseMatrix" to be build using a scalar input,\n is not of the good size (its actual measured size is %i). Please correct your input and relaunch.'%matrix.size) type = "ScalarSparseMatrix" logging.debug("CREATE ScalarSparseMatrix is %s"%matrix) ]]> -- 2.39.2