Skip to content

Commit a91d5d6

Browse files
committed
Correct the mismatch in the error name
1 parent 9e5975f commit a91d5d6

File tree

1 file changed

+7
-7
lines changed

1 file changed

+7
-7
lines changed

scipy/signal/signaltools.py

+7-7
Original file line numberDiff line numberDiff line change
@@ -1299,12 +1299,12 @@ def convolve(in1, in2, mode='full', method='auto'):
12991299

13001300
def order_filter(a, domain, rank):
13011301
"""
1302-
Perform an order filter on an N-dimensional array.
1302+
Perform an order filter on an N-D array.
13031303
1304-
Perform an order filter on the array in. The domain argument acts as a
1305-
mask centered over each pixel. The non-zero elements of domain are
1304+
Perform an order filter on the array in. The domain argument acts as a
1305+
mask centered over each pixel. The non-zero elements of domain are
13061306
used to select elements surrounding each input pixel which are placed
1307-
in a list. The list is sorted, and the output for that pixel is the
1307+
in a list. The list is sorted, and the output for that pixel is the
13081308
element corresponding to rank in the sorted list.
13091309
13101310
Parameters
@@ -1538,7 +1538,7 @@ def convolve2d(in1, in2, mode='full', boundary='fill', fillvalue=0):
15381538
in2 = np.asarray(in2)
15391539

15401540
if not in1.ndim == in2.ndim == 2:
1541-
raise ValueError('convolve2d inputs must both be 2D arrays')
1541+
raise ValueError('convolve2d inputs must both be 2-D arrays')
15421542

15431543
if _inputs_swap_needed(mode, in1.shape, in2.shape):
15441544
in1, in2 = in2, in1
@@ -1628,7 +1628,7 @@ def correlate2d(in1, in2, mode='full', boundary='fill', fillvalue=0):
16281628
in2 = np.asarray(in2)
16291629

16301630
if not in1.ndim == in2.ndim == 2:
1631-
raise ValueError('correlate2d inputs must both be 2D arrays')
1631+
raise ValueError('correlate2d inputs must both be 2-D arrays')
16321632

16331633
swapped_inputs = _inputs_swap_needed(mode, in1.shape, in2.shape)
16341634
if swapped_inputs:
@@ -3924,7 +3924,7 @@ def _validate_pad(padtype, padlen, x, axis, ntaps):
39243924
def _validate_x(x):
39253925
x = np.asarray(x)
39263926
if x.ndim == 0:
3927-
raise ValueError('x must be at least 1D')
3927+
raise ValueError('x must be at least 1-D')
39283928
return x
39293929

39303930

0 commit comments

Comments
 (0)