forked from SciSharp/NumSharp
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDataSample.cs
More file actions
41 lines (36 loc) · 1.16 KB
/
DataSample.cs
File metadata and controls
41 lines (36 loc) · 1.16 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
using System;
using System.Collections.Generic;
using System.Text;
namespace NumSharp.UnitTest
{
public class DataSample
{
/// <summary>
/// shape(2, 3, 2, 2)
/// </summary>
public static int[,,,] Int32D2x3x2x2
=> new int[,,,] {{{{1, 3}, {2, 2}}, {{1, 2}, {3, 3}}, {{3, 2}, {2, 1}},}, {{{2, 1}, {2, 3}}, {{3, 2}, {3, 1}}, {{3, 2}, {1, 2}},}};
/// <summary>
/// shape(4, 3, 2)
/// </summary>
public static int[,,] Int32D4x3x2
=> new int[,,] {{{1, 3}, {2, 1}}, {{2, 1}, {2, 3}}, {{1, 1}, {2, 2}}, {{3, 1}, {1, 2}}};
/// <summary>
/// shape(4, 3)
/// </summary>
public static int[,] Int32D4x3
=> new int[,] {{3, 2, 1}, {1, 2, 1}, {1, 2, 3}, {2, 3, 1}};
/// <summary>
/// shape(12)
/// </summary>
/// <returns></returns>
public static int[] Int32D12
=> new int[] {1, 2, 1, 3, 2, 1, 1, 2, 3, 2, 3, 2};
/// <summary>
/// shape(2, 2)
/// </summary>
/// <returns></returns>
public static int[,] Int32D2x2
=> new int[,] {{1, 2}, {2, 3}};
}
}