source:
mire/functions.py
@
14
Last change on this file since 14 was 14, checked in by meynadie, 16 years ago | |
---|---|
File size: 131 bytes |
Rev | Line | |
---|---|---|
[14] | 1 | import numpy |
2 | import math | |
3 | ||
4 | def modulus(vec): | |
5 | tmp = 0 | |
6 | for comp in vec: | |
7 | tmp += comp**2 | |
8 | return math.sqrt(tmp) | |
9 |
Note: See TracBrowser
for help on using the repository browser.