diff options
| author | Claudius "keldu" Holeksa <mail@keldu.de> | 2026-08-20 18:59:15 +0200 |
|---|---|---|
| committer | Claudius "keldu" Holeksa <mail@keldu.de> | 2026-08-20 18:59:15 +0200 |
| commit | e16b136502bc8252bcffe2f5650825d580cb258a (patch) | |
| tree | a3eaf3b0419a1c5897c344a949cf5775b1637afc /scripts | |
| parent | 2124d0d49e122987ad080af8df53b1bb1faddf07 (diff) | |
| parent | 5cd236287542b47016fe3c49aa56bb66d74c4ad7 (diff) | |
| download | libs-lbm-e16b136502bc8252bcffe2f5650825d580cb258a.tar.gz | |
Merge branch 'dev'
Diffstat (limited to 'scripts')
| -rwxr-xr-x | scripts/python/csv_magnitude_of_sum.py | 19 | ||||
| -rwxr-xr-x | scripts/python/csv_sum.py | 19 | ||||
| -rwxr-xr-x | scripts/python/csv_sum_of_magnitude.py (renamed from scripts/python/csv_magnitude_sum.py) | 0 |
3 files changed, 38 insertions, 0 deletions
diff --git a/scripts/python/csv_magnitude_of_sum.py b/scripts/python/csv_magnitude_of_sum.py new file mode 100755 index 0000000..7ec25a1 --- /dev/null +++ b/scripts/python/csv_magnitude_of_sum.py @@ -0,0 +1,19 @@ +#!/usr/bin/env python3 + +import argparse +import numpy as np + + +def main(): + parser = argparse.ArgumentParser(description="Compute the sum of magnitude"); + parser.add_argument("one"); + args = parser.parse_args(); + + a = np.loadtxt(args.one, delimiter=","); + + print(np.linalg.norm(np.sum(a,axis=0))); +#enddef + +if __name__ == "__main__": + main(); +#enddef diff --git a/scripts/python/csv_sum.py b/scripts/python/csv_sum.py new file mode 100755 index 0000000..bc16006 --- /dev/null +++ b/scripts/python/csv_sum.py @@ -0,0 +1,19 @@ +#!/usr/bin/env python3 + +import argparse +import numpy as np + + +def main(): + parser = argparse.ArgumentParser(description="Compute the sum of magnitude"); + parser.add_argument("one"); + args = parser.parse_args(); + + a = np.loadtxt(args.one, delimiter=","); + + print(np.sum(a,axis=0)); +#enddef + +if __name__ == "__main__": + main(); +#enddef diff --git a/scripts/python/csv_magnitude_sum.py b/scripts/python/csv_sum_of_magnitude.py index 773ce52..773ce52 100755 --- a/scripts/python/csv_magnitude_sum.py +++ b/scripts/python/csv_sum_of_magnitude.py |
