Changeset 26553 for issm/trunk-jpl/src/m/miscellaneous/MatlabFuncs.py
- Timestamp:
- 11/08/21 11:59:05 (3 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
issm/trunk-jpl/src/m/miscellaneous/MatlabFuncs.py
r26358 r26553 50 50 51 51 return np.degrees(np.arctan2(Y, X)) 52 # }}} 53 54 def contains(str, pat): #{{{ 55 """function contains - Determine if pattern is in strings 56 57 Usage: 58 TF = contains(str, pat) 59 60 TODO: 61 - Implement 'IgnoreCase' option 62 """ 63 52 64 # }}} 53 65 … … 142 154 # }}} 143 155 156 def intersect(A, B): # {{{ 157 """function intersect - Set intersection of two arrays 158 159 Usage: 160 C = intersect(A, B) 161 162 NOTE: 163 - Only the following functionality is currently implemented: 164 - C = intersect(A,B) returns the data common to both A and B, with no 165 repetitions. C is in sorted order. 166 167 """ 168 import numpy as np 169 170 return np.intersect1d(A, B) 171 #}}} 172 144 173 def isa(A, dataType): # {{{ 145 """ FUNCTION ISA174 """function isa 146 175 147 176 NOTE: … … 216 245 def mod(a, m): # {{{ 217 246 return a % m 247 # }}} 248 249 def numel(A): # {{{ 250 """function numel - Number of array elements 251 252 Usage: 253 n = numel(A)) 254 """ 255 import numpy as np 256 257 return np.size(A) 218 258 # }}} 219 259
Note:
See TracChangeset
for help on using the changeset viewer.