Skip to content

Commit

Permalink
MNT #1206 remove commented code
Browse files Browse the repository at this point in the history
  • Loading branch information
prjemian committed Jul 31, 2024
1 parent 9df37cd commit f8827f3
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 12 deletions.
3 changes: 1 addition & 2 deletions ophyd/tests/test_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -151,12 +151,11 @@ def test_set_signal_to_None():
[[1, 2, 3], [1, 2, 3], [], None, None, True], # identical
[[1, 2, 3], [0, 0, 0], [], None, None, False], # b has different values
[[1, 2, 3], [1, 2, 3, 0], [], None, None, False], # different shape
# [[1, 2, 3, 0], [1, 2, 3], [], None, None, False], # len(a) > len(b)
# [[1, 2, 3], [1, 2, 3, 0], [], None, 1e-8, False], # raises ValueError
[5, [1, 2, 3], [], None, None, False], # not the same type
[[1, 2, 3], 5, [], None, None, False], # not the same type
# numpy arrays
[[1, 2, 3], np.array([1, 2, 3]), [], None, None, True], # identical
# [[1, 2, 3], np.array([1, 2, 3, 0]), [], None, None, True], # len(a)
# tuple
[(1, 2, 3), np.array([1, 2, 3]), [], None, None, True], # identical
# with tolerance
Expand Down
10 changes: 0 additions & 10 deletions ophyd/utils/epics_pvs.py
Original file line number Diff line number Diff line change
Expand Up @@ -338,16 +338,6 @@ def _compare_maybe_enum(a, b, enums, atol, rtol):
# then compare the strings
return a == b

# array_like = (list, np.ndarray, tuple)
# if isinstance(a, array_like) and isinstance(b, array_like):
# a = np.array(a) # target
# b = np.array(b) # reported by EPICS
# if len(a.shape) == 1 and len(b.shape) == 1 and len(a) < len(b):
# b = b[: len(a)] # cut 1-D EPICS array down to requested size

# if a.shape != b.shape:
# return False

# if either relative/absolute tolerance is used, use numpy
# to compare:
if atol is not None or rtol is not None:
Expand Down

0 comments on commit f8827f3

Please sign in to comment.