fixed warnings and removed ambiguous read_frame (#154)
All checks were successful
Build on RHEL9 / buildh (push) Successful in 1m47s

Fixed warnings:
- unused variable in Interpolator
- Narrowing conversions uint64-->int64

Removed an ambiguous function from JungfrauDataFile
- NDarry read_frame(header&=nullptr)
- Frame read_frame()

NDArray and NDView size() is now signed
This commit is contained in:
Erik Fröjdh
2025-04-09 17:54:55 +02:00
committed by GitHub
parent 894065fe9c
commit 8b0eee1e66
10 changed files with 50 additions and 45 deletions

View File

@ -183,14 +183,14 @@ TEST_CASE("Size and shape matches") {
int64_t h = 75;
std::array<int64_t, 2> shape{w, h};
NDArray<double> a{shape};
REQUIRE(a.size() == static_cast<uint64_t>(w * h));
REQUIRE(a.size() == w * h);
REQUIRE(a.shape() == shape);
}
TEST_CASE("Initial value matches for all elements") {
double v = 4.35;
NDArray<double> a{{5, 5}, v};
for (uint32_t i = 0; i < a.size(); ++i) {
for (int i = 0; i < a.size(); ++i) {
REQUIRE(a(i) == v);
}
}