GeezerVison is showing github.com — Merge pull request #317 from roryyorke/master · python-control/python-control@662e52e
File treeExpand file treeCollapse file tree Open diff view settings Expand file treeCollapse file tree Open diff view settings Collapse file Copy file name to clipboardExpand all lines: control/tests/xferfcn_input_test.py +14-14Lines changed: 14 additions & 14 deletions | Original file line number | Diff line number | Diff line change |
|---|
| 7 | 7 | import numpy as np | 8 | 8 |
| 9 | 9 | from numpy import int, int8, int16, int32, int64 | 10 | | -from numpy import float, float16, float32, float64, float128 | | 10 | +from numpy import float, float16, float32, float64, longdouble | 11 | 11 | from numpy import all, ndarray, array | 12 | 12 |
| 13 | 13 | from control.xferfcn import _clean_part | @@ -73,7 +73,7 @@ def test_clean_part_tuple(self): | 73 | 73 |
| 74 | 74 | def test_clean_part_all_scalar_types(self): | 75 | 75 | """Test single scalar value for all valid data types.""" | 76 | | - for dtype in [int, int8, int16, int32, int64, float, float16, float32, float64, float128]: | | 76 | + for dtype in [int, int8, int16, int32, int64, float, float16, float32, float64, longdouble]: | 77 | 77 | num = dtype(1) | 78 | 78 | num_ = _clean_part(num) | 79 | 79 |
| @@ -92,7 +92,7 @@ def test_clean_part_np_array(self): | 92 | 92 |
| 93 | 93 | def test_clean_part_all_np_array_types(self): | 94 | 94 | """Test scalar value in numpy array of ndim=0 for all data types.""" | 95 | | - for dtype in [int, int8, int16, int32, int64, float, float16, float32, float64, float128]: | | 95 | + for dtype in [int, int8, int16, int32, int64, float, float16, float32, float64, longdouble]: | 96 | 96 | num = np.array(1, dtype=dtype) | 97 | 97 | num_ = _clean_part(num) | 98 | 98 |
| @@ -102,7 +102,7 @@ def test_clean_part_all_np_array_types(self): | 102 | 102 |
| 103 | 103 | def test_clean_part_all_np_array_types2(self): | 104 | 104 | """Test numpy array for all types.""" | 105 | | - for dtype in [int, int8, int16, int32, int64, float, float16, float32, float64, float128]: | | 105 | + for dtype in [int, int8, int16, int32, int64, float, float16, float32, float64, longdouble]: | 106 | 106 | num = np.array([1, 2], dtype=dtype) | 107 | 107 | num_ = _clean_part(num) | 108 | 108 |
| @@ -112,7 +112,7 @@ def test_clean_part_all_np_array_types2(self): | 112 | 112 |
| 113 | 113 | def test_clean_part_list_all_types(self): | 114 | 114 | """Test list of a single value for all data types.""" | 115 | | - for dtype in [int, int8, int16, int32, int64, float, float16, float32, float64, float128]: | | 115 | + for dtype in [int, int8, int16, int32, int64, float, float16, float32, float64, longdouble]: | 116 | 116 | num = [dtype(1)] | 117 | 117 | num_ = _clean_part(num) | 118 | 118 | assert isinstance(num_, list) | @@ -121,7 +121,7 @@ def test_clean_part_list_all_types(self): | 121 | 121 |
| 122 | 122 | def test_clean_part_list_all_types2(self): | 123 | 123 | """List of list of numbers of all data types.""" | 124 | | - for dtype in [int, int8, int16, int32, int64, float, float16, float32, float64, float128]: | | 124 | + for dtype in [int, int8, int16, int32, int64, float, float16, float32, float64, longdouble]: | 125 | 125 | num = [dtype(1), dtype(2)] | 126 | 126 | num_ = _clean_part(num) | 127 | 127 | assert isinstance(num_, list) | @@ -130,7 +130,7 @@ def test_clean_part_list_all_types2(self): | 130 | 130 |
| 131 | 131 | def test_clean_part_tuple_all_types(self): | 132 | 132 | """Test tuple of a single value for all data types.""" | 133 | | - for dtype in [int, int8, int16, int32, int64, float, float16, float32, float64, float128]: | | 133 | + for dtype in [int, int8, int16, int32, int64, float, float16, float32, float64, longdouble]: | 134 | 134 | num = (dtype(1),) | 135 | 135 | num_ = _clean_part(num) | 136 | 136 | assert isinstance(num_, list) | @@ -139,7 +139,7 @@ def test_clean_part_tuple_all_types(self): | 139 | 139 |
| 140 | 140 | def test_clean_part_tuple_all_types2(self): | 141 | 141 | """Test tuple of a single value for all data types.""" | 142 | | - for dtype in [int, int8, int16, int32, int64, float, float16, float32, float64, float128]: | | 142 | + for dtype in [int, int8, int16, int32, int64, float, float16, float32, float64, longdouble]: | 143 | 143 | num = (dtype(1), dtype(2)) | 144 | 144 | num_ = _clean_part(num) | 145 | 145 | assert isinstance(num_, list) | @@ -184,7 +184,7 @@ def test_clean_part_list_list_list_floats(self): | 184 | 184 |
| 185 | 185 | def test_clean_part_list_list_array(self): | 186 | 186 | """List of list of numpy arrays for all valid types.""" | 187 | | - for dtype in int, int8, int16, int32, int64, float, float16, float32, float64, float128: | | 187 | + for dtype in int, int8, int16, int32, int64, float, float16, float32, float64, longdouble: | 188 | 188 | num = [[array([1, 1], dtype=dtype), array([2, 2], dtype=dtype)]] | 189 | 189 | num_ = _clean_part(num) | 190 | 190 |
| @@ -195,7 +195,7 @@ def test_clean_part_list_list_array(self): | 195 | 195 |
| 196 | 196 | def test_clean_part_tuple_list_array(self): | 197 | 197 | """Tuple of list of numpy arrays for all valid types.""" | 198 | | - for dtype in int, int8, int16, int32, int64, float, float16, float32, float64, float128: | | 198 | + for dtype in int, int8, int16, int32, int64, float, float16, float32, float64, longdouble: | 199 | 199 | num = ([array([1, 1], dtype=dtype), array([2, 2], dtype=dtype)],) | 200 | 200 | num_ = _clean_part(num) | 201 | 201 |
| @@ -206,7 +206,7 @@ def test_clean_part_tuple_list_array(self): | 206 | 206 |
| 207 | 207 | def test_clean_part_list_tuple_array(self): | 208 | 208 | """List of tuple of numpy array for all valid types.""" | 209 | | - for dtype in int, int8, int16, int32, int64, float, float16, float32, float64, float128: | | 209 | + for dtype in int, int8, int16, int32, int64, float, float16, float32, float64, longdouble: | 210 | 210 | num = [(array([1, 1], dtype=dtype), array([2, 2], dtype=dtype))] | 211 | 211 | num_ = _clean_part(num) | 212 | 212 |
| @@ -217,7 +217,7 @@ def test_clean_part_list_tuple_array(self): | 217 | 217 |
| 218 | 218 | def test_clean_part_tuple_tuples_arrays(self): | 219 | 219 | """Tuple of tuples of numpy arrays for all valid types.""" | 220 | | - for dtype in int, int8, int16, int32, int64, float, float16, float32, float64, float128: | | 220 | + for dtype in int, int8, int16, int32, int64, float, float16, float32, float64, longdouble: | 221 | 221 | num = ((array([1, 1], dtype=dtype), array([2, 2], dtype=dtype)), | 222 | 222 | (array([3, 4], dtype=dtype), array([4, 4], dtype=dtype))) | 223 | 223 | num_ = _clean_part(num) | @@ -229,7 +229,7 @@ def test_clean_part_tuple_tuples_arrays(self): | 229 | 229 |
| 230 | 230 | def test_clean_part_list_tuples_arrays(self): | 231 | 231 | """List of tuples of numpy arrays for all valid types.""" | 232 | | - for dtype in int, int8, int16, int32, int64, float, float16, float32, float64, float128: | | 232 | + for dtype in int, int8, int16, int32, int64, float, float16, float32, float64, longdouble: | 233 | 233 | num = [(array([1, 1], dtype=dtype), array([2, 2], dtype=dtype)), | 234 | 234 | (array([3, 4], dtype=dtype), array([4, 4], dtype=dtype))] | 235 | 235 | num_ = _clean_part(num) | @@ -241,7 +241,7 @@ def test_clean_part_list_tuples_arrays(self): | 241 | 241 |
| 242 | 242 | def test_clean_part_list_list_arrays(self): | 243 | 243 | """List of list of numpy arrays for all valid types.""" | 244 | | - for dtype in int, int8, int16, int32, int64, float, float16, float32, float64, float128: | | 244 | + for dtype in int, int8, int16, int32, int64, float, float16, float32, float64, longdouble: | 245 | 245 | num = [[array([1, 1], dtype=dtype), array([2, 2], dtype=dtype)], | 246 | 246 | [array([3, 3], dtype=dtype), array([4, 4], dtype=dtype)]] | 247 | 247 | num_ = _clean_part(num) | |
|