Skip to content

Commit 8a0115a

Browse files
committed
Added new Slicing example (.net5)
1 parent d1265cc commit 8a0115a

File tree

3 files changed

+37
-1
lines changed

3 files changed

+37
-1
lines changed

Numpy.NET.sln

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,9 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Numpy.Bare.Dotnet", "src\Nu
3333
EndProject
3434
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "WebApiExample_netcore3.1", "src\Examples\WebApiExample_netcore3.1\WebApiExample_netcore3.1.csproj", "{53C73261-DD84-47D1-A9BA-E553D34FF0A3}"
3535
EndProject
36-
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "CustomInstallLocationExample", "src\Examples\CustomInstallLocationExample\CustomInstallLocationExample.csproj", "{BB0A367A-8A36-454F-9F92-2FD6DA665A39}"
36+
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "CustomInstallLocationExample", "src\Examples\CustomInstallLocationExample\CustomInstallLocationExample.csproj", "{BB0A367A-8A36-454F-9F92-2FD6DA665A39}"
37+
EndProject
38+
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "SlicingExample", "src\Examples\SlicingExample\SlicingExample.csproj", "{FB116716-8C1F-4926-86F9-03AE46C7FA58}"
3739
EndProject
3840
Global
3941
GlobalSection(SolutionConfigurationPlatforms) = preSolution
@@ -101,6 +103,10 @@ Global
101103
{BB0A367A-8A36-454F-9F92-2FD6DA665A39}.Debug|Any CPU.Build.0 = Debug|Any CPU
102104
{BB0A367A-8A36-454F-9F92-2FD6DA665A39}.Release|Any CPU.ActiveCfg = Release|Any CPU
103105
{BB0A367A-8A36-454F-9F92-2FD6DA665A39}.Release|Any CPU.Build.0 = Release|Any CPU
106+
{FB116716-8C1F-4926-86F9-03AE46C7FA58}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
107+
{FB116716-8C1F-4926-86F9-03AE46C7FA58}.Debug|Any CPU.Build.0 = Debug|Any CPU
108+
{FB116716-8C1F-4926-86F9-03AE46C7FA58}.Release|Any CPU.ActiveCfg = Release|Any CPU
109+
{FB116716-8C1F-4926-86F9-03AE46C7FA58}.Release|Any CPU.Build.0 = Release|Any CPU
104110
EndGlobalSection
105111
GlobalSection(SolutionProperties) = preSolution
106112
HideSolutionNode = FALSE
@@ -112,6 +118,7 @@ Global
112118
{84BCB8CA-6B29-48D8-BEEE-751C7547419E} = {25D84E98-E107-45C9-A0EC-0B25E24DA607}
113119
{53C73261-DD84-47D1-A9BA-E553D34FF0A3} = {25D84E98-E107-45C9-A0EC-0B25E24DA607}
114120
{BB0A367A-8A36-454F-9F92-2FD6DA665A39} = {25D84E98-E107-45C9-A0EC-0B25E24DA607}
121+
{FB116716-8C1F-4926-86F9-03AE46C7FA58} = {25D84E98-E107-45C9-A0EC-0B25E24DA607}
115122
EndGlobalSection
116123
GlobalSection(ExtensibilityGlobals) = postSolution
117124
SolutionGuid = {5EB08541-5168-443C-B524-A5CB7E7C613D}
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
using System;
2+
using Numpy;
3+
4+
namespace SlicingExample
5+
{
6+
class Program
7+
{
8+
static void Main(string[] args)
9+
{
10+
var a = np.arange(20).reshape(4,5);
11+
Console.WriteLine(a);
12+
var b = a["2:4"];
13+
Console.WriteLine("\n sliced with 2:4");
14+
Console.WriteLine(b );
15+
}
16+
}
17+
}
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
<Project Sdk="Microsoft.NET.Sdk">
2+
3+
<PropertyGroup>
4+
<OutputType>Exe</OutputType>
5+
<TargetFramework>net5.0</TargetFramework>
6+
</PropertyGroup>
7+
8+
<ItemGroup>
9+
<PackageReference Include="Numpy" Version="3.10.1.30" />
10+
</ItemGroup>
11+
12+
</Project>

0 commit comments

Comments
 (0)