Commit 0e85970e authored by Daniel Scheffler's avatar Daniel Scheffler
Browse files

Fixed wrong assertion.

parent ee5aad8a
Pipeline #3413 passed with stages
in 20 minutes and 17 seconds
......@@ -533,6 +533,8 @@ class SensorMapGeometryTransformer(object):
raise NotImplementedError(lons, '%dD longitude arrays are not yet supported.' % lons.ndim)
if lats.ndim > 2:
raise NotImplementedError(lats, '%dD latitude arrays are not yet supported.' % lats.ndim)
if lons.shape != lats.shape:
raise ValueError((lons.shape, lats.shape), "'lons' and 'lats' are expected to have the same shape.")
self.resamp_alg = resamp_alg
self.opts = dict(radius_of_influence=radius_of_influence,
......@@ -723,9 +725,13 @@ class SensorMapGeometryTransformer(object):
:param area_definition: an instance of pyresample.geometry.AreaDefinition;
OVERRIDES tgt_prj, tgt_extent and tgt_res; saves computation time
if not data.shape == self.lons.shape == self.lats.shape:
raise ValueError(data.shape,
'Expected a sensor geometry data array with a shape of %s.' % str(self.lons.shape))
if self.lons.ndim > 2 >= data.ndim:
raise ValueError(data.ndim, "'data' must at least have %d dimensions because of %d longiture array "
"dimensions." % (self.lons.ndim, self.lons.ndim))
if data.shape[:2] != self.lons.shape[:2]:
raise ValueError(data.shape, 'Expected a sensor geometry data array with a %d rows and %d columns.'
% self.lons.shape[:2])
# get area_definition
if area_definition:
__version__ = '0.14.4'
__versionalias__ = '20181214_02'
__version__ = '0.14.5'
__versionalias__ = '20181214_03'
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment