source:
issm/trunk-jpl/src/m/miscellaneous/PythonFuncs.py@
25012
| Last change on this file since 25012 was 25012, checked in by , 5 years ago | |
|---|---|
| File size: 419 bytes | |
| Line | |
|---|---|
| 1 | import numpy as np |
| 2 | |
| 3 | |
| 4 | def logical_and_n(*arg): |
| 5 | |
| 6 | if len(arg): |
| 7 | result = arg[0] |
| 8 | for item in arg[1:]: |
| 9 | result = np.logical_and(result, item) |
| 10 | return result |
| 11 | |
| 12 | else: |
| 13 | return None |
| 14 | |
| 15 | |
| 16 | def logical_or_n(*arg): |
| 17 | |
| 18 | if len(arg): |
| 19 | result = arg[0] |
| 20 | for item in arg[1:]: |
| 21 | result = np.logical_or(result, item) |
| 22 | return result |
| 23 | |
| 24 | else: |
| 25 | return None |
Note:
See TracBrowser
for help on using the repository browser.
![(please configure the [header_logo] section in trac.ini)](/trac/issm/chrome/common/trac_banner.png)