diff options
| author | Claudius "keldu" Holeksa <mail@keldu.de> | 2026-07-04 21:58:38 +0200 |
|---|---|---|
| committer | Claudius "keldu" Holeksa <mail@keldu.de> | 2026-07-04 21:58:38 +0200 |
| commit | 803bf67093d621509d4d8d4af326fa2c66c299bc (patch) | |
| tree | d7710be92f188927cf4ad33cae071e5830ddbc30 /scripts | |
| parent | 761e4912e14324ccf713b9309336816cd3283b38 (diff) | |
| download | libs-lbm-803bf67093d621509d4d8d4af326fa2c66c299bc.tar.gz | |
Dangling changes
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 |
