def is_numeric_batch(batch):
 def is_numeric(batch):
  return (isinstance(batch, np.ndarray) or scipy.sparse.issparse(batch) or (str(type(batch)) == "<type 'CudaNdarray'>"))
 return _is_batch_all(batch, is_numeric)

def is_numeric_batch ( batch ) : def is_numeric ( batch ) : return ( isinstance ( batch , np . ndarray ) or scipy . sparse . issparse ( batch ) or ( str ( type ( batch ) ) == "<type 'CudaNdarray'>" ) ) return _is_batch_all ( batch , is_numeric )
returns true if batch is a numeric variable .