Skip to content

Commit 662e52e

Browse files
authored
Merge pull request #317 from roryyorke/master
Use numpy.longdouble instead of numpy.float128 in testing
2 parents 089936f + e1e319f commit 662e52e

File tree

1 file changed

+14
-14
lines changed

1 file changed

+14
-14
lines changed

control/tests/xferfcn_input_test.py

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
import numpy as np
88

99
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
1111
from numpy import all, ndarray, array
1212

1313
from control.xferfcn import _clean_part
@@ -73,7 +73,7 @@ def test_clean_part_tuple(self):
7373

7474
def test_clean_part_all_scalar_types(self):
7575
"""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]:
7777
num = dtype(1)
7878
num_ = _clean_part(num)
7979

@@ -92,7 +92,7 @@ def test_clean_part_np_array(self):
9292

9393
def test_clean_part_all_np_array_types(self):
9494
"""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]:
9696
num = np.array(1, dtype=dtype)
9797
num_ = _clean_part(num)
9898

@@ -102,7 +102,7 @@ def test_clean_part_all_np_array_types(self):
102102

103103
def test_clean_part_all_np_array_types2(self):
104104
"""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]:
106106
num = np.array([1, 2], dtype=dtype)
107107
num_ = _clean_part(num)
108108

@@ -112,7 +112,7 @@ def test_clean_part_all_np_array_types2(self):
112112

113113
def test_clean_part_list_all_types(self):
114114
"""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]:
116116
num = [dtype(1)]
117117
num_ = _clean_part(num)
118118
assert isinstance(num_, list)
@@ -121,7 +121,7 @@ def test_clean_part_list_all_types(self):
121121

122122
def test_clean_part_list_all_types2(self):
123123
"""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]:
125125
num = [dtype(1), dtype(2)]
126126
num_ = _clean_part(num)
127127
assert isinstance(num_, list)
@@ -130,7 +130,7 @@ def test_clean_part_list_all_types2(self):
130130

131131
def test_clean_part_tuple_all_types(self):
132132
"""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]:
134134
num = (dtype(1),)
135135
num_ = _clean_part(num)
136136
assert isinstance(num_, list)
@@ -139,7 +139,7 @@ def test_clean_part_tuple_all_types(self):
139139

140140
def test_clean_part_tuple_all_types2(self):
141141
"""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]:
143143
num = (dtype(1), dtype(2))
144144
num_ = _clean_part(num)
145145
assert isinstance(num_, list)
@@ -184,7 +184,7 @@ def test_clean_part_list_list_list_floats(self):
184184

185185
def test_clean_part_list_list_array(self):
186186
"""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:
188188
num = [[array([1, 1], dtype=dtype), array([2, 2], dtype=dtype)]]
189189
num_ = _clean_part(num)
190190

@@ -195,7 +195,7 @@ def test_clean_part_list_list_array(self):
195195

196196
def test_clean_part_tuple_list_array(self):
197197
"""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:
199199
num = ([array([1, 1], dtype=dtype), array([2, 2], dtype=dtype)],)
200200
num_ = _clean_part(num)
201201

@@ -206,7 +206,7 @@ def test_clean_part_tuple_list_array(self):
206206

207207
def test_clean_part_list_tuple_array(self):
208208
"""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:
210210
num = [(array([1, 1], dtype=dtype), array([2, 2], dtype=dtype))]
211211
num_ = _clean_part(num)
212212

@@ -217,7 +217,7 @@ def test_clean_part_list_tuple_array(self):
217217

218218
def test_clean_part_tuple_tuples_arrays(self):
219219
"""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:
221221
num = ((array([1, 1], dtype=dtype), array([2, 2], dtype=dtype)),
222222
(array([3, 4], dtype=dtype), array([4, 4], dtype=dtype)))
223223
num_ = _clean_part(num)
@@ -229,7 +229,7 @@ def test_clean_part_tuple_tuples_arrays(self):
229229

230230
def test_clean_part_list_tuples_arrays(self):
231231
"""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:
233233
num = [(array([1, 1], dtype=dtype), array([2, 2], dtype=dtype)),
234234
(array([3, 4], dtype=dtype), array([4, 4], dtype=dtype))]
235235
num_ = _clean_part(num)
@@ -241,7 +241,7 @@ def test_clean_part_list_tuples_arrays(self):
241241

242242
def test_clean_part_list_list_arrays(self):
243243
"""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:
245245
num = [[array([1, 1], dtype=dtype), array([2, 2], dtype=dtype)],
246246
[array([3, 3], dtype=dtype), array([4, 4], dtype=dtype)]]
247247
num_ = _clean_part(num)

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy