forked from SciSharp/NumSharp
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathnp.exp.cs
More file actions
82 lines (73 loc) · 4.27 KB
/
np.exp.cs
File metadata and controls
82 lines (73 loc) · 4.27 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
using System;
using NumSharp.Backends;
namespace NumSharp
{
public partial class np
{
/// <summary>
/// Base-e exponential, element-wise.
/// </summary>
/// <param name="a">Input value.</param>
/// <param name="dtype">The dtype of the returned NDArray</param>
/// <returns>The natural logarithm of x, element-wise. This is a scalar NDArray.</returns>
/// <remarks>https://docs.scipy.org/doc/numpy/reference/generated/numpy.exp.html</remarks>
public static NDArray exp(in NDArray a, Type dtype) => a.TensorEngine.Exp(a, dtype);
/// <summary>
/// Base-e exponential, element-wise.
/// </summary>
/// <param name="a">Input value.</param>
/// <param name="typeCode">The dtype of the returned NDArray</param>
/// <returns>The natural logarithm of x, element-wise. This is a scalar NDArray.</returns>
/// <remarks>https://docs.scipy.org/doc/numpy/reference/generated/numpy.exp.html</remarks>
public static NDArray exp(in NDArray a, NPTypeCode typeCode) => a.TensorEngine.Exp(a, typeCode);
/// <summary>
/// Base-e exponential, element-wise.
/// </summary>
/// <param name="a">Input value.</param>
/// <returns>The natural logarithm of x, element-wise. This is a scalar NDArray.</returns>
/// <remarks>https://docs.scipy.org/doc/numpy/reference/generated/numpy.exp.html</remarks>
public static NDArray exp(in NDArray a) => a.TensorEngine.Exp(a);
/// <summary>
/// Calculate 2**p for all p in the input array.
/// </summary>
/// <param name="a">Input value.</param>
/// <returns>Element-wise 2 to the power x. This is a scalar if x is a scalar.</returns>
/// <remarks>https://docs.scipy.org/doc/numpy/reference/generated/numpy.exp2.html</remarks>
public static NDArray exp2(in NDArray a, Type dtype) => a.TensorEngine.Exp2(a, dtype);
/// <summary>
/// Calculate 2**p for all p in the input array.
/// </summary>
/// <param name="a">Input value.</param>
/// <returns>Element-wise 2 to the power x. This is a scalar if x is a scalar.</returns>
/// <remarks>https://docs.scipy.org/doc/numpy/reference/generated/numpy.exp2.html</remarks>
public static NDArray exp2(in NDArray a, NPTypeCode typeCode) => a.TensorEngine.Exp2(a, typeCode);
/// <summary>
/// Calculate 2**p for all p in the input array.
/// </summary>
/// <param name="a">Input value.</param>
/// <returns>Element-wise 2 to the power x. This is a scalar if x is a scalar.</returns>
/// <remarks>https://docs.scipy.org/doc/numpy/reference/generated/numpy.exp2.html</remarks>
public static NDArray exp2(in NDArray a) => a.TensorEngine.Exp2(a);
/// <summary>
/// Calculate exp(x) - 1 for all elements in the array.
/// </summary>
/// <param name="a">Input value.</param>
/// <returns>Element-wise exponential minus one: out = exp(x) - 1. This is a scalar if x is a scalar.</returns>
/// <remarks>https://docs.scipy.org/doc/numpy-1.15.0/reference/generated/numpy.expm1.html</remarks>
public static NDArray expm1(in NDArray a, Type dtype) => a.TensorEngine.Expm1(a, dtype);
/// <summary>
/// Calculate exp(x) - 1 for all elements in the array.
/// </summary>
/// <param name="a">Input value.</param>
/// <returns>Element-wise exponential minus one: out = exp(x) - 1. This is a scalar if x is a scalar.</returns>
/// <remarks>https://docs.scipy.org/doc/numpy-1.15.0/reference/generated/numpy.expm1.html</remarks>
public static NDArray expm1(in NDArray a, NPTypeCode typeCode) => a.TensorEngine.Expm1(a, typeCode);
/// <summary>
/// Calculate exp(x) - 1 for all elements in the array.
/// </summary>
/// <param name="a">Input value.</param>
/// <returns>Element-wise exponential minus one: out = exp(x) - 1. This is a scalar if x is a scalar.</returns>
/// <remarks>https://docs.scipy.org/doc/numpy-1.15.0/reference/generated/numpy.expm1.html</remarks>
public static NDArray expm1(in NDArray a) => a.TensorEngine.Expm1(a);
}
}