Changes between Version 10 and Version 11 of coding_rules
- Timestamp:
- 06/16/20 10:00:32 (5 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
coding_rules
v10 v11 107 107 - [https://numpy.org/devdocs/user/numpy-for-matlab-users.html NumPy for Matlab users | NumPy] 108 108 - [http://mathesaurus.sourceforge.net/matlab-numpy.html NumPy for MATLAB users | mathesaurus.sourceforge.net] 109 Some notable omissions in the above sources are as follows: 110 || '''MATLAB''' || '''!NumPy''' || '''Notes''' || 111 || {{{find(a>0.5)}}} || {{{np.empty(a>0.5)}}}[[BR]][[BR]]{{{np.empty(a>0.5,a,a)}}} || find the indices where (a > 0.5)[[BR]][[BR]]When only the {{{condition}}} parameters is provided, this function is a shorthand for {{{np.asarray(condition).nonzero()}}}.[[BR]]Further, when working on a 1D array, this array must be passed in as a value for parameters {{{x}}} and {{{y}}} if the desired output is a single array of indices rather than a tuple of arrays.[[BR]][[BR]]See also: https://numpy.org/doc/stable/reference/generated/numpy.where.html || 109 112 110 113 == !Variable/Enum/Function Names ==