From f7a43834cab2fa6ef10012fd0e02103190513dc9 Mon Sep 17 00:00:00 2001 From: jkirk5 Date: Wed, 8 Jan 2025 15:59:17 -0500 Subject: [PATCH] test fixes --- aviary/subsystems/mass/gasp_based/test/test_fixed.py | 6 +++--- aviary/subsystems/test/test_premission.py | 1 + aviary/utils/preprocessors.py | 7 +++++-- 3 files changed, 9 insertions(+), 5 deletions(-) diff --git a/aviary/subsystems/mass/gasp_based/test/test_fixed.py b/aviary/subsystems/mass/gasp_based/test/test_fixed.py index 8a95ece97..1af3573d5 100644 --- a/aviary/subsystems/mass/gasp_based/test/test_fixed.py +++ b/aviary/subsystems/mass/gasp_based/test/test_fixed.py @@ -1704,7 +1704,7 @@ def test_case1(self): if __name__ == "__main__": - # unittest.main() + unittest.main() # test = GearTestCaseMultiengine() - test = EngineTestCaseMultiEngine() - test.test_case_1() + # test = EngineTestCaseMultiEngine() + # test.test_case_1() diff --git a/aviary/subsystems/test/test_premission.py b/aviary/subsystems/test/test_premission.py index acc5ed124..596b34012 100644 --- a/aviary/subsystems/test/test_premission.py +++ b/aviary/subsystems/test/test_premission.py @@ -354,4 +354,5 @@ def test_manual_override(self): unittest.main() # test = PreMissionTestCase() # test.setUp() + # test.test_manual_override() # test.test_GASP_mass_FLOPS_everything_else() diff --git a/aviary/utils/preprocessors.py b/aviary/utils/preprocessors.py index bf555c8d0..d428c93b5 100644 --- a/aviary/utils/preprocessors.py +++ b/aviary/utils/preprocessors.py @@ -339,8 +339,11 @@ def preprocess_propulsion(aviary_options: AviaryValues, engine_models: list = No # update aviary options and outputs with new vectors # if data is numerical, store in a numpy array # keep tuples as tuples, lists get converted to numpy arrays - if type(vec[0]) in (int, float, np.int64, np.float64)\ - and type(vec) is not tuple: + # Some machines default to 32-bit np array types, so we have to check for those too + if ( + type(vec[0]) in (int, float, np.int32, np.int64, np.float32, np.float64) + and type(vec) is not tuple + ): vec = np.array(vec, dtype=dtype) aviary_options.set_val(var, vec, units)