diff --git a/geos-ats/src/geos/ats/helpers/curve_check.py b/geos-ats/src/geos/ats/helpers/curve_check.py index a35b27f..31250c7 100644 --- a/geos-ats/src/geos/ats/helpers/curve_check.py +++ b/geos-ats/src/geos/ats/helpers/curve_check.py @@ -33,16 +33,18 @@ def interpolate_values_time( ta, xa, tb ): """ N = list( np.shape( xa ) ) M = len( tb ) + ta = np.ascontiguousarray( np.squeeze( ta ) ) + tb = np.ascontiguousarray( np.squeeze( tb ) ) if ( len( N ) == 1 ): return interp1d( ta, xa )( tb ) else: # Reshape the input array so that we can work on the non-time axes - S = np.product( N[ 1: ] ) + S = np.prod( N[ 1: ] ) xc = np.reshape( xa, ( N[ 0 ], S ) ) xd = np.zeros( ( len( tb ), S ) ) for ii in range( S ): - xd[ :, ii ] = interp1d( ta, xc[ :, ii ] )( tb ) + xd[ :, ii ] = interp1d( ta, xc[ :, ii ], bounds_error=False, fill_value='extrapolate' )( tb ) # Return the array to it's expected shape N[ 0 ] = M diff --git a/geos-ats/src/geos/ats/test_case.py b/geos-ats/src/geos/ats/test_case.py index 9c3c27f..7affe6c 100644 --- a/geos-ats/src/geos/ats/test_case.py +++ b/geos-ats/src/geos/ats/test_case.py @@ -1,4 +1,4 @@ -import ats # type: ignore[import] +import ats # type: ignore[import] import os import shutil import logging @@ -319,7 +319,7 @@ def testCreate( self ): priority = 1 # Setup a new test group - atsTest = None + parent_test = None ats.tests.AtsTest.newGroup( priority=priority, path=self.path ) for stepnum, step in enumerate( self.steps ): np = getattr( step.p, "np", 1 ) @@ -329,10 +329,10 @@ def testCreate( self ): label = "%s_%d_%s" % ( self.name, stepnum + 1, step.label() ) # call either 'test' or 'testif' - if atsTest is None: + if parent_test is None: func = lambda *a, **k: test( *a, **k ) else: - func = lambda *a, **k: testif( atsTest, *a, **k ) + func = lambda *a, **k: testif( parent_test, *a, **k ) # Set the time limit kw = {} @@ -359,6 +359,11 @@ def testCreate( self ): if self.last_status == PASSED: atsTest.status = SKIPPED + # Set the parent test + # Note: do not make tests dependent on the result of curvecheck + if step.label() != 'curvecheck': + parent_test = atsTest + # End the group ats.tests.AtsTest.endGroup()