#NEWLINE# def test_copy_astype( self ) : #NEWLINE# #INDENT# cop = self . bseries . astype ( np . float64 ) #NEWLINE# self . assertIsNot ( cop , self . bseries ) #NEWLINE# self . assertIs ( cop . sp_index , self . bseries . sp_index ) #NEWLINE# self . assertEqual ( cop . dtype , np . float64 ) #NEWLINE# cop2 = self . iseries . copy ( ) #NEWLINE# tm . assert_sp_series_equal ( cop , self . bseries ) #NEWLINE# tm . assert_sp_series_equal ( cop2 , self . iseries ) #NEWLINE# cop [ : 5 ] = 97 #NEWLINE# self . assertEqual ( cop . sp_values [ 0 ] , 97 ) #NEWLINE# self . assertNotEqual ( self . bseries . sp_values [ 0 ] , 97 ) #NEWLINE# zbcop = self . zbseries . copy ( ) #NEWLINE# zicop = self . ziseries . copy ( ) #NEWLINE# tm . assert_sp_series_equal ( zbcop , self . zbseries ) #NEWLINE# tm . assert_sp_series_equal ( zicop , self . ziseries ) #NEWLINE# view = self . bseries . copy ( deep = False ) #NEWLINE# view . sp_values [ : 5 ] = 5 #NEWLINE# self . assertTrue ( ( self . bseries . sp_values [ : 5 ] == 5 ) . all ( ) )