March 25, 2006
10:51 a.m.
Hi all, In ma.py the masked_array function the fill_value of the array passed in is not used. The code currently looks like this: def masked_array (a, mask=nomask, fill_value=None): """masked_array(a, mask=nomask) = array(a, mask=mask, copy=0, fill_value=fill_value) """ return array(a, mask=mask, copy=0, fill_value=fill_value) It seems to me that using the fill_value from a (if it is a MaskedArray) would be the sane thing to do? Something like if fill_value == None and isinstance(a, MaskedArray): fill_value = a.fill_value() return array(a, mask=mask, copy=0, fill_value=fill_value) As it stands, all the ma functions such as transpose, reshape, etc lose the fill_value which seems wrong to me. Tim
7501
Age (days ago)
7501
Last active (days ago)
0 comments
1 participants
participants (1)
-
Tim Leslie