Changes between Version 15 and Version 16 of MaskedArray
- Timestamp:
- 03/21/06 14:45:03 (7 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
MaskedArray
v15 v16 20 20 21 21 === Case 1 === 22 The function would work OK with masked arrays if it called {{{ma.asarray}}} instead of {{{numeric.asarray}}} (as it's currently the case). A fix could be to add a {{{mask=False_}}} property by default to any {{{ndarray}}}, and get rid of the {{{MaskedArray}}} class ? 22 The function would work OK with masked arrays if it called {{{ma.asarray}}} instead of {{{numeric.asarray}}} (as it's currently the case). A fix could be to add a {{{mask=False_}}} property by default to any {{{ndarray}}}, and get rid of the {{{MaskedArray}}} class ? A second possibility would be to check in {{{numeric.asarray}}} whwther the argument is already a (masked) array. 23 23 * '''{{{diff}}}''' 24 24 … … 28 28 * '''{{{ndim}}}''': The masked array could inherit {{{ndim}}} from its {{{data}}} part. Implemented in changeset:2185. 29 29 * '''{{{std, var}}}''': An example of implementation of the function (not the method) {{{std}}} is given [attachment:ma_examples.py there]. 30 * '''{{{trace}}}''': Fill with 0 if {{{use_missing}}} is False. 30 * '''{{{trace}}}''': Fill with 0 if {{{use_missing}}} is False. Please check [http://projects.scipy.org/scipy/numpy/attachment/wiki/MaskedArray/ma-20060321.patch this file] 31 31 * '''{{{cumprod, cumsum}}}''': 32 32 * {{{use_missing=True}}}: The output is masked for indices [''i''...''N''], where ''i'' is the index of the first missing value, and ''N'' the nb of data (including missing). 33 33 * {{{use_missing=False}}}: Fill the initial missing values by 1 for {{{cumprod}}} or 0 for {{{cumsum}}}. 34 * '''{{{clip}}}''': Please check [http://projects.scipy.org/scipy/numpy/attachment/wiki/MaskedArray/ma-20060321.patch this file] 34 35 35 36 === Case 3 === 36 The function must be applied to both the data part and the mask. I expect it's the case for most of the functions in '''{{{shape_base}}}''', '''{{{index_trick}}}'''. As an illustration, a quick and dirty adaptation of the concatenator {{{r_}}} canbe:37 The function must be applied to both the data part and the mask. I assume it's the case for most of the functions in '''{{{shape_base}}}''', '''{{{index_trick}}}'''. As an illustration, a quick and dirty adaptation of the concatenator {{{r_}}} could be: 37 38 {{{ 38 39 #!python 39 40 mar_ = lambda seq:ma.array(data=[s.data for s in seq],mask=[s.mask for s in seq]) 40 41 }}} 41 * '''{{{swapaxes, squeeze}}}''' 42 * '''{{{swapaxes, squeeze}}}''': {{{swapaxes}}} can be checked[http://projects.scipy.org/scipy/numpy/attachment/wiki/MaskedArray/ma-20060321.patch here] 42 43 43 44 === Case 4 ===
