Add more test cases for tensor operations #475

Merged
margarita0303 merged 4 commits from feature/tensors-performance into feature/tensors-performance 2022-04-06 14:32:56 +03:00
Showing only changes of commit 0440764cd3 - Show all commits

View File

@ -299,4 +299,14 @@ internal class TestDoubleAnalyticTensorAlgebra {
doubleArrayOf(1.5, 0.5) doubleArrayOf(1.5, 0.5)
)} )}
} }
@Test
fun testStd() = DoubleTensorAlgebra {
assertTrue { floor(tensor5.std() * 10000 ) / 10000 == 2.9439 }
}
@Test
fun testVariance() = DoubleTensorAlgebra {
assertTrue { floor(tensor5.variance() * 10000 ) / 10000 == 8.6666 }
}
} }