def _fill_and_verify_kernel_shape(x, n):
 try:
  return _fill_shape(x, n)
 except TypeError as e:
  raise base.IncompatibleShapeError('Invalid kernel shape: {}'.format(e))

def _fill_and_verify_kernel_shape ( x , n ) : try : return _fill_shape ( x , n ) except TypeError as e : raise base . IncompatibleShapeError ( 'Invalid kernel shape: {}' . format ( e ) )
expands x if necessary into a n-d kernel shape and reports errors .