Changes between Version 32 and Version 33 of coding_rules


Ignore:
Timestamp:
08/21/20 14:40:54 (5 years ago)
Author:
jdquinn
Comment:

Added documentation for element-wise sqrt under Python

Legend:

Unmodified
Added
Removed
Modified
  • coding_rules

    v32 v33  
    132132|| `s=num2str(A)` || `s=str(A)` || convert numbers to character array ||
    133133
    134 
    135134=== !NumPy/SciPy ===
    136135!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:
     
    144143|| `v=nonzeros(A)` || `v=A[np.nonzero(A)]` || Find the values of the nonzero elements ||
    145144|| `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) ||
    146146
    147147== !Variable/Enum/Function Names ==