Skip to content

Commit 8cae892

Browse files
committed
rename NumPy to np in all projects.
1 parent ffe9b58 commit 8cae892

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

69 files changed

+45
-81
lines changed

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

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ public NDArray hstack(params NDArray[] nps)
2626
else
2727
npAll[idx+1] = nps[idx];
2828

29-
NDArray np = new NDArray();
29+
NDArray nd = new NDArray();
3030

3131
// easy 1D case
3232
if (this.ndim == 1)
@@ -35,7 +35,7 @@ public NDArray hstack(params NDArray[] nps)
3535
for (int idx = 0; idx < npAll.Length;idx++)
3636
list1D.AddRange(npAll[idx].Storage.GetData<object>().ToList());
3737

38-
np = NumPy.array(list1D.ToArray(),this.dtype);
38+
nd = np.array(list1D.ToArray(),this.dtype);
3939
}
4040
else
4141
{
@@ -54,7 +54,7 @@ public NDArray hstack(params NDArray[] nps)
5454
}
5555
}
5656

57-
np.Storage.SetData( list.ToArray());
57+
nd.Storage.SetData( list.ToArray());
5858

5959
int[] shapes = npAll[0].shape.Shapes.ToArray();
6060

@@ -63,12 +63,12 @@ public NDArray hstack(params NDArray[] nps)
6363
else
6464
shapes[1] *= npAll.Length;
6565

66-
np.Storage.Shape = new Shape(shapes);
66+
nd.Storage.Shape = new Shape(shapes);
6767

6868

6969
}
7070

71-
return np;
71+
return nd;
7272
}
7373
}
7474
}

src/NumSharp.Core/Creation/NumPy.arange.cs renamed to src/NumSharp.Core/Creation/np.arange.cs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,11 +4,10 @@
44
using System.Linq;
55
using System.Numerics;
66
using System.Text;
7-
using np = NumSharp.Core.NumPy;
87

98
namespace NumSharp.Core
109
{
11-
public static partial class NumPy
10+
public static partial class np
1211
{
1312
public static NDArray arange(double stop)
1413
{

src/NumSharp.Core/Creation/NumPy.array.cs renamed to src/NumSharp.Core/Creation/np.array.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77

88
namespace NumSharp.Core
99
{
10-
public static partial class NumPy
10+
public static partial class np
1111
{
1212
public static NDArray array(Array array, Type dtype = null, int ndim = 1)
1313
{

src/NumSharp.Core/Creation/NumPy.asarray.cs renamed to src/NumSharp.Core/Creation/np.asarray.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77

88
namespace NumSharp.Core
99
{
10-
public static partial class NumPy
10+
public static partial class np
1111
{
1212
public static NDArray asarray(double[] data, int ndim = 1)
1313
{

src/NumSharp.Core/Creation/NumPy.asmatrix.cs renamed to src/NumSharp.Core/Creation/np.asmatrix.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55

66
namespace NumSharp.Core
77
{
8-
public static partial class NumPy
8+
public static partial class np
99
{
1010
public static matrix asmatrix(NDArray nd)
1111
{

src/NumSharp.Core/Creation/NumPy.hstack.cs renamed to src/NumSharp.Core/Creation/np.hstack.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55

66
namespace NumSharp.Core
77
{
8-
public static partial class NumPy
8+
public static partial class np
99
{
1010
public static NDArray hstack(params NDArray[] nps)
1111
{

src/NumSharp.Core/Creation/NumPy.linspace.cs renamed to src/NumSharp.Core/Creation/np.linspace.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55

66
namespace NumSharp.Core
77
{
8-
public static partial class NumPy
8+
public static partial class np
99
{
1010
public static NDArray linspace(double start, double stop, int num, bool entdpoint = true, Type dtype = null)
1111
{

src/NumSharp.Core/Creation/NumPy.ones.cs renamed to src/NumSharp.Core/Creation/np.ones.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77

88
namespace NumSharp.Core
99
{
10-
public static partial class NumPy
10+
public static partial class np
1111
{
1212
public static NDArray ones(params int[] shapes)
1313
{

src/NumSharp.Core/Creation/NumPy.ones_like.cs renamed to src/NumSharp.Core/Creation/np.ones_like.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,11 +5,11 @@
55

66
namespace NumSharp.Core
77
{
8-
public static partial class NumPy
8+
public static partial class np
99
{
1010
public static NDArray ones_like(NDArray nd, string order = "C")
1111
{
12-
return NumPy.ones(new Shape(nd.shape.Shapes));
12+
return np.ones(new Shape(nd.shape.Shapes));
1313
}
1414
}
1515
}

src/NumSharp.Core/Creation/NumPy.vstack.cs renamed to src/NumSharp.Core/Creation/np.vstack.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55

66
namespace NumSharp.Core
77
{
8-
public static partial class NumPy
8+
public static partial class np
99
{
1010
public static NDArray vstack(params NDArray[] nps)
1111
{

0 commit comments

Comments
 (0)