Skip to content

Commit a61598c

Browse files
committed
simplified internal structure (no changes to the public API)
1 parent 609f9ab commit a61598c

File tree

129 files changed

+22548
-64957
lines changed

Some content is hidden

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

129 files changed

+22548
-64957
lines changed

src/Examples/MatmulExample/MatmulExample.csproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
</PropertyGroup>
77

88
<ItemGroup>
9-
<PackageReference Include="Numpy" Version="1.0.0" />
9+
<PackageReference Include="Numpy" Version="3.7.1.4" />
1010
</ItemGroup>
1111

1212
</Project>

src/Examples/MatmulExample/Program.cs

Lines changed: 25 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -10,40 +10,40 @@ class Program
1010
{
1111
static void Main(string[] args)
1212
{
13-
Console.WriteLine("Efficient matrix multiplication with NumPy:");
14-
// before starting the measurement, let us call numpy once to get the setup checks done.
15-
var stopwatch = Stopwatch.StartNew();
16-
np.arange(1);
13+
Console.WriteLine("Efficient matrix multiplication with NumPy:");
14+
// before starting the measurement, let us call numpy once to get the setup checks done.
15+
np.arange(1);
16+
var stopwatch = Stopwatch.StartNew();
1717

18-
var a1 = np.arange(60000).reshape(300, 200);
19-
var a2 = np.arange(80000).reshape(200, 400);
18+
var a1 = np.arange(60000).reshape(300, 200);
19+
var a2 = np.arange(80000).reshape(200, 400);
2020

21-
var result = np.matmul(a1, a2);
22-
stopwatch.Stop();
21+
var result = np.matmul(a1, a2);
22+
stopwatch.Stop();
2323

24-
Console.WriteLine($"execution time with NumPy: {stopwatch.Elapsed.TotalMilliseconds}ms\n");
25-
Console.WriteLine("Result:\n" + result.repr);
24+
Console.WriteLine($"execution time with NumPy: {stopwatch.Elapsed.TotalMilliseconds}ms\n");
25+
Console.WriteLine("Result:\n" + result.repr);
2626

2727

28-
Console.WriteLine("executing on bg thread");
28+
Console.WriteLine("executing on bg thread");
2929

30-
var a = np.arange(1000);
31-
var b = np.arange(1000);
30+
var a = np.arange(1000);
31+
var b = np.arange(1000);
3232

33-
// https://github.com/pythonnet/pythonnet/issues/109
34-
PythonEngine.BeginAllowThreads();
33+
// https://github.com/pythonnet/pythonnet/issues/109
34+
PythonEngine.BeginAllowThreads();
3535

36-
Task.Run(() =>
37-
{
38-
using (Py.GIL())
39-
{
40-
np.matmul(a, b);
41-
Console.WriteLine("matmul on bg thread is done");
42-
}
43-
}).Wait();
44-
Console.WriteLine("Press key");
36+
Task.Run(() =>
37+
{
38+
using (Py.GIL())
39+
{
40+
np.matmul(a, b);
41+
Console.WriteLine("matmul on bg thread is done");
42+
}
43+
}).Wait();
44+
Console.WriteLine("Press key");
4545

46-
Console.ReadKey();
46+
Console.ReadKey();
4747
}
4848
}
4949
}

src/Numpy.Bare/Manual/NumPy.array.cs

Lines changed: 0 additions & 147 deletions
This file was deleted.

src/Numpy.Bare/Manual/NumPy.linalg.norm.cs

Lines changed: 0 additions & 108 deletions
This file was deleted.

0 commit comments

Comments
 (0)