#NEWLINE# def test_mask_save( ) : #NEWLINE# #INDENT# tf = tempfile . NamedTemporaryFile ( suffix = '.hdf' ) #NEWLINE# ds = cortex . Dataset ( test = ( np . random . randn ( * volshape ) , subj , xfmname ) ) #NEWLINE# ds . append ( masked = ds . test . masked [ 'thin' ] ) #NEWLINE# data = ds . masked . data #NEWLINE# ds . save ( tf . name ) #NEWLINE# ds = cortex . load ( tf . name ) #NEWLINE# assert ( ds . masked . shape == volshape ) #NEWLINE# assert np . allclose ( ds . masked . data , data )