def _check_surface_size(surf):
 sizes = (surf['rr'].max(axis=0) - surf['rr'].min(axis=0))
 if (sizes < 0.05).any():
  raise RuntimeError(('Dimensions of the surface %s seem too small (%9.5f mm). Maybe the the unit of measure is meters instead of mm' % (_surf_name[surf['id']], (1000 * sizes.min()))))

def _check_surface_size ( surf ) : sizes = ( surf [ 'rr' ] . max ( axis = 0 ) - surf [ 'rr' ] . min ( axis = 0 ) ) if ( sizes < 0.05 ) . any ( ) : raise RuntimeError ( ( 'Dimensions of the surface %s seem too small (%9.5f mm). Maybe the the unit of measure is meters instead of mm' % ( _surf_name [ surf [ 'id' ] ] , ( 1000 * sizes . min ( ) ) ) ) )
check that the coordinate limits are reasonable .