Skip to content

Commit

Permalink
test fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
jkirk5 committed Jan 8, 2025
1 parent 00317c6 commit f7a4383
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 5 deletions.
6 changes: 3 additions & 3 deletions aviary/subsystems/mass/gasp_based/test/test_fixed.py
Original file line number Diff line number Diff line change
Expand Up @@ -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()
1 change: 1 addition & 0 deletions aviary/subsystems/test/test_premission.py
Original file line number Diff line number Diff line change
Expand Up @@ -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()
7 changes: 5 additions & 2 deletions aviary/utils/preprocessors.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)

Expand Down

0 comments on commit f7a4383

Please sign in to comment.