forked from SciSharp/NumSharp
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathnumpy.arange.cs
More file actions
41 lines (34 loc) · 955 Bytes
/
numpy.arange.cs
File metadata and controls
41 lines (34 loc) · 955 Bytes
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 NumSharp;
using System.Linq;
using System.Collections.Generic;
public static partial class numpy
{
public static dynamic arange(object stop)
{
return numpy.arange(0,stop,1);
}
public static dynamic arange(object start, object stop, object step)
{
dynamic returnValue = null;
switch (start)
{
case int startCast :
{
int stopCast = (int) stop;
int stepCast = (int) step;
returnValue = np.arange(stopCast,startCast,stepCast);
break;
}
case float startCast_ :
{
int startCast = (int) start;
int stopCast = (int) stop;
int stepCast = (int) step;
returnValue = np.arange(stopCast,startCast,stepCast);
break;
}
}
return returnValue;
}
}