diff options
author | justanothercatgirl <sotov2070@gmail.com> | 2025-04-14 00:34:52 +0300 |
---|---|---|
committer | justanothercatgirl <sotov2070@gmail.com> | 2025-04-14 00:34:52 +0300 |
commit | 5ee716791bf7a8ca74c1670a6887a53ab92141f6 (patch) | |
tree | 0a5a522f89d258ec36f4af23cc60aaa578abe7e8 /libprakpp/include/praktable.hpp | |
parent | 320bf2f0155edd67557a3042403eeb843b90a41d (diff) |
added 218, 226, 234, 240
Diffstat (limited to 'libprakpp/include/praktable.hpp')
-rw-r--r-- | libprakpp/include/praktable.hpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/libprakpp/include/praktable.hpp b/libprakpp/include/praktable.hpp index 2cfa500..f00e7b9 100644 --- a/libprakpp/include/praktable.hpp +++ b/libprakpp/include/praktable.hpp @@ -472,7 +472,7 @@ public: // Fills a specified column with the same value `v` table &fill_column(const std::string &column, dtype v) { - apply([&v](const std::vector<dtype>& _) -> dtype { return v; }, {}, column); + apply([&v](const std::vector<dtype>& _) -> dtype { return v; }, std::vector<std::string>{}, column); return *this; } @@ -538,7 +538,7 @@ public: dtype avg = col_avg(column); for (auto it = begin(column); it != end(column); ++it) accum += (*it - avg)*(*it - avg); - return std::sqrt(accum); + return std::sqrt(accum / rows); } // takes columns [columns], calculates average and standard deviation for each row, puts them into `avg` and `stddev` and deleted original columns |