@@ -339,14 +339,24 @@ def test_inconsistent_shape(self):
339339 with self .assertRaisesRegexp (ValueError , emsg ):
340340 vinterp ._Interpolation ([1 , 3 ], data , zdata , axis = 2 )
341341
342- def test_axis_out_of_bounds (self ):
342+ def test_axis_out_of_bounds_fz_src_relative (self ):
343+ # axis is out of bounds as identified by the absolute axis with z_src.
343344 data = np .empty ([5 , 4 ])
344345 zdata = np .empty ([5 , 4 ])
345346 axis = 4
346347 emsg = 'Axis {} out of range'
347348 with self .assertRaisesRegexp (ValueError , emsg .format (axis )):
348349 vinterp ._Interpolation ([1 , 3 ], data , zdata , axis = axis )
349350
351+ def test_axis_out_of_bounds_z_src_absolute (self ):
352+ # axis is out of bounds as identified by the relative axis with fz_src.
353+ data = np .empty ([5 , 4 ])
354+ zdata = np .empty ([3 , 5 , 4 ])
355+ axis = 0
356+ emsg = 'Axis {} out of range'
357+ with self .assertRaisesRegexp (ValueError , emsg .format (axis )):
358+ vinterp ._Interpolation ([1 , 3 ], data , zdata , axis = axis )
359+
350360 def test_nd_inconsistent_ndims (self ):
351361 z_target = np .empty ((2 , 3 , 4 ))
352362 z_src = np .empty ((3 , 4 ))
0 commit comments