diff options
| author | Claudius "keldu" Holeksa <mail@keldu.de> | 2026-08-19 16:36:14 +0200 |
|---|---|---|
| committer | Claudius "keldu" Holeksa <mail@keldu.de> | 2026-08-19 16:36:14 +0200 |
| commit | 5dade743e7c1e6b0b6001b4265bf792f0b05f93a (patch) | |
| tree | 36bdc75fd46251913f3a6eadd8e737144e24e7e4 /scripts/python/csv_magnitude_of_sum.py | |
| parent | eaa598784db491d37bdb1b9ff87d6e6bc9979476 (diff) | |
| download | libs-lbm-5dade743e7c1e6b0b6001b4265bf792f0b05f93a.tar.gz | |
Dangling
Diffstat (limited to 'scripts/python/csv_magnitude_of_sum.py')
| -rwxr-xr-x | scripts/python/csv_magnitude_of_sum.py | 19 |
1 files changed, 19 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 |
