File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -238,10 +238,11 @@ def _validate_inputs_lonlat_bounds_vertices(self):
238238
239239 # Vertices can be Skycoord of specified length or None, depending on bounds:
240240 if self ._bound_nverts > 0 :
241- assert (isinstance (self ._vertices , SkyCoord )
242- & (len (self ._vertices ) == self ._bound_nverts ))
243- else :
244- assert self ._vertices is None
241+ if (isinstance (self ._vertices , SkyCoord )
242+ & (len (self ._vertices ) != self ._bound_nverts )):
243+ raise ValueError ('Invalid vertices direct input! Inconsistent with bounds.' )
244+ elif (self ._vertices is not None ) & (self ._bound_nverts == 0 ):
245+ raise ValueError ('Invalid vertices direct input! Inconsistent with bounds.' )
245246
246247 # -------------------------------------------------------------------------------
247248 # ALWAYS derive boundaries on the fly, IF all _params are not None
You can’t perform that action at this time.
0 commit comments