Changes between Version 15 and Version 16 of MaskedArray

Show
Ignore:
Timestamp:
03/21/06 14:45:03 (7 years ago)
Author:
pgmdevlist@…
Comment:

Cosmetic modifications + link to proposed patch

Legend:

Unmodified
Added
Removed
Modified
  • MaskedArray

    v15 v16  
    2020 
    2121=== 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. 
    2323  * '''{{{diff}}}''' 
    2424 
     
    2828  * '''{{{ndim}}}''': The masked array could inherit {{{ndim}}} from its {{{data}}} part. Implemented in changeset:2185. 
    2929  * '''{{{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] 
    3131  * '''{{{cumprod, cumsum}}}''':   
    3232    * {{{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). 
    3333    * {{{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] 
    3435  
    3536=== 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_}}} can be: 
     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: 
    3738{{{ 
    3839#!python 
    3940mar_ = lambda seq:ma.array(data=[s.data for s in seq],mask=[s.mask for s in seq]) 
    4041}}} 
    41   * '''{{{swapaxes, squeeze}}}''' 
     42  * '''{{{swapaxes, squeeze}}}''': {{{swapaxes}}} can be checked[http://projects.scipy.org/scipy/numpy/attachment/wiki/MaskedArray/ma-20060321.patch here] 
    4243 
    4344=== Case 4 ===