From 4da3348e6438c4cb85ab7fb57f6e911f0084f68b Mon Sep 17 00:00:00 2001 From: RAMSEY YUNIS Date: Tue, 21 Jul 2026 14:18:15 -0700 Subject: [PATCH 1/6] includes should be read in as type array, then after the recursion it will be converted to list or dict below --- pyyeti/nastran/bulk.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyyeti/nastran/bulk.py b/pyyeti/nastran/bulk.py index 504dcad..102730e 100644 --- a/pyyeti/nastran/bulk.py +++ b/pyyeti/nastran/bulk.py @@ -780,7 +780,7 @@ def rdcards( kwargs = { # save args for use in _rdinclude "name": name, "blank": blank, - "return_var": return_var, + "return_var": "array", "dtype": dtype, "no_data_return": (), # return value from _rdinclude must be iterable (not None) "regex": regex, From d99d31eba3d628170f15f2b752e57b7157e78c55 Mon Sep 17 00:00:00 2001 From: RAMSEY YUNIS Date: Tue, 21 Jul 2026 14:18:34 -0700 Subject: [PATCH 2/6] ensure keys are int (cards can only have int id anyway) --- pyyeti/nastran/bulk.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyyeti/nastran/bulk.py b/pyyeti/nastran/bulk.py index 102730e..198ff73 100644 --- a/pyyeti/nastran/bulk.py +++ b/pyyeti/nastran/bulk.py @@ -825,7 +825,7 @@ def rdcards( for val in vals: cur = len(val) mxlen = max(mxlen, cur) - key = val[0] # before it gets turned into dtype + key = int(val[0]) # before it gets turned into dtype val = np.array(val).astype(dtype) if todict: Vals[key] = val From 03f2da2e7f8d507eb53aa8669cd40e989e796f3f Mon Sep 17 00:00:00 2001 From: RAMSEY YUNIS Date: Tue, 21 Jul 2026 14:42:53 -0700 Subject: [PATCH 3/6] try to fix an issue with tests not retaining the GRID card --- pyyeti/nastran/bulk.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/pyyeti/nastran/bulk.py b/pyyeti/nastran/bulk.py index 198ff73..efc6a76 100644 --- a/pyyeti/nastran/bulk.py +++ b/pyyeti/nastran/bulk.py @@ -777,10 +777,12 @@ def rdcards( for symbol in include_symbols: if not len(symbol) > 2: raise ValueError(f"Symbols must have a length >1, got {symbol}") + + kwargsReturnType = "list" if return_var == "list" else array kwargs = { # save args for use in _rdinclude "name": name, "blank": blank, - "return_var": "array", + "return_var": kwargsReturnType, "dtype": dtype, "no_data_return": (), # return value from _rdinclude must be iterable (not None) "regex": regex, From 7043719f6baaa909319ebbd429e25b9df4b9db44 Mon Sep 17 00:00:00 2001 From: RAMSEY YUNIS Date: Tue, 21 Jul 2026 14:45:03 -0700 Subject: [PATCH 4/6] correct a typo, array should be a string --- pyyeti/nastran/bulk.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyyeti/nastran/bulk.py b/pyyeti/nastran/bulk.py index efc6a76..18b8d1b 100644 --- a/pyyeti/nastran/bulk.py +++ b/pyyeti/nastran/bulk.py @@ -778,7 +778,7 @@ def rdcards( if not len(symbol) > 2: raise ValueError(f"Symbols must have a length >1, got {symbol}") - kwargsReturnType = "list" if return_var == "list" else array + kwargsReturnType = "list" if return_var == "list" else "array" kwargs = { # save args for use in _rdinclude "name": name, "blank": blank, From c56dc0d42aef4b8aa2abd065d90f1f44f12b8b0d Mon Sep 17 00:00:00 2001 From: RAMSEY YUNIS Date: Tue, 21 Jul 2026 15:06:20 -0700 Subject: [PATCH 5/6] test if this fixes the test issues --- pyyeti/nastran/bulk.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyyeti/nastran/bulk.py b/pyyeti/nastran/bulk.py index 18b8d1b..26feb9b 100644 --- a/pyyeti/nastran/bulk.py +++ b/pyyeti/nastran/bulk.py @@ -782,7 +782,7 @@ def rdcards( kwargs = { # save args for use in _rdinclude "name": name, "blank": blank, - "return_var": kwargsReturnType, + "return_var": return_var, "dtype": dtype, "no_data_return": (), # return value from _rdinclude must be iterable (not None) "regex": regex, From efe94878cf2d36bdfe18a893aaf89e1f465fbb1b Mon Sep 17 00:00:00 2001 From: RAMSEY YUNIS Date: Tue, 21 Jul 2026 15:11:53 -0700 Subject: [PATCH 6/6] It did not. It appears to be a python version issue. --- pyyeti/nastran/bulk.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyyeti/nastran/bulk.py b/pyyeti/nastran/bulk.py index 26feb9b..18b8d1b 100644 --- a/pyyeti/nastran/bulk.py +++ b/pyyeti/nastran/bulk.py @@ -782,7 +782,7 @@ def rdcards( kwargs = { # save args for use in _rdinclude "name": name, "blank": blank, - "return_var": return_var, + "return_var": kwargsReturnType, "dtype": dtype, "no_data_return": (), # return value from _rdinclude must be iterable (not None) "regex": regex,