Last change
on this file since 27458 was 27458, checked in by jdquinn, 2 years ago |
CHG: MATLAB > Python translation; cleanup
|
File size:
440 bytes
|
Line | |
---|
1 | import numpy as np
|
---|
2 |
|
---|
3 |
|
---|
4 | def logical_and_n(*arg): # {{{
|
---|
5 | if len(arg):
|
---|
6 | result = arg[0]
|
---|
7 | for item in arg[1:]:
|
---|
8 | result = np.logical_and(result, item)
|
---|
9 | return result
|
---|
10 | else:
|
---|
11 | return None
|
---|
12 | # }}}
|
---|
13 |
|
---|
14 | def logical_or_n(*arg): # {{{
|
---|
15 | if len(arg):
|
---|
16 | result = arg[0]
|
---|
17 | for item in arg[1:]:
|
---|
18 | result = np.logical_or(result, item)
|
---|
19 | return result
|
---|
20 | else:
|
---|
21 | return None
|
---|
22 | # }}}
|
---|
Note:
See
TracBrowser
for help on using the repository browser.