Fix getDims, copyFromRawData and fromRawData bug.2

This commit is contained in:
Krad
2023-04-21 14:29:08 +08:00
parent fdc0ecfb32
commit a09a748051
2 changed files with 5 additions and 7 deletions

View File

@@ -239,11 +239,7 @@ namespace Aurora {
{
return 3;
}
if(mInfo[1] > 1)
{
return 2;
}
return 1;
return 2;
}
double *Matrix::getData() const {
@@ -322,7 +318,7 @@ namespace Aurora {
Matrix Matrix::copyFromRawData(double *data, int rows, int cols, int slices, ValueType type) {
int colsize = cols>0?cols:1;
int slicesize = slicesize>0?slicesize:1;
int slicesize = slices>0?slices:1;
int size = rows*colsize*slicesize;
double *newBuffer = malloc(size, type);
cblas_dcopy(size*type,data,1,newBuffer,1);