Changes between Version 32 and Version 33 of coding_rules
- Timestamp:
- 08/21/20 14:40:54 (5 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
coding_rules
v32 v33 132 132 || `s=num2str(A)` || `s=str(A)` || convert numbers to character array || 133 133 134 135 134 === !NumPy/SciPy === 136 135 !NumPy and !SciPy are used extensively in the Python interface to ISSM to replicate MATLAB-native functionality. When translating modules or tests, for example, from MATLAB to Python, the following sources may come in handy: … … 144 143 || `v=nonzeros(A)` || `v=A[np.nonzero(A)]` || Find the values of the nonzero elements || 145 144 || `B=sortrows(A,column)` || `B=A[A[:,column].argsort()]` || sort rows of matrix or table (MATLAB), or 2D array (!NumPy) in ascending order based on the elements in 'column' || 145 || `sqrt(A)` || `A ** 0.5` || Element-wise square root (math.sqrt can only be applied to scalars) || 146 146 147 147 == !Variable/Enum/Function Names ==