diff --git a/src/Matrix.cpp b/src/Matrix.cpp index 3eef744..8043598 100644 --- a/src/Matrix.cpp +++ b/src/Matrix.cpp @@ -671,6 +671,13 @@ namespace Aurora { allDimIndex.push_back(j); } } + if (isScalar()){ + mode = 0; + } + if (isVector()){ + if (getDimSize(0)>1 && aRowIdx!=$) mode = 0; + if (getDimSize(1)>1 && aColIdx!=$) mode = 0; + } int rowStride = 1; int colStride = getDimSize(0); int sliceStride = getDimSize(0)*getDimSize(1); @@ -1157,6 +1164,10 @@ namespace Aurora { std::cerr <<"Assign value fail!Src slice(dim 2 size:"<< matrix.getDimSize(1) <<"), not match of des(dim 2 size:"<