Skip to content

Commit b8acc71

Browse files
committed
add NumSharp
1 parent b72475e commit b8acc71

File tree

7 files changed

+11
-11
lines changed

7 files changed

+11
-11
lines changed

src/NumSharp.Core/Creation/NumPy.array.cs

+1-1
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ public static NDArray<T> array<T>(this NumPy<T> np, IEnumerable<T> array, int nd
2020

2121
public static NDArray<Byte> array<T>(this NumPy<T> np, System.Drawing.Bitmap image )
2222
{
23-
NDArray<Byte> imageArray = new NDArray<byte>();
23+
NDArray<Byte> imageArray = new NDArray<Byte>();
2424

2525
var bmpd = image.LockBits(new System.Drawing.Rectangle(0, 0, image.Width, image.Height), System.Drawing.Imaging.ImageLockMode.ReadOnly, image.PixelFormat);
2626
var dataSize = bmpd.Stride * bmpd.Height;

src/NumSharp.Core/Extensions/NdArray.HStack.cs

+1-1
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ public static NDArray<T> HStack<T>(this NDArray<T> np1, params NDArray<T>[] nps)
3030
//Enumerable.Range(0, total)
3131
// .Select(x =>
3232
// {
33-
// foreach (NDArray<T> ele in nps)
33+
// foreach (NDArrayGeneric<T> ele in nps)
3434
// {
3535
// for (int j = i * pageSize; j < (i + 1) * pageSize; j++)
3636
// list.Add(ele.Data[j]);

src/NumSharp.Core/NumPyWithDType.cs src/NumSharp.Core/NumSharp.cs

+4-4
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44

55
namespace NumSharp.Core
66
{
7-
public class NumPyWithDType
7+
public class NumSharp
88
{
99
public static Type int16 = typeof(short);
1010
public static Type double8 = typeof(double);
@@ -14,7 +14,7 @@ public NDArrayWithDType arange(int stop, Type dtype = null)
1414
{
1515
if(dtype == null)
1616
{
17-
dtype = NumPyWithDType.int16;
17+
dtype = NumSharp.int16;
1818
}
1919

2020
return arange(0, stop, 1, dtype);
@@ -31,14 +31,14 @@ public NDArrayWithDType arange(int start, int stop, int step = 1, Type dtype = n
3131
{
3232
case "Int32":
3333
{
34-
var n = new NDArrayWithDType(NumPyWithDType.int16);
34+
var n = new NDArrayWithDType(NumSharp.int16);
3535
n.arange(stop, start, step);
3636
return n;
3737
}
3838

3939
case "Double":
4040
{
41-
var n = new NDArrayWithDType(NumPyWithDType.double8);
41+
var n = new NDArrayWithDType(NumSharp.double8);
4242
n.arange(stop, start, step);
4343
return n;
4444
}

test/NumSharp.Benchmark/np.amin.cs

+1-1
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ public void amin0axis()
3939
[Benchmark]
4040
public void amin0axisWithDType()
4141
{
42-
var nd2 = new NDArrayWithDType(NumPyWithDType.double8);
42+
var nd2 = new NDArrayWithDType(Core.NumSharp.double8);
4343
nd2 = nd2.arange(1000 * 8 * 8 * 8, 0, 1).reshape(1000, 8, 8, 8);
4444
var nd3 = nd2.AMin(0);
4545
}

test/NumSharp.Benchmark/np.arange.cs

+1-1
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ public void arange()
3838
[Benchmark]
3939
public void arange_ndarraywithdtype()
4040
{
41-
var nd2 = new NDArrayWithDType(NumPyWithDType.int16);
41+
var nd2 = new NDArrayWithDType(Core.NumSharp.int16);
4242
var nd3 = nd2.arange(length, start, step);
4343
}
4444

test/NumSharp.UnitTest/Creation/NdArray.ARange.Test.cs

+1-1
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ public void arange()
2828
n = np.arange(0, 11, 3);
2929
Assert.IsTrue(Enumerable.SequenceEqual(n.Data, new int[] { 0, 3, 6, 9 }));
3030

31-
var nd2 = new NDArrayWithDType(NumPyWithDType.int16);
31+
var nd2 = new NDArrayWithDType(Core.NumSharp.int16);
3232
var nd3 = nd2.arange(3);
3333
}
3434
}

test/NumSharp.UnitTest/Extensions/NDArray.AMin.Test.cs

+2-2
Original file line numberDiff line numberDiff line change
@@ -49,8 +49,8 @@ public void amin()
4949
Assert.IsTrue(n1[1, 1, 1] == 18);
5050
Assert.IsTrue(n1[1, 2, 1] == 22);
5151

52-
var np2 = new NumPyWithDType();
53-
var nd2 = np2.arange(0, 4, 1, NumPyWithDType.double8).reshape(2, 2);
52+
var np2 = new Core.NumSharp();
53+
var nd2 = np2.arange(0, 4, 1, Core.NumSharp.double8).reshape(2, 2);
5454
nd2 = nd2.AMin(0);
5555
}
5656
}

0 commit comments

Comments
 (0)