def getdtype(dtype, a=None, default=None):
 if (dtype is None):
  try:
   newdtype = a.dtype
  except AttributeError:
   if (default is not None):
    newdtype = np.dtype(default)
   else:
    raise TypeError('could not interpret data type')
 else:
  newdtype = np.dtype(dtype)
  if (newdtype == np.object_):
   warnings.warn('object dtype is not supported by sparse matrices')
 return newdtype

def getdtype ( dtype , a = None , default = None ) : if ( dtype is None ) : try : newdtype = a . dtype except AttributeError : if ( default is not None ) : newdtype = np . dtype ( default ) else : raise TypeError ( 'could not interpret data type' ) else : newdtype = np . dtype ( dtype ) if ( newdtype == np . object_ ) : warnings . warn ( 'object dtype is not supported by sparse matrices' ) return newdtype
function used to simplify argument processing .