Add new size function

This commit is contained in:
kradchen
2023-05-19 13:43:43 +08:00
parent 28457dd99b
commit 3b894d24bf
2 changed files with 6 additions and 0 deletions

View File

@@ -117,3 +117,8 @@ Matrix Aurora::size(const Matrix &aMatrix)
return Matrix::New(output,2,1,1);
}
}
int Aurora::size(const Matrix &aMatrix,int dims)
{
return aMatrix.getDimSize(dims-1);
}

View File

@@ -42,6 +42,7 @@ namespace Aurora {
Matrix interpn(const Matrix& aX, const Matrix& aY, const Matrix& aZ, const Matrix& aV, const Matrix& aX1, const Matrix& aY1, const Matrix& aZ1,InterpnMethod aMethod);
Matrix size(const Matrix &aMatrix);
int size(const Matrix &aMatrix,int dims);
};