forked from SciSharp/NumSharp
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathnp.modf.cs
More file actions
30 lines (28 loc) · 1.55 KB
/
np.modf.cs
File metadata and controls
30 lines (28 loc) · 1.55 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
using System;
using NumSharp.Backends;
namespace NumSharp
{
public static partial class np
{
/// <summary>
/// Return the fractional and integral parts of an array, element-wise.
/// The fractional and integral parts are negative if the given number is negative.
/// </summary>
/// <param name="x">Input array.</param>
/// <param name="outType">The dtype the returned ndarray should be of, only non integer values are supported.</param>
/// <returns>Fractional part of x. This is a scalar if x is a scalar.</returns>
/// <remarks>https://docs.scipy.org/doc/numpy/reference/generated/numpy.modf.html</remarks>
public static (NDArray Fractional, NDArray Intergral) modf(in NDArray x, NPTypeCode? outType = null)
=> x.TensorEngine.ModF(x, outType);
/// <summary>
/// Return the fractional and integral parts of an array, element-wise.
/// The fractional and integral parts are negative if the given number is negative.
/// </summary>
/// <param name="x">Input array.</param>
/// <param name="outType">The dtype the returned ndarray should be of, only non integer values are supported.</param>
/// <returns>Fractional part of x. This is a scalar if x is a scalar.</returns>
/// <remarks>https://docs.scipy.org/doc/numpy/reference/generated/numpy.modf.html</remarks>
public static (NDArray Fractional, NDArray Intergral) modf(in NDArray x, Type outType)
=> x.TensorEngine.ModF(x, outType);
}
}