forked from SciSharp/Numpy.NET
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathnp.padding.gen.cs
More file actions
116 lines (111 loc) · 4.67 KB
/
np.padding.gen.cs
File metadata and controls
116 lines (111 loc) · 4.67 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
// Copyright (c) 2019 by the SciSharp Team
// Code generated by CodeMinion: https://github.com/SciSharp/CodeMinion
using System;
using System.Collections;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Runtime.InteropServices;
using System.Text;
using Python.Runtime;
using Numpy.Models;
using Python.Included;
namespace Numpy
{
public static partial class np
{
/// <summary>
/// Pads an array.<br></br>
///
/// Notes
///
/// For an array with rank greater than 1, some of the padding of later
/// axes is calculated from padding of previous axes.<br></br>
/// This is easiest to
/// think about with a rank 2 array where the corners of the padded array
/// are calculated by using padded values from the first axis.<br></br>
///
/// The padding function, if used, should return a rank 1 array equal in
/// length to the vector argument with padded values replaced.<br></br>
/// It has the
/// following signature:
///
/// where
/// </summary>
/// <param name="array">
/// Input array
/// </param>
/// <param name="pad_width">
/// Number of values padded to the edges of each axis.<br></br>
///
/// ((before_1, after_1), … (before_N, after_N)) unique pad widths
/// for each axis.<br></br>
///
/// ((before, after),) yields same before and after pad for each axis.<br></br>
///
/// (pad,) or int is a shortcut for before = after = pad width for all
/// axes.
/// </param>
/// <param name="mode">
/// One of the following string values or a user supplied function.
/// </param>
/// <param name="stat_length">
/// Used in ‘maximum’, ‘mean’, ‘median’, and ‘minimum’. Number of
/// values at edge of each axis used to calculate the statistic value.<br></br>
///
/// ((before_1, after_1), … (before_N, after_N)) unique statistic
/// lengths for each axis.<br></br>
///
/// ((before, after),) yields same before and after statistic lengths
/// for each axis.<br></br>
///
/// (stat_length,) or int is a shortcut for before = after = statistic
/// length for all axes.<br></br>
///
/// Default is None, to use the entire axis.
/// </param>
/// <param name="constant_values">
/// Used in ‘constant’. The values to set the padded values for each
/// axis.<br></br>
///
/// ((before_1, after_1), … (before_N, after_N)) unique pad constants
/// for each axis.<br></br>
///
/// ((before, after),) yields same before and after constants for each
/// axis.<br></br>
///
/// (constant,) or int is a shortcut for before = after = constant for
/// all axes.<br></br>
///
/// Default is 0.
/// </param>
/// <param name="end_values">
/// Used in ‘linear_ramp’. The values used for the ending value of the
/// linear_ramp and that will form the edge of the padded array.<br></br>
///
/// ((before_1, after_1), … (before_N, after_N)) unique end values
/// for each axis.<br></br>
///
/// ((before, after),) yields same before and after end values for each
/// axis.<br></br>
///
/// (constant,) or int is a shortcut for before = after = end value for
/// all axes.<br></br>
///
/// Default is 0.
/// </param>
/// <param name="reflect_type">
/// Used in ‘reflect’, and ‘symmetric’. The ‘even’ style is the
/// default with an unaltered reflection around the edge value.<br></br>
/// For
/// the ‘odd’ style, the extended part of the array is created by
/// subtracting the reflected values from two times the edge value.
/// </param>
/// <returns>
/// Padded array of rank equal to array with shape increased
/// according to pad_width.
/// </returns>
public static NDarray pad(NDarray array, NDarray pad_width, string mode, int[] stat_length = null, int[] constant_values = null, int[] end_values = null, string reflect_type = null)
=> NumPy.Instance.pad(array, pad_width, mode, stat_length:stat_length, constant_values:constant_values, end_values:end_values, reflect_type:reflect_type);
}
}