From: Jean-Philippe ARGAUD Date: Tue, 31 Jan 2017 20:40:21 +0000 (+0100) Subject: Adding control on user defined sparse matrix X-Git-Tag: V8_3_0rc1~28 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=eb3d0150f7188a34ac5d3d038ef4474927124a2e;p=modules%2Fadao.git Adding control on user defined sparse matrix --- 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) ]]>