Skip to content

Commit

Permalink
Merge pull request #226 from james-d-mitchell/fix-compile-warnings
Browse files Browse the repository at this point in the history
Fix compile warnings
  • Loading branch information
JohanMabille committed Jan 17, 2023
2 parents 4d97057 + b2dc1e9 commit 6f6ccb0
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions include/xtensor-blas/xlinalg.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -94,9 +94,9 @@ namespace xt
{
for (std::size_t i = 0; i < v.size(); ++i)
{
result += std::abs(std::pow(v(i), ord));
result += static_cast<underlying_value_type>(std::abs(std::pow(v(i), ord)));
}
result = std::pow(result, 1. / static_cast<double>(ord));
result = static_cast<underlying_value_type>(std::pow(result, 1. / static_cast<double>(ord)));
}
return result;
}
Expand Down
4 changes: 2 additions & 2 deletions test/test_lapack.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -178,7 +178,7 @@ namespace xt
-1.3449222878385465,
-1.81183493755905478};

for (int i = 0; i < x_expected.shape()[0]; ++i)
for (std::size_t i = 0; i < x_expected.shape()[0]; ++i)
{
EXPECT_NEAR(x_expected[i], x[i], 5e-16);
}
Expand All @@ -203,7 +203,7 @@ namespace xt
-0.05799057434472885,
0.08606304705465571};

for (int i = 0; i < x_expected.shape()[0]; ++i)
for (std::size_t i = 0; i < x_expected.shape()[0]; ++i)
{
EXPECT_DOUBLE_EQ(x_expected[i], x[i]);
}
Expand Down

0 comments on commit 6f6ccb0

Please sign in to comment.