def typeof(val, purpose=Purpose.argument):
 c = _TypeofContext(purpose)
 ty = typeof_impl(val, c)
 if (ty is None):
  msg = ('cannot determine Numba type of %r' % (type(val),))
  raise ValueError(msg)
 return ty

def typeof ( val , purpose = Purpose . argument ) : c = _TypeofContext ( purpose ) ty = typeof_impl ( val , c ) if ( ty is None ) : msg = ( 'cannot determine Numba type of %r' % ( type ( val ) , ) ) raise ValueError ( msg ) return ty
get the numba type of a python value for the given purpose .