mirror of
https://github.com/slsdetectorgroup/aare.git
synced 2025-06-15 00:37:13 +02:00
Multi threaded fitting and returning chi2 (#132)
Co-authored-by: Patrick <patrick.sieberer@psi.ch> Co-authored-by: JulianHeymes <julian.heymes@psi.ch> Co-authored-by: Dhanya Thattil <dhanya.thattil@psi.ch>
This commit is contained in:
@ -379,4 +379,32 @@ TEST_CASE("Elementwise operations on images") {
|
||||
REQUIRE(A(i) == a_val);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
TEST_CASE("Assign an std::array to a 1D NDArray") {
|
||||
NDArray<int, 1> a{{5}, 0};
|
||||
std::array<int, 5> b{1, 2, 3, 4, 5};
|
||||
a = b;
|
||||
for (uint32_t i = 0; i < a.size(); ++i) {
|
||||
REQUIRE(a(i) == b[i]);
|
||||
}
|
||||
}
|
||||
|
||||
TEST_CASE("Assign an std::array to a 1D NDArray of a different size") {
|
||||
NDArray<int, 1> a{{3}, 0};
|
||||
std::array<int, 5> b{1, 2, 3, 4, 5};
|
||||
a = b;
|
||||
|
||||
REQUIRE(a.size() == 5);
|
||||
for (uint32_t i = 0; i < a.size(); ++i) {
|
||||
REQUIRE(a(i) == b[i]);
|
||||
}
|
||||
}
|
||||
|
||||
TEST_CASE("Construct an NDArray from an std::array") {
|
||||
std::array<int, 5> b{1, 2, 3, 4, 5};
|
||||
NDArray<int, 1> a(b);
|
||||
for (uint32_t i = 0; i < a.size(); ++i) {
|
||||
REQUIRE(a(i) == b[i]);
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user