Skip to content

Commit b03442c

Browse files
committed
remove unnecessary dependencts
v0.8.1 release
1 parent 5e5e941 commit b03442c

16 files changed

Lines changed: 155 additions & 82 deletions

File tree

src/NumSharp.Core/Casting/Implicit/NdArray.Implicit.ValueTypes.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -141,12 +141,12 @@ public static implicit operator NDArray(Complex d)
141141
return ndArray;
142142
}
143143

144-
public static implicit operator NDArray(Quaternion d)
144+
/*public static implicit operator NDArray(Quaternion d)
145145
{
146146
var ndArray = new NDArray(typeof(Quaternion),new int[0]);
147147
ndArray.Storage.SetData(new Quaternion[]{d});
148148
149149
return ndArray;
150-
}
150+
}*/
151151
}
152152
}

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -53,12 +53,12 @@ public NDArray arange(int stop, int start = 0, int step = 1)
5353
dataArray = list.Select(x => (Complex)x).ToArray();
5454
break;
5555
}
56-
case Quaternion[] dataArray:
56+
/*case Quaternion[] dataArray:
5757
{
5858
// no performance critial operation
5959
dataArray = list.Select(x => new Quaternion(new Vector3(0, 0, 0), x)).ToArray();
6060
break;
61-
}
61+
}*/
6262
default:
6363
{
6464
throw new IncorrectTypeException();

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -54,12 +54,12 @@ public NDArray linspace(double start, double stop,int num, bool entdpoint = true
5454
dataArray[idx] = (Complex)doubleArray[idx];
5555
break;
5656
}
57-
case Quaternion[] dataArray :
57+
/*case Quaternion[] dataArray :
5858
{
5959
for(int idx = 0; idx < dataArray.Length;idx++)
6060
dataArray[idx] = new Quaternion(new Vector3(0,0,0),(float)doubleArray[idx]);
6161
break;
62-
}
62+
}*/
6363
default :
6464
{
6565
throw new IncorrectTypeException();

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ public static NDArray array(Array array, Type dtype = null, int ndim = 1)
3030
return nd;
3131
}
3232

33-
public static NDArray array(System.Drawing.Bitmap image)
33+
/*public static NDArray array(System.Drawing.Bitmap image)
3434
{
3535
var imageArray = new NDArray(typeof(Byte));
3636
@@ -45,7 +45,7 @@ public static NDArray array(System.Drawing.Bitmap image)
4545
imageArray.Storage.SetData(bytes);
4646
4747
return imageArray;
48-
}
48+
}*/
4949

5050
public static NDArray array<T>(T[][] data)
5151
{

src/NumSharp.Core/LinearAlgebra/np.prod.cs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,8 @@ public static partial class np
99
public static NDArray prod(NDArray nd, int axis = -1, Type dtype = null)
1010
{
1111
NDArray result = null;
12+
if (nd.size == 0) return 1;
13+
1214
if(axis == -1)
1315
{
1416
switch (nd.dtype.Name)

src/NumSharp.Core/NDStorage.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -144,13 +144,13 @@ protected Array _ChangeTypeOfArray(Array arrayVar, Type dtype)
144144
newValues.SetValue(new System.Numerics.Complex((double)arrayVar.GetValue(idx),0),idx);
145145
break;
146146
}
147-
else if ( dtype == typeof(System.Numerics.Quaternion) )
147+
/*else if ( dtype == typeof(System.Numerics.Quaternion) )
148148
{
149149
newValues = new System.Numerics.Quaternion[arrayVar.Length];
150150
for(int idx = 0;idx < arrayVar.Length;idx++)
151151
newValues.SetValue(new System.Numerics.Quaternion(new System.Numerics.Vector3(0,0,0) , (float)arrayVar.GetValue(idx)),idx);
152152
break;
153-
}
153+
}*/
154154
else
155155
{
156156
newValues = new object[arrayVar.Length];

src/NumSharp.Core/NumSharp.Core.csproj

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -51,12 +51,6 @@
5151
<PackageReference Include="System.Memory" Version="4.5.1" />
5252
</ItemGroup>
5353

54-
<ItemGroup Condition="$([System.Text.RegularExpressions.Regex]::IsMatch('$(TargetFramework)', '^netstandard\d'))">
55-
<PackageReference Include="System.Drawing.Common" Version="4.5.1" />
56-
<PackageReference Include="Microsoft.Windows.Compatibility" Version="2.0.1" />
57-
<PackageReference Include="System.Memory" Version="4.5.2" />
58-
</ItemGroup>
59-
6054
<ItemGroup Condition="$([System.Text.RegularExpressions.Regex]::IsMatch('$(TargetFramework)', '^netcoreapp\d'))">
6155
<PackageReference Include="Microsoft.Windows.Compatibility" Version="2.0.1" />
6256
<PackageReference Include="System.Drawing.Common" Version="4.5.1" />
@@ -71,11 +65,6 @@
7165
<None Remove="Operations\NdArray.ElementsWise.tt" />
7266
</ItemGroup>
7367

74-
<ItemGroup>
75-
<PackageReference Include="Microsoft.CSharp" Version="4.5.0" />
76-
<PackageReference Include="System.Numerics.Vectors" Version="4.5.0" />
77-
</ItemGroup>
78-
7968
<Target Name="LogDebugInfo">
8069
<Message Text="Building for $(TargetFramework) on $(OS)" Importance="High" />
8170
</Target>

src/NumSharp.Core/Operations/Elementwise/NDArray.Equals.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ public partial class NDArray
6464
}
6565
break;
6666
}
67-
case Quaternion[] values :
67+
/*case Quaternion[] values :
6868
{
6969
Quaternion value = (Quaternion) obj;
7070
for(int idx =0; idx < bools.Length;idx++)
@@ -73,7 +73,7 @@ public partial class NDArray
7373
bools[idx] = true;
7474
}
7575
break;
76-
}
76+
}*/
7777
default :
7878
{
7979
throw new IncorrectTypeException();

src/NumSharp.Core/Operations/Elementwise/NDArray.NotEquals.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ public partial class NDArray
6464
}
6565
break;
6666
}
67-
case Quaternion[] values :
67+
/*case Quaternion[] values :
6868
{
6969
Quaternion value = (Quaternion) obj;
7070
for(int idx =0; idx < bools.Length;idx++)
@@ -73,7 +73,7 @@ public partial class NDArray
7373
bools[idx] = true;
7474
}
7575
break;
76-
}
76+
}*/
7777
default :
7878
{
7979
throw new IncorrectTypeException();

src/NumSharp.Core/Operations/Elementwise/NdArray.Addition.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -192,7 +192,7 @@ public partial class NDArray
192192
break;
193193
}
194194

195-
case System.Numerics.Quaternion[] resArr :
195+
/*case System.Numerics.Quaternion[] resArr :
196196
{
197197
System.Numerics.Quaternion[] np1Array = np1SysArr as System.Numerics.Quaternion[];
198198
System.Numerics.Quaternion[] np2Array = np2SysArr as System.Numerics.Quaternion[];
@@ -215,7 +215,7 @@ public partial class NDArray
215215
resArr[idx] = np1Array[idx] + scalar;
216216
}
217217
break;
218-
}
218+
}*/
219219
default :
220220
{
221221
throw new IncorrectTypeException();

0 commit comments

Comments
 (0)