diff --git a/csharp/Tensor.NET/Algebra/Dot.cs b/csharp/Tensor.NET/Algebra/Dot.cs index 01f62f0..fdb2338 100644 --- a/csharp/Tensor.NET/Algebra/Dot.cs +++ b/csharp/Tensor.NET/Algebra/Dot.cs @@ -17,7 +17,6 @@ public static Tensor Dot(this Tensor lhs, Tensor rhs) where T : stru /// /// Get the dot result of the two tensors. For the details, please refer to https://numpy.org/doc/stable/reference/generated/numpy.dot.html#numpy.dot /// - /// /// /// /// @@ -26,7 +25,6 @@ public static Tensor Dot(this Tensor lhs, Tensor rhs){ }/// /// Get the dot result of the two tensors. For the details, please refer to https://numpy.org/doc/stable/reference/generated/numpy.dot.html#numpy.dot /// - /// /// /// /// @@ -36,7 +34,6 @@ public static Tensor Dot(this Tensor lhs, Tensor rhs){ /// /// Get the dot result of the two tensors. For the details, please refer to https://numpy.org/doc/stable/reference/generated/numpy.dot.html#numpy.dot /// - /// /// /// /// @@ -46,7 +43,6 @@ public static Tensor Dot(this Tensor lhs, Tensor rhs){ /// /// Get the dot result of the two tensors. For the details, please refer to https://numpy.org/doc/stable/reference/generated/numpy.dot.html#numpy.dot /// - /// /// /// /// @@ -56,7 +52,6 @@ public static Tensor Dot(this Tensor lhs, Tensor rhs){ /// /// Get the dot result of the two tensors. For the details, please refer to https://numpy.org/doc/stable/reference/generated/numpy.dot.html#numpy.dot /// - /// /// /// /// @@ -66,7 +61,6 @@ public static Tensor Dot(this Tensor lhs, Tensor rhs){ /// /// Get the dot result of the two tensors. For the details, please refer to https://numpy.org/doc/stable/reference/generated/numpy.dot.html#numpy.dot /// - /// /// /// /// @@ -76,7 +70,6 @@ public static Tensor Dot(this Tensor lhs, Tensor rhs){ /// /// Get the dot result of the two tensors. For the details, please refer to https://numpy.org/doc/stable/reference/generated/numpy.dot.html#numpy.dot /// - /// /// /// /// @@ -86,7 +79,6 @@ public static Tensor Dot(this Tensor lhs, Tensor rhs){ /// /// Get the dot result of the two tensors. For the details, please refer to https://numpy.org/doc/stable/reference/generated/numpy.dot.html#numpy.dot /// - /// /// /// /// @@ -96,7 +88,6 @@ public static Tensor Dot(this Tensor lhs, Tensor rhs){ /// /// Get the dot result of the two tensors. For the details, please refer to https://numpy.org/doc/stable/reference/generated/numpy.dot.html#numpy.dot /// - /// /// /// /// @@ -106,7 +97,6 @@ public static Tensor Dot(this Tensor lhs, Tensor rhs){ /// /// Get the dot result of the two tensors. For the details, please refer to https://numpy.org/doc/stable/reference/generated/numpy.dot.html#numpy.dot /// - /// /// /// /// @@ -116,7 +106,6 @@ public static Tensor Dot(this Tensor lhs, Tensor rhs){ /// /// Get the dot result of the two tensors. For the details, please refer to https://numpy.org/doc/stable/reference/generated/numpy.dot.html#numpy.dot /// - /// /// /// /// @@ -126,7 +115,6 @@ public static Tensor Dot(this Tensor lhs, Tensor rhs){ /// /// Get the dot result of the two tensors. For the details, please refer to https://numpy.org/doc/stable/reference/generated/numpy.dot.html#numpy.dot /// - /// /// /// /// @@ -136,7 +124,6 @@ public static Tensor Dot(this Tensor lhs, Tensor rhs){ /// /// Get the dot result of the two tensors. For the details, please refer to https://numpy.org/doc/stable/reference/generated/numpy.dot.html#numpy.dot /// - /// /// /// /// @@ -146,7 +133,6 @@ public static Tensor Dot(this Tensor lhs, Tensor rhs){ /// /// Get the dot result of the two tensors. For the details, please refer to https://numpy.org/doc/stable/reference/generated/numpy.dot.html#numpy.dot /// - /// /// /// /// @@ -156,7 +142,6 @@ public static Tensor Dot(this Tensor lhs, Tensor rhs){ /// /// Get the dot result of the two tensors. For the details, please refer to https://numpy.org/doc/stable/reference/generated/numpy.dot.html#numpy.dot /// - /// /// /// /// @@ -166,7 +151,6 @@ public static Tensor Dot(this Tensor lhs, Tensor rhs){ /// /// Get the dot result of the two tensors. For the details, please refer to https://numpy.org/doc/stable/reference/generated/numpy.dot.html#numpy.dot /// - /// /// /// /// @@ -176,7 +160,6 @@ public static Tensor Dot(this Tensor lhs, Tensor rhs){ /// /// Get the dot result of the two tensors. For the details, please refer to https://numpy.org/doc/stable/reference/generated/numpy.dot.html#numpy.dot /// - /// /// /// /// @@ -186,7 +169,6 @@ public static Tensor Dot(this Tensor lhs, Tensor rhs){ /// /// Get the dot result of the two tensors. For the details, please refer to https://numpy.org/doc/stable/reference/generated/numpy.dot.html#numpy.dot /// - /// /// /// /// @@ -196,7 +178,6 @@ public static Tensor Dot(this Tensor lhs, Tensor rhs){ /// /// Get the dot result of the two tensors. For the details, please refer to https://numpy.org/doc/stable/reference/generated/numpy.dot.html#numpy.dot /// - /// /// /// /// @@ -206,7 +187,6 @@ public static Tensor Dot(this Tensor lhs, Tensor rhs){ /// /// Get the dot result of the two tensors. For the details, please refer to https://numpy.org/doc/stable/reference/generated/numpy.dot.html#numpy.dot /// - /// /// /// /// @@ -216,7 +196,6 @@ public static Tensor Dot(this Tensor lhs, Tensor rhs){ /// /// Get the dot result of the two tensors. For the details, please refer to https://numpy.org/doc/stable/reference/generated/numpy.dot.html#numpy.dot /// - /// /// /// /// diff --git a/csharp/Tensor.NET/Algebra/Matmul.cs b/csharp/Tensor.NET/Algebra/Matmul.cs index 860fb9b..1b07ba5 100644 --- a/csharp/Tensor.NET/Algebra/Matmul.cs +++ b/csharp/Tensor.NET/Algebra/Matmul.cs @@ -7,7 +7,6 @@ public static class MatmulExtension{ /// /// Get the matrix mutiply result of the two tensors. For the details, please refer to https://numpy.org/doc/stable/reference/generated/numpy.matmul.html /// - /// /// /// /// @@ -17,7 +16,6 @@ public static Tensor Matmul(this Tensor lhs, Tensor rhs) where T : s /// /// Get the matrix mutiply result of the two tensors. For the details, please refer to https://numpy.org/doc/stable/reference/generated/numpy.matmul.html /// - /// /// /// /// @@ -27,7 +25,6 @@ public static Tensor Matmul(this Tensor lhs, Tensor rhs){ /// /// Get the matrix mutiply result of the two tensors. For the details, please refer to https://numpy.org/doc/stable/reference/generated/numpy.matmul.html /// - /// /// /// /// @@ -37,7 +34,6 @@ public static Tensor Matmul(this Tensor lhs, Tensor rhs){ /// /// Get the matrix mutiply result of the two tensors. For the details, please refer to https://numpy.org/doc/stable/reference/generated/numpy.matmul.html /// - /// /// /// /// @@ -47,7 +43,6 @@ public static Tensor Matmul(this Tensor lhs, Tensor rhs){ /// /// Get the matrix mutiply result of the two tensors. For the details, please refer to https://numpy.org/doc/stable/reference/generated/numpy.matmul.html /// - /// /// /// /// @@ -57,7 +52,6 @@ public static Tensor Matmul(this Tensor lhs, Tensor rhs){ /// /// Get the matrix mutiply result of the two tensors. For the details, please refer to https://numpy.org/doc/stable/reference/generated/numpy.matmul.html /// - /// /// /// /// @@ -70,7 +64,6 @@ public static Tensor Matmul(this Tensor lhs, Tensor rhs){ /// /// Get the matrix mutiply result of the two tensors. For the details, please refer to https://numpy.org/doc/stable/reference/generated/numpy.matmul.html /// - /// /// /// /// @@ -80,7 +73,6 @@ public static Tensor Matmul(this Tensor lhs, Tensor rhs){ /// /// Get the matrix mutiply result of the two tensors. For the details, please refer to https://numpy.org/doc/stable/reference/generated/numpy.matmul.html /// - /// /// /// /// @@ -90,7 +82,6 @@ public static Tensor Matmul(this Tensor lhs, Tensor rhs){ /// /// Get the matrix mutiply result of the two tensors. For the details, please refer to https://numpy.org/doc/stable/reference/generated/numpy.matmul.html /// - /// /// /// /// @@ -100,7 +91,6 @@ public static Tensor Matmul(this Tensor lhs, Tensor rhs){ /// /// Get the matrix mutiply result of the two tensors. For the details, please refer to https://numpy.org/doc/stable/reference/generated/numpy.matmul.html /// - /// /// /// /// @@ -110,7 +100,6 @@ public static Tensor Matmul(this Tensor lhs, Tensor rhs){ /// /// Get the matrix mutiply result of the two tensors. For the details, please refer to https://numpy.org/doc/stable/reference/generated/numpy.matmul.html /// - /// /// /// /// @@ -120,7 +109,6 @@ public static Tensor Matmul(this Tensor lhs, Tensor rhs){ /// /// Get the matrix mutiply result of the two tensors. For the details, please refer to https://numpy.org/doc/stable/reference/generated/numpy.matmul.html /// - /// /// /// /// @@ -130,7 +118,6 @@ public static Tensor Matmul(this Tensor lhs, Tensor rhs){ /// /// Get the matrix mutiply result of the two tensors. For the details, please refer to https://numpy.org/doc/stable/reference/generated/numpy.matmul.html /// - /// /// /// /// @@ -140,7 +127,6 @@ public static Tensor Matmul(this Tensor lhs, Tensor rhs){ /// /// Get the matrix mutiply result of the two tensors. For the details, please refer to https://numpy.org/doc/stable/reference/generated/numpy.matmul.html /// - /// /// /// /// @@ -150,7 +136,6 @@ public static Tensor Matmul(this Tensor lhs, Tensor rhs){ /// /// Get the matrix mutiply result of the two tensors. For the details, please refer to https://numpy.org/doc/stable/reference/generated/numpy.matmul.html /// - /// /// /// /// @@ -160,7 +145,6 @@ public static Tensor Matmul(this Tensor lhs, Tensor rhs){ /// /// Get the matrix mutiply result of the two tensors. For the details, please refer to https://numpy.org/doc/stable/reference/generated/numpy.matmul.html /// - /// /// /// /// @@ -170,7 +154,6 @@ public static Tensor Matmul(this Tensor lhs, Tensor rhs){ /// /// Get the matrix mutiply result of the two tensors. For the details, please refer to https://numpy.org/doc/stable/reference/generated/numpy.matmul.html /// - /// /// /// /// @@ -180,7 +163,6 @@ public static Tensor Matmul(this Tensor lhs, Tensor rhs){ /// /// Get the matrix mutiply result of the two tensors. For the details, please refer to https://numpy.org/doc/stable/reference/generated/numpy.matmul.html /// - /// /// /// /// @@ -190,7 +172,6 @@ public static Tensor Matmul(this Tensor lhs, Tensor rhs){ /// /// Get the matrix mutiply result of the two tensors. For the details, please refer to https://numpy.org/doc/stable/reference/generated/numpy.matmul.html /// - /// /// /// /// @@ -200,7 +181,6 @@ public static Tensor Matmul(this Tensor lhs, Tensor rhs){ /// /// Get the matrix mutiply result of the two tensors. For the details, please refer to https://numpy.org/doc/stable/reference/generated/numpy.matmul.html /// - /// /// /// /// diff --git a/csharp/Tensor.NET/Manipulation/Flip.cs b/csharp/Tensor.NET/Manipulation/Flip.cs index ff8c580..b90bd73 100644 --- a/csharp/Tensor.NET/Manipulation/Flip.cs +++ b/csharp/Tensor.NET/Manipulation/Flip.cs @@ -68,12 +68,12 @@ public static partial class Tensor{ /// the tensor to be flipped /// The axes to flip. If it's set to null, then all axis will be flipped. /// The flipped tensor - public static Tensor Flip(Tensor src, int[]? axis = null) where T : struct, IEquatable, IConvertible{ - if(axis is null){ + public static Tensor Flip(Tensor src, int[]? axes = null) where T : struct, IEquatable, IConvertible{ + if(axes is null){ return src.Flip(); } else{ - return src.Flip(axis); + return src.Flip(axes); } } /// diff --git a/csharp/Tensor.NET/Manipulation/Pad.cs b/csharp/Tensor.NET/Manipulation/Pad.cs index aaea4f0..a784064 100644 --- a/csharp/Tensor.NET/Manipulation/Pad.cs +++ b/csharp/Tensor.NET/Manipulation/Pad.cs @@ -117,9 +117,9 @@ public static Tensor Pad(this Tensor src, int[] widths, PadMode mode = /// /// /// - /// Number of values padded to the edges of each axis. ((width_1, width_1), … (width_N, width_N)) same pad widths for each axis. + /// Number of values padded to the edges of each axis. ((width_1, width_1), … (width_N, width_N)) same pad widths for each axis. /// The mode of the padding. - /// Used in ‘constant’. The values to set the padded values for each axis. ((value_1, value_1), ... (value_N, value_N)) same pad constants for each axis. Default is 0. + /// Used in ‘constant’. The values to set the padded values for each axis. ((value_1, value_1), ... (value_N, value_N)) same pad constants for each axis. Default is 0. /// /// /// diff --git a/csharp/Tensor.NET/Tensor.NET.csproj b/csharp/Tensor.NET/Tensor.NET.csproj index b7c7795..49d3b47 100644 --- a/csharp/Tensor.NET/Tensor.NET.csproj +++ b/csharp/Tensor.NET/Tensor.NET.csproj @@ -22,9 +22,13 @@ 3. Add ForEach method for Tensor. 4. Add docs for public APIs. + Corresponding commit ID for this version: e1faabd35d7bb2671d6cb52fc2c6f8ef2edc43f1 + Apache-2.0 True + true + $(NoWarn);1591 diff --git a/csharp/Tensor.NET/Tensor/Scalar.cs b/csharp/Tensor.NET/Tensor/Scalar.cs index cb7f136..879d7bd 100644 --- a/csharp/Tensor.NET/Tensor/Scalar.cs +++ b/csharp/Tensor.NET/Tensor/Scalar.cs @@ -309,9 +309,7 @@ public Scalar(T value){ DataType = TensorTypeInfo.GetTypeInfo(typeof(T))._dtype; } public T Value{ get; set; } - // public Scalar(int vaule, DType dataType) : base(new TensorMemory(1, dataType), new TensorLayout(new int[]{1}, dataType)){ - // } /// /// Get the value of the specified type. Since this function contains casting, /// if you already have an instance of Scalar, please use the Value property directly. @@ -339,6 +337,7 @@ public override V GetValue() where V : struct{ throw new NotImplementedException(); } } + /// /// Get the value of the specified type. Since this function contains casting, /// if you already have an instance of Scalar, please use the Value property directly. diff --git a/csharp/Tensor.NET/Tensor/Tensor.Where.cs b/csharp/Tensor.NET/Tensor/Tensor.Where.cs index 0422573..7e5959c 100644 --- a/csharp/Tensor.NET/Tensor/Tensor.Where.cs +++ b/csharp/Tensor.NET/Tensor/Tensor.Where.cs @@ -23,10 +23,10 @@ public Tensor Where(Func condition, T trueCase, T falseCase){ public static partial class Tensor{ /// - /// Return elements chosen from trueCase or falseCase depending on condition. + /// Return elements chosen from trueCase or falseCase depending on a bool tensor. /// For details, please refer to https://numpy.org/doc/stable/reference/generated/numpy.where.html?highlight=where /// - /// The condition to decide whether use trueCase or falseCase + /// The condition to decide whether use trueCase or falseCase /// The value to fill when the condition is true. /// The value to fill when the condition is false. ///