forked from SciSharp/Numpy.NET
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathnp.linspace.cs
More file actions
117 lines (113 loc) · 4.83 KB
/
np.linspace.cs
File metadata and controls
117 lines (113 loc) · 4.83 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
117
using System;
using System.Collections.Generic;
using System.Text;
using Numpy.Models;
namespace Numpy
{
public static partial class np
{
/// <summary>
/// Return evenly spaced numbers over a specified interval.<br></br>
///
/// Returns num evenly spaced samples, calculated over the
/// interval [start, stop].<br></br>
///
/// The endpoint of the interval can optionally be excluded.
/// </summary>
/// <param name="start">
/// The starting value of the sequence.
/// </param>
/// <param name="stop">
/// The end value of the sequence, unless endpoint is set to False.<br></br>
///
/// In that case, the sequence consists of all but the last of num + 1
/// evenly spaced samples, so that stop is excluded.<br></br>
/// Note that the step
/// size changes when endpoint is False.
/// </param>
/// <param name="step">Returns the step which is the spacing
/// between samples.
/// </param>
/// <param name="num">
/// Number of samples to generate.<br></br>
/// Default is 50. Must be non-negative.
/// </param>
/// <param name="endpoint">
/// If True, stop is the last sample.<br></br>
/// Otherwise, it is not included.<br></br>
///
/// Default is True.
/// </param>
/// <param name="dtype">
/// The type of the output array.<br></br>
/// If dtype is not given, infer the data
/// type from the other input arguments.
/// </param>
/// <param name="axis">
/// The axis in the result to store the samples.<br></br>
/// Relevant only if start
/// or stop are array-like.<br></br>
/// By default (0), the samples will be along a
/// new axis inserted at the beginning.<br></br>
/// Use -1 to get an axis at the end.
/// </param>
/// <returns>
/// There are num equally spaced samples in the closed interval
/// [start, stop] or the half-open interval [start, stop)
/// </returns>
public static NDarray linspace(NDarray start, NDarray stop, out float step, int num = 50, bool endpoint = true,
Dtype dtype = null, int? axis = 0)
=> NumPy.Instance.linspace(start, stop, out step, num, endpoint, dtype, axis);
/// <summary>
/// Return evenly spaced numbers over a specified interval.<br></br>
///
/// Returns num evenly spaced samples, calculated over the
/// interval [start, stop].<br></br>
///
/// The endpoint of the interval can optionally be excluded.
/// </summary>
/// <param name="start">
/// The starting value of the sequence.
/// </param>
/// <param name="stop">
/// The end value of the sequence, unless endpoint is set to False.<br></br>
///
/// In that case, the sequence consists of all but the last of num + 1
/// evenly spaced samples, so that stop is excluded.<br></br>
/// Note that the step
/// size changes when endpoint is False.
/// </param>
/// <param name="step">Returns the step which is the spacing
/// between samples.
/// </param>
/// <param name="num">
/// Number of samples to generate.<br></br>
/// Default is 50. Must be non-negative.
/// </param>
/// <param name="endpoint">
/// If True, stop is the last sample.<br></br>
/// Otherwise, it is not included.<br></br>
///
/// Default is True.
/// </param>
/// <param name="dtype">
/// The type of the output array.<br></br>
/// If dtype is not given, infer the data
/// type from the other input arguments.
/// </param>
/// <param name="axis">
/// The axis in the result to store the samples.<br></br>
/// Relevant only if start
/// or stop are array-like.<br></br>
/// By default (0), the samples will be along a
/// new axis inserted at the beginning.<br></br>
/// Use -1 to get an axis at the end.
/// </param>
/// <returns>
/// There are num equally spaced samples in the closed interval
/// [start, stop] or the half-open interval [start, stop)
/// </returns>
public static NDarray linspace(double start, double stop, out float step, int num = 50, bool endpoint = true, Dtype dtype = null, int? axis = 0)
=> NumPy.Instance.linspace(start, stop, out step, num, endpoint, dtype, axis);
}
}