diff options
author | Determinant <[email protected]> | 2015-08-25 11:47:47 +0800 |
---|---|---|
committer | Determinant <[email protected]> | 2015-08-25 11:47:47 +0800 |
commit | ed2a4148dbb9c18f428571b3e2970d7b2adfb058 (patch) | |
tree | 902c42cee0db9ef13bd08b586d5b0f41e34f9196 | |
parent | 47dba09eeba2463a804e89c9d0aed7b30cc92b4e (diff) |
add optional parameters to mat:create
-rw-r--r-- | nerv/matrix/init.lua | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/nerv/matrix/init.lua b/nerv/matrix/init.lua index ae9b884..1091d7e 100644 --- a/nerv/matrix/init.lua +++ b/nerv/matrix/init.lua @@ -45,8 +45,8 @@ function nerv.Matrix:generate(gen) end end -function nerv.Matrix:create() - return self.__constructor(self:nrow(), self:ncol()) +function nerv.Matrix:create(nrow, ncol) + return self.__constructor(nrow or self:nrow(), ncol or self:ncol()) end nerv.MMatrixInt.fmt = "%d " |