parameters: (self,var)
docstring: makes sure that self.var is in float32 format if it exists
docstring_summary: makes sure that self.var is in float32 format if it exists
docstring_tokens: makes sure that self . var is in float32 format if it exists
function: def _ensure_float32(self,var):
          """ makes sure that self.var is in float32 format if it exists """
          if var in self.__dict__:
              if getattr(self,var).dtype != np.dtype('float32'): setattr(self,var, getattr(self,var).astype('float32'))
function_tokens: def _ensure_float32 ( self , var ) : if var in self . __dict__ : if getattr ( self , var ) . dtype != np . dtype ( 'float32' ) : setattr ( self , var , getattr ( self , var ) . astype ( 'float32' ) )