Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PYTHON

np.ma.filled

>>> x = np.ma.array(np.arange(9).reshape(3, 3), mask=[[1, 0, 0],
                                                      [1, 0, 0],
                                                      [0, 0, 0]])

>>> x.filled(123) 
array([[123,   1,   2],
       [123,   4,   5],
       [  6,   7,   8]])
Source by vimsky.com #
 
PREVIOUS NEXT
Tagged:
ADD COMMENT
Topic
Name
3+3 =