#NEWLINE# @ nodata_value . setter #NEWLINE# def nodata_value( self , value ) : #NEWLINE# #INDENT# '\n        Sets the nodata value for this band.\n        ' #NEWLINE# if ( value is None ) : #NEWLINE# #INDENT# if ( not capi . delete_band_nodata_value ) : #NEWLINE# #INDENT# raise ValueError ( 'GDAL >= 2.1 required to delete nodata values.' ) #NEWLINE# #UNINDENT# capi . delete_band_nodata_value ( self . _ptr ) #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# if ( not isinstance ( value , ( int , float ) ) ) : #NEWLINE# #INDENT# raise ValueError ( 'Nodata value must be numeric or None.' ) #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# capi . set_band_nodata_value ( self . _ptr , value ) #NEWLINE# #UNINDENT# #UNINDENT# self . _flush ( )