diff options
| author | Claudius "keldu" Holeksa <mail@keldu.de> | 2026-07-04 22:22:02 +0200 |
|---|---|---|
| committer | Claudius "keldu" Holeksa <mail@keldu.de> | 2026-07-04 22:22:02 +0200 |
| commit | a31a302fb9fdf28b105eea55d98d2164dbeb7357 (patch) | |
| tree | 454bbdadaf23868c1d4a3ab16b06462104680eba /scripts | |
| parent | 89b1992988569add71f3b2f858a38a001d141d3b (diff) | |
| parent | 275ded2ed5a5bdb92c78a801e40926fc000fb25b (diff) | |
| download | libs-lbm-a31a302fb9fdf28b105eea55d98d2164dbeb7357.tar.gz | |
Merge branch 'dev'
Diffstat (limited to 'scripts')
| -rwxr-xr-x | scripts/python/csv_magnitude_sum.py | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/scripts/python/csv_magnitude_sum.py b/scripts/python/csv_magnitude_sum.py new file mode 100755 index 0000000..773ce52 --- /dev/null +++ b/scripts/python/csv_magnitude_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(np.linalg.norm(a,axis=1))); +#enddef + +if __name__ == "__main__": + main(); +#enddef |
