@@ -1108,27 +1108,38 @@ def pad(array, pad_width, mode=None, **kwargs):
1108
1108
mode : {str, function}
1109
1109
One of the following string values or a user supplied function.
1110
1110
1111
- 'constant' Pads with a constant value.
1112
- 'edge' Pads with the edge values of array.
1113
- 'linear_ramp' Pads with the linear ramp between end_value and the
1114
- array edge value.
1115
- 'maximum' Pads with the maximum value of all or part of the
1116
- vector along each axis.
1117
- 'mean' Pads with the mean value of all or part of the
1118
- vector along each axis.
1119
- 'median' Pads with the median value of all or part of the
1120
- vector along each axis.
1121
- 'minimum' Pads with the minimum value of all or part of the
1122
- vector along each axis.
1123
- 'reflect' Pads with the reflection of the vector mirrored on
1124
- the first and last values of the vector along each
1125
- axis.
1126
- 'symmetric' Pads with the reflection of the vector mirrored
1127
- along the edge of the array.
1128
- 'wrap' Pads with the wrap of the vector along the axis.
1129
- The first values are used to pad the end and the
1130
- end values are used to pad the beginning.
1131
- <function> Padding function, see Notes.
1111
+ 'constant'
1112
+ Pads with a constant value.
1113
+ 'edge'
1114
+ Pads with the edge values of array.
1115
+ 'linear_ramp'
1116
+ Pads with the linear ramp between end_value and the
1117
+ array edge value.
1118
+ 'maximum'
1119
+ Pads with the maximum value of all or part of the
1120
+ vector along each axis.
1121
+ 'mean'
1122
+ Pads with the mean value of all or part of the
1123
+ vector along each axis.
1124
+ 'median'
1125
+ Pads with the median value of all or part of the
1126
+ vector along each axis.
1127
+ 'minimum'
1128
+ Pads with the minimum value of all or part of the
1129
+ vector along each axis.
1130
+ 'reflect'
1131
+ Pads with the reflection of the vector mirrored on
1132
+ the first and last values of the vector along each
1133
+ axis.
1134
+ 'symmetric'
1135
+ Pads with the reflection of the vector mirrored
1136
+ along the edge of the array.
1137
+ 'wrap'
1138
+ Pads with the wrap of the vector along the axis.
1139
+ The first values are used to pad the end and the
1140
+ end values are used to pad the beginning.
1141
+ <function>
1142
+ Padding function, see Notes.
1132
1143
stat_length : {sequence, int}, optional
1133
1144
Used in 'maximum', 'mean', 'median', and 'minimum'. Number of
1134
1145
values at edge of each axis used to calculate the statistic value.
@@ -1194,7 +1205,7 @@ def pad(array, pad_width, mode=None, **kwargs):
1194
1205
1195
1206
The padding function, if used, should return a rank 1 array equal in
1196
1207
length to the vector argument with padded values replaced. It has the
1197
- following signature:
1208
+ following signature::
1198
1209
1199
1210
padding_func(vector, iaxis_pad_width, iaxis, **kwargs)
1200
1211
@@ -1275,7 +1286,6 @@ def pad(array, pad_width, mode=None, **kwargs):
1275
1286
[10, 10, 3, 4, 5, 10, 10],
1276
1287
[10, 10, 10, 10, 10, 10, 10],
1277
1288
[10, 10, 10, 10, 10, 10, 10]])
1278
-
1279
1289
"""
1280
1290
1281
1291
narray = np .array (array )
0 commit comments