I am looking for a way to alter the --
masked value symbol when printing a masked Numpy array
Poking around in the np.ma
module, and the methods of a masked array I found
np.ma.masked_print_option
"Handle the string used to represent missing data in a masked array."
The default '--':
In [619]: np.ma.masked_print_option.display()
Out[619]: '--'
changed to 'xx'
In [620]: np.ma.masked_print_option.set_display('xx')
In [621]: M
Out[621]:
masked_array(data = [0 xx 2 xx 4 xx 6 xx 8 xx],
mask = [False True False True False True False True False True],
fill_value = 999999)