From 78c121d4e250e16f7d73b912040b8171b12452c1 Mon Sep 17 00:00:00 2001 From: Zephyr-Blessed Date: Tue, 17 Feb 2026 08:48:38 +0000 Subject: [PATCH 1/2] fix: update 391 broken NumPy documentation URLs Replace all references from docs.scipy.org/doc/numpy to numpy.org/doc/stable across 125 C# source files. The old docs.scipy.org URLs (both unversioned and version-pinned numpy-1.14 through numpy-1.17) now redirect or return 404. The canonical NumPy documentation is at numpy.org/doc/stable/. Fixes #530 --- src/NumSharp.Core/APIs/np.cs | 4 +- src/NumSharp.Core/APIs/np.cumsum.cs | 2 +- src/NumSharp.Core/APIs/np.fromfile.cs | 4 +- src/NumSharp.Core/APIs/np.size.cs | 2 +- src/NumSharp.Core/APIs/np.tofile.cs | 2 +- .../ArrayManipulation/Default.Broadcasting.cs | 18 +++---- .../Backends/Default/Math/BLAS/Default.Dot.cs | 2 +- .../Default/Math/BLAS/Default.MatMul.2D2D.cs | 2 +- .../Default/Math/BLAS/Default.MatMul.cs | 2 +- src/NumSharp.Core/Backends/NDArray.cs | 14 +++--- src/NumSharp.Core/Creation/NDArray.Copy.cs | 2 +- src/NumSharp.Core/Creation/NdArray.DStack.cs | 2 +- src/NumSharp.Core/Creation/NdArray.HStack.cs | 2 +- src/NumSharp.Core/Creation/NdArray.Mgrid.cs | 2 +- src/NumSharp.Core/Creation/NdArray.ReShape.cs | 12 ++--- src/NumSharp.Core/Creation/NdArray.VStack.cs | 2 +- .../Creation/np.are_broadcastable.cs | 8 +-- src/NumSharp.Core/Creation/np.array.cs | 50 +++++++++---------- src/NumSharp.Core/Creation/np.asanyarray.cs | 2 +- src/NumSharp.Core/Creation/np.broadcast.cs | 2 +- .../Creation/np.broadcast_arrays.cs | 4 +- src/NumSharp.Core/Creation/np.broadcast_to.cs | 18 +++---- src/NumSharp.Core/Creation/np.concatenate.cs | 20 ++++---- src/NumSharp.Core/Creation/np.copy.cs | 2 +- src/NumSharp.Core/Creation/np.dstack.cs | 2 +- src/NumSharp.Core/Creation/np.dtype.cs | 6 +-- src/NumSharp.Core/Creation/np.empty.cs | 10 ++-- src/NumSharp.Core/Creation/np.eye.cs | 4 +- src/NumSharp.Core/Creation/np.full.cs | 16 +++--- src/NumSharp.Core/Creation/np.full_like.cs | 2 +- src/NumSharp.Core/Creation/np.hstack.cs | 2 +- src/NumSharp.Core/Creation/np.linspace.cs | 8 +-- src/NumSharp.Core/Creation/np.mgrid.cs | 2 +- src/NumSharp.Core/Creation/np.ones.cs | 12 ++--- src/NumSharp.Core/Creation/np.ones_like.cs | 2 +- src/NumSharp.Core/Creation/np.stack.cs | 2 +- src/NumSharp.Core/Creation/np.vstack.cs | 2 +- src/NumSharp.Core/Creation/np.zeros.cs | 10 ++-- src/NumSharp.Core/Creation/np.zeros_like.cs | 2 +- src/NumSharp.Core/Generics/NDArray`1.cs | 4 +- .../Generics/NdArray`1.ReShape.cs | 12 ++--- src/NumSharp.Core/Indexing/np.nonzero.cs | 2 +- .../LinearAlgebra/NDArray.dot.cs | 2 +- src/NumSharp.Core/LinearAlgebra/np.dot.cs | 2 +- src/NumSharp.Core/LinearAlgebra/np.matmul.cs | 2 +- src/NumSharp.Core/LinearAlgebra/np.outer.cs | 2 +- src/NumSharp.Core/Logic/np.all.cs | 4 +- src/NumSharp.Core/Logic/np.any.cs | 4 +- src/NumSharp.Core/Logic/np.array_equal.cs | 2 +- .../Logic/np.find_common_type.cs | 12 ++--- src/NumSharp.Core/Logic/np.is.cs | 2 +- .../Manipulation/NDArray.itemset.cs | 8 +-- .../Manipulation/NDArray.ravel.cs | 2 +- .../Manipulation/NDArray.unique.cs | 4 +- .../Manipulation/NdArray.Transpose.cs | 2 +- .../Manipulation/NdArray.swapaxes.cs | 2 +- src/NumSharp.Core/Manipulation/np.asscalar.cs | 12 ++--- src/NumSharp.Core/Manipulation/np.atleastd.cs | 24 ++++----- src/NumSharp.Core/Manipulation/np.copyto.cs | 2 +- src/NumSharp.Core/Manipulation/np.moveaxis.cs | 8 +-- src/NumSharp.Core/Manipulation/np.ravel.cs | 2 +- src/NumSharp.Core/Manipulation/np.repeat.cs | 4 +- src/NumSharp.Core/Manipulation/np.reshape.cs | 6 +-- src/NumSharp.Core/Manipulation/np.rollaxis.cs | 2 +- src/NumSharp.Core/Manipulation/np.squeeze.cs | 10 ++-- src/NumSharp.Core/Manipulation/np.swapaxes.cs | 2 +- .../Manipulation/np.transpose.cs | 2 +- src/NumSharp.Core/Manipulation/np.unique.cs | 2 +- src/NumSharp.Core/Math/NDArray.cumsum.cs | 2 +- src/NumSharp.Core/Math/NDArray.prod.cs | 2 +- src/NumSharp.Core/Math/NDArray.sum.cs | 8 +-- src/NumSharp.Core/Math/np.absolute.cs | 12 ++--- src/NumSharp.Core/Math/np.ceil.cs | 4 +- src/NumSharp.Core/Math/np.clip.cs | 6 +-- src/NumSharp.Core/Math/np.cos.cs | 12 ++--- src/NumSharp.Core/Math/np.floor.cs | 4 +- src/NumSharp.Core/Math/np.log.cs | 24 ++++----- src/NumSharp.Core/Math/np.math.cs | 18 +++---- src/NumSharp.Core/Math/np.modf.cs | 4 +- src/NumSharp.Core/Math/np.power.cs | 8 +-- src/NumSharp.Core/Math/np.round.cs | 16 +++--- src/NumSharp.Core/Math/np.sign.cs | 4 +- src/NumSharp.Core/Math/np.sin.cs | 12 ++--- src/NumSharp.Core/Math/np.sqrt.cs | 4 +- src/NumSharp.Core/Math/np.sum.cs | 20 ++++---- src/NumSharp.Core/Math/np.tan.cs | 16 +++--- .../Operations/Elementwise/NDArray.Equals.cs | 2 +- .../RandomSampling/np.random.binomial.cs | 4 +- .../RandomSampling/np.random.chisquare.cs | 4 +- .../RandomSampling/np.random.choice.cs | 4 +- src/NumSharp.Core/RandomSampling/np.random.cs | 2 +- .../RandomSampling/np.random.exponential.cs | 4 +- .../RandomSampling/np.random.gamma.cs | 4 +- .../RandomSampling/np.random.geometric.cs | 4 +- .../RandomSampling/np.random.lognormal.cs | 4 +- .../RandomSampling/np.random.permutation.cs | 4 +- .../RandomSampling/np.random.poisson.cs | 4 +- .../RandomSampling/np.random.randint.cs | 2 +- .../RandomSampling/np.random.shuffle.cs | 2 +- .../Selection/NDArray.Indexing.Masking.cs | 2 +- .../NDArray.Indexing.Selection.Getter.cs | 2 +- .../NDArray.Indexing.Selection.Setter.cs | 2 +- .../Selection/NDArray.Indexing.cs | 2 +- .../Sorting_Searching_Counting/np.amax.cs | 6 +-- .../Sorting_Searching_Counting/np.argmax.cs | 8 +-- .../Sorting_Searching_Counting/np.min.cs | 6 +-- .../np.searchsorted.cs | 2 +- src/NumSharp.Core/Statistics/NDArray.amax.cs | 12 ++--- src/NumSharp.Core/Statistics/NDArray.amin.cs | 12 ++--- .../Statistics/NDArray.argmax.cs | 4 +- .../Statistics/NDArray.argmin.cs | 4 +- src/NumSharp.Core/Statistics/NDArray.mean.cs | 8 +-- src/NumSharp.Core/Statistics/NDArray.std.cs | 4 +- src/NumSharp.Core/Statistics/NDArray.var.cs | 4 +- src/NumSharp.Core/Statistics/np.exp.cs | 18 +++---- src/NumSharp.Core/Statistics/np.mean.cs | 10 ++-- src/NumSharp.Core/Statistics/np.std.cs | 16 +++--- src/NumSharp.Core/Statistics/np.var.cs | 16 +++--- .../Creation/np.broadcast.Tests.cs | 6 +-- .../Extensions/ndarray.argsort.Test.cs | 2 +- .../Manipulation/np.dstack.Test.cs | 2 +- .../Manipulation/np.hstack.Test.cs | 2 +- .../Manipulation/np.stack.Test.cs | 2 +- .../Manipulation/np.vstack.Test.cs | 2 +- .../RandomSampling/np.random.normal.Test.cs | 2 +- 125 files changed, 391 insertions(+), 391 deletions(-) diff --git a/src/NumSharp.Core/APIs/np.cs b/src/NumSharp.Core/APIs/np.cs index 13b8b3e4..83f8d852 100644 --- a/src/NumSharp.Core/APIs/np.cs +++ b/src/NumSharp.Core/APIs/np.cs @@ -13,10 +13,10 @@ public static partial class np /// /// A convenient alias for None, useful for indexing arrays. /// - /// https://docs.scipy.org/doc/numpy-1.17.0/reference/arrays.indexing.html



https://stackoverflow.com/questions/42190783/what-does-three-dots-in-python-mean-when-indexing-what-looks-like-a-number
+ /// https://numpy.org/doc/stable/reference/arrays.indexing.html



https://stackoverflow.com/questions/42190783/what-does-three-dots-in-python-mean-when-indexing-what-looks-like-a-number
public static readonly Slice newaxis = new Slice(null, null, 1) {IsNewAxis = true}; - // https://docs.scipy.org/doc/numpy-1.16.0/user/basics.types.html + // https://numpy.org/doc/stable/user/basics.types.html public static readonly Type bool_ = typeof(bool); public static readonly Type bool8 = bool_; public static readonly Type @bool = bool_; diff --git a/src/NumSharp.Core/APIs/np.cumsum.cs b/src/NumSharp.Core/APIs/np.cumsum.cs index 0ee864eb..8c06f8d9 100644 --- a/src/NumSharp.Core/APIs/np.cumsum.cs +++ b/src/NumSharp.Core/APIs/np.cumsum.cs @@ -11,7 +11,7 @@ public static partial class np /// Axis along which the cumulative sum is computed. The default (None) is to compute the cumsum over the flattened array. /// Type of the returned array and of the accumulator in which the elements are summed. If dtype is not specified, it defaults to the dtype of a, unless a has an integer dtype with a precision less than that of the default platform integer. In that case, the default platform integer is used. /// A new array holding the result is returned unless out is specified, in which case a reference to out is returned. The result has the same size as a, and the same shape as a if axis is not None or a is a 1-d array. - /// https://docs.scipy.org/doc/numpy/reference/generated/numpy.cumsum.html + /// https://numpy.org/doc/stable/reference/generated/numpy.cumsum.html public static NDArray cumsum(NDArray arr, int? axis = null, NPTypeCode? typeCode = null) { return arr.TensorEngine.ReduceCumAdd(arr, axis, typeCode); diff --git a/src/NumSharp.Core/APIs/np.fromfile.cs b/src/NumSharp.Core/APIs/np.fromfile.cs index 8567ae16..d283d55f 100644 --- a/src/NumSharp.Core/APIs/np.fromfile.cs +++ b/src/NumSharp.Core/APIs/np.fromfile.cs @@ -14,7 +14,7 @@ public static partial class np /// filename. /// Data type of the returned array. For binary files, it is used to determine the size and byte-order of the items in the file. /// - /// https://docs.scipy.org/doc/numpy/reference/generated/numpy.fromfile.html + /// https://numpy.org/doc/stable/reference/generated/numpy.fromfile.html public static NDArray fromfile(string file, NPTypeCode dtype) { return fromfile(file, dtype.AsType()); @@ -27,7 +27,7 @@ public static NDArray fromfile(string file, NPTypeCode dtype) /// filename. /// Data type of the returned array. For binary files, it is used to determine the size and byte-order of the items in the file. /// - /// https://docs.scipy.org/doc/numpy/reference/generated/numpy.fromfile.html + /// https://numpy.org/doc/stable/reference/generated/numpy.fromfile.html public static NDArray fromfile(string file, Type dtype) { unsafe diff --git a/src/NumSharp.Core/APIs/np.size.cs b/src/NumSharp.Core/APIs/np.size.cs index 15a0e6ba..30e08482 100644 --- a/src/NumSharp.Core/APIs/np.size.cs +++ b/src/NumSharp.Core/APIs/np.size.cs @@ -10,7 +10,7 @@ public partial class np /// Input data. /// Axis along which the elements are counted. By default, give the total number of elements. /// Number of elements along the specified axis. - /// https://docs.scipy.org/doc/numpy/reference/generated/numpy.ma.size.html + /// https://numpy.org/doc/stable/reference/generated/numpy.ma.size.html public static int size(NDArray a, int? axis = null) { if (a == null) diff --git a/src/NumSharp.Core/APIs/np.tofile.cs b/src/NumSharp.Core/APIs/np.tofile.cs index 3bd2eba8..5c9e69a2 100644 --- a/src/NumSharp.Core/APIs/np.tofile.cs +++ b/src/NumSharp.Core/APIs/np.tofile.cs @@ -10,7 +10,7 @@ public partial class NDArray /// Data is always written in ‘C’ order, independent of the order of a.

The data produced by this method can be recovered using the function fromfile(). /// /// An open file object, or a string containing a filename. - /// https://docs.scipy.org/doc/numpy/reference/generated/numpy.ndarray.tofile.html + /// https://numpy.org/doc/stable/reference/generated/numpy.ndarray.tofile.html public void tofile(string fid) { //TODO! support for sliced data (if sliced, clone and then save) diff --git a/src/NumSharp.Core/Backends/Default/ArrayManipulation/Default.Broadcasting.cs b/src/NumSharp.Core/Backends/Default/ArrayManipulation/Default.Broadcasting.cs index 4d60d60a..be3c1651 100644 --- a/src/NumSharp.Core/Backends/Default/ArrayManipulation/Default.Broadcasting.cs +++ b/src/NumSharp.Core/Backends/Default/ArrayManipulation/Default.Broadcasting.cs @@ -6,7 +6,7 @@ namespace NumSharp.Backends { public partial class DefaultEngine { - /// Based on https://docs.scipy.org/doc/numpy-1.16.1/user/basics.broadcasting.html + /// Based on https://numpy.org/doc/stable/user/basics.broadcasting.html public static Shape ResolveReturnShape(Shape leftShape, Shape rightShape) { if (leftShape == rightShape) @@ -78,7 +78,7 @@ public static Shape ResolveReturnShape(Shape leftShape, Shape rightShape) return mit; //implicit cast } - /// Based on https://docs.scipy.org/doc/numpy-1.16.1/user/basics.broadcasting.html + /// Based on https://numpy.org/doc/stable/user/basics.broadcasting.html public static Shape ResolveReturnShape(params Shape[] shapes) { if (shapes.Length == 0) @@ -134,7 +134,7 @@ public static Shape ResolveReturnShape(params Shape[] shapes) return mit.Clean(); } - /// Based on https://docs.scipy.org/doc/numpy-1.16.1/user/basics.broadcasting.html + /// Based on https://numpy.org/doc/stable/user/basics.broadcasting.html public static Shape ResolveReturnShape(params NDArray[] shapes) { if (shapes.Length == 0) @@ -191,7 +191,7 @@ public static Shape ResolveReturnShape(params NDArray[] shapes) return mit.Clean(); } - /// Based on https://docs.scipy.org/doc/numpy-1.16.1/user/basics.broadcasting.html + /// Based on https://numpy.org/doc/stable/user/basics.broadcasting.html public static Shape[] Broadcast(params Shape[] shapes) { if (shapes.Length == 0) @@ -268,7 +268,7 @@ public static Shape[] Broadcast(params Shape[] shapes) //private static readonly int[][] _zeros = new int[][] {new int[0], new int[] {0}, new int[] {0, 0}, new int[] {0, 0, 0}, new int[] {0, 0, 0, 0}, new int[] {0, 0, 0, 0, 0}, new int[] {0, 0, 0, 0, 0, 0}, new int[] {0, 0, 0, 0, 0, 0, 0}, new int[] {0, 0, 0, 0, 0, 0, 0, 0}, new int[] {0, 0, 0, 0, 0, 0, 0, 0, 0}, new int[] {0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, new int[] {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, new int[] {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, new int[] {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, new int[] {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, new int[] {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, new int[] {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, new int[] {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},}; - /// Based on https://docs.scipy.org/doc/numpy-1.16.1/user/basics.broadcasting.html + /// Based on https://numpy.org/doc/stable/user/basics.broadcasting.html public static (Shape LeftShape, Shape RightShape) Broadcast(Shape leftShape, Shape rightShape) { if (leftShape._hashCode != 0 && leftShape._hashCode == rightShape._hashCode) @@ -373,7 +373,7 @@ public static (Shape LeftShape, Shape RightShape) Broadcast(Shape leftShape, Sha return (leftResult, rightResult); } - /// Based on https://docs.scipy.org/doc/numpy-1.16.1/user/basics.broadcasting.html + /// Based on https://numpy.org/doc/stable/user/basics.broadcasting.html public static NDArray[] Broadcast(params NDArray[] arrays) { if (arrays.Length == 0) @@ -390,7 +390,7 @@ public static NDArray[] Broadcast(params NDArray[] arrays) return arrays; } - /// Based on https://docs.scipy.org/doc/numpy-1.16.1/user/basics.broadcasting.html + /// Based on https://numpy.org/doc/stable/user/basics.broadcasting.html public unsafe static bool AreBroadcastable(params Shape[] shapes) { if (shapes.Length <= 1) @@ -442,7 +442,7 @@ public unsafe static bool AreBroadcastable(params Shape[] shapes) return true; } - /// Based on https://docs.scipy.org/doc/numpy-1.16.1/user/basics.broadcasting.html + /// Based on https://numpy.org/doc/stable/user/basics.broadcasting.html public unsafe static bool AreBroadcastable(params int[][] shapes) { if (shapes.Length <= 1) @@ -494,7 +494,7 @@ public unsafe static bool AreBroadcastable(params int[][] shapes) return true; } - /// Based on https://docs.scipy.org/doc/numpy-1.16.1/user/basics.broadcasting.html + /// Based on https://numpy.org/doc/stable/user/basics.broadcasting.html public static bool AreBroadcastable(params NDArray[] arrays) { if (arrays.Length <= 1) diff --git a/src/NumSharp.Core/Backends/Default/Math/BLAS/Default.Dot.cs b/src/NumSharp.Core/Backends/Default/Math/BLAS/Default.Dot.cs index e9824b5f..a68262d6 100644 --- a/src/NumSharp.Core/Backends/Default/Math/BLAS/Default.Dot.cs +++ b/src/NumSharp.Core/Backends/Default/Math/BLAS/Default.Dot.cs @@ -11,7 +11,7 @@ namespace NumSharp.Backends public partial class DefaultEngine { - /// https://docs.scipy.org/doc/numpy/reference/generated/numpy.dot.html + /// https://numpy.org/doc/stable/reference/generated/numpy.dot.html public override NDArray Dot(in NDArray left, in NDArray right) { //Dot product of two arrays.Specifically, diff --git a/src/NumSharp.Core/Backends/Default/Math/BLAS/Default.MatMul.2D2D.cs b/src/NumSharp.Core/Backends/Default/Math/BLAS/Default.MatMul.2D2D.cs index 492d4f29..6ea8d421 100644 --- a/src/NumSharp.Core/Backends/Default/Math/BLAS/Default.MatMul.2D2D.cs +++ b/src/NumSharp.Core/Backends/Default/Math/BLAS/Default.MatMul.2D2D.cs @@ -17,7 +17,7 @@ protected static NDArray MultiplyMatrix(NDArray left, NDArray right, NDArray @ou return null; } #else - /// https://docs.scipy.org/doc/numpy/reference/generated/numpy.multiply.html + /// https://numpy.org/doc/stable/reference/generated/numpy.multiply.html [SuppressMessage("ReSharper", "JoinDeclarationAndInitializer")] [MethodImpl(OptimizeAndInline)] protected static NDArray MultiplyMatrix(NDArray left, NDArray right, NDArray @out = null) diff --git a/src/NumSharp.Core/Backends/Default/Math/BLAS/Default.MatMul.cs b/src/NumSharp.Core/Backends/Default/Math/BLAS/Default.MatMul.cs index dfb8e1cb..4892f17d 100644 --- a/src/NumSharp.Core/Backends/Default/Math/BLAS/Default.MatMul.cs +++ b/src/NumSharp.Core/Backends/Default/Math/BLAS/Default.MatMul.cs @@ -10,7 +10,7 @@ namespace NumSharp.Backends { public partial class DefaultEngine { - /// https://docs.scipy.org/doc/numpy/reference/generated/numpy.matmul.html + /// https://numpy.org/doc/stable/reference/generated/numpy.matmul.html public override NDArray Matmul(NDArray lhs, NDArray rhs) { if (lhs.Shape.IsScalar || rhs.Shape.IsScalar) diff --git a/src/NumSharp.Core/Backends/NDArray.cs b/src/NumSharp.Core/Backends/NDArray.cs index ef944200..cfa276ad 100644 --- a/src/NumSharp.Core/Backends/NDArray.cs +++ b/src/NumSharp.Core/Backends/NDArray.cs @@ -35,7 +35,7 @@ namespace NumSharp /// An associated data-type object describes the format of each element in the array (its byte-order,

/// how many bytes it occupies in memory, whether it is an integer, a floating point number, or something else, etc.) /// - /// https://docs.scipy.org/doc/numpy/reference/generated/numpy.ndarray.html + /// https://numpy.org/doc/stable/reference/generated/numpy.ndarray.html [DebuggerTypeProxy(nameof(NDArrayDebuggerProxy))] [SuppressMessage("ReSharper", "ParameterHidesMember")] public partial class NDArray : IIndex, ICloneable, IEnumerable @@ -342,7 +342,7 @@ public int[] shape /// /// A 1-D iterator over the array. /// - /// https://docs.scipy.org/doc/numpy/reference/generated/numpy.ndarray.flat.html + /// https://numpy.org/doc/stable/reference/generated/numpy.ndarray.flat.html public NDArray flat { get @@ -357,7 +357,7 @@ public NDArray flat /// The transposed array.

/// Same as self.transpose(). /// - /// https://docs.scipy.org/doc/numpy/reference/generated/numpy.ndarray.T.html + /// https://numpy.org/doc/stable/reference/generated/numpy.ndarray.T.html public NDArray T { get @@ -422,7 +422,7 @@ protected internal IArraySlice Array /// The dtype to cast this array. /// By default, astype always returns a newly allocated array. If this is set to false, the input internal array is replaced instead of returning a new NDArray with the casted data. /// An of given . - /// https://docs.scipy.org/doc/numpy/reference/generated/numpy.ndarray.astype.html + /// https://numpy.org/doc/stable/reference/generated/numpy.ndarray.astype.html [SuppressMessage("ReSharper", "ParameterHidesMember")] public NDArray astype(Type dtype, bool copy = true) => TensorEngine.Cast(this, dtype, copy); @@ -432,7 +432,7 @@ protected internal IArraySlice Array /// The dtype to cast this array. /// By default, astype always returns a newly allocated array. If this is set to false, the input internal array is replaced instead of returning a new NDArray with the casted data. /// An of given . - /// https://docs.scipy.org/doc/numpy/reference/generated/numpy.ndarray.astype.html + /// https://numpy.org/doc/stable/reference/generated/numpy.ndarray.astype.html public NDArray astype(NPTypeCode typeCode, bool copy = true) => TensorEngine.Cast(this, typeCode, copy); /// @@ -505,7 +505,7 @@ IEnumerable _empty() /// This argument can also be specified as an ndarray sub-class, which then specifies the type of the returned object (this is equivalent to setting the type parameter). /// /// - /// https://docs.scipy.org/doc/numpy/reference/generated/numpy.ndarray.view.html + /// https://numpy.org/doc/stable/reference/generated/numpy.ndarray.view.html public NDArray view(Type dtype = null) { //TODO! this shouldnt be a cast in case dtype != null, it should be an unsafe reinterpret (see remarks). @@ -525,7 +525,7 @@ public NDArray view(Type dtype = null) /// This argument can also be specified as an ndarray sub-class, which then specifies the type of the returned object (this is equivalent to setting the type parameter). /// /// - /// https://docs.scipy.org/doc/numpy/reference/generated/numpy.ndarray.view.html + /// https://numpy.org/doc/stable/reference/generated/numpy.ndarray.view.html public NDArray view() where T : unmanaged => view(typeof(T)).AsGeneric(); diff --git a/src/NumSharp.Core/Creation/NDArray.Copy.cs b/src/NumSharp.Core/Creation/NDArray.Copy.cs index 7d9c2110..49ac4c80 100644 --- a/src/NumSharp.Core/Creation/NDArray.Copy.cs +++ b/src/NumSharp.Core/Creation/NDArray.Copy.cs @@ -7,7 +7,7 @@ public partial class NDArray /// /// /// - /// https://docs.scipy.org/doc/numpy/reference/generated/numpy.ndarray.copy.html + /// https://numpy.org/doc/stable/reference/generated/numpy.ndarray.copy.html public NDArray copy(char order = 'C') => Clone(); //TODO order support } } diff --git a/src/NumSharp.Core/Creation/NdArray.DStack.cs b/src/NumSharp.Core/Creation/NdArray.DStack.cs index cdcdeae3..5bbed2ba 100644 --- a/src/NumSharp.Core/Creation/NdArray.DStack.cs +++ b/src/NumSharp.Core/Creation/NdArray.DStack.cs @@ -12,7 +12,7 @@ public partial class NDArray /// /// The arrays must have the same shape along all but the third axis. 1-D or 2-D arrays must have the same shape. /// The array formed by stacking the given arrays, will be at least 3-D. - /// https://docs.scipy.org/doc/numpy/reference/generated/numpy.dstack.html + /// https://numpy.org/doc/stable/reference/generated/numpy.dstack.html public NDArray dstack(params NDArray[] tup) { if (tup == null) diff --git a/src/NumSharp.Core/Creation/NdArray.HStack.cs b/src/NumSharp.Core/Creation/NdArray.HStack.cs index b05e5519..e5f4f8d8 100644 --- a/src/NumSharp.Core/Creation/NdArray.HStack.cs +++ b/src/NumSharp.Core/Creation/NdArray.HStack.cs @@ -11,7 +11,7 @@ public partial class NDArray /// /// The arrays must have the same shape along all but the second axis, except 1-D arrays which can be any length. /// The array formed by stacking the given arrays. - /// https://docs.scipy.org/doc/numpy/reference/generated/numpy.hstack.html + /// https://numpy.org/doc/stable/reference/generated/numpy.hstack.html public NDArray hstack(params NDArray[] tup) { if (tup == null) diff --git a/src/NumSharp.Core/Creation/NdArray.Mgrid.cs b/src/NumSharp.Core/Creation/NdArray.Mgrid.cs index 06ebb24e..68a0db64 100644 --- a/src/NumSharp.Core/Creation/NdArray.Mgrid.cs +++ b/src/NumSharp.Core/Creation/NdArray.Mgrid.cs @@ -9,7 +9,7 @@ public partial class NDArray /// /// /// mesh-grid `ndarrays` all of the same dimensions - /// https://docs.scipy.org/doc/numpy/reference/generated/numpy.mgrid.html + /// https://numpy.org/doc/stable/reference/generated/numpy.mgrid.html public (NDArray, NDArray) mgrid(NDArray rhs) { return np.mgrid(this, rhs); diff --git a/src/NumSharp.Core/Creation/NdArray.ReShape.cs b/src/NumSharp.Core/Creation/NdArray.ReShape.cs index c92ff885..59bd5918 100644 --- a/src/NumSharp.Core/Creation/NdArray.ReShape.cs +++ b/src/NumSharp.Core/Creation/NdArray.ReShape.cs @@ -9,7 +9,7 @@ public partial class NDArray /// /// The new shape should be compatible with the original shape. If an integer, then the result will be a 1-D array of that length. One shape dimension can be -1. In this case, the value is inferred from the length of the array and remaining dimensions. /// This will be a new view object if possible; otherwise, it will be a copy. Note there is no guarantee of the memory layout (C- or Fortran- contiguous) of the returned array. - /// https://docs.scipy.org/doc/numpy/reference/generated/numpy.reshape.html + /// https://numpy.org/doc/stable/reference/generated/numpy.reshape.html public NDArray reshape(Shape newShape) { return reshape(ref newShape); @@ -20,7 +20,7 @@ public NDArray reshape(Shape newShape) /// /// The new shape should be compatible with the original shape. If an integer, then the result will be a 1-D array of that length. One shape dimension can be -1. In this case, the value is inferred from the length of the array and remaining dimensions. /// This will be a new view object if possible; otherwise, it will be a copy. Note there is no guarantee of the memory layout (C- or Fortran- contiguous) of the returned array. - /// https://docs.scipy.org/doc/numpy/reference/generated/numpy.reshape.html + /// https://numpy.org/doc/stable/reference/generated/numpy.reshape.html public NDArray reshape(ref Shape newShape) { // NumPy: reshape returns a view when possible (contiguous), otherwise a copy @@ -45,7 +45,7 @@ public NDArray reshape(ref Shape newShape) /// and remaining dimensions. /// This will be a new view object if possible; otherwise, it will be a copy. Note there is no guarantee of the /// memory layout (C- or Fortran- contiguous) of the returned array. - /// https://docs.scipy.org/doc/numpy/reference/generated/numpy.reshape.html + /// https://numpy.org/doc/stable/reference/generated/numpy.reshape.html [SuppressMessage("ReSharper", "ParameterHidesMember")] public NDArray reshape(params int[] shape) { @@ -68,7 +68,7 @@ public NDArray reshape(params int[] shape) /// /// The new shape should be compatible with the original shape. If an integer, then the result will be a 1-D array of that length. One shape dimension can be -1. In this case, the value is inferred from the length of the array and remaining dimensions. /// This will be a new view object if possible; otherwise, it will be a copy. Note there is no guarantee of the memory layout (C- or Fortran- contiguous) of the returned array. - /// https://docs.scipy.org/doc/numpy/reference/generated/numpy.reshape.html + /// https://numpy.org/doc/stable/reference/generated/numpy.reshape.html public NDArray reshape_unsafe(Shape newshape) { return reshape_unsafe(ref newshape); @@ -79,7 +79,7 @@ public NDArray reshape_unsafe(Shape newshape) /// /// The new shape should be compatible with the original shape. If an integer, then the result will be a 1-D array of that length. One shape dimension can be -1. In this case, the value is inferred from the length of the array and remaining dimensions. /// This will be a new view object if possible; otherwise, it will be a copy. Note there is no guarantee of the memory layout (C- or Fortran- contiguous) of the returned array. - /// https://docs.scipy.org/doc/numpy/reference/generated/numpy.reshape.html + /// https://numpy.org/doc/stable/reference/generated/numpy.reshape.html public NDArray reshape_unsafe(ref Shape newshape) { var ret = Storage.Alias(); @@ -95,7 +95,7 @@ public NDArray reshape_unsafe(ref Shape newshape) /// and remaining dimensions. /// This will be a new view object if possible; otherwise, it will be a copy. Note there is no guarantee of the /// memory layout (C- or Fortran- contiguous) of the returned array. - /// https://docs.scipy.org/doc/numpy/reference/generated/numpy.reshape.html + /// https://numpy.org/doc/stable/reference/generated/numpy.reshape.html [SuppressMessage("ReSharper", "ParameterHidesMember")] public NDArray reshape_unsafe(params int[] shape) { diff --git a/src/NumSharp.Core/Creation/NdArray.VStack.cs b/src/NumSharp.Core/Creation/NdArray.VStack.cs index 752e5aab..34783bd3 100644 --- a/src/NumSharp.Core/Creation/NdArray.VStack.cs +++ b/src/NumSharp.Core/Creation/NdArray.VStack.cs @@ -10,7 +10,7 @@ public partial class NDArray /// /// The type dtype to return. /// The arrays must have the same shape along all but the first axis. 1-D arrays must have the same length. - /// https://docs.scipy.org/doc/numpy/reference/generated/numpy.vstack.html + /// https://numpy.org/doc/stable/reference/generated/numpy.vstack.html public NDArray vstack(params NDArray[] tup) { if (tup == null) diff --git a/src/NumSharp.Core/Creation/np.are_broadcastable.cs b/src/NumSharp.Core/Creation/np.are_broadcastable.cs index 5652f204..6dbae0db 100644 --- a/src/NumSharp.Core/Creation/np.are_broadcastable.cs +++ b/src/NumSharp.Core/Creation/np.are_broadcastable.cs @@ -10,7 +10,7 @@ public static partial class np /// /// The arrays to test for broadcasting. /// True if these can be broadcasted against each other. - /// https://docs.scipy.org/doc/numpy/reference/generated/numpy.broadcast_arrays.html + /// https://numpy.org/doc/stable/reference/generated/numpy.broadcast_arrays.html public static bool are_broadcastable(params NDArray[] ndArrays) { return DefaultEngine.AreBroadcastable(ndArrays); @@ -21,7 +21,7 @@ public static bool are_broadcastable(params NDArray[] ndArrays) /// /// The shapes to test for broadcasting. /// True if these can be broadcasted against each other. - /// https://docs.scipy.org/doc/numpy/reference/generated/numpy.broadcast_arrays.html + /// https://numpy.org/doc/stable/reference/generated/numpy.broadcast_arrays.html public static bool are_broadcastable(params Shape[] shapes) { return DefaultEngine.AreBroadcastable(shapes); @@ -32,7 +32,7 @@ public static bool are_broadcastable(params Shape[] shapes) /// /// The shapes to test for broadcasting. /// True if these can be broadcasted against each other. - /// https://docs.scipy.org/doc/numpy/reference/generated/numpy.broadcast_arrays.html + /// https://numpy.org/doc/stable/reference/generated/numpy.broadcast_arrays.html public static bool are_broadcastable(params int[][] shapes) { return DefaultEngine.AreBroadcastable(shapes); @@ -44,7 +44,7 @@ public static bool are_broadcastable(params int[][] shapes) /// An array to test for broadcasting. /// An array to test for broadcasting. /// True if these can be broadcasted against each other. - /// https://docs.scipy.org/doc/numpy/reference/generated/numpy.broadcast_arrays.html + /// https://numpy.org/doc/stable/reference/generated/numpy.broadcast_arrays.html public static bool are_broadcastable(NDArray lhs, NDArray rhs) { return DefaultEngine.AreBroadcastable(lhs, rhs); diff --git a/src/NumSharp.Core/Creation/np.array.cs b/src/NumSharp.Core/Creation/np.array.cs index 2306487e..9c0bd606 100644 --- a/src/NumSharp.Core/Creation/np.array.cs +++ b/src/NumSharp.Core/Creation/np.array.cs @@ -29,7 +29,7 @@ public static partial class np /// Specifies the minimum number of dimensions that the resulting array should have. Ones will be pre-pended to the shape as needed to meet this requirement. /// Always copies if the array is larger than 1-d. /// Not used. - /// https://docs.scipy.org/doc/numpy/reference/generated/numpy.array.html + /// https://numpy.org/doc/stable/reference/generated/numpy.array.html [MethodImpl(Optimize)] [SuppressMessage("ReSharper", "InvalidXmlDocComment")] public static NDArray array(Array array, Type dtype = null, int ndmin = 1, bool copy = true, char order = 'C') @@ -75,7 +75,7 @@ public static NDArray array(Array array, Type dtype = null, int ndmin = 1, bool /// The type of given array, must be compliant to numpy's supported dtypes. /// The array to create from. /// An with the data and shape of the given array. - /// https://docs.scipy.org/doc/numpy/reference/generated/numpy.array.html

Always performs a copy.
+ /// https://numpy.org/doc/stable/reference/generated/numpy.array.html

Always performs a copy.
public static NDArray array(params T[] data) where T : unmanaged => new NDArray(ArraySlice.FromArray(data, true), Shape.Vector(data.Length)); /// @@ -84,7 +84,7 @@ public static NDArray array(Array array, Type dtype = null, int ndmin = 1, bool /// The type of given array, must be compliant to numpy's supported dtypes. /// The enumeration of data to create from. /// An with the data and shape of the given array. - /// https://docs.scipy.org/doc/numpy/reference/generated/numpy.array.html

Always performs a copy.
+ /// https://numpy.org/doc/stable/reference/generated/numpy.array.html

Always performs a copy.
public static NDArray array(IEnumerable data) where T : unmanaged { var slice = ArraySlice.FromArray(data.ToArray(), false); @@ -98,7 +98,7 @@ public static NDArray array(IEnumerable data) where T : unmanaged /// The enumeration of data to create from. /// An with the data and shape of the given array. /// - /// https://docs.scipy.org/doc/numpy/reference/generated/numpy.array.html

+ /// https://numpy.org/doc/stable/reference/generated/numpy.array.html

/// Always performs a copy.

/// can be used to limit the amount of items to read form . Reading stops on either size or ends. ///
@@ -156,7 +156,7 @@ public static NDArray array(string chars) /// The type of given array, must be compliant to numpy's supported dtypes. /// The array to create from. Shape is taken from the first item of each array/nested array. /// An with the data and shape of the given array. - /// https://docs.scipy.org/doc/numpy/reference/generated/numpy.array.html

Always performs a copy.
+ /// https://numpy.org/doc/stable/reference/generated/numpy.array.html

Always performs a copy.
[SuppressMessage("ReSharper", "SuggestVarOrType_SimpleTypes")] [SuppressMessage("ReSharper", "SuggestVarOrType_Elsewhere")] [MethodImpl(Optimize)] @@ -194,7 +194,7 @@ public static NDArray array(T[][] data) where T : unmanaged /// The type of given array, must be compliant to numpy's supported dtypes. /// The array to create from. Shape is taken from the first item of each array/nested array. /// An with the data and shape of the given array. - /// https://docs.scipy.org/doc/numpy/reference/generated/numpy.array.html

Always performs a copy.
+ /// https://numpy.org/doc/stable/reference/generated/numpy.array.html

Always performs a copy.
[SuppressMessage("ReSharper", "SuggestVarOrType_SimpleTypes")] [SuppressMessage("ReSharper", "SuggestVarOrType_Elsewhere")] [MethodImpl(Optimize)] @@ -239,7 +239,7 @@ public static NDArray array(T[][][] data) where T : unmanaged /// The type of given array, must be compliant to numpy's supported dtypes. /// The array to create from. Shape is taken from the first item of each array/nested array. /// An with the data and shape of the given array. - /// https://docs.scipy.org/doc/numpy/reference/generated/numpy.array.html

Always performs a copy.
+ /// https://numpy.org/doc/stable/reference/generated/numpy.array.html

Always performs a copy.
[SuppressMessage("ReSharper", "SuggestVarOrType_SimpleTypes")] [SuppressMessage("ReSharper", "SuggestVarOrType_Elsewhere")] [MethodImpl(Optimize)] @@ -291,7 +291,7 @@ public static NDArray array(T[][][][] data) where T : unmanaged /// The type of given array, must be compliant to numpy's supported dtypes. /// The array to create from. Shape is taken from the first item of each array/nested array. /// An with the data and shape of the given array. - /// https://docs.scipy.org/doc/numpy/reference/generated/numpy.array.html

Always performs a copy.
+ /// https://numpy.org/doc/stable/reference/generated/numpy.array.html

Always performs a copy.
[SuppressMessage("ReSharper", "SuggestVarOrType_SimpleTypes")] [SuppressMessage("ReSharper", "SuggestVarOrType_Elsewhere")] [MethodImpl(Optimize)] @@ -359,7 +359,7 @@ public static NDArray array(T[][][][][] data) where T : unmanaged /// If false then the array will be pinned by calling . /// /// An with the data and shape of the given array. - /// https://docs.scipy.org/doc/numpy/reference/generated/numpy.array.html + /// https://numpy.org/doc/stable/reference/generated/numpy.array.html public static NDArray array(T[#(repeat(",", i))] data, bool copy = true) where T : unmanaged { if (data == null) @@ -380,7 +380,7 @@ public static NDArray array(T[#(repeat(",", i))] data, bool copy = true) wher /// If false then the array will be pinned by calling . /// /// An with the data and shape of the given array. - /// https://docs.scipy.org/doc/numpy/reference/generated/numpy.array.html + /// https://numpy.org/doc/stable/reference/generated/numpy.array.html public static NDArray array(T[] data, bool copy) where T : unmanaged { if (data == null) @@ -399,7 +399,7 @@ public static NDArray array(T[] data, bool copy) where T : unmanaged /// If false then the array will be pinned by calling . /// /// An with the data and shape of the given array. - /// https://docs.scipy.org/doc/numpy/reference/generated/numpy.array.html + /// https://numpy.org/doc/stable/reference/generated/numpy.array.html public static NDArray array(T[,] data, bool copy = true) where T : unmanaged { if (data == null) @@ -418,7 +418,7 @@ public static NDArray array(T[,] data, bool copy = true) where T : unmanaged /// If false then the array will be pinned by calling . /// /// An with the data and shape of the given array. - /// https://docs.scipy.org/doc/numpy/reference/generated/numpy.array.html + /// https://numpy.org/doc/stable/reference/generated/numpy.array.html public static NDArray array(T[,,] data, bool copy = true) where T : unmanaged { if (data == null) @@ -437,7 +437,7 @@ public static NDArray array(T[,,] data, bool copy = true) where T : unmanaged /// If false then the array will be pinned by calling . /// /// An with the data and shape of the given array. - /// https://docs.scipy.org/doc/numpy/reference/generated/numpy.array.html + /// https://numpy.org/doc/stable/reference/generated/numpy.array.html public static NDArray array(T[,,,] data, bool copy = true) where T : unmanaged { if (data == null) @@ -456,7 +456,7 @@ public static NDArray array(T[,,,] data, bool copy = true) where T : unmanage /// If false then the array will be pinned by calling . /// /// An with the data and shape of the given array. - /// https://docs.scipy.org/doc/numpy/reference/generated/numpy.array.html + /// https://numpy.org/doc/stable/reference/generated/numpy.array.html public static NDArray array(T[,,,,] data, bool copy = true) where T : unmanaged { if (data == null) @@ -475,7 +475,7 @@ public static NDArray array(T[,,,,] data, bool copy = true) where T : unmanag /// If false then the array will be pinned by calling . /// /// An with the data and shape of the given array. - /// https://docs.scipy.org/doc/numpy/reference/generated/numpy.array.html + /// https://numpy.org/doc/stable/reference/generated/numpy.array.html public static NDArray array(T[,,,,,] data, bool copy = true) where T : unmanaged { if (data == null) @@ -494,7 +494,7 @@ public static NDArray array(T[,,,,,] data, bool copy = true) where T : unmana /// If false then the array will be pinned by calling . /// /// An with the data and shape of the given array. - /// https://docs.scipy.org/doc/numpy/reference/generated/numpy.array.html + /// https://numpy.org/doc/stable/reference/generated/numpy.array.html public static NDArray array(T[,,,,,,] data, bool copy = true) where T : unmanaged { if (data == null) @@ -513,7 +513,7 @@ public static NDArray array(T[,,,,,,] data, bool copy = true) where T : unman /// If false then the array will be pinned by calling . /// /// An with the data and shape of the given array. - /// https://docs.scipy.org/doc/numpy/reference/generated/numpy.array.html + /// https://numpy.org/doc/stable/reference/generated/numpy.array.html public static NDArray array(T[,,,,,,,] data, bool copy = true) where T : unmanaged { if (data == null) @@ -532,7 +532,7 @@ public static NDArray array(T[,,,,,,,] data, bool copy = true) where T : unma /// If false then the array will be pinned by calling . /// /// An with the data and shape of the given array. - /// https://docs.scipy.org/doc/numpy/reference/generated/numpy.array.html + /// https://numpy.org/doc/stable/reference/generated/numpy.array.html public static NDArray array(T[,,,,,,,,] data, bool copy = true) where T : unmanaged { if (data == null) @@ -551,7 +551,7 @@ public static NDArray array(T[,,,,,,,,] data, bool copy = true) where T : unm /// If false then the array will be pinned by calling . /// /// An with the data and shape of the given array. - /// https://docs.scipy.org/doc/numpy/reference/generated/numpy.array.html + /// https://numpy.org/doc/stable/reference/generated/numpy.array.html public static NDArray array(T[,,,,,,,,,] data, bool copy = true) where T : unmanaged { if (data == null) @@ -570,7 +570,7 @@ public static NDArray array(T[,,,,,,,,,] data, bool copy = true) where T : un /// If false then the array will be pinned by calling . /// /// An with the data and shape of the given array. - /// https://docs.scipy.org/doc/numpy/reference/generated/numpy.array.html + /// https://numpy.org/doc/stable/reference/generated/numpy.array.html public static NDArray array(T[,,,,,,,,,,] data, bool copy = true) where T : unmanaged { if (data == null) @@ -589,7 +589,7 @@ public static NDArray array(T[,,,,,,,,,,] data, bool copy = true) where T : u /// If false then the array will be pinned by calling . /// /// An with the data and shape of the given array. - /// https://docs.scipy.org/doc/numpy/reference/generated/numpy.array.html + /// https://numpy.org/doc/stable/reference/generated/numpy.array.html public static NDArray array(T[,,,,,,,,,,,] data, bool copy = true) where T : unmanaged { if (data == null) @@ -608,7 +608,7 @@ public static NDArray array(T[,,,,,,,,,,,] data, bool copy = true) where T : /// If false then the array will be pinned by calling . /// /// An with the data and shape of the given array. - /// https://docs.scipy.org/doc/numpy/reference/generated/numpy.array.html + /// https://numpy.org/doc/stable/reference/generated/numpy.array.html public static NDArray array(T[,,,,,,,,,,,,] data, bool copy = true) where T : unmanaged { if (data == null) @@ -627,7 +627,7 @@ public static NDArray array(T[,,,,,,,,,,,,] data, bool copy = true) where T : /// If false then the array will be pinned by calling . /// /// An with the data and shape of the given array. - /// https://docs.scipy.org/doc/numpy/reference/generated/numpy.array.html + /// https://numpy.org/doc/stable/reference/generated/numpy.array.html public static NDArray array(T[,,,,,,,,,,,,,] data, bool copy = true) where T : unmanaged { if (data == null) @@ -646,7 +646,7 @@ public static NDArray array(T[,,,,,,,,,,,,,] data, bool copy = true) where T /// If false then the array will be pinned by calling . /// /// An with the data and shape of the given array. - /// https://docs.scipy.org/doc/numpy/reference/generated/numpy.array.html + /// https://numpy.org/doc/stable/reference/generated/numpy.array.html public static NDArray array(T[,,,,,,,,,,,,,,] data, bool copy = true) where T : unmanaged { if (data == null) @@ -665,7 +665,7 @@ public static NDArray array(T[,,,,,,,,,,,,,,] data, bool copy = true) where T /// If false then the array will be pinned by calling . /// /// An with the data and shape of the given array. - /// https://docs.scipy.org/doc/numpy/reference/generated/numpy.array.html + /// https://numpy.org/doc/stable/reference/generated/numpy.array.html public static NDArray array(T[,,,,,,,,,,,,,,,] data, bool copy = true) where T : unmanaged { if (data == null) diff --git a/src/NumSharp.Core/Creation/np.asanyarray.cs b/src/NumSharp.Core/Creation/np.asanyarray.cs index 6be41d9c..5e83dc00 100644 --- a/src/NumSharp.Core/Creation/np.asanyarray.cs +++ b/src/NumSharp.Core/Creation/np.asanyarray.cs @@ -10,7 +10,7 @@ public static partial class np /// Input data, in any form that can be converted to an array. This includes scalars, lists, lists of tuples, tuples, tuples of tuples, tuples of lists, and ndarrays. /// By default, the data-type is inferred from the input data. /// Array interpretation of a. If a is an ndarray or a subclass of ndarray, it is returned as-is and no copy is performed. - /// https://docs.scipy.org/doc/numpy/reference/generated/numpy.asanyarray.html + /// https://numpy.org/doc/stable/reference/generated/numpy.asanyarray.html public static NDArray asanyarray(in object a, Type dtype = null) //todo support order { NDArray ret; diff --git a/src/NumSharp.Core/Creation/np.broadcast.cs b/src/NumSharp.Core/Creation/np.broadcast.cs index 4c00fb76..f42321fe 100644 --- a/src/NumSharp.Core/Creation/np.broadcast.cs +++ b/src/NumSharp.Core/Creation/np.broadcast.cs @@ -9,7 +9,7 @@ public static partial class np /// Produce an object that mimics broadcasting. ///
/// Broadcast the input parameters against one another, and return an object that encapsulates the result. Amongst others, it has shape and nd properties, and may be used as an iterator. - /// https://docs.scipy.org/doc/numpy/reference/generated/numpy.broadcast.html + /// https://numpy.org/doc/stable/reference/generated/numpy.broadcast.html public static Broadcast broadcast(NDArray nd1, NDArray nd2) { return new Broadcast { shape = DefaultEngine.ResolveReturnShape(nd1.Shape, nd2.Shape), iters = new[] { nd1.AsIterator(), nd2.AsIterator() } }; diff --git a/src/NumSharp.Core/Creation/np.broadcast_arrays.cs b/src/NumSharp.Core/Creation/np.broadcast_arrays.cs index 37468953..5c84f767 100644 --- a/src/NumSharp.Core/Creation/np.broadcast_arrays.cs +++ b/src/NumSharp.Core/Creation/np.broadcast_arrays.cs @@ -9,7 +9,7 @@ public static partial class np /// /// The arrays to broadcast. /// These arrays are views on the original arrays. They are typically not contiguous. Furthermore, more than one element of a broadcasted array may refer to a single memory location. If you need to write to the arrays, make copies first. - /// https://docs.scipy.org/doc/numpy/reference/generated/numpy.broadcast_arrays.html + /// https://numpy.org/doc/stable/reference/generated/numpy.broadcast_arrays.html public static NDArray[] broadcast_arrays(params NDArray[] ndArrays) { int len = ndArrays.Length; @@ -32,7 +32,7 @@ public static NDArray[] broadcast_arrays(params NDArray[] ndArrays) /// An array to broadcast. /// An array to broadcast. /// These arrays are views on the original arrays. They are typically not contiguous. Furthermore, more than one element of a broadcasted array may refer to a single memory location. If you need to write to the arrays, make copies first. - /// https://docs.scipy.org/doc/numpy/reference/generated/numpy.broadcast_arrays.html + /// https://numpy.org/doc/stable/reference/generated/numpy.broadcast_arrays.html public static (NDArray Lhs, NDArray Rhs) broadcast_arrays(NDArray lhs, NDArray rhs) { var (leftShape, rightShape) = DefaultEngine.Broadcast(lhs.Shape, rhs.Shape); diff --git a/src/NumSharp.Core/Creation/np.broadcast_to.cs b/src/NumSharp.Core/Creation/np.broadcast_to.cs index 1d9a7ae6..9f06d309 100644 --- a/src/NumSharp.Core/Creation/np.broadcast_to.cs +++ b/src/NumSharp.Core/Creation/np.broadcast_to.cs @@ -37,7 +37,7 @@ private static void ValidateBroadcastTo(Shape from, Shape target) /// The shape that is to be broadcasted /// The shape that'll be used to broadcast shape /// A readonly view on the original array with the given shape. It is typically not contiguous. Furthermore, more than one element of a broadcasted array may refer to a single memory location. - /// https://docs.scipy.org/doc/numpy/reference/generated/numpy.broadcast_to.html + /// https://numpy.org/doc/stable/reference/generated/numpy.broadcast_to.html public static Shape broadcast_to(Shape from, Shape against) { ValidateBroadcastTo(from, against); @@ -50,7 +50,7 @@ public static Shape broadcast_to(Shape from, Shape against) /// The NDArray to broadcast. /// The shape to broadcast against. /// These arrays are views on the original arrays. They are typically not contiguous. Furthermore, more than one element of a broadcasted array may refer to a single memory location. If you need to write to the arrays, make copies first. - /// https://docs.scipy.org/doc/numpy/reference/generated/numpy.broadcast_to.html + /// https://numpy.org/doc/stable/reference/generated/numpy.broadcast_to.html public static NDArray broadcast_to(UnmanagedStorage from, Shape against) { ValidateBroadcastTo(from.Shape, against); @@ -63,7 +63,7 @@ public static NDArray broadcast_to(UnmanagedStorage from, Shape against) /// The NDArray to broadcast. /// The shape to broadcast against. /// These arrays are views on the original arrays. They are typically not contiguous. Furthermore, more than one element of a broadcasted array may refer to a single memory location. If you need to write to the arrays, make copies first. - /// https://docs.scipy.org/doc/numpy/reference/generated/numpy.broadcast_to.html + /// https://numpy.org/doc/stable/reference/generated/numpy.broadcast_to.html public static NDArray broadcast_to(NDArray from, Shape against) { ValidateBroadcastTo(from.Shape, against); @@ -76,7 +76,7 @@ public static NDArray broadcast_to(NDArray from, Shape against) /// The shape that is to be broadcasted /// The shape that'll be used to broadcast shape /// A readonly view on the original array with the given shape. It is typically not contiguous. Furthermore, more than one element of a broadcasted array may refer to a single memory location. - /// https://docs.scipy.org/doc/numpy/reference/generated/numpy.broadcast_to.html + /// https://numpy.org/doc/stable/reference/generated/numpy.broadcast_to.html public static Shape broadcast_to(Shape from, NDArray against) { ValidateBroadcastTo(from, against.Shape); @@ -89,7 +89,7 @@ public static Shape broadcast_to(Shape from, NDArray against) /// The UnmanagedStorage to broadcast. /// The shape to broadcast against. /// These arrays are views on the original arrays. They are typically not contiguous. Furthermore, more than one element of a broadcasted array may refer to a single memory location. If you need to write to the arrays, make copies first. - /// https://docs.scipy.org/doc/numpy/reference/generated/numpy.broadcast_to.html + /// https://numpy.org/doc/stable/reference/generated/numpy.broadcast_to.html public static NDArray broadcast_to(UnmanagedStorage from, NDArray against) { ValidateBroadcastTo(from.Shape, against.Shape); @@ -102,7 +102,7 @@ public static NDArray broadcast_to(UnmanagedStorage from, NDArray against) /// The NDArray to broadcast. /// The shape to broadcast against. /// These arrays are views on the original arrays. They are typically not contiguous. Furthermore, more than one element of a broadcasted array may refer to a single memory location. If you need to write to the arrays, make copies first. - /// https://docs.scipy.org/doc/numpy/reference/generated/numpy.broadcast_to.html + /// https://numpy.org/doc/stable/reference/generated/numpy.broadcast_to.html public static NDArray broadcast_to(NDArray from, NDArray against) { ValidateBroadcastTo(from.Shape, against.Shape); @@ -116,7 +116,7 @@ public static NDArray broadcast_to(NDArray from, NDArray against) /// The shape that is to be broadcasted /// The shape that'll be used to broadcast shape /// A readonly view on the original array with the given shape. It is typically not contiguous. Furthermore, more than one element of a broadcasted array may refer to a single memory location. - /// https://docs.scipy.org/doc/numpy/reference/generated/numpy.broadcast_to.html + /// https://numpy.org/doc/stable/reference/generated/numpy.broadcast_to.html public static Shape broadcast_to(Shape from, UnmanagedStorage against) { ValidateBroadcastTo(from, against.Shape); @@ -129,7 +129,7 @@ public static Shape broadcast_to(Shape from, UnmanagedStorage against) /// The UnmanagedStorage to broadcast. /// The shape to broadcast against. /// These arrays are views on the original arrays. They are typically not contiguous. Furthermore, more than one element of a broadcasted array may refer to a single memory location. If you need to write to the arrays, make copies first. - /// https://docs.scipy.org/doc/numpy/reference/generated/numpy.broadcast_to.html + /// https://numpy.org/doc/stable/reference/generated/numpy.broadcast_to.html public static NDArray broadcast_to(UnmanagedStorage from, UnmanagedStorage against) { ValidateBroadcastTo(from.Shape, against.Shape); @@ -142,7 +142,7 @@ public static NDArray broadcast_to(UnmanagedStorage from, UnmanagedStorage again /// The NDArray to broadcast. /// The shape to broadcast against. /// These arrays are views on the original arrays. They are typically not contiguous. Furthermore, more than one element of a broadcasted array may refer to a single memory location. If you need to write to the arrays, make copies first. - /// https://docs.scipy.org/doc/numpy/reference/generated/numpy.broadcast_to.html + /// https://numpy.org/doc/stable/reference/generated/numpy.broadcast_to.html public static NDArray broadcast_to(NDArray from, UnmanagedStorage against) { ValidateBroadcastTo(from.Shape, against.Shape); diff --git a/src/NumSharp.Core/Creation/np.concatenate.cs b/src/NumSharp.Core/Creation/np.concatenate.cs index 1ae31fab..ba4d9f85 100644 --- a/src/NumSharp.Core/Creation/np.concatenate.cs +++ b/src/NumSharp.Core/Creation/np.concatenate.cs @@ -11,7 +11,7 @@ public static partial class np /// The axis along which the arrays will be joined. If axis is None, arrays are flattened before use. Default is 0. /// The arrays must have the same shape, except in the dimension corresponding to axis (the first, by default). /// The concatenated array. - /// https://docs.scipy.org/doc/numpy/reference/generated/numpy.concatenate.html + /// https://numpy.org/doc/stable/reference/generated/numpy.concatenate.html public static NDArray concatenate(NDArray[] arrays, int axis = 0) { //What we do is we have the axis which is the only dimension that is allowed to be different @@ -113,7 +113,7 @@ public static NDArray concatenate(NDArray[] arrays, int axis = 0) /// The axis along which the arrays will be joined. If axis is None, arrays are flattened before use. Default is 0. /// The arrays must have the same shape, except in the dimension corresponding to axis (the first, by default). /// The concatenated array. - /// https://docs.scipy.org/doc/numpy/reference/generated/numpy.concatenate.html + /// https://numpy.org/doc/stable/reference/generated/numpy.concatenate.html public static NDArray concatenate(#(repeat("NDArray", #1 , ", " , "(" , "" , "" , ")" )) arrays, int axis = 0) { return concatenate(new NDArray[] {#(repeat("^pre+(n+1)", #1 , ", " ))}, axis); @@ -127,7 +127,7 @@ public static NDArray concatenate(#(repeat("NDArray", #1 , ", " , "(" , "" /// The axis along which the arrays will be joined. If axis is None, arrays are flattened before use. Default is 0. /// The arrays must have the same shape, except in the dimension corresponding to axis (the first, by default). /// The concatenated array. - /// https://docs.scipy.org/doc/numpy/reference/generated/numpy.concatenate.html + /// https://numpy.org/doc/stable/reference/generated/numpy.concatenate.html public static NDArray concatenate((NDArray, NDArray) arrays, int axis = 0) { return concatenate(new NDArray[] {arrays.Item1, arrays.Item2}, axis); @@ -139,7 +139,7 @@ public static NDArray concatenate((NDArray, NDArray) arrays, int axis = 0) /// The axis along which the arrays will be joined. If axis is None, arrays are flattened before use. Default is 0. /// The arrays must have the same shape, except in the dimension corresponding to axis (the first, by default). /// The concatenated array. - /// https://docs.scipy.org/doc/numpy/reference/generated/numpy.concatenate.html + /// https://numpy.org/doc/stable/reference/generated/numpy.concatenate.html public static NDArray concatenate((NDArray, NDArray, NDArray) arrays, int axis = 0) { return concatenate(new NDArray[] {arrays.Item1, arrays.Item2, arrays.Item3}, axis); @@ -151,7 +151,7 @@ public static NDArray concatenate((NDArray, NDArray, NDArray) arrays, int axis = /// The axis along which the arrays will be joined. If axis is None, arrays are flattened before use. Default is 0. /// The arrays must have the same shape, except in the dimension corresponding to axis (the first, by default). /// The concatenated array. - /// https://docs.scipy.org/doc/numpy/reference/generated/numpy.concatenate.html + /// https://numpy.org/doc/stable/reference/generated/numpy.concatenate.html public static NDArray concatenate((NDArray, NDArray, NDArray, NDArray) arrays, int axis = 0) { return concatenate(new NDArray[] {arrays.Item1, arrays.Item2, arrays.Item3, arrays.Item4}, axis); @@ -163,7 +163,7 @@ public static NDArray concatenate((NDArray, NDArray, NDArray, NDArray) arrays, i /// The axis along which the arrays will be joined. If axis is None, arrays are flattened before use. Default is 0. /// The arrays must have the same shape, except in the dimension corresponding to axis (the first, by default). /// The concatenated array. - /// https://docs.scipy.org/doc/numpy/reference/generated/numpy.concatenate.html + /// https://numpy.org/doc/stable/reference/generated/numpy.concatenate.html public static NDArray concatenate((NDArray, NDArray, NDArray, NDArray, NDArray) arrays, int axis = 0) { return concatenate(new NDArray[] {arrays.Item1, arrays.Item2, arrays.Item3, arrays.Item4, arrays.Item5}, axis); @@ -175,7 +175,7 @@ public static NDArray concatenate((NDArray, NDArray, NDArray, NDArray, NDArray) /// The axis along which the arrays will be joined. If axis is None, arrays are flattened before use. Default is 0. /// The arrays must have the same shape, except in the dimension corresponding to axis (the first, by default). /// The concatenated array. - /// https://docs.scipy.org/doc/numpy/reference/generated/numpy.concatenate.html + /// https://numpy.org/doc/stable/reference/generated/numpy.concatenate.html public static NDArray concatenate((NDArray, NDArray, NDArray, NDArray, NDArray, NDArray) arrays, int axis = 0) { return concatenate(new NDArray[] {arrays.Item1, arrays.Item2, arrays.Item3, arrays.Item4, arrays.Item5, arrays.Item6}, axis); @@ -187,7 +187,7 @@ public static NDArray concatenate((NDArray, NDArray, NDArray, NDArray, NDArray, /// The axis along which the arrays will be joined. If axis is None, arrays are flattened before use. Default is 0. /// The arrays must have the same shape, except in the dimension corresponding to axis (the first, by default). /// The concatenated array. - /// https://docs.scipy.org/doc/numpy/reference/generated/numpy.concatenate.html + /// https://numpy.org/doc/stable/reference/generated/numpy.concatenate.html public static NDArray concatenate((NDArray, NDArray, NDArray, NDArray, NDArray, NDArray, NDArray) arrays, int axis = 0) { return concatenate(new NDArray[] {arrays.Item1, arrays.Item2, arrays.Item3, arrays.Item4, arrays.Item5, arrays.Item6, arrays.Item7}, axis); @@ -199,7 +199,7 @@ public static NDArray concatenate((NDArray, NDArray, NDArray, NDArray, NDArray, /// The axis along which the arrays will be joined. If axis is None, arrays are flattened before use. Default is 0. /// The arrays must have the same shape, except in the dimension corresponding to axis (the first, by default). /// The concatenated array. - /// https://docs.scipy.org/doc/numpy/reference/generated/numpy.concatenate.html + /// https://numpy.org/doc/stable/reference/generated/numpy.concatenate.html public static NDArray concatenate((NDArray, NDArray, NDArray, NDArray, NDArray, NDArray, NDArray, NDArray) arrays, int axis = 0) { return concatenate(new NDArray[] {arrays.Item1, arrays.Item2, arrays.Item3, arrays.Item4, arrays.Item5, arrays.Item6, arrays.Item7, arrays.Item8}, axis); @@ -211,7 +211,7 @@ public static NDArray concatenate((NDArray, NDArray, NDArray, NDArray, NDArray, /// The axis along which the arrays will be joined. If axis is None, arrays are flattened before use. Default is 0. /// The arrays must have the same shape, except in the dimension corresponding to axis (the first, by default). /// The concatenated array. - /// https://docs.scipy.org/doc/numpy/reference/generated/numpy.concatenate.html + /// https://numpy.org/doc/stable/reference/generated/numpy.concatenate.html public static NDArray concatenate((NDArray, NDArray, NDArray, NDArray, NDArray, NDArray, NDArray, NDArray, NDArray) arrays, int axis = 0) { return concatenate(new NDArray[] {arrays.Item1, arrays.Item2, arrays.Item3, arrays.Item4, arrays.Item5, arrays.Item6, arrays.Item7, arrays.Item8, arrays.Item9}, axis); diff --git a/src/NumSharp.Core/Creation/np.copy.cs b/src/NumSharp.Core/Creation/np.copy.cs index bf1154e2..07be754d 100644 --- a/src/NumSharp.Core/Creation/np.copy.cs +++ b/src/NumSharp.Core/Creation/np.copy.cs @@ -8,7 +8,7 @@ public partial class np /// Input data. /// /// Array interpretation of a. - /// https://docs.scipy.org/doc/numpy/reference/generated/numpy.copy.html + /// https://numpy.org/doc/stable/reference/generated/numpy.copy.html public static NDArray copy(NDArray a, char order = 'C') => a.copy(); //TODO order support } } diff --git a/src/NumSharp.Core/Creation/np.dstack.cs b/src/NumSharp.Core/Creation/np.dstack.cs index 78d72861..cc79fc32 100644 --- a/src/NumSharp.Core/Creation/np.dstack.cs +++ b/src/NumSharp.Core/Creation/np.dstack.cs @@ -12,7 +12,7 @@ public static partial class np /// /// The arrays must have the same shape along all but the third axis. 1-D or 2-D arrays must have the same shape. /// The array formed by stacking the given arrays, will be at least 3-D. - /// https://docs.scipy.org/doc/numpy/reference/generated/numpy.dstack.html + /// https://numpy.org/doc/stable/reference/generated/numpy.dstack.html public static NDArray dstack(params NDArray[] tup) { if (tup == null) diff --git a/src/NumSharp.Core/Creation/np.dtype.cs b/src/NumSharp.Core/Creation/np.dtype.cs index 5bc97a04..9bd5ce2f 100644 --- a/src/NumSharp.Core/Creation/np.dtype.cs +++ b/src/NumSharp.Core/Creation/np.dtype.cs @@ -8,7 +8,7 @@ namespace NumSharp { - /// https://docs.scipy.org/doc/numpy-1.16.0/reference/generated/numpy.dtype.html#numpy.dtype + /// https://numpy.org/doc/stable/reference/generated/numpy.dtype.html#numpy.dtype public class DType { protected internal static readonly FrozenDictionary _kind_list_map = new Dictionary() @@ -170,7 +170,7 @@ public static char mintypecode(char[] typechars, string typeset = "GDFgdf", char /// /// A based on , return can be null. /// - /// https://docs.scipy.org/doc/numpy-1.16.0/reference/arrays.dtypes.html

+ /// https://numpy.org/doc/stable/reference/arrays.dtypes.html

/// This was created to ease the porting of C++ numpy to C#. ///
public static DType dtype(string dtype) @@ -377,7 +377,7 @@ internal enum NPY_SCALARKIND }; /// - /// https://docs.scipy.org/doc/numpy-1.16.1/reference/c-api.dtype.html#enumerated-types + /// https://numpy.org/doc/stable/reference/c-api.dtype.html#enumerated-types /// internal enum NPY_TYPECHAR { diff --git a/src/NumSharp.Core/Creation/np.empty.cs b/src/NumSharp.Core/Creation/np.empty.cs index 8ec9528d..f54fc838 100644 --- a/src/NumSharp.Core/Creation/np.empty.cs +++ b/src/NumSharp.Core/Creation/np.empty.cs @@ -10,7 +10,7 @@ public static partial class np /// /// Shape of the empty array, e.g., (2, 3) or 2. /// Array of uninitialized (arbitrary) data of the given shape, dtype, and order. Object arrays will be initialized to None. - /// https://docs.scipy.org/doc/numpy/reference/generated/numpy.empty.html + /// https://numpy.org/doc/stable/reference/generated/numpy.empty.html public static NDArray empty(params int[] shapes) { return empty(shapes, null); @@ -21,7 +21,7 @@ public static NDArray empty(params int[] shapes) /// /// Shape of the empty array, e.g., (2, 3) or 2. /// Array of uninitialized (arbitrary) data of the given shape, dtype, and order. Object arrays will be initialized to None. - /// https://docs.scipy.org/doc/numpy/reference/generated/numpy.empty.html + /// https://numpy.org/doc/stable/reference/generated/numpy.empty.html public static NDArray empty(params int[] shapes) { return empty(shapes, typeof(T)); @@ -33,7 +33,7 @@ public static NDArray empty(params int[] shapes) /// Shape of the empty array, e.g., (2, 3) or 2. /// Desired output data-type for the array, e.g, numpy.int8. Default is numpy.float64. /// Array of uninitialized (arbitrary) data of the given shape, dtype, and order. Object arrays will be initialized to None. - /// https://docs.scipy.org/doc/numpy/reference/generated/numpy.empty.html + /// https://numpy.org/doc/stable/reference/generated/numpy.empty.html public static NDArray empty(Shape shape, Type dtype) { return empty(shape, (dtype ?? typeof(double)).GetTypeCode()); @@ -45,7 +45,7 @@ public static NDArray empty(Shape shape, Type dtype) /// Shape of the empty array, e.g., (2, 3) or 2. /// Desired output data-type for the array, e.g, numpy.int8. Default is numpy.float64. /// Array of uninitialized (arbitrary) data of the given shape, dtype, and order. Object arrays will be initialized to None. - /// https://docs.scipy.org/doc/numpy/reference/generated/numpy.empty.html + /// https://numpy.org/doc/stable/reference/generated/numpy.empty.html public static NDArray empty(Shape shape, NPTypeCode typeCode) { if (typeCode == NPTypeCode.Empty) @@ -60,7 +60,7 @@ public static NDArray empty(Shape shape, NPTypeCode typeCode) /// Shape of the empty array, e.g., (2, 3) or 2. /// Desired output data-type for the array, e.g, numpy.int8. Default is numpy.float64. /// Array of uninitialized (arbitrary) data of the given shape, dtype, and order. Object arrays will be initialized to None. - /// https://docs.scipy.org/doc/numpy/reference/generated/numpy.empty.html + /// https://numpy.org/doc/stable/reference/generated/numpy.empty.html public static NDArray empty(Shape shape) { return new NDArray(NPTypeCode.Double, shape, false); diff --git a/src/NumSharp.Core/Creation/np.eye.cs b/src/NumSharp.Core/Creation/np.eye.cs index 775eb10c..2f6fbdbb 100644 --- a/src/NumSharp.Core/Creation/np.eye.cs +++ b/src/NumSharp.Core/Creation/np.eye.cs @@ -12,7 +12,7 @@ public static partial class np /// Number of rows (and columns) in n x n output. /// Data-type of the output. Defaults to double. /// n x n array with its main diagonal set to one, and all other elements 0. - /// https://docs.scipy.org/doc/numpy/reference/generated/numpy.identity.html + /// https://numpy.org/doc/stable/reference/generated/numpy.identity.html public static NDArray identity(int n, Type dtype = null) { return eye(n, dtype: dtype ?? typeof(double)); @@ -26,7 +26,7 @@ public static NDArray identity(int n, Type dtype = null) /// Index of the diagonal: 0 (the default) refers to the main diagonal, a positive value refers to an upper diagonal, and a negative value to a lower diagonal. /// Data-type of the returned array. /// An array where all elements are equal to zero, except for the k-th diagonal, whose values are equal to one. - /// https://docs.scipy.org/doc/numpy/reference/generated/numpy.eye.html + /// https://numpy.org/doc/stable/reference/generated/numpy.eye.html public static NDArray eye(int N, int? M=null, int k = 0, Type dtype = null) { if (!M.HasValue) diff --git a/src/NumSharp.Core/Creation/np.full.cs b/src/NumSharp.Core/Creation/np.full.cs index 9c149bc1..0e750b6a 100644 --- a/src/NumSharp.Core/Creation/np.full.cs +++ b/src/NumSharp.Core/Creation/np.full.cs @@ -13,7 +13,7 @@ public static partial class np /// Fill value. /// Shape of the empty array, e.g., (2, 3) or 2. /// Array of fill_value with the given shape, dtype, and order. - /// https://docs.scipy.org/doc/numpy/reference/generated/numpy.full.html + /// https://numpy.org/doc/stable/reference/generated/numpy.full.html public static NDArray full(ValueType fill_value, params int[] shapes) { return full(fill_value, shapes, null); @@ -25,7 +25,7 @@ public static NDArray full(ValueType fill_value, params int[] shapes) /// Fill value. /// Shape of the empty array, e.g., (2, 3) or 2. /// Array of fill_value with the given shape, dtype, and order. - /// https://docs.scipy.org/doc/numpy/reference/generated/numpy.full.html + /// https://numpy.org/doc/stable/reference/generated/numpy.full.html public static NDArray full(ValueType fill_value, params int[] shapes) where T : unmanaged { return full(fill_value, shapes, typeof(T)); @@ -38,7 +38,7 @@ public static NDArray full(ValueType fill_value, params int[] shapes) where T /// Shape of the empty array, e.g., (2, 3) or 2. /// The desired data-type for the array The default, null, means np.array(fill_value).dtype. /// Array of fill_value with the given shape, dtype, and order. - /// https://docs.scipy.org/doc/numpy/reference/generated/numpy.full.html + /// https://numpy.org/doc/stable/reference/generated/numpy.full.html public static NDArray full(ValueType fill_value, Shape shape, Type dtype) { return full(fill_value, shape, (fill_value.GetType()).GetTypeCode()); @@ -50,7 +50,7 @@ public static NDArray full(ValueType fill_value, Shape shape, Type dtype) /// Fill value. /// Shape of the empty array, e.g., (2, 3) or 2. /// Array of fill_value with the given shape, dtype, and order. - /// https://docs.scipy.org/doc/numpy/reference/generated/numpy.full.html + /// https://numpy.org/doc/stable/reference/generated/numpy.full.html public static NDArray full(ValueType fill_value, Shape shape) { return new NDArray(new UnmanagedStorage(ArraySlice.Allocate(fill_value.GetType(), shape.size, fill_value), shape)); @@ -64,7 +64,7 @@ public static NDArray full(ValueType fill_value, Shape shape) /// Shape of the empty array, e.g., (2, 3) or 2. /// The desired data-type for the array The default, null, means np.array(fill_value).dtype. /// Array of fill_value with the given shape, dtype, and order. - /// https://docs.scipy.org/doc/numpy/reference/generated/numpy.full.html + /// https://numpy.org/doc/stable/reference/generated/numpy.full.html public static NDArray full(Shape shape, ValueType fill_value, Type dtype) { return full(fill_value, shape, dtype); @@ -77,7 +77,7 @@ public static NDArray full(Shape shape, ValueType fill_value, Type dtype) /// Shape of the empty array, e.g., (2, 3) or 2. /// The desired data-type for the array The default, null, means np.array(fill_value).dtype. /// Array of fill_value with the given shape, dtype, and order. - /// https://docs.scipy.org/doc/numpy/reference/generated/numpy.full.html + /// https://numpy.org/doc/stable/reference/generated/numpy.full.html public static NDArray full(Shape shape, ValueType fill_value, NPTypeCode typeCode) { return full(fill_value, shape, typeCode); @@ -89,7 +89,7 @@ public static NDArray full(Shape shape, ValueType fill_value, NPTypeCode typeCod /// Fill value. /// Shape of the empty array, e.g., (2, 3) or 2. /// Array of fill_value with the given shape, dtype, and order. - /// https://docs.scipy.org/doc/numpy/reference/generated/numpy.full.html + /// https://numpy.org/doc/stable/reference/generated/numpy.full.html public static NDArray full(Shape shape, ValueType fill_value) { return full(fill_value, shape); @@ -102,7 +102,7 @@ public static NDArray full(Shape shape, ValueType fill_value) /// Shape of the empty array, e.g., (2, 3) or 2. /// The desired data-type for the array The default, null, means np.array(fill_value).dtype. /// Array of fill_value with the given shape, dtype, and order. - /// https://docs.scipy.org/doc/numpy/reference/generated/numpy.full.html + /// https://numpy.org/doc/stable/reference/generated/numpy.full.html public static NDArray full(ValueType fill_value, Shape shape, NPTypeCode typeCode) { if (typeCode == NPTypeCode.Empty) diff --git a/src/NumSharp.Core/Creation/np.full_like.cs b/src/NumSharp.Core/Creation/np.full_like.cs index 73da6fc0..4302c688 100644 --- a/src/NumSharp.Core/Creation/np.full_like.cs +++ b/src/NumSharp.Core/Creation/np.full_like.cs @@ -14,7 +14,7 @@ public static partial class np /// Fill value. /// Overrides the data type of the result. /// Array of fill_value with the same shape and type as a. - /// https://docs.scipy.org/doc/numpy/reference/generated/numpy.full_like.html + /// https://numpy.org/doc/stable/reference/generated/numpy.full_like.html public static NDArray full_like(NDArray a, object fill_value, Type dtype = null) { var typeCode = (dtype ?? fill_value?.GetType() ?? a.dtype).GetTypeCode(); diff --git a/src/NumSharp.Core/Creation/np.hstack.cs b/src/NumSharp.Core/Creation/np.hstack.cs index eb94995f..303113f0 100644 --- a/src/NumSharp.Core/Creation/np.hstack.cs +++ b/src/NumSharp.Core/Creation/np.hstack.cs @@ -12,7 +12,7 @@ public static partial class np /// /// The arrays must have the same shape along all but the second axis, except 1-D arrays which can be any length. /// The array formed by stacking the given arrays. - /// https://docs.scipy.org/doc/numpy/reference/generated/numpy.hstack.html + /// https://numpy.org/doc/stable/reference/generated/numpy.hstack.html public static NDArray hstack(params NDArray[] tup) { if (tup == null) diff --git a/src/NumSharp.Core/Creation/np.linspace.cs b/src/NumSharp.Core/Creation/np.linspace.cs index da01b66a..32e4f3ec 100644 --- a/src/NumSharp.Core/Creation/np.linspace.cs +++ b/src/NumSharp.Core/Creation/np.linspace.cs @@ -17,7 +17,7 @@ public static partial class np /// Number of samples to generate. Default is 50. Must be non-negative. /// If True, stop is the last sample. Otherwise, it is not included. Default is True. /// The type of the output array. If dtype is not given, infer the data type from the other input arguments. - /// https://docs.scipy.org/doc/numpy-1.15.0/reference/generated/numpy.linspace.html + /// https://numpy.org/doc/stable/reference/generated/numpy.linspace.html public static NDArray linspace(double start, double stop, int num, bool endpoint, Type dtype) { return linspace(start, stop, num, endpoint, (dtype ?? typeof(double)).GetTypeCode()); @@ -33,7 +33,7 @@ public static NDArray linspace(double start, double stop, int num, bool endpoint /// Number of samples to generate. Default is 50. Must be non-negative. /// If True, stop is the last sample. Otherwise, it is not included. Default is True. /// The type of the output array. If dtype is not given, infer the data type from the other input arguments. - /// https://docs.scipy.org/doc/numpy-1.15.0/reference/generated/numpy.linspace.html + /// https://numpy.org/doc/stable/reference/generated/numpy.linspace.html public static NDArray linspace(float start, float stop, int num, bool endpoint, Type dtype) { return linspace(start, stop, num, endpoint, (dtype ?? typeof(float)).GetTypeCode()); @@ -49,7 +49,7 @@ public static NDArray linspace(float start, float stop, int num, bool endpoint, /// Number of samples to generate. Default is 50. Must be non-negative. /// If True, stop is the last sample. Otherwise, it is not included. Default is True. /// The type of the output array. If dtype is not given, infer the data type from the other input arguments. - /// https://docs.scipy.org/doc/numpy-1.15.0/reference/generated/numpy.linspace.html + /// https://numpy.org/doc/stable/reference/generated/numpy.linspace.html public static NDArray linspace(float start, float stop, int num, bool endpoint = true, NPTypeCode typeCode = NPTypeCode.Single) { return linspace((double)start, (double)stop, num, endpoint, typeCode); @@ -65,7 +65,7 @@ public static NDArray linspace(float start, float stop, int num, bool endpoint = /// Number of samples to generate. Default is 50. Must be non-negative. /// If True, stop is the last sample. Otherwise, it is not included. Default is True. /// The type of the output array. If dtype is not given, infer the data type from the other input arguments. - /// https://docs.scipy.org/doc/numpy-1.15.0/reference/generated/numpy.linspace.html + /// https://numpy.org/doc/stable/reference/generated/numpy.linspace.html public static NDArray linspace(double start, double stop, int num, bool endpoint = true, NPTypeCode typeCode = NPTypeCode.Double) { if (typeCode == NPTypeCode.Empty) diff --git a/src/NumSharp.Core/Creation/np.mgrid.cs b/src/NumSharp.Core/Creation/np.mgrid.cs index b44dcc7f..4ec5b1da 100644 --- a/src/NumSharp.Core/Creation/np.mgrid.cs +++ b/src/NumSharp.Core/Creation/np.mgrid.cs @@ -15,7 +15,7 @@ public static partial class np /// /// /// mesh-grid `ndarrays` all of the same dimensions - /// https://docs.scipy.org/doc/numpy/reference/generated/numpy.mgrid.html + /// https://numpy.org/doc/stable/reference/generated/numpy.mgrid.html public static (NDArray, NDArray) mgrid(NDArray lhs, NDArray rhs) { if (!(lhs.ndim == 1 || rhs.ndim == 1)) diff --git a/src/NumSharp.Core/Creation/np.ones.cs b/src/NumSharp.Core/Creation/np.ones.cs index 10ff18ce..cc635b4e 100644 --- a/src/NumSharp.Core/Creation/np.ones.cs +++ b/src/NumSharp.Core/Creation/np.ones.cs @@ -13,7 +13,7 @@ public static partial class np /// /// Shape of the new array. /// The desired data-type for the array, e.g., . Default is / . - /// https://docs.scipy.org/doc/numpy/reference/generated/numpy.ones.html + /// https://numpy.org/doc/stable/reference/generated/numpy.ones.html public static NDArray ones(params int[] shapes) { return ones(typeof(double), shapes); @@ -24,7 +24,7 @@ public static NDArray ones(params int[] shapes) /// /// Shape of the new array. /// The desired data-type for the array, e.g., . Default is / . - /// https://docs.scipy.org/doc/numpy/reference/generated/numpy.ones.html + /// https://numpy.org/doc/stable/reference/generated/numpy.ones.html public static NDArray ones(Type dtype = null, params int[] shapes) { return ones(new Shape(shapes), dtype: dtype); @@ -35,7 +35,7 @@ public static NDArray ones(Type dtype = null, params int[] shapes) /// /// Shape of the new array. /// The desired data-type for the array, e.g., . Default is / . - /// https://docs.scipy.org/doc/numpy/reference/generated/numpy.ones.html + /// https://numpy.org/doc/stable/reference/generated/numpy.ones.html public static NDArray ones(params int[] shapes) where T : unmanaged { return ones(new Shape(shapes), typeof(T)); @@ -46,7 +46,7 @@ public static NDArray ones(params int[] shapes) where T : unmanaged /// /// Shape of the new array. /// The desired data-type for the array, e.g., . Default is / . - /// https://docs.scipy.org/doc/numpy/reference/generated/numpy.ones.html + /// https://numpy.org/doc/stable/reference/generated/numpy.ones.html public static NDArray ones(Shape shape, Type dtype) { return ones(shape, (dtype ?? typeof(double)).GetTypeCode()); @@ -58,7 +58,7 @@ public static NDArray ones(Shape shape, Type dtype) /// /// Shape of the new array. /// The desired data-type for the array, e.g., . Default is / . - /// https://docs.scipy.org/doc/numpy/reference/generated/numpy.ones.html + /// https://numpy.org/doc/stable/reference/generated/numpy.ones.html public static NDArray ones(Shape shape) { return ones(shape, NPTypeCode.Double); @@ -69,7 +69,7 @@ public static NDArray ones(Shape shape) /// /// Shape of the new array. /// The desired data-type for the array, e.g., . Default is / . - /// https://docs.scipy.org/doc/numpy/reference/generated/numpy.ones.html + /// https://numpy.org/doc/stable/reference/generated/numpy.ones.html public static NDArray ones(Shape shape, NPTypeCode typeCode) { object one = null; diff --git a/src/NumSharp.Core/Creation/np.ones_like.cs b/src/NumSharp.Core/Creation/np.ones_like.cs index c2867895..cb2f187f 100644 --- a/src/NumSharp.Core/Creation/np.ones_like.cs +++ b/src/NumSharp.Core/Creation/np.ones_like.cs @@ -10,7 +10,7 @@ public static partial class np /// Array of ones with the same shape and type as a. /// Overrides the data type of the result. /// Array of zeros with the same shape and type as `nd`. - /// https://docs.scipy.org/doc/numpy/reference/generated/numpy.ones_like.html + /// https://numpy.org/doc/stable/reference/generated/numpy.ones_like.html public static NDArray ones_like(NDArray a, Type dtype = null) { return np.ones(new Shape(a.shape), dtype ?? a.dtype); diff --git a/src/NumSharp.Core/Creation/np.stack.cs b/src/NumSharp.Core/Creation/np.stack.cs index 90fb41b1..a8cba279 100644 --- a/src/NumSharp.Core/Creation/np.stack.cs +++ b/src/NumSharp.Core/Creation/np.stack.cs @@ -12,7 +12,7 @@ public static partial class np /// Each array must have the same shape. /// The axis in the result array along which the input arrays are stacked. /// The stacked array has one more dimension than the input arrays. - /// https://docs.scipy.org/doc/numpy/reference/generated/numpy.stack.html + /// https://numpy.org/doc/stable/reference/generated/numpy.stack.html public static NDArray stack(NDArray[] arrays, int axis = 0) { if (arrays == null) diff --git a/src/NumSharp.Core/Creation/np.vstack.cs b/src/NumSharp.Core/Creation/np.vstack.cs index d434fe83..6d3e07e0 100644 --- a/src/NumSharp.Core/Creation/np.vstack.cs +++ b/src/NumSharp.Core/Creation/np.vstack.cs @@ -10,7 +10,7 @@ public static partial class np /// /// The arrays must have the same shape along all but the first axis. 1-D arrays must have the same length. /// The array formed by stacking the given arrays, will be at least 2-D. - /// https://docs.scipy.org/doc/numpy/reference/generated/numpy.vstack.html + /// https://numpy.org/doc/stable/reference/generated/numpy.vstack.html public static NDArray vstack(params NDArray[] tup) { if (tup == null) diff --git a/src/NumSharp.Core/Creation/np.zeros.cs b/src/NumSharp.Core/Creation/np.zeros.cs index 7289796d..bd41b833 100644 --- a/src/NumSharp.Core/Creation/np.zeros.cs +++ b/src/NumSharp.Core/Creation/np.zeros.cs @@ -10,7 +10,7 @@ public static partial class np /// /// Shape of the new array, /// Array of zeros with the given shape, dtype. - /// https://docs.scipy.org/doc/numpy/reference/generated/numpy.zeros.html + /// https://numpy.org/doc/stable/reference/generated/numpy.zeros.html public static NDArray zeros(params int[] shapes) { return zeros(shapes, null); @@ -21,7 +21,7 @@ public static NDArray zeros(params int[] shapes) /// /// Shape of the new array, /// Array of zeros with the given shape, type . - /// https://docs.scipy.org/doc/numpy/reference/generated/numpy.zeros.html + /// https://numpy.org/doc/stable/reference/generated/numpy.zeros.html public static NDArray zeros(params int[] shapes) where T : unmanaged { return zeros(shapes, typeof(T)); @@ -33,7 +33,7 @@ public static NDArray zeros(params int[] shapes) where T : unmanaged /// Shape of the new array, /// The desired data-type for the array, e.g., . Default is / . /// Array of zeros with the given shape, dtype. - /// https://docs.scipy.org/doc/numpy/reference/generated/numpy.zeros.html + /// https://numpy.org/doc/stable/reference/generated/numpy.zeros.html public static NDArray zeros(Shape shape, Type dtype) { return zeros(shape, (dtype ?? typeof(double)).GetTypeCode()); @@ -45,7 +45,7 @@ public static NDArray zeros(Shape shape, Type dtype) /// Shape of the new array, /// The desired data-type for the array, e.g., . Default is / . /// Array of zeros with the given shape, dtype. - /// https://docs.scipy.org/doc/numpy/reference/generated/numpy.zeros.html + /// https://numpy.org/doc/stable/reference/generated/numpy.zeros.html public static NDArray zeros(Shape shape, NPTypeCode typeCode) { if (typeCode == NPTypeCode.Empty) @@ -60,7 +60,7 @@ public static NDArray zeros(Shape shape, NPTypeCode typeCode) /// Shape of the new array, /// The desired data-type for the array, e.g., . Default is / . /// Array of zeros with the given shape, dtype. - /// https://docs.scipy.org/doc/numpy/reference/generated/numpy.zeros.html + /// https://numpy.org/doc/stable/reference/generated/numpy.zeros.html public static NDArray zeros(Shape shape) { return new NDArray(NPTypeCode.Double, shape, true); //already allocates inside. diff --git a/src/NumSharp.Core/Creation/np.zeros_like.cs b/src/NumSharp.Core/Creation/np.zeros_like.cs index e39622b8..1c68e7c7 100644 --- a/src/NumSharp.Core/Creation/np.zeros_like.cs +++ b/src/NumSharp.Core/Creation/np.zeros_like.cs @@ -10,7 +10,7 @@ public static partial class np /// The shape and data-type of a define these same attributes of the returned array. /// Overrides the data type of the result. /// Array of zeros with the same shape and type as `nd`. - /// https://docs.scipy.org/doc/numpy/reference/generated/numpy.zeros_like.html + /// https://numpy.org/doc/stable/reference/generated/numpy.zeros_like.html public static NDArray zeros_like(NDArray a, Type dtype = null) { return np.zeros(new Shape(a.shape), dtype ?? a.dtype); diff --git a/src/NumSharp.Core/Generics/NDArray`1.cs b/src/NumSharp.Core/Generics/NDArray`1.cs index 98f18d50..f698b198 100644 --- a/src/NumSharp.Core/Generics/NDArray`1.cs +++ b/src/NumSharp.Core/Generics/NDArray`1.cs @@ -225,7 +225,7 @@ public NDArray(Shape shape, bool fillZeros) : base(InfoOf.NPTypeCode, sh /// /// A 1-D iterator over the array. /// - /// https://docs.scipy.org/doc/numpy/reference/generated/numpy.ndarray.flat.html + /// https://numpy.org/doc/stable/reference/generated/numpy.ndarray.flat.html public new NDArray flat { get @@ -238,7 +238,7 @@ public NDArray(Shape shape, bool fillZeros) : base(InfoOf.NPTypeCode, sh /// The transposed array.

/// Same as self.transpose(). /// - /// https://docs.scipy.org/doc/numpy/reference/generated/numpy.ndarray.T.html + /// https://numpy.org/doc/stable/reference/generated/numpy.ndarray.T.html public new NDArray T { get diff --git a/src/NumSharp.Core/Generics/NdArray`1.ReShape.cs b/src/NumSharp.Core/Generics/NdArray`1.ReShape.cs index aeccc517..0617e0f0 100644 --- a/src/NumSharp.Core/Generics/NdArray`1.ReShape.cs +++ b/src/NumSharp.Core/Generics/NdArray`1.ReShape.cs @@ -9,7 +9,7 @@ public partial class NDArray /// /// The new shape should be compatible with the original shape. If an integer, then the result will be a 1-D array of that length. One shape dimension can be -1. In this case, the value is inferred from the length of the array and remaining dimensions. /// This will be a new view object if possible; otherwise, it will be a copy. Note there is no guarantee of the memory layout (C- or Fortran- contiguous) of the returned array. - /// https://docs.scipy.org/doc/numpy/reference/generated/numpy.reshape.html + /// https://numpy.org/doc/stable/reference/generated/numpy.reshape.html public new NDArray reshape(Shape newShape) { return reshape(ref newShape); @@ -20,7 +20,7 @@ public partial class NDArray /// /// The new shape should be compatible with the original shape. If an integer, then the result will be a 1-D array of that length. One shape dimension can be -1. In this case, the value is inferred from the length of the array and remaining dimensions. /// This will be a new view object if possible; otherwise, it will be a copy. Note there is no guarantee of the memory layout (C- or Fortran- contiguous) of the returned array. - /// https://docs.scipy.org/doc/numpy/reference/generated/numpy.reshape.html + /// https://numpy.org/doc/stable/reference/generated/numpy.reshape.html public new NDArray reshape(ref Shape newShape) { var ret = Storage.Alias(); @@ -36,7 +36,7 @@ public partial class NDArray /// and remaining dimensions. /// This will be a new view object if possible; otherwise, it will be a copy. Note there is no guarantee of the /// memory layout (C- or Fortran- contiguous) of the returned array. - /// https://docs.scipy.org/doc/numpy/reference/generated/numpy.reshape.html + /// https://numpy.org/doc/stable/reference/generated/numpy.reshape.html [SuppressMessage("ReSharper", "ParameterHidesMember")] public new NDArray reshape(params int[] shape) { @@ -50,7 +50,7 @@ public partial class NDArray /// /// The new shape should be compatible with the original shape. If an integer, then the result will be a 1-D array of that length. One shape dimension can be -1. In this case, the value is inferred from the length of the array and remaining dimensions. /// This will be a new view object if possible; otherwise, it will be a copy. Note there is no guarantee of the memory layout (C- or Fortran- contiguous) of the returned array. - /// https://docs.scipy.org/doc/numpy/reference/generated/numpy.reshape.html + /// https://numpy.org/doc/stable/reference/generated/numpy.reshape.html public new NDArray reshape_unsafe(Shape newshape) { return reshape_unsafe(ref newshape); @@ -61,7 +61,7 @@ public partial class NDArray /// /// The new shape should be compatible with the original shape. If an integer, then the result will be a 1-D array of that length. One shape dimension can be -1. In this case, the value is inferred from the length of the array and remaining dimensions. /// This will be a new view object if possible; otherwise, it will be a copy. Note there is no guarantee of the memory layout (C- or Fortran- contiguous) of the returned array. - /// https://docs.scipy.org/doc/numpy/reference/generated/numpy.reshape.html + /// https://numpy.org/doc/stable/reference/generated/numpy.reshape.html public new NDArray reshape_unsafe(ref Shape newShape) { var ret = Storage.Alias(); @@ -77,7 +77,7 @@ public partial class NDArray /// and remaining dimensions. /// This will be a new view object if possible; otherwise, it will be a copy. Note there is no guarantee of the /// memory layout (C- or Fortran- contiguous) of the returned array. - /// https://docs.scipy.org/doc/numpy/reference/generated/numpy.reshape.html + /// https://numpy.org/doc/stable/reference/generated/numpy.reshape.html [SuppressMessage("ReSharper", "ParameterHidesMember")] public new NDArray reshape_unsafe(params int[] shape) { diff --git a/src/NumSharp.Core/Indexing/np.nonzero.cs b/src/NumSharp.Core/Indexing/np.nonzero.cs index f5f5b2a7..7043fecc 100644 --- a/src/NumSharp.Core/Indexing/np.nonzero.cs +++ b/src/NumSharp.Core/Indexing/np.nonzero.cs @@ -19,7 +19,7 @@ public static partial class np /// /// Input array. /// Indices of elements that are non-zero. - /// https://docs.scipy.org/doc/numpy/reference/generated/numpy.nonzero.html + /// https://numpy.org/doc/stable/reference/generated/numpy.nonzero.html public static NDArray[] nonzero(in NDArray a) => a.TensorEngine.NonZero(a); } diff --git a/src/NumSharp.Core/LinearAlgebra/NDArray.dot.cs b/src/NumSharp.Core/LinearAlgebra/NDArray.dot.cs index de463557..d536df9a 100644 --- a/src/NumSharp.Core/LinearAlgebra/NDArray.dot.cs +++ b/src/NumSharp.Core/LinearAlgebra/NDArray.dot.cs @@ -8,7 +8,7 @@ public partial class NDArray /// Rhs, Second argument. /// Returns the dot product of a and b. If a and b are both scalars or both 1-D arrays then a scalar is returned; otherwise an array is returned. If out is given, then it is returned. /// - /// https://docs.scipy.org/doc/numpy/reference/generated/numpy.dot.html

+ /// https://numpy.org/doc/stable/reference/generated/numpy.dot.html

/// Specifically,

/// - If both a and b are 1-D arrays, it is inner product of vectors (without complex conjugation).

/// - If both a and b are 2-D arrays, it is matrix multiplication, but using matmul or a @ b is preferred.

diff --git a/src/NumSharp.Core/LinearAlgebra/np.dot.cs b/src/NumSharp.Core/LinearAlgebra/np.dot.cs index 5ab97679..44ac7f4d 100644 --- a/src/NumSharp.Core/LinearAlgebra/np.dot.cs +++ b/src/NumSharp.Core/LinearAlgebra/np.dot.cs @@ -10,7 +10,7 @@ public static partial class np /// Rhs, Second argument. /// Returns the dot product of a and b. If a and b are both scalars or both 1-D arrays then a scalar is returned; otherwise an array is returned. If out is given, then it is returned. /// - /// https://docs.scipy.org/doc/numpy/reference/generated/numpy.dot.html

+ /// https://numpy.org/doc/stable/reference/generated/numpy.dot.html

/// Specifically,

/// - If both a and b are 1-D arrays, it is inner product of vectors (without complex conjugation).

/// - If both a and b are 2-D arrays, it is matrix multiplication, but using matmul or a @ b is preferred.

diff --git a/src/NumSharp.Core/LinearAlgebra/np.matmul.cs b/src/NumSharp.Core/LinearAlgebra/np.matmul.cs index 7c0f2773..2acc95d2 100644 --- a/src/NumSharp.Core/LinearAlgebra/np.matmul.cs +++ b/src/NumSharp.Core/LinearAlgebra/np.matmul.cs @@ -8,7 +8,7 @@ public static partial class np /// Lhs Input array, scalars not allowed. /// Rhs Input array, scalars not allowed. /// The matrix product of the inputs. This is a scalar only when both x1, x2 are 1-d vectors. - /// https://docs.scipy.org/doc/numpy/reference/generated/numpy.matmul.html + /// https://numpy.org/doc/stable/reference/generated/numpy.matmul.html public static NDArray matmul(in NDArray x1, in NDArray x2) => x1.TensorEngine.Matmul(x1, x2); } diff --git a/src/NumSharp.Core/LinearAlgebra/np.outer.cs b/src/NumSharp.Core/LinearAlgebra/np.outer.cs index 28545073..ec914cd3 100644 --- a/src/NumSharp.Core/LinearAlgebra/np.outer.cs +++ b/src/NumSharp.Core/LinearAlgebra/np.outer.cs @@ -10,7 +10,7 @@ public partial class np /// First input vector. Input is flattened if not already 1-dimensional. /// Second input vector. Input is flattened if not already 1-dimensional. /// out[i, j] = a[i] * b[j] - /// https://docs.scipy.org/doc/numpy/reference/generated/numpy.outer.html + /// https://numpy.org/doc/stable/reference/generated/numpy.outer.html public static NDArray outer(in NDArray a, in NDArray b) { //multiply(a.ravel()[:, newaxis], b.ravel()[newaxis, :], out) diff --git a/src/NumSharp.Core/Logic/np.all.cs b/src/NumSharp.Core/Logic/np.all.cs index 7691b25a..2719af63 100644 --- a/src/NumSharp.Core/Logic/np.all.cs +++ b/src/NumSharp.Core/Logic/np.all.cs @@ -9,7 +9,7 @@ public static partial class np /// /// Input array or object that can be converted to an array. /// A new boolean or ndarray is returned unless out is specified, in which case a reference to out is returned. - /// https://docs.scipy.org/doc/numpy/reference/generated/numpy.all.html + /// https://numpy.org/doc/stable/reference/generated/numpy.all.html public static bool all(NDArray a) { #if _REGEN @@ -53,7 +53,7 @@ public static bool all(NDArray a) /// Input array or object that can be converted to an array. /// Axis or axes along which a logical AND reduction is performed. The default (axis = None) is to perform a logical OR over all the dimensions of the input array. axis may be negative, in which case it counts from the last to the first axis. /// A new boolean or ndarray is returned unless out is specified, in which case a reference to out is returned. - /// https://docs.scipy.org/doc/numpy/reference/generated/numpy.all.html + /// https://numpy.org/doc/stable/reference/generated/numpy.all.html public static NDArray all(NDArray nd, int axis, bool keepdims = false) { if (axis < 0) diff --git a/src/NumSharp.Core/Logic/np.any.cs b/src/NumSharp.Core/Logic/np.any.cs index 3aa0a920..e5b96a6c 100644 --- a/src/NumSharp.Core/Logic/np.any.cs +++ b/src/NumSharp.Core/Logic/np.any.cs @@ -10,7 +10,7 @@ public static partial class np /// /// Input array or object that can be converted to an array. /// A new boolean or ndarray is returned unless out is specified, in which case a reference to out is returned. - /// https://docs.scipy.org/doc/numpy/reference/generated/numpy.any.html + /// https://numpy.org/doc/stable/reference/generated/numpy.any.html public static bool any(NDArray a) { #if _REGEN @@ -54,7 +54,7 @@ public static bool any(NDArray a) /// Input array or object that can be converted to an array. /// Axis or axes along which a logical OR reduction is performed. The default (axis = None) is to perform a logical OR over all the dimensions of the input array. axis may be negative, in which case it counts from the last to the first axis. /// A new boolean or ndarray is returned unless out is specified, in which case a reference to out is returned. - /// https://docs.scipy.org/doc/numpy/reference/generated/numpy.any.html + /// https://numpy.org/doc/stable/reference/generated/numpy.any.html public static NDArray any(NDArray nd, int axis, bool keepdims) { if (axis < 0) diff --git a/src/NumSharp.Core/Logic/np.array_equal.cs b/src/NumSharp.Core/Logic/np.array_equal.cs index a970e292..cc4c4523 100644 --- a/src/NumSharp.Core/Logic/np.array_equal.cs +++ b/src/NumSharp.Core/Logic/np.array_equal.cs @@ -7,7 +7,7 @@ public static partial class np /// Input array. /// Input array. /// Returns True if the arrays are equal. - /// https://docs.scipy.org/doc/numpy-1.16.0/reference/generated/numpy.array_equal.html + /// https://numpy.org/doc/stable/reference/generated/numpy.array_equal.html public static bool array_equal(NDArray a, NDArray b) { return a.array_equal(b); diff --git a/src/NumSharp.Core/Logic/np.find_common_type.cs b/src/NumSharp.Core/Logic/np.find_common_type.cs index 6967b4c1..c2d844cc 100644 --- a/src/NumSharp.Core/Logic/np.find_common_type.cs +++ b/src/NumSharp.Core/Logic/np.find_common_type.cs @@ -644,7 +644,7 @@ private static readonly (NPTypeCode Type, int Priority)[] powerPriorities = /// A list of dtypes or dtype convertible objects representing arrays. Can be null. /// A list of dtypes or dtype convertible objects representing scalars.Can be null. /// The common data type, which is the maximum of array_types ignoring scalar_types, unless the maximum of scalar_types is of a different kind (dtype.kind). If the kind is not understood, then None is returned. - /// https://docs.scipy.org/doc/numpy/reference/generated/numpy.find_common_type.html + /// https://numpy.org/doc/stable/reference/generated/numpy.find_common_type.html public static NPTypeCode find_common_type(NPTypeCode[] array_types, NPTypeCode[] scalar_types) { return _FindCommonType(array_types ?? Array.Empty(), scalar_types ?? Array.Empty()); @@ -658,7 +658,7 @@ public static NPTypeCode find_common_type(NPTypeCode[] array_types, NPTypeCode[] /// A list of dtypes or dtype convertible objects representing arrays. Can be null. /// A list of dtypes or dtype convertible objects representing scalars.Can be null. /// The common data type, which is the maximum of array_types ignoring scalar_types, unless the maximum of scalar_types is of a different kind (dtype.kind). If the kind is not understood, then None is returned. - /// https://docs.scipy.org/doc/numpy/reference/generated/numpy.find_common_type.html + /// https://numpy.org/doc/stable/reference/generated/numpy.find_common_type.html public static NPTypeCode find_common_type(Type[] array_types) { return _FindCommonType(array_types?.Select(v => v.GetTypeCode()).ToArray() ?? Array.Empty(), Array.Empty()); @@ -670,7 +670,7 @@ public static NPTypeCode find_common_type(Type[] array_types) /// A list of dtypes or dtype convertible objects representing arrays. Can be null. /// A list of dtypes or dtype convertible objects representing scalars.Can be null. /// The common data type, which is the maximum of array_types ignoring scalar_types, unless the maximum of scalar_types is of a different kind (dtype.kind). If the kind is not understood, then None is returned. - /// https://docs.scipy.org/doc/numpy/reference/generated/numpy.find_common_type.html + /// https://numpy.org/doc/stable/reference/generated/numpy.find_common_type.html public static NPTypeCode find_common_type(Type[] array_types, Type[] scalar_types) { return _FindCommonType(array_types?.Select(v => v.GetTypeCode()).ToArray() ?? Array.Empty(), scalar_types?.Select(v => v.GetTypeCode()).ToArray() ?? Array.Empty()); @@ -682,7 +682,7 @@ public static NPTypeCode find_common_type(Type[] array_types, Type[] scalar_type /// A list of dtypes or dtype convertible objects representing arrays. Can be null. /// A list of dtypes or dtype convertible objects representing scalars.Can be null. /// The common data type, which is the maximum of array_types ignoring scalar_types, unless the maximum of scalar_types is of a different kind (dtype.kind). If the kind is not understood, then None is returned. - /// https://docs.scipy.org/doc/numpy/reference/generated/numpy.find_common_type.html + /// https://numpy.org/doc/stable/reference/generated/numpy.find_common_type.html public static NPTypeCode find_common_type(string[] array_types, string[] scalar_types) { return _FindCommonType(array_types?.Select(v => np.dtype(v).typecode).ToArray() ?? Array.Empty(), scalar_types?.Select(v => np.dtype(v).typecode).ToArray() ?? Array.Empty()); @@ -694,7 +694,7 @@ public static NPTypeCode find_common_type(string[] array_types, string[] scalar_ /// A list of dtypes or dtype convertible objects representing arrays. Can be null. /// A list of dtypes or dtype convertible objects representing scalars.Can be null. /// The common data type, which is the maximum of array_types ignoring scalar_types, unless the maximum of scalar_types is of a different kind (dtype.kind). If the kind is not understood, then None is returned. - /// https://docs.scipy.org/doc/numpy/reference/generated/numpy.find_common_type.html + /// https://numpy.org/doc/stable/reference/generated/numpy.find_common_type.html public static NPTypeCode find_common_type(Type[] array_types, NPTypeCode[] scalar_types) { return _FindCommonType(array_types?.Select(v => v.GetTypeCode()).ToArray() ?? Array.Empty(), scalar_types ?? Array.Empty()); @@ -706,7 +706,7 @@ public static NPTypeCode find_common_type(Type[] array_types, NPTypeCode[] scala /// A list of dtypes or dtype convertible objects representing arrays. Can be null. /// A list of dtypes or dtype convertible objects representing scalars.Can be null. /// The common data type, which is the maximum of array_types ignoring scalar_types, unless the maximum of scalar_types is of a different kind (dtype.kind). If the kind is not understood, then None is returned. - /// https://docs.scipy.org/doc/numpy/reference/generated/numpy.find_common_type.html + /// https://numpy.org/doc/stable/reference/generated/numpy.find_common_type.html public static NPTypeCode find_common_type(NPTypeCode[] array_types, Type[] scalar_types) { return _FindCommonType(array_types ?? Array.Empty(), scalar_types?.Select(v => v.GetTypeCode()).ToArray() ?? Array.Empty()); diff --git a/src/NumSharp.Core/Logic/np.is.cs b/src/NumSharp.Core/Logic/np.is.cs index 7cebb6d7..01dc917e 100644 --- a/src/NumSharp.Core/Logic/np.is.cs +++ b/src/NumSharp.Core/Logic/np.is.cs @@ -66,7 +66,7 @@ public static NDArray isnan(NDArray a) /// /// Returns true incase of a number, bool or string. If null, returns false. /// - /// https://docs.scipy.org/doc/numpy/reference/generated/numpy.isscalar.html + /// https://numpy.org/doc/stable/reference/generated/numpy.isscalar.html public static bool isscalar(object obj) { switch (obj) diff --git a/src/NumSharp.Core/Manipulation/NDArray.itemset.cs b/src/NumSharp.Core/Manipulation/NDArray.itemset.cs index 012d73f5..6e7bf19a 100644 --- a/src/NumSharp.Core/Manipulation/NDArray.itemset.cs +++ b/src/NumSharp.Core/Manipulation/NDArray.itemset.cs @@ -7,7 +7,7 @@ public partial class NDArray /// /// Insert scalar into an array (scalar is cast to array’s dtype, if possible) /// - /// https://docs.scipy.org/doc/numpy/reference/generated/numpy.ndarray.itemset.html + /// https://numpy.org/doc/stable/reference/generated/numpy.ndarray.itemset.html public void itemset(ref Shape shape, ValueType val) { SetValue(val, shape.dimensions); //TODO! if T != dtype, we need to cast! @@ -16,7 +16,7 @@ public void itemset(ref Shape shape, ValueType val) /// /// Insert scalar into an array (scalar is cast to array’s dtype, if possible) /// - /// https://docs.scipy.org/doc/numpy/reference/generated/numpy.ndarray.itemset.html + /// https://numpy.org/doc/stable/reference/generated/numpy.ndarray.itemset.html public void itemset(Shape shape, ValueType val) { SetValue(val, shape.dimensions); //TODO! if T != dtype, we need to cast! @@ -25,7 +25,7 @@ public void itemset(Shape shape, ValueType val) /// /// Insert scalar into an array (scalar is cast to array’s dtype, if possible) /// - /// https://docs.scipy.org/doc/numpy/reference/generated/numpy.ndarray.itemset.html + /// https://numpy.org/doc/stable/reference/generated/numpy.ndarray.itemset.html public void itemset(int[] shape, ValueType val) { SetValue(val, shape); //TODO! if T != dtype, we need to cast! @@ -34,7 +34,7 @@ public void itemset(int[] shape, ValueType val) /// /// Insert scalar into an array (scalar is cast to array’s dtype, if possible) /// - /// https://docs.scipy.org/doc/numpy/reference/generated/numpy.ndarray.itemset.html + /// https://numpy.org/doc/stable/reference/generated/numpy.ndarray.itemset.html public void itemset(int[] shape, T val) where T : unmanaged { SetValue(val, shape); //TODO! if T != dtype, we need to cast! diff --git a/src/NumSharp.Core/Manipulation/NDArray.ravel.cs b/src/NumSharp.Core/Manipulation/NDArray.ravel.cs index f6720ee3..11f1bf95 100644 --- a/src/NumSharp.Core/Manipulation/NDArray.ravel.cs +++ b/src/NumSharp.Core/Manipulation/NDArray.ravel.cs @@ -5,7 +5,7 @@ public partial class NDArray /// /// Return a contiguous flattened array. A 1-D array, containing the elements of the input, is returned /// - /// https://docs.scipy.org/doc/numpy/reference/generated/numpy.ravel.html + /// https://numpy.org/doc/stable/reference/generated/numpy.ravel.html ///

If this array's is a slice, the a copy will be made.
public NDArray ravel() { diff --git a/src/NumSharp.Core/Manipulation/NDArray.unique.cs b/src/NumSharp.Core/Manipulation/NDArray.unique.cs index 4d885089..34f2df2b 100644 --- a/src/NumSharp.Core/Manipulation/NDArray.unique.cs +++ b/src/NumSharp.Core/Manipulation/NDArray.unique.cs @@ -18,7 +18,7 @@ public partial class NDArray /// * the number of times each unique value comes up in the input array

/// /// The sorted unique values. - /// https://docs.scipy.org/doc/numpy/reference/generated/numpy.unique.html + /// https://numpy.org/doc/stable/reference/generated/numpy.unique.html public NDArray unique() { switch (typecode) @@ -55,7 +55,7 @@ public NDArray unique() /// * the number of times each unique value comes up in the input array

/// /// - /// https://docs.scipy.org/doc/numpy/reference/generated/numpy.unique.html + /// https://numpy.org/doc/stable/reference/generated/numpy.unique.html protected NDArray unique() where T : unmanaged { unsafe diff --git a/src/NumSharp.Core/Manipulation/NdArray.Transpose.cs b/src/NumSharp.Core/Manipulation/NdArray.Transpose.cs index 2475012d..44f21d77 100644 --- a/src/NumSharp.Core/Manipulation/NdArray.Transpose.cs +++ b/src/NumSharp.Core/Manipulation/NdArray.Transpose.cs @@ -7,7 +7,7 @@ public partial class NDArray /// /// By default, reverse the dimensions, otherwise permute the axes according to the values given. /// a with its axes permuted. A view is returned whenever possible. - /// https://docs.scipy.org/doc/numpy/reference/generated/numpy.transpose.html + /// https://numpy.org/doc/stable/reference/generated/numpy.transpose.html public NDArray transpose(int[] premute = null) => np.transpose(this, premute); } diff --git a/src/NumSharp.Core/Manipulation/NdArray.swapaxes.cs b/src/NumSharp.Core/Manipulation/NdArray.swapaxes.cs index b93c60e0..a284abce 100644 --- a/src/NumSharp.Core/Manipulation/NdArray.swapaxes.cs +++ b/src/NumSharp.Core/Manipulation/NdArray.swapaxes.cs @@ -8,7 +8,7 @@ public partial class NDArray /// Input array. /// First axis. /// Second axis. - /// https://docs.scipy.org/doc/numpy/reference/generated/numpy.swapaxes.html + /// https://numpy.org/doc/stable/reference/generated/numpy.swapaxes.html public NDArray swapaxes(int axis1, int axis2) => TensorEngine.SwapAxes(this, axis1, axis2); } diff --git a/src/NumSharp.Core/Manipulation/np.asscalar.cs b/src/NumSharp.Core/Manipulation/np.asscalar.cs index e83237d1..1a0247a5 100644 --- a/src/NumSharp.Core/Manipulation/np.asscalar.cs +++ b/src/NumSharp.Core/Manipulation/np.asscalar.cs @@ -11,7 +11,7 @@ public static partial class np /// /// Input NDArray of size 1. /// - /// https://docs.scipy.org/doc/numpy-1.16.0/reference/generated/numpy.asscalar.html + /// https://numpy.org/doc/stable/reference/generated/numpy.asscalar.html public static T asscalar(NDArray nd) where T : unmanaged { if (nd.size != 1) @@ -27,7 +27,7 @@ public static T asscalar(NDArray nd) where T : unmanaged /// /// Input array of size 1. /// - /// https://docs.scipy.org/doc/numpy-1.16.0/reference/generated/numpy.asscalar.html + /// https://numpy.org/doc/stable/reference/generated/numpy.asscalar.html public static T asscalar(Array arr) { if (arr.Length != 1) @@ -43,7 +43,7 @@ public static T asscalar(Array arr) /// /// Input NDArray of size 1. /// - /// https://docs.scipy.org/doc/numpy-1.16.0/reference/generated/numpy.asscalar.html + /// https://numpy.org/doc/stable/reference/generated/numpy.asscalar.html public static ValueType asscalar(NDArray nd) { if (nd.size != 1) @@ -56,7 +56,7 @@ public static ValueType asscalar(NDArray nd) /// /// Input array of size 1. /// - /// https://docs.scipy.org/doc/numpy-1.16.0/reference/generated/numpy.asscalar.html + /// https://numpy.org/doc/stable/reference/generated/numpy.asscalar.html public static ValueType asscalar(Array arr) { if (arr.Length != 1) @@ -69,7 +69,7 @@ public static ValueType asscalar(Array arr) /// /// Input array of size 1. /// - /// https://docs.scipy.org/doc/numpy-1.16.0/reference/generated/numpy.asscalar.html + /// https://numpy.org/doc/stable/reference/generated/numpy.asscalar.html public static T asscalar(ArraySlice arr) where T : unmanaged { if (arr.Count != 1) @@ -82,7 +82,7 @@ public static T asscalar(ArraySlice arr) where T : unmanaged /// /// Input array of size 1. /// - /// https://docs.scipy.org/doc/numpy-1.16.0/reference/generated/numpy.asscalar.html + /// https://numpy.org/doc/stable/reference/generated/numpy.asscalar.html public static T asscalar(IArraySlice arr) where T : unmanaged { if (arr.Count != 1) diff --git a/src/NumSharp.Core/Manipulation/np.atleastd.cs b/src/NumSharp.Core/Manipulation/np.atleastd.cs index 176cef0a..66c23efb 100644 --- a/src/NumSharp.Core/Manipulation/np.atleastd.cs +++ b/src/NumSharp.Core/Manipulation/np.atleastd.cs @@ -9,7 +9,7 @@ public static partial class np /// /// One or more array-like sequences. Non-array inputs are converted to arrays. Arrays that already have three or more dimensions are preserved. /// An array, or list of arrays, each with a.ndim >= 3. Copies are avoided where possible, and views with three or more dimensions are returned. For example, a 1-D array of shape (N,) becomes a view of shape (1, N, 1), and a 2-D array of shape (M, N) becomes a view of shape (M, N, 1). - /// https://docs.scipy.org/doc/numpy/reference/generated/numpy.atleast_3d.html + /// https://numpy.org/doc/stable/reference/generated/numpy.atleast_3d.html public static NDArray atleast_3d(object arys) { if (arys == null) @@ -33,7 +33,7 @@ public static NDArray atleast_3d(object arys) /// View inputs as arrays with at least three dimensions. /// /// An array, or list of arrays, each with a.ndim >= 3. Copies are avoided where possible, and views with three or more dimensions are returned. For example, a 1-D array of shape (N,) becomes a view of shape (1, N, 1), and a 2-D array of shape (M, N) becomes a view of shape (M, N, 1). - /// https://docs.scipy.org/doc/numpy/reference/generated/numpy.atleast_3d.html + /// https://numpy.org/doc/stable/reference/generated/numpy.atleast_3d.html public static NDArray atleast_3d(NDArray arr) { if (arr == null) @@ -57,7 +57,7 @@ public static NDArray atleast_3d(NDArray arr) /// /// One or more array-like sequences. Non-array inputs are converted to arrays. Arrays that already have three or more dimensions are preserved. /// An array, or list of arrays, each with a.ndim >= 3. Copies are avoided where possible, and views with three or more dimensions are returned. For example, a 1-D array of shape (N,) becomes a view of shape (1, N, 1), and a 2-D array of shape (M, N) becomes a view of shape (M, N, 1). - /// https://docs.scipy.org/doc/numpy/reference/generated/numpy.atleast_3d.html + /// https://numpy.org/doc/stable/reference/generated/numpy.atleast_3d.html public static NDArray[] atleast_3d(params object[] arys) { if (arys == null) @@ -95,7 +95,7 @@ public static NDArray[] atleast_3d(params object[] arys) /// /// One or more array-like sequences. Non-array inputs are converted to arrays. Arrays that already have three or more dimensions are preserved. /// An array, or list of arrays, each with a.ndim >= 3. Copies are avoided where possible, and views with three or more dimensions are returned. For example, a 1-D array of shape (N,) becomes a view of shape (1, N, 1), and a 2-D array of shape (M, N) becomes a view of shape (M, N, 1). - /// https://docs.scipy.org/doc/numpy/reference/generated/numpy.atleast_3d.html + /// https://numpy.org/doc/stable/reference/generated/numpy.atleast_3d.html public static NDArray[] atleast_3d(params NDArray[] arys) { if (arys == null) @@ -133,7 +133,7 @@ public static NDArray[] atleast_3d(params NDArray[] arys) /// /// One or more array-like sequences. Non-array inputs are converted to arrays. Arrays that already have two or more dimensions are preserved. /// An array, or list of arrays, each with a.ndim >= 2. Copies are avoided where possible, and views with two or more dimensions are returned. - /// https://docs.scipy.org/doc/numpy/reference/generated/numpy.atleast_2d.html + /// https://numpy.org/doc/stable/reference/generated/numpy.atleast_2d.html public static NDArray atleast_2d(object arys) { if (arys == null) @@ -156,7 +156,7 @@ public static NDArray atleast_2d(object arys) /// /// One or more array-like sequences. Non-array inputs are converted to arrays. Arrays that already have two or more dimensions are preserved. /// An array, or list of arrays, each with a.ndim >= 2. Copies are avoided where possible, and views with two or more dimensions are returned. - /// https://docs.scipy.org/doc/numpy/reference/generated/numpy.atleast_2d.html + /// https://numpy.org/doc/stable/reference/generated/numpy.atleast_2d.html public static NDArray atleast_2d(NDArray arr) { if (arr == null) @@ -178,7 +178,7 @@ public static NDArray atleast_2d(NDArray arr) /// /// One or more array-like sequences. Non-array inputs are converted to arrays. Arrays that already have two or more dimensions are preserved. /// An array, or list of arrays, each with a.ndim >= 2. Copies are avoided where possible, and views with two or more dimensions are returned. - /// https://docs.scipy.org/doc/numpy/reference/generated/numpy.atleast_2d.html + /// https://numpy.org/doc/stable/reference/generated/numpy.atleast_2d.html public static NDArray[] atleast_2d(params object[] arys) { if (arys == null) @@ -212,7 +212,7 @@ public static NDArray[] atleast_2d(params object[] arys) /// /// One or more array-like sequences. Non-array inputs are converted to arrays. Arrays that already have two or more dimensions are preserved. /// An array, or list of arrays, each with a.ndim >= 2. Copies are avoided where possible, and views with two or more dimensions are returned. - /// https://docs.scipy.org/doc/numpy/reference/generated/numpy.atleast_2d.html + /// https://numpy.org/doc/stable/reference/generated/numpy.atleast_2d.html public static NDArray[] atleast_2d(params NDArray[] arys) { if (arys == null) @@ -248,7 +248,7 @@ public static NDArray[] atleast_2d(params NDArray[] arys) /// /// One or more input arrays. /// An array, or list of arrays, each with a.ndim >= 1. Copies are made only if necessary. - /// https://docs.scipy.org/doc/numpy/reference/generated/numpy.atleast_1d.html + /// https://numpy.org/doc/stable/reference/generated/numpy.atleast_1d.html public static NDArray atleast_1d(object arys) { if (arys == null) @@ -269,7 +269,7 @@ public static NDArray atleast_1d(object arys) /// Scalar inputs are converted to 1-dimensional arrays, whilst higher-dimensional inputs are preserved. /// /// An array, or list of arrays, each with a.ndim >= 1. Copies are made only if necessary. - /// https://docs.scipy.org/doc/numpy/reference/generated/numpy.atleast_1d.html + /// https://numpy.org/doc/stable/reference/generated/numpy.atleast_1d.html public static NDArray atleast_1d(NDArray arr) { if (arr == null) @@ -290,7 +290,7 @@ public static NDArray atleast_1d(NDArray arr) /// /// One or more input arrays. /// An array, or list of arrays, each with a.ndim >= 1. Copies are made only if necessary. - /// https://docs.scipy.org/doc/numpy/reference/generated/numpy.atleast_1d.html + /// https://numpy.org/doc/stable/reference/generated/numpy.atleast_1d.html public static NDArray[] atleast_1d(params object[] arys) { if (arys == null) @@ -323,7 +323,7 @@ public static NDArray[] atleast_1d(params object[] arys) /// /// One or more input arrays. /// An array, or list of arrays, each with a.ndim >= 1. Copies are made only if necessary. - /// https://docs.scipy.org/doc/numpy/reference/generated/numpy.atleast_1d.html + /// https://numpy.org/doc/stable/reference/generated/numpy.atleast_1d.html public static NDArray[] atleast_1d(params NDArray[] arys) { if (arys == null) diff --git a/src/NumSharp.Core/Manipulation/np.copyto.cs b/src/NumSharp.Core/Manipulation/np.copyto.cs index 518235f9..b82d9a62 100644 --- a/src/NumSharp.Core/Manipulation/np.copyto.cs +++ b/src/NumSharp.Core/Manipulation/np.copyto.cs @@ -11,7 +11,7 @@ public static partial class np /// /// The array into which values are copied. /// The array from which values are copied. - /// https://docs.scipy.org/doc/numpy/reference/generated/numpy.copyto.html + /// https://numpy.org/doc/stable/reference/generated/numpy.copyto.html public static void copyto(NDArray dst, NDArray src) //todo! add where argument { if (dst == null) diff --git a/src/NumSharp.Core/Manipulation/np.moveaxis.cs b/src/NumSharp.Core/Manipulation/np.moveaxis.cs index 209eb9ca..1e4f627b 100644 --- a/src/NumSharp.Core/Manipulation/np.moveaxis.cs +++ b/src/NumSharp.Core/Manipulation/np.moveaxis.cs @@ -10,7 +10,7 @@ public static partial class np /// Original positions of the axes to move. These must be unique (distinct). /// Destination positions for each of the original axes. These must also be unique (distinct). /// Array with moved axes. - /// https://docs.scipy.org/doc/numpy/reference/generated/numpy.moveaxis.html + /// https://numpy.org/doc/stable/reference/generated/numpy.moveaxis.html public static NDArray moveaxis(in NDArray a, int source, int destination) => a.TensorEngine.MoveAxis(a, new[] {source}, new[] {destination}); @@ -22,7 +22,7 @@ public static NDArray moveaxis(in NDArray a, int source, int destination) /// Original positions of the axes to move. These must be unique (distinct). /// Destination positions for each of the original axes. These must also be unique (distinct). /// Array with moved axes. - /// https://docs.scipy.org/doc/numpy/reference/generated/numpy.moveaxis.html + /// https://numpy.org/doc/stable/reference/generated/numpy.moveaxis.html public static NDArray moveaxis(in NDArray a, int[] source, int destination) => a.TensorEngine.MoveAxis(a, source, new[] {destination}); @@ -34,7 +34,7 @@ public static NDArray moveaxis(in NDArray a, int[] source, int destination) /// Original positions of the axes to move. These must be unique (distinct). /// Destination positions for each of the original axes. These must also be unique (distinct). /// Array with moved axes. - /// https://docs.scipy.org/doc/numpy/reference/generated/numpy.moveaxis.html + /// https://numpy.org/doc/stable/reference/generated/numpy.moveaxis.html public static NDArray moveaxis(in NDArray a, int source, int[] destination) => a.TensorEngine.MoveAxis(a, new[] {source}, destination); @@ -46,7 +46,7 @@ public static NDArray moveaxis(in NDArray a, int source, int[] destination) /// Original positions of the axes to move. These must be unique (distinct). /// Destination positions for each of the original axes. These must also be unique (distinct). /// Array with moved axes. - /// https://docs.scipy.org/doc/numpy/reference/generated/numpy.moveaxis.html + /// https://numpy.org/doc/stable/reference/generated/numpy.moveaxis.html public static NDArray moveaxis(in NDArray a, int[] source, int[] destination) => a.TensorEngine.MoveAxis(a, source, destination); } diff --git a/src/NumSharp.Core/Manipulation/np.ravel.cs b/src/NumSharp.Core/Manipulation/np.ravel.cs index a28ce56c..5ce14fbe 100644 --- a/src/NumSharp.Core/Manipulation/np.ravel.cs +++ b/src/NumSharp.Core/Manipulation/np.ravel.cs @@ -7,7 +7,7 @@ public static partial class np /// /// Return a contiguous flattened array. A 1-D array, containing the elements of the input, is returned /// - /// https://docs.scipy.org/doc/numpy/reference/generated/numpy.ravel.html + /// https://numpy.org/doc/stable/reference/generated/numpy.ravel.html /// Input array. The elements in a are read in the order specified by order, and packed as a 1-D array. ///

If this array's is a sliced or broadcasted, the a copy will be made.
public static NDArray ravel(NDArray a) diff --git a/src/NumSharp.Core/Manipulation/np.repeat.cs b/src/NumSharp.Core/Manipulation/np.repeat.cs index 1ff4dadb..5191c386 100644 --- a/src/NumSharp.Core/Manipulation/np.repeat.cs +++ b/src/NumSharp.Core/Manipulation/np.repeat.cs @@ -14,7 +14,7 @@ public static partial class np /// The number of repetitions for each element. repeats is broadcasted to fit the shape of the given axis. /// /// - /// https://docs.scipy.org/doc/numpy/reference/generated/numpy.repeat.html + /// https://numpy.org/doc/stable/reference/generated/numpy.repeat.html public static NDArray repeat(NDArray a, int repeats) //TODO! , int axis = -1 { int size = a.size * repeats; @@ -157,7 +157,7 @@ public static NDArray repeat(NDArray a, int repeats) //TODO! , int axis = -1 /// The number of repetitions for each element. repeats is broadcasted to fit the shape of the given axis. /// /// - /// https://docs.scipy.org/doc/numpy/reference/generated/numpy.repeat.html + /// https://numpy.org/doc/stable/reference/generated/numpy.repeat.html public static NDArray repeat(T a, int repeats) where T : unmanaged //TODO! , int axis = -1 { var ret = new NDArray(InfoOf.NPTypeCode, Shape.Vector(repeats)); diff --git a/src/NumSharp.Core/Manipulation/np.reshape.cs b/src/NumSharp.Core/Manipulation/np.reshape.cs index 62833071..a74c841b 100644 --- a/src/NumSharp.Core/Manipulation/np.reshape.cs +++ b/src/NumSharp.Core/Manipulation/np.reshape.cs @@ -8,7 +8,7 @@ public static partial class np /// Array to be reshaped. /// The new shape should be compatible with the original shape. /// original reshaped without copying. - /// https://docs.scipy.org/doc/numpy-1.16.0/reference/generated/numpy.reshape.html + /// https://numpy.org/doc/stable/reference/generated/numpy.reshape.html public static NDArray reshape(NDArray nd, params int[] shape) { return nd.reshape(shape); @@ -20,7 +20,7 @@ public static NDArray reshape(NDArray nd, params int[] shape) /// Array to be reshaped. /// The new shape should be compatible with the original shape. /// original reshaped without copying. - /// https://docs.scipy.org/doc/numpy-1.16.0/reference/generated/numpy.reshape.html + /// https://numpy.org/doc/stable/reference/generated/numpy.reshape.html public static NDArray reshape(NDArray nd, Shape shape) { return nd.reshape(shape); @@ -32,7 +32,7 @@ public static NDArray reshape(NDArray nd, Shape shape) /// Array to be reshaped. /// The new shape should be compatible with the original shape. /// original reshaped without copying. - /// https://docs.scipy.org/doc/numpy-1.16.0/reference/generated/numpy.reshape.html + /// https://numpy.org/doc/stable/reference/generated/numpy.reshape.html public static NDArray reshape(NDArray nd, ref Shape shape) { return nd.reshape(ref shape); diff --git a/src/NumSharp.Core/Manipulation/np.rollaxis.cs b/src/NumSharp.Core/Manipulation/np.rollaxis.cs index dba63c22..37d8f14a 100644 --- a/src/NumSharp.Core/Manipulation/np.rollaxis.cs +++ b/src/NumSharp.Core/Manipulation/np.rollaxis.cs @@ -9,7 +9,7 @@ public static partial class np /// Input array. /// The axis to roll backwards. The positions of the other axes do not change relative to one another. /// The axis is rolled until it lies before this position. The default, 0, results in a “complete” roll. - /// https://docs.scipy.org/doc/numpy/reference/generated/numpy.rollaxis.html + /// https://numpy.org/doc/stable/reference/generated/numpy.rollaxis.html public static NDArray rollaxis(in NDArray a, int axis, int start = 0) => a.TensorEngine.RollAxis(a, axis, start); } diff --git a/src/NumSharp.Core/Manipulation/np.squeeze.cs b/src/NumSharp.Core/Manipulation/np.squeeze.cs index f403fe2b..99cf33cc 100644 --- a/src/NumSharp.Core/Manipulation/np.squeeze.cs +++ b/src/NumSharp.Core/Manipulation/np.squeeze.cs @@ -12,7 +12,7 @@ public static partial class np /// /// Input data. /// The input array, but with all or a subset of the dimensions of length 1 removed. This is always a itself or a view into a. - /// https://docs.scipy.org/doc/numpy/reference/generated/numpy.squeeze.html + /// https://numpy.org/doc/stable/reference/generated/numpy.squeeze.html public static NDArray squeeze(NDArray a) { return a.reshape(a.shape.Where(x => x != 1).ToArray()); @@ -24,7 +24,7 @@ public static NDArray squeeze(NDArray a) /// Input data. /// Selects a subset of the single-dimensional entries in the shape. If an axis is selected with shape entry greater than one, an error is raised. /// The input array, but with all or a subset of the dimensions of length 1 removed. This is always a itself or a view into a. - /// https://docs.scipy.org/doc/numpy/reference/generated/numpy.squeeze.html + /// https://numpy.org/doc/stable/reference/generated/numpy.squeeze.html /// If axis is not None, and an axis being squeezed is not of length 1 public static NDArray squeeze(NDArray a, int axis) { @@ -45,7 +45,7 @@ public static NDArray squeeze(NDArray a, int axis) /// /// Input shape. /// The input array, but with all or a subset of the dimensions of length 1 removed. This is always a itself or a view into a. - /// https://docs.scipy.org/doc/numpy/reference/generated/numpy.squeeze.html + /// https://numpy.org/doc/stable/reference/generated/numpy.squeeze.html public static Shape squeeze(Shape shape) { //TODO! what will happen if its a slice? @@ -58,7 +58,7 @@ public static Shape squeeze(Shape shape) /// Input data. /// Selects a subset of the single-dimensional entries in the shape. If an axis is selected with shape entry greater than one, an error is raised. /// The input array, but with all or a subset of the dimensions of length 1 removed. This is always a itself or a view into a. - /// https://docs.scipy.org/doc/numpy/reference/generated/numpy.squeeze.html + /// https://numpy.org/doc/stable/reference/generated/numpy.squeeze.html /// If axis is not None, and an axis being squeezed is not of length 1 [MethodImpl(Inline)] internal static NDArray squeeze_fast(NDArray a, int axis) @@ -72,7 +72,7 @@ internal static NDArray squeeze_fast(NDArray a, int axis) /// Input data. /// Selects a subset of the single-dimensional entries in the shape. If an axis is selected with shape entry greater than one, an error is raised. /// The input array, but with all or a subset of the dimensions of length 1 removed. This is always a itself or a view into a. - /// https://docs.scipy.org/doc/numpy/reference/generated/numpy.squeeze.html + /// https://numpy.org/doc/stable/reference/generated/numpy.squeeze.html /// If axis is not None, and an axis being squeezed is not of length 1 [MethodImpl(Inline)] internal static Shape squeeze_fast(Shape a, int axis) diff --git a/src/NumSharp.Core/Manipulation/np.swapaxes.cs b/src/NumSharp.Core/Manipulation/np.swapaxes.cs index 9ecbda4a..f044447a 100644 --- a/src/NumSharp.Core/Manipulation/np.swapaxes.cs +++ b/src/NumSharp.Core/Manipulation/np.swapaxes.cs @@ -8,7 +8,7 @@ public static partial class np /// Input array. /// First axis. /// Second axis. - /// https://docs.scipy.org/doc/numpy/reference/generated/numpy.swapaxes.html + /// https://numpy.org/doc/stable/reference/generated/numpy.swapaxes.html public static NDArray swapaxes(in NDArray a, int axis1, int axis2) => a.TensorEngine.SwapAxes(a, axis1, axis2); } diff --git a/src/NumSharp.Core/Manipulation/np.transpose.cs b/src/NumSharp.Core/Manipulation/np.transpose.cs index 322858be..88e9f4d1 100644 --- a/src/NumSharp.Core/Manipulation/np.transpose.cs +++ b/src/NumSharp.Core/Manipulation/np.transpose.cs @@ -8,7 +8,7 @@ public static partial class np /// Input array. /// By default, reverse the dimensions, otherwise permute the axes according to the values given. /// a with its axes permuted. A view is returned whenever possible. - /// https://docs.scipy.org/doc/numpy/reference/generated/numpy.transpose.html + /// https://numpy.org/doc/stable/reference/generated/numpy.transpose.html public static NDArray transpose(in NDArray a, int[] premute = null) => a.TensorEngine.Transpose(a, premute); } diff --git a/src/NumSharp.Core/Manipulation/np.unique.cs b/src/NumSharp.Core/Manipulation/np.unique.cs index 0b5648cc..9d4fde24 100644 --- a/src/NumSharp.Core/Manipulation/np.unique.cs +++ b/src/NumSharp.Core/Manipulation/np.unique.cs @@ -11,7 +11,7 @@ public static partial class np /// * the number of times each unique value comes up in the input array

/// /// The sorted unique values. - /// https://docs.scipy.org/doc/numpy/reference/generated/numpy.unique.html + /// https://numpy.org/doc/stable/reference/generated/numpy.unique.html public static NDArray unique(in NDArray a) => a.unique(); } diff --git a/src/NumSharp.Core/Math/NDArray.cumsum.cs b/src/NumSharp.Core/Math/NDArray.cumsum.cs index e70bc470..4950702a 100644 --- a/src/NumSharp.Core/Math/NDArray.cumsum.cs +++ b/src/NumSharp.Core/Math/NDArray.cumsum.cs @@ -13,7 +13,7 @@ public partial class NDArray /// Axis along which the cumulative sum is computed. The default (-1) is to compute the cumsum over the flattened array. /// Type of the returned array and of the accumulator in which the elements are summed. If dtype is not specified, it defaults to the dtype of a, unless a has an integer dtype with a precision less than that of the default platform integer. In that case, the default platform integer is used. /// A new array holding the result is returned unless out is specified, in which case a reference to out is returned. The result has the same size as a, and the same shape as a if axis is not None or a is a 1-d array. - /// https://docs.scipy.org/doc/numpy/reference/generated/numpy.cumsum.html + /// https://numpy.org/doc/stable/reference/generated/numpy.cumsum.html public NDArray cumsum(int? axis = null, Type dtype = null) { return np.cumsum(this, axis, dtype?.GetTypeCode()); diff --git a/src/NumSharp.Core/Math/NDArray.prod.cs b/src/NumSharp.Core/Math/NDArray.prod.cs index 4a95d46f..bf615739 100644 --- a/src/NumSharp.Core/Math/NDArray.prod.cs +++ b/src/NumSharp.Core/Math/NDArray.prod.cs @@ -13,7 +13,7 @@ public partial class NDArray /// The type of the returned array, as well as of the accumulator in which the elements are multiplied. The dtype of a is used by default unless a has an integer dtype of less precision than the default platform integer. In that case, if a is signed then the platform integer is used while if a is unsigned then an unsigned integer of the same precision as the platform integer is used. /// If this is set to True, the axes which are reduced are left in the result as dimensions with size one. With this option, the result will broadcast correctly against the input array. /// An array shaped as a but with the specified axis removed. - /// https://docs.scipy.org/doc/numpy/reference/generated/numpy.prod.html + /// https://numpy.org/doc/stable/reference/generated/numpy.prod.html public NDArray prod(int? axis = null, Type dtype = null, bool keepdims = false) => np.prod(this, axis, dtype, keepdims); diff --git a/src/NumSharp.Core/Math/NDArray.sum.cs b/src/NumSharp.Core/Math/NDArray.sum.cs index 392e9c6f..acd92cea 100644 --- a/src/NumSharp.Core/Math/NDArray.sum.cs +++ b/src/NumSharp.Core/Math/NDArray.sum.cs @@ -12,7 +12,7 @@ public partial class NDArray /// The type of the returned array and of the accumulator in which the elements are summed. The dtype of a is used by default unless a has an integer dtype of less precision than the default platform integer. In that case, if a is signed then the platform integer is used while if a is unsigned then an unsigned integer of the same precision as the platform integer is used. /// If this is set to True, the axes which are reduced are left in the result as dimensions with size one. With this option, the result will broadcast correctly against the input array. If the default value is passed, then keepdims will not be passed through to the sum method of sub-classes of ndarray, however any non-default value will be.If the sub-class’ method does not implement keepdims any exceptions will be raised. /// An array with the same shape as a, with the specified axis removed. If a is a 0-d array, or if axis is None, a scalar is returned. If an output array is specified, a reference to out is returned. - /// https://docs.scipy.org/doc/numpy/reference/generated/numpy.ndarray.sum.html + /// https://numpy.org/doc/stable/reference/generated/numpy.ndarray.sum.html public NDArray sum(int axis, bool keepdims, Type dtype) { return TensorEngine.Sum(this, axis, dtype != null ? dtype.GetTypeCode() : default(NPTypeCode?), keepdims); @@ -25,7 +25,7 @@ public NDArray sum(int axis, bool keepdims, Type dtype) /// The type of the returned array and of the accumulator in which the elements are summed. The dtype of a is used by default unless a has an integer dtype of less precision than the default platform integer. In that case, if a is signed then the platform integer is used while if a is unsigned then an unsigned integer of the same precision as the platform integer is used. /// If this is set to True, the axes which are reduced are left in the result as dimensions with size one. With this option, the result will broadcast correctly against the input array. If the default value is passed, then keepdims will not be passed through to the sum method of sub-classes of ndarray, however any non-default value will be.If the sub-class’ method does not implement keepdims any exceptions will be raised. /// An array with the same shape as a, with the specified axis removed. If a is a 0-d array, or if axis is None, a scalar is returned. If an output array is specified, a reference to out is returned. - /// https://docs.scipy.org/doc/numpy/reference/generated/numpy.ndarray.sum.html + /// https://numpy.org/doc/stable/reference/generated/numpy.ndarray.sum.html public NDArray sum(int axis, bool keepdims, NPTypeCode? typeCode = null) { return TensorEngine.Sum(this, axis, typeCode, keepdims); @@ -38,7 +38,7 @@ public NDArray sum(int axis, bool keepdims, NPTypeCode? typeCode = null) /// The type of the returned array and of the accumulator in which the elements are summed. The dtype of a is used by default unless a has an integer dtype of less precision than the default platform integer. In that case, if a is signed then the platform integer is used while if a is unsigned then an unsigned integer of the same precision as the platform integer is used. /// If this is set to True, the axes which are reduced are left in the result as dimensions with size one. With this option, the result will broadcast correctly against the input array. If the default value is passed, then keepdims will not be passed through to the sum method of sub-classes of ndarray, however any non-default value will be.If the sub-class’ method does not implement keepdims any exceptions will be raised. /// An array with the same shape as a, with the specified axis removed. If a is a 0-d array, or if axis is None, a scalar is returned. If an output array is specified, a reference to out is returned. - /// https://docs.scipy.org/doc/numpy/reference/generated/numpy.ndarray.sum.html + /// https://numpy.org/doc/stable/reference/generated/numpy.ndarray.sum.html public NDArray sum(int axis) { return TensorEngine.Sum(this, axis, null, false); @@ -51,7 +51,7 @@ public NDArray sum(int axis) /// The type of the returned array and of the accumulator in which the elements are summed. The dtype of a is used by default unless a has an integer dtype of less precision than the default platform integer. In that case, if a is signed then the platform integer is used while if a is unsigned then an unsigned integer of the same precision as the platform integer is used. /// If this is set to True, the axes which are reduced are left in the result as dimensions with size one. With this option, the result will broadcast correctly against the input array. If the default value is passed, then keepdims will not be passed through to the sum method of sub-classes of ndarray, however any non-default value will be.If the sub-class’ method does not implement keepdims any exceptions will be raised. /// An array with the same shape as a, with the specified axis removed. If a is a 0-d array, or if axis is None, a scalar is returned. If an output array is specified, a reference to out is returned. - /// https://docs.scipy.org/doc/numpy/reference/generated/numpy.ndarray.sum.html + /// https://numpy.org/doc/stable/reference/generated/numpy.ndarray.sum.html public NDArray sum() { return TensorEngine.Sum(this, null, null, false); diff --git a/src/NumSharp.Core/Math/np.absolute.cs b/src/NumSharp.Core/Math/np.absolute.cs index 93d351d0..9814387d 100644 --- a/src/NumSharp.Core/Math/np.absolute.cs +++ b/src/NumSharp.Core/Math/np.absolute.cs @@ -12,7 +12,7 @@ public static partial class np /// Input value. /// The dtype the returned ndarray should be of, only non integer values are supported. /// An ndarray containing the absolute value of each element in x. - /// https://docs.scipy.org/doc/numpy/reference/generated/numpy.absolute.html + /// https://numpy.org/doc/stable/reference/generated/numpy.absolute.html public static NDArray absolute(in NDArray a, Type outType) => a.TensorEngine.Abs(a, outType); /// @@ -22,7 +22,7 @@ public static partial class np /// Input value. /// The dtype the returned ndarray should be of, only non integer values are supported. /// An ndarray containing the absolute value of each element in x. - /// https://docs.scipy.org/doc/numpy/reference/generated/numpy.absolute.html + /// https://numpy.org/doc/stable/reference/generated/numpy.absolute.html public static NDArray absolute(in NDArray a, NPTypeCode? outType) => a.TensorEngine.Abs(a, outType); /// @@ -31,7 +31,7 @@ public static partial class np /// /// Input value. /// An ndarray containing the absolute value of each element in x. - /// https://docs.scipy.org/doc/numpy/reference/generated/numpy.absolute.html + /// https://numpy.org/doc/stable/reference/generated/numpy.absolute.html public static NDArray absolute(in NDArray a) => a.TensorEngine.Abs(a); /// @@ -41,7 +41,7 @@ public static partial class np /// Input value. /// The dtype the returned ndarray should be of, only non integer values are supported. /// An ndarray containing the absolute value of each element in x. - /// https://docs.scipy.org/doc/numpy/reference/generated/numpy.absolute.html + /// https://numpy.org/doc/stable/reference/generated/numpy.absolute.html public static NDArray abs(in NDArray a, Type outType) => a.TensorEngine.Abs(a, outType); /// @@ -51,7 +51,7 @@ public static partial class np /// Input value. /// The dtype the returned ndarray should be of, only non integer values are supported. /// An ndarray containing the absolute value of each element in x. - /// https://docs.scipy.org/doc/numpy/reference/generated/numpy.absolute.html + /// https://numpy.org/doc/stable/reference/generated/numpy.absolute.html public static NDArray abs(in NDArray a, NPTypeCode? outType) => a.TensorEngine.Abs(a, outType); /// @@ -60,7 +60,7 @@ public static partial class np /// /// Input value. /// An ndarray containing the absolute value of each element in x. - /// https://docs.scipy.org/doc/numpy/reference/generated/numpy.absolute.html + /// https://numpy.org/doc/stable/reference/generated/numpy.absolute.html public static NDArray abs(in NDArray a) => a.TensorEngine.Abs(a); } } diff --git a/src/NumSharp.Core/Math/np.ceil.cs b/src/NumSharp.Core/Math/np.ceil.cs index 3742fb98..b3d07ed2 100644 --- a/src/NumSharp.Core/Math/np.ceil.cs +++ b/src/NumSharp.Core/Math/np.ceil.cs @@ -12,7 +12,7 @@ public static partial class np /// Input data. /// The dtype the returned ndarray should be of, only non integer values are supported. /// The ceiling of each element in x, with float dtype. This is a scalar if x is a scalar. - /// https://docs.scipy.org/doc/numpy/reference/generated/numpy.ceil.html + /// https://numpy.org/doc/stable/reference/generated/numpy.ceil.html public static NDArray ceil(in NDArray x, NPTypeCode? outType = null) => x.TensorEngine.Ceil(x, outType); @@ -23,7 +23,7 @@ public static NDArray ceil(in NDArray x, NPTypeCode? outType = null) /// Input data. /// The dtype the returned ndarray should be of, only non integer values are supported. /// The ceiling of each element in x, with float dtype. This is a scalar if x is a scalar. - /// https://docs.scipy.org/doc/numpy/reference/generated/numpy.ceil.html + /// https://numpy.org/doc/stable/reference/generated/numpy.ceil.html public static NDArray ceil(in NDArray x, Type outType) => x.TensorEngine.Ceil(x, outType); } diff --git a/src/NumSharp.Core/Math/np.clip.cs b/src/NumSharp.Core/Math/np.clip.cs index 40108971..4ec39df0 100644 --- a/src/NumSharp.Core/Math/np.clip.cs +++ b/src/NumSharp.Core/Math/np.clip.cs @@ -14,7 +14,7 @@ public static partial class np /// Minimum value. If None, clipping is not performed on lower interval edge. Not more than one of a_min and a_max may be None. /// The dtype the returned ndarray should be of, only non integer values are supported. /// An array with the elements of a, but where values < a_min are replaced with a_min, and those > a_max with a_max. - /// https://docs.scipy.org/doc/numpy-1.15.0/reference/generated/numpy.clip.html + /// https://numpy.org/doc/stable/reference/generated/numpy.clip.html public static NDArray clip(in NDArray a, NDArray a_min, NDArray a_max, NPTypeCode? outType = null) => a.TensorEngine.ClipNDArray(a, a_min, a_max, outType); @@ -27,7 +27,7 @@ public static NDArray clip(in NDArray a, NDArray a_min, NDArray a_max, NPTypeCod /// Minimum value. If None, clipping is not performed on lower interval edge. Not more than one of a_min and a_max may be None. /// The dtype the returned ndarray should be of, only non integer values are supported. /// An array with the elements of a, but where values < a_min are replaced with a_min, and those > a_max with a_max. - /// https://docs.scipy.org/doc/numpy-1.15.0/reference/generated/numpy.clip.html + /// https://numpy.org/doc/stable/reference/generated/numpy.clip.html public static NDArray clip(in NDArray a, NDArray a_min, NDArray a_max, Type outType) => a.TensorEngine.ClipNDArray(a, a_min, a_max, outType); @@ -40,7 +40,7 @@ public static NDArray clip(in NDArray a, NDArray a_min, NDArray a_max, Type outT /// Minimum value. If None, clipping is not performed on lower interval edge. Not more than one of a_min and a_max may be None. /// The results will be placed in this array. It may be the input array for in-place clipping. out must be of the right shape to hold the output. Its type is preserved. /// An array with the elements of a, but where values < a_min are replaced with a_min, and those > a_max with a_max. - /// https://docs.scipy.org/doc/numpy-1.15.0/reference/generated/numpy.clip.html + /// https://numpy.org/doc/stable/reference/generated/numpy.clip.html public static NDArray clip(in NDArray a, NDArray a_min, NDArray a_max, NDArray @out) => a.TensorEngine.ClipNDArray(a, a_min, a_max, (NPTypeCode?)null, @out); } diff --git a/src/NumSharp.Core/Math/np.cos.cs b/src/NumSharp.Core/Math/np.cos.cs index 2187f07e..2000a0ee 100644 --- a/src/NumSharp.Core/Math/np.cos.cs +++ b/src/NumSharp.Core/Math/np.cos.cs @@ -11,7 +11,7 @@ public static partial class np /// Input array in radians. /// The dtype the returned ndarray should be of, only non integer values are supported. /// The sine of each element of x. This is a scalar if x is a scalar. - /// https://docs.scipy.org/doc/numpy/reference/generated/numpy.cos.html + /// https://numpy.org/doc/stable/reference/generated/numpy.cos.html public static NDArray cos(in NDArray x, NPTypeCode? outType = null) => x.TensorEngine.Cos(x, outType); @@ -21,7 +21,7 @@ public static NDArray cos(in NDArray x, NPTypeCode? outType = null) /// Input array in radians. /// The dtype the returned ndarray should be of, only non integer values are supported. /// The sine of each element of x. This is a scalar if x is a scalar. - /// https://docs.scipy.org/doc/numpy/reference/generated/numpy.cos.html + /// https://numpy.org/doc/stable/reference/generated/numpy.cos.html public static NDArray cos(in NDArray x, Type outType) => x.TensorEngine.Cos(x, outType); @@ -32,7 +32,7 @@ public static NDArray cos(in NDArray x, Type outType) /// Input array. /// The dtype the returned ndarray should be of, only non integer values are supported. /// Output array of same shape as x. This is a scalar if x is a scalar. - /// https://docs.scipy.org/doc/numpy/reference/generated/numpy.cosh.html + /// https://numpy.org/doc/stable/reference/generated/numpy.cosh.html public static NDArray cosh(in NDArray x, NPTypeCode? outType = null) => x.TensorEngine.Cosh(x, outType); @@ -43,7 +43,7 @@ public static NDArray cosh(in NDArray x, NPTypeCode? outType = null) /// Input array. /// The dtype the returned ndarray should be of, only non integer values are supported. /// Output array of same shape as x. This is a scalar if x is a scalar. - /// https://docs.scipy.org/doc/numpy/reference/generated/numpy.cosh.html + /// https://numpy.org/doc/stable/reference/generated/numpy.cosh.html public static NDArray cosh(in NDArray x, Type outType) => x.TensorEngine.Cosh(x, outType); @@ -54,7 +54,7 @@ public static NDArray cosh(in NDArray x, Type outType) /// Input array. /// The dtype the returned ndarray should be of, only non integer values are supported. /// The angle of the ray intersecting the unit circle at the given x-coordinate in radians [0, pi]. This is a scalar if x is a scalar. - /// https://docs.scipy.org/doc/numpy/reference/generated/numpy.arccos.html + /// https://numpy.org/doc/stable/reference/generated/numpy.arccos.html public static NDArray arccos(in NDArray x, NPTypeCode? outType = null) => x.TensorEngine.ACos(x, outType); @@ -65,7 +65,7 @@ public static NDArray arccos(in NDArray x, NPTypeCode? outType = null) /// Input array. /// The dtype the returned ndarray should be of, only non integer values are supported. /// The angle of the ray intersecting the unit circle at the given x-coordinate in radians [0, pi]. This is a scalar if x is a scalar. - /// https://docs.scipy.org/doc/numpy/reference/generated/numpy.arccos.html + /// https://numpy.org/doc/stable/reference/generated/numpy.arccos.html public static NDArray arccos(in NDArray x, Type outType) => x.TensorEngine.ACos(x, outType); } diff --git a/src/NumSharp.Core/Math/np.floor.cs b/src/NumSharp.Core/Math/np.floor.cs index 1eea15b6..69dfb8a0 100644 --- a/src/NumSharp.Core/Math/np.floor.cs +++ b/src/NumSharp.Core/Math/np.floor.cs @@ -12,7 +12,7 @@ public static partial class np /// Input array /// The dtype the returned ndarray should be of, only non integer values are supported. /// The floor of each element in x. This is a scalar if x is a scalar. - /// https://docs.scipy.org/doc/numpy/reference/generated/numpy.floor.html + /// https://numpy.org/doc/stable/reference/generated/numpy.floor.html public static NDArray floor(in NDArray x, NPTypeCode? outType = null) => x.TensorEngine.Floor(x, outType); @@ -23,7 +23,7 @@ public static NDArray floor(in NDArray x, NPTypeCode? outType = null) /// Input array /// The dtype the returned ndarray should be of, only non integer values are supported. /// The floor of each element in x. This is a scalar if x is a scalar. - /// https://docs.scipy.org/doc/numpy/reference/generated/numpy.floor.html + /// https://numpy.org/doc/stable/reference/generated/numpy.floor.html public static NDArray floor(in NDArray x, Type outType) => x.TensorEngine.Floor(x, outType); } diff --git a/src/NumSharp.Core/Math/np.log.cs b/src/NumSharp.Core/Math/np.log.cs index 3488b2fd..081dc2e5 100644 --- a/src/NumSharp.Core/Math/np.log.cs +++ b/src/NumSharp.Core/Math/np.log.cs @@ -13,7 +13,7 @@ public partial class np /// Input value. /// The dtype the returned ndarray should be of, only non integer values are supported. /// The natural logarithm of x, element-wise. This is a scalar if x is a scalar. - /// https://docs.scipy.org/doc/numpy/reference/generated/numpy.log.html + /// https://numpy.org/doc/stable/reference/generated/numpy.log.html public static NDArray log(in NDArray x, Type outType) => x.TensorEngine.Log(x); /// @@ -24,7 +24,7 @@ public partial class np /// Input value. /// The dtype the returned ndarray should be of, only non integer values are supported. /// The natural logarithm of x, element-wise. This is a scalar if x is a scalar. - /// https://docs.scipy.org/doc/numpy/reference/generated/numpy.log.html + /// https://numpy.org/doc/stable/reference/generated/numpy.log.html public static NDArray log(in NDArray x, NPTypeCode? outType = null) => x.TensorEngine.Log(x, outType); /// @@ -34,7 +34,7 @@ public partial class np /// /// Input value. /// The natural logarithm of x, element-wise. This is a scalar if x is a scalar. - /// https://docs.scipy.org/doc/numpy/reference/generated/numpy.log.html + /// https://numpy.org/doc/stable/reference/generated/numpy.log.html public static NDArray log(in NDArray x) => x.TensorEngine.Log(x); /// @@ -42,7 +42,7 @@ public partial class np /// /// Input value. /// Base-2 logarithm of x. This is a scalar if x is a scalar. - /// https://docs.scipy.org/doc/numpy/reference/generated/numpy.log2.html + /// https://numpy.org/doc/stable/reference/generated/numpy.log2.html public static NDArray log2(in NDArray x, Type outType) => x.TensorEngine.Log2(x); /// @@ -50,7 +50,7 @@ public partial class np /// /// Input value. /// Base-2 logarithm of x. This is a scalar if x is a scalar. - /// https://docs.scipy.org/doc/numpy/reference/generated/numpy.log2.html + /// https://numpy.org/doc/stable/reference/generated/numpy.log2.html public static NDArray log2(in NDArray x, NPTypeCode? outType = null) => x.TensorEngine.Log2(x, outType); /// @@ -58,7 +58,7 @@ public partial class np /// /// Input value. /// Base-2 logarithm of x. This is a scalar if x is a scalar. - /// https://docs.scipy.org/doc/numpy/reference/generated/numpy.log2.html + /// https://numpy.org/doc/stable/reference/generated/numpy.log2.html public static NDArray log2(in NDArray x) => x.TensorEngine.Log2(x); /// @@ -66,7 +66,7 @@ public partial class np /// /// Input value. /// The logarithm to the base 10 of x, element-wise. NaNs are returned where x is negative. This is a scalar if x is a scalar. - /// https://docs.scipy.org/doc/numpy/reference/generated/numpy.log10.html + /// https://numpy.org/doc/stable/reference/generated/numpy.log10.html public static NDArray log10(in NDArray x, Type outType) => x.TensorEngine.Log10(x); /// @@ -74,7 +74,7 @@ public partial class np /// /// Input value. /// The logarithm to the base 10 of x, element-wise. NaNs are returned where x is negative. This is a scalar if x is a scalar. - /// https://docs.scipy.org/doc/numpy/reference/generated/numpy.log10.html + /// https://numpy.org/doc/stable/reference/generated/numpy.log10.html public static NDArray log10(in NDArray x, NPTypeCode? outType = null) => x.TensorEngine.Log10(x, outType); /// @@ -82,7 +82,7 @@ public partial class np /// /// Input value. /// The logarithm to the base 10 of x, element-wise. NaNs are returned where x is negative. This is a scalar if x is a scalar. - /// https://docs.scipy.org/doc/numpy/reference/generated/numpy.log10.html + /// https://numpy.org/doc/stable/reference/generated/numpy.log10.html public static NDArray log10(in NDArray x) => x.TensorEngine.Log10(x); /// @@ -91,7 +91,7 @@ public partial class np /// /// Input value. /// Natural logarithm of 1 + x, element-wise. This is a scalar if x is a scalar. - /// https://docs.scipy.org/doc/numpy/reference/generated/numpy.log1p.html + /// https://numpy.org/doc/stable/reference/generated/numpy.log1p.html public static NDArray log1p(in NDArray x, Type outType) => x.TensorEngine.Log1p(x); /// @@ -100,7 +100,7 @@ public partial class np /// /// Input value. /// Natural logarithm of 1 + x, element-wise. This is a scalar if x is a scalar. - /// https://docs.scipy.org/doc/numpy/reference/generated/numpy.log1p.html + /// https://numpy.org/doc/stable/reference/generated/numpy.log1p.html public static NDArray log1p(in NDArray x, NPTypeCode? outType = null) => x.TensorEngine.Log1p(x, outType); /// @@ -109,7 +109,7 @@ public partial class np /// /// Input value. /// Natural logarithm of 1 + x, element-wise. This is a scalar if x is a scalar. - /// https://docs.scipy.org/doc/numpy/reference/generated/numpy.log1p.html + /// https://numpy.org/doc/stable/reference/generated/numpy.log1p.html public static NDArray log1p(in NDArray x) => x.TensorEngine.Log1p(x); } } diff --git a/src/NumSharp.Core/Math/np.math.cs b/src/NumSharp.Core/Math/np.math.cs index 86533ee3..a1c160f7 100644 --- a/src/NumSharp.Core/Math/np.math.cs +++ b/src/NumSharp.Core/Math/np.math.cs @@ -5,27 +5,27 @@ namespace NumSharp { public static partial class np { - /// https://docs.scipy.org/doc/numpy/reference/generated/numpy.add.html + /// https://numpy.org/doc/stable/reference/generated/numpy.add.html public static NDArray add(in NDArray x1, in NDArray x2) => x1.TensorEngine.Add(x1, x2); - /// https://docs.scipy.org/doc/numpy/reference/generated/numpy.divide.html + /// https://numpy.org/doc/stable/reference/generated/numpy.divide.html public static NDArray divide(in NDArray x1, in NDArray x2) => x1.TensorEngine.Divide(x1, x2); - /// https://docs.scipy.org/doc/numpy/reference/generated/numpy.true_divide.html + /// https://numpy.org/doc/stable/reference/generated/numpy.true_divide.html public static NDArray true_divide(in NDArray x1, in NDArray x2) => x1.TensorEngine.Divide(x1, x2); - /// https://docs.scipy.org/doc/numpy/reference/generated/numpy.multiply.html + /// https://numpy.org/doc/stable/reference/generated/numpy.multiply.html public static NDArray multiply(in NDArray x1, in NDArray x2) => x1.TensorEngine.Multiply(x1, x2); - /// https://docs.scipy.org/doc/numpy/reference/generated/numpy.subtract.html + /// https://numpy.org/doc/stable/reference/generated/numpy.subtract.html public static NDArray subtract(in NDArray x1, in NDArray x2) => x1.TensorEngine.Subtract(x1, x2); - /// https://docs.scipy.org/doc/numpy/reference/generated/numpy.mod.html + /// https://numpy.org/doc/stable/reference/generated/numpy.mod.html public static NDArray mod(in NDArray x1, in NDArray x2) => x1.TensorEngine.Mod(x1, x2); @@ -54,21 +54,21 @@ public static NDArray convolve(NDArray a, NDArray v, string mode = "full") /// The type of the returned array, as well as of the accumulator in which the elements are multiplied. The dtype of a is used by default unless a has an integer dtype of less precision than the default platform integer. In that case, if a is signed then the platform integer is used while if a is unsigned then an unsigned integer of the same precision as the platform integer is used. /// If this is set to True, the axes which are reduced are left in the result as dimensions with size one. With this option, the result will broadcast correctly against the input array. /// An array shaped as a but with the specified axis removed. - /// https://docs.scipy.org/doc/numpy/reference/generated/numpy.prod.html + /// https://numpy.org/doc/stable/reference/generated/numpy.prod.html public static NDArray prod(in NDArray a, int? axis = null, Type dtype = null, bool keepdims = false) //todo impl a version with keepdims => a.TensorEngine.ReduceProduct(a, axis, keepdims, dtype != null ? dtype.GetTypeCode() : (NPTypeCode?)null); /// /// Numerical positive, element-wise. /// - /// https://docs.scipy.org/doc/numpy/reference/generated/numpy.positive.html + /// https://numpy.org/doc/stable/reference/generated/numpy.positive.html public static NDArray positive(in NDArray nd) => nd.positive(); /// /// Numerical negative, element-wise. /// - /// https://docs.scipy.org/doc/numpy/reference/generated/numpy.negative.html + /// https://numpy.org/doc/stable/reference/generated/numpy.negative.html public static NDArray negative(in NDArray nd) => nd.negative(); } diff --git a/src/NumSharp.Core/Math/np.modf.cs b/src/NumSharp.Core/Math/np.modf.cs index af2c0ecd..7ddde7f4 100644 --- a/src/NumSharp.Core/Math/np.modf.cs +++ b/src/NumSharp.Core/Math/np.modf.cs @@ -12,7 +12,7 @@ public static partial class np /// Input array. /// The dtype the returned ndarray should be of, only non integer values are supported. /// Fractional part of x. This is a scalar if x is a scalar. - /// https://docs.scipy.org/doc/numpy/reference/generated/numpy.modf.html + /// https://numpy.org/doc/stable/reference/generated/numpy.modf.html public static (NDArray Fractional, NDArray Intergral) modf(in NDArray x, NPTypeCode? outType = null) => x.TensorEngine.ModF(x, outType); @@ -23,7 +23,7 @@ public static (NDArray Fractional, NDArray Intergral) modf(in NDArray x, NPTypeC /// Input array. /// The dtype the returned ndarray should be of, only non integer values are supported. /// Fractional part of x. This is a scalar if x is a scalar. - /// https://docs.scipy.org/doc/numpy/reference/generated/numpy.modf.html + /// https://numpy.org/doc/stable/reference/generated/numpy.modf.html public static (NDArray Fractional, NDArray Intergral) modf(in NDArray x, Type outType) => x.TensorEngine.ModF(x, outType); } diff --git a/src/NumSharp.Core/Math/np.power.cs b/src/NumSharp.Core/Math/np.power.cs index f39b5e42..a92585e3 100644 --- a/src/NumSharp.Core/Math/np.power.cs +++ b/src/NumSharp.Core/Math/np.power.cs @@ -12,7 +12,7 @@ public partial class np /// The exponents. /// The dtype of the returned NDArray /// The bases in x1 raised to the exponents in x2. This is a scalar NDArray if both x1 and x2 are scalars. - /// https://docs.scipy.org/doc/numpy/reference/generated/numpy.power.html + /// https://numpy.org/doc/stable/reference/generated/numpy.power.html public static NDArray power(in NDArray x1, in ValueType x2, Type dtype) => x1.TensorEngine.Power(x1, x2, dtype); /// @@ -22,7 +22,7 @@ public partial class np /// The exponents. /// The dtype of the returned NDArray /// The bases in x1 raised to the exponents in x2. This is a scalar NDArray if both x1 and x2 are scalars. - /// https://docs.scipy.org/doc/numpy/reference/generated/numpy.power.html + /// https://numpy.org/doc/stable/reference/generated/numpy.power.html public static NDArray power(in NDArray x1, in ValueType x2, NPTypeCode typeCode) => x1.TensorEngine.Power(x1, x2, typeCode); /// @@ -31,7 +31,7 @@ public partial class np /// The bases. /// The exponents. /// The bases in x1 raised to the exponents in x2. This is a scalar NDArray if both x1 and x2 are scalars. - /// https://docs.scipy.org/doc/numpy/reference/generated/numpy.power.html + /// https://numpy.org/doc/stable/reference/generated/numpy.power.html public static NDArray power(in NDArray x1, in ValueType x2) => x1.TensorEngine.Power(x1, x2); /// @@ -39,7 +39,7 @@ public partial class np /// /// Input data. /// Element-wise x*x, of the same shape and dtype as x. Returns scalar if x is a scalar. - /// https://docs.scipy.org/doc/numpy/reference/generated/numpy.square.html + /// https://numpy.org/doc/stable/reference/generated/numpy.square.html public static NDArray square(in NDArray x) => x.TensorEngine.Power(x, 2); } } diff --git a/src/NumSharp.Core/Math/np.round.cs b/src/NumSharp.Core/Math/np.round.cs index 43932b50..5ef32ccb 100644 --- a/src/NumSharp.Core/Math/np.round.cs +++ b/src/NumSharp.Core/Math/np.round.cs @@ -12,7 +12,7 @@ public static partial class np /// The dtype the returned ndarray should be of, only non integer values are supported. /// An array of the same type as a, containing the rounded values. Unless out was specified, a new array is created. A reference to the result is returned. /// The real and imaginary parts of complex numbers are rounded separately.The result of rounding a float is a float. - /// https://docs.scipy.org/doc/numpy/reference/generated/numpy.around.html + /// https://numpy.org/doc/stable/reference/generated/numpy.around.html public static NDArray round_(in NDArray x, NPTypeCode? outType = null) => x.TensorEngine.Round(x, outType); @@ -24,7 +24,7 @@ public static NDArray round_(in NDArray x, NPTypeCode? outType = null) /// The dtype the returned ndarray should be of, only non integer values are supported. /// An array of the same type as a, containing the rounded values. Unless out was specified, a new array is created. A reference to the result is returned. /// The real and imaginary parts of complex numbers are rounded separately.The result of rounding a float is a float. - /// https://docs.scipy.org/doc/numpy/reference/generated/numpy.around.html + /// https://numpy.org/doc/stable/reference/generated/numpy.around.html public static NDArray round_(in NDArray x, int decimals, NPTypeCode? outType = null) => x.TensorEngine.Round(x, decimals, outType); @@ -35,7 +35,7 @@ public static NDArray round_(in NDArray x, int decimals, NPTypeCode? outType = n /// The dtype the returned ndarray should be of, only non integer values are supported. /// An array of the same type as a, containing the rounded values. Unless out was specified, a new array is created. A reference to the result is returned. /// The real and imaginary parts of complex numbers are rounded separately.The result of rounding a float is a float. - /// https://docs.scipy.org/doc/numpy/reference/generated/numpy.around.html + /// https://numpy.org/doc/stable/reference/generated/numpy.around.html public static NDArray round_(in NDArray x, Type outType) => x.TensorEngine.Round(x, outType); @@ -47,7 +47,7 @@ public static NDArray round_(in NDArray x, Type outType) /// The dtype the returned ndarray should be of, only non integer values are supported. /// An array of the same type as a, containing the rounded values. Unless out was specified, a new array is created. A reference to the result is returned. /// The real and imaginary parts of complex numbers are rounded separately.The result of rounding a float is a float. - /// https://docs.scipy.org/doc/numpy/reference/generated/numpy.around.html + /// https://numpy.org/doc/stable/reference/generated/numpy.around.html public static NDArray round_(in NDArray x, int decimals, Type outType) => x.TensorEngine.Round(x, decimals, outType); @@ -58,7 +58,7 @@ public static NDArray round_(in NDArray x, int decimals, Type outType) /// The dtype the returned ndarray should be of, only non integer values are supported. /// An array of the same type as a, containing the rounded values. Unless out was specified, a new array is created. A reference to the result is returned. /// The real and imaginary parts of complex numbers are rounded separately.The result of rounding a float is a float. - /// https://docs.scipy.org/doc/numpy/reference/generated/numpy.around.html + /// https://numpy.org/doc/stable/reference/generated/numpy.around.html public static NDArray around(in NDArray x, NPTypeCode? outType = null) => x.TensorEngine.Round(x, outType); @@ -70,7 +70,7 @@ public static NDArray around(in NDArray x, NPTypeCode? outType = null) /// The dtype the returned ndarray should be of, only non integer values are supported. /// An array of the same type as a, containing the rounded values. Unless out was specified, a new array is created. A reference to the result is returned. /// The real and imaginary parts of complex numbers are rounded separately.The result of rounding a float is a float. - /// https://docs.scipy.org/doc/numpy/reference/generated/numpy.around.html + /// https://numpy.org/doc/stable/reference/generated/numpy.around.html public static NDArray around(in NDArray x, int decimals, NPTypeCode? outType = null) => x.TensorEngine.Round(x, decimals, outType); @@ -81,7 +81,7 @@ public static NDArray around(in NDArray x, int decimals, NPTypeCode? outType = n /// The dtype the returned ndarray should be of, only non integer values are supported. /// An array of the same type as a, containing the rounded values. Unless out was specified, a new array is created. A reference to the result is returned. /// The real and imaginary parts of complex numbers are rounded separately.The result of rounding a float is a float. - /// https://docs.scipy.org/doc/numpy/reference/generated/numpy.around.html + /// https://numpy.org/doc/stable/reference/generated/numpy.around.html public static NDArray around(in NDArray x, Type outType) => x.TensorEngine.Round(x, outType); @@ -93,7 +93,7 @@ public static NDArray around(in NDArray x, Type outType) /// The dtype the returned ndarray should be of, only non integer values are supported. /// An array of the same type as a, containing the rounded values. Unless out was specified, a new array is created. A reference to the result is returned. /// The real and imaginary parts of complex numbers are rounded separately.The result of rounding a float is a float. - /// https://docs.scipy.org/doc/numpy/reference/generated/numpy.around.html + /// https://numpy.org/doc/stable/reference/generated/numpy.around.html public static NDArray around(in NDArray x, int decimals, Type outType) => x.TensorEngine.Round(x, decimals, outType); } diff --git a/src/NumSharp.Core/Math/np.sign.cs b/src/NumSharp.Core/Math/np.sign.cs index 2e9746ce..f69afd4d 100644 --- a/src/NumSharp.Core/Math/np.sign.cs +++ b/src/NumSharp.Core/Math/np.sign.cs @@ -12,7 +12,7 @@ public static partial class np /// Angle, in radians (2 \pi rad equals 360 degrees). /// The dtype the returned ndarray should be of, only non integer values are supported. /// The sign of x. This is a scalar if x is a scalar. - /// https://docs.scipy.org/doc/numpy/reference/generated/numpy.sign.html + /// https://numpy.org/doc/stable/reference/generated/numpy.sign.html public static NDArray sign(in NDArray x, NPTypeCode? outType = null) => x.TensorEngine.Sign(x, outType); @@ -23,7 +23,7 @@ public static NDArray sign(in NDArray x, NPTypeCode? outType = null) /// Angle, in radians (2 \pi rad equals 360 degrees). /// The dtype the returned ndarray should be of, only non integer values are supported. /// The sign of x. This is a scalar if x is a scalar. - /// https://docs.scipy.org/doc/numpy/reference/generated/numpy.sign.html + /// https://numpy.org/doc/stable/reference/generated/numpy.sign.html public static NDArray sign(in NDArray x, Type outType) => x.TensorEngine.Sign(x, outType); } diff --git a/src/NumSharp.Core/Math/np.sin.cs b/src/NumSharp.Core/Math/np.sin.cs index b2df4c09..740a2032 100644 --- a/src/NumSharp.Core/Math/np.sin.cs +++ b/src/NumSharp.Core/Math/np.sin.cs @@ -11,7 +11,7 @@ public static partial class np /// Angle, in radians (2 \pi rad equals 360 degrees). /// The dtype the returned ndarray should be of, only non integer values are supported. /// The sine of each element of x. This is a scalar if x is a scalar. - /// https://docs.scipy.org/doc/numpy/reference/generated/numpy.sin.html + /// https://numpy.org/doc/stable/reference/generated/numpy.sin.html public static NDArray sin(in NDArray x, NPTypeCode? outType = null) => x.TensorEngine.Sin(x, outType); @@ -21,7 +21,7 @@ public static NDArray sin(in NDArray x, NPTypeCode? outType = null) /// Angle, in radians (2 \pi rad equals 360 degrees). /// The dtype the returned ndarray should be of, only non integer values are supported. /// The sine of each element of x. This is a scalar if x is a scalar. - /// https://docs.scipy.org/doc/numpy/reference/generated/numpy.sin.html + /// https://numpy.org/doc/stable/reference/generated/numpy.sin.html public static NDArray sin(in NDArray x, Type outType) => x.TensorEngine.Sin(x, outType); @@ -32,7 +32,7 @@ public static NDArray sin(in NDArray x, Type outType) /// Input array. /// The dtype the returned ndarray should be of, only non integer values are supported. /// The sine of each element of x. This is a scalar if x is a scalar. - /// https://docs.scipy.org/doc/numpy/reference/generated/numpy.sinh.html + /// https://numpy.org/doc/stable/reference/generated/numpy.sinh.html public static NDArray sinh(in NDArray x, NPTypeCode? outType = null) => x.TensorEngine.Sinh(x, outType); @@ -43,7 +43,7 @@ public static NDArray sinh(in NDArray x, NPTypeCode? outType = null) /// Input array. /// The dtype the returned ndarray should be of, only non integer values are supported. /// The sine of each element of x. This is a scalar if x is a scalar. - /// https://docs.scipy.org/doc/numpy/reference/generated/numpy.sinh.html + /// https://numpy.org/doc/stable/reference/generated/numpy.sinh.html public static NDArray sinh(in NDArray x, Type outType) => x.TensorEngine.Sinh(x, outType); @@ -54,7 +54,7 @@ public static NDArray sinh(in NDArray x, Type outType) /// Input array. /// The dtype the returned ndarray should be of, only non integer values are supported. /// The inverse sine of each element in x, in radians and in the closed interval [-pi/2, pi/2]. This is a scalar if x is a scalar. - /// https://docs.scipy.org/doc/numpy/reference/generated/numpy.arcsin.html + /// https://numpy.org/doc/stable/reference/generated/numpy.arcsin.html public static NDArray arcsin(in NDArray x, NPTypeCode? outType = null) => x.TensorEngine.ASin(x, outType); @@ -65,7 +65,7 @@ public static NDArray arcsin(in NDArray x, NPTypeCode? outType = null) /// Input array. /// The dtype the returned ndarray should be of, only non integer values are supported. /// The inverse sine of each element in x, in radians and in the closed interval [-pi/2, pi/2]. This is a scalar if x is a scalar. - /// https://docs.scipy.org/doc/numpy/reference/generated/numpy.arcsin.html + /// https://numpy.org/doc/stable/reference/generated/numpy.arcsin.html public static NDArray arcsin(in NDArray x, Type outType) => x.TensorEngine.ASin(x, outType); } diff --git a/src/NumSharp.Core/Math/np.sqrt.cs b/src/NumSharp.Core/Math/np.sqrt.cs index 93d82533..b9270edf 100644 --- a/src/NumSharp.Core/Math/np.sqrt.cs +++ b/src/NumSharp.Core/Math/np.sqrt.cs @@ -11,7 +11,7 @@ public static partial class np /// The dtype the returned ndarray should be of, only non integer values are supported. /// The values whose square-roots are required. /// An array of the same shape as x, containing the positive square-root of each element in x. If any element in x is complex, a complex array is returned (and the square-roots of negative reals are calculated). If all of the elements in x are real, so is y, with negative elements returning nan. If out was provided, y is a reference to it. This is a scalar if x is a scalar. - /// https://docs.scipy.org/doc/numpy/reference/generated/numpy.sqrt.html + /// https://numpy.org/doc/stable/reference/generated/numpy.sqrt.html public static NDArray sqrt(in NDArray x, NPTypeCode? outType = null) => x.TensorEngine.Sqrt(x, outType); @@ -21,7 +21,7 @@ public static NDArray sqrt(in NDArray x, NPTypeCode? outType = null) /// The values whose square-roots are required. /// The dtype the returned ndarray should be of, only non integer values are supported. /// An array of the same shape as x, containing the positive square-root of each element in x. If any element in x is complex, a complex array is returned (and the square-roots of negative reals are calculated). If all of the elements in x are real, so is y, with negative elements returning nan. If out was provided, y is a reference to it. This is a scalar if x is a scalar. - /// https://docs.scipy.org/doc/numpy/reference/generated/numpy.sqrt.html + /// https://numpy.org/doc/stable/reference/generated/numpy.sqrt.html public static NDArray sqrt(in NDArray x, Type outType) => x.TensorEngine.Sqrt(x); } diff --git a/src/NumSharp.Core/Math/np.sum.cs b/src/NumSharp.Core/Math/np.sum.cs index 633137e2..dde3d14c 100644 --- a/src/NumSharp.Core/Math/np.sum.cs +++ b/src/NumSharp.Core/Math/np.sum.cs @@ -13,7 +13,7 @@ public static partial class np /// The type of the returned array and of the accumulator in which the elements are summed. The dtype of a is used by default unless a has an integer dtype of less precision than the default platform integer. In that case, if a is signed then the platform integer is used while if a is unsigned then an unsigned integer of the same precision as the platform integer is used. /// If this is set to True, the axes which are reduced are left in the result as dimensions with size one. With this option, the result will broadcast correctly against the input array. If the default value is passed, then keepdims will not be passed through to the sum method of sub-classes of ndarray, however any non-default value will be.If the sub-class’ method does not implement keepdims any exceptions will be raised. /// An array with the same shape as a, with the specified axis removed. If a is a 0-d array, or if axis is None, a scalar is returned. If an output array is specified, a reference to out is returned. - /// https://docs.scipy.org/doc/numpy/reference/generated/numpy.sum.html + /// https://numpy.org/doc/stable/reference/generated/numpy.sum.html public static NDArray sum(in NDArray a) => a.TensorEngine.Sum(a, axis: null, typeCode: null, keepdims: false); @@ -25,7 +25,7 @@ public static NDArray sum(in NDArray a) /// The type of the returned array and of the accumulator in which the elements are summed. The dtype of a is used by default unless a has an integer dtype of less precision than the default platform integer. In that case, if a is signed then the platform integer is used while if a is unsigned then an unsigned integer of the same precision as the platform integer is used. /// If this is set to True, the axes which are reduced are left in the result as dimensions with size one. With this option, the result will broadcast correctly against the input array. If the default value is passed, then keepdims will not be passed through to the sum method of sub-classes of ndarray, however any non-default value will be.If the sub-class’ method does not implement keepdims any exceptions will be raised. /// An array with the same shape as a, with the specified axis removed. If a is a 0-d array, or if axis is None, a scalar is returned. If an output array is specified, a reference to out is returned. - /// https://docs.scipy.org/doc/numpy/reference/generated/numpy.sum.html + /// https://numpy.org/doc/stable/reference/generated/numpy.sum.html public static NDArray sum(in NDArray a, int axis) => a.TensorEngine.Sum(a, axis: axis, typeCode: null, keepdims: false); @@ -37,7 +37,7 @@ public static NDArray sum(in NDArray a, int axis) /// The type of the returned array and of the accumulator in which the elements are summed. The dtype of a is used by default unless a has an integer dtype of less precision than the default platform integer. In that case, if a is signed then the platform integer is used while if a is unsigned then an unsigned integer of the same precision as the platform integer is used. /// If this is set to True, the axes which are reduced are left in the result as dimensions with size one. With this option, the result will broadcast correctly against the input array. If the default value is passed, then keepdims will not be passed through to the sum method of sub-classes of ndarray, however any non-default value will be.If the sub-class’ method does not implement keepdims any exceptions will be raised. /// An array with the same shape as a, with the specified axis removed. If a is a 0-d array, or if axis is None, a scalar is returned. If an output array is specified, a reference to out is returned. - /// https://docs.scipy.org/doc/numpy/reference/generated/numpy.sum.html + /// https://numpy.org/doc/stable/reference/generated/numpy.sum.html public static NDArray sum(in NDArray a, bool keepdims) => a.TensorEngine.Sum(a, axis: null, typeCode: null, keepdims: keepdims); @@ -49,7 +49,7 @@ public static NDArray sum(in NDArray a, bool keepdims) /// The type of the returned array and of the accumulator in which the elements are summed. The dtype of a is used by default unless a has an integer dtype of less precision than the default platform integer. In that case, if a is signed then the platform integer is used while if a is unsigned then an unsigned integer of the same precision as the platform integer is used. /// If this is set to True, the axes which are reduced are left in the result as dimensions with size one. With this option, the result will broadcast correctly against the input array. If the default value is passed, then keepdims will not be passed through to the sum method of sub-classes of ndarray, however any non-default value will be.If the sub-class’ method does not implement keepdims any exceptions will be raised. /// An array with the same shape as a, with the specified axis removed. If a is a 0-d array, or if axis is None, a scalar is returned. If an output array is specified, a reference to out is returned. - /// https://docs.scipy.org/doc/numpy/reference/generated/numpy.sum.html + /// https://numpy.org/doc/stable/reference/generated/numpy.sum.html public static NDArray sum(in NDArray a, int? axis, bool keepdims) => a.TensorEngine.Sum(a, axis: axis, typeCode: null, keepdims: keepdims); @@ -61,7 +61,7 @@ public static NDArray sum(in NDArray a, int? axis, bool keepdims) /// The type of the returned array and of the accumulator in which the elements are summed. The dtype of a is used by default unless a has an integer dtype of less precision than the default platform integer. In that case, if a is signed then the platform integer is used while if a is unsigned then an unsigned integer of the same precision as the platform integer is used. /// If this is set to True, the axes which are reduced are left in the result as dimensions with size one. With this option, the result will broadcast correctly against the input array. If the default value is passed, then keepdims will not be passed through to the sum method of sub-classes of ndarray, however any non-default value will be.If the sub-class’ method does not implement keepdims any exceptions will be raised. /// An array with the same shape as a, with the specified axis removed. If a is a 0-d array, or if axis is None, a scalar is returned. If an output array is specified, a reference to out is returned. - /// https://docs.scipy.org/doc/numpy/reference/generated/numpy.sum.html + /// https://numpy.org/doc/stable/reference/generated/numpy.sum.html public static NDArray sum(in NDArray a, int? axis, bool keepdims, Type dtype) => a.TensorEngine.Sum(a, axis: axis, typeCode: dtype?.GetTypeCode(), keepdims: keepdims); @@ -73,7 +73,7 @@ public static NDArray sum(in NDArray a, int? axis, bool keepdims, Type dtype) /// The type of the returned array and of the accumulator in which the elements are summed. The dtype of a is used by default unless a has an integer dtype of less precision than the default platform integer. In that case, if a is signed then the platform integer is used while if a is unsigned then an unsigned integer of the same precision as the platform integer is used. /// If this is set to True, the axes which are reduced are left in the result as dimensions with size one. With this option, the result will broadcast correctly against the input array. If the default value is passed, then keepdims will not be passed through to the sum method of sub-classes of ndarray, however any non-default value will be.If the sub-class’ method does not implement keepdims any exceptions will be raised. /// An array with the same shape as a, with the specified axis removed. If a is a 0-d array, or if axis is None, a scalar is returned. If an output array is specified, a reference to out is returned. - /// https://docs.scipy.org/doc/numpy/reference/generated/numpy.sum.html + /// https://numpy.org/doc/stable/reference/generated/numpy.sum.html public static NDArray sum(in NDArray a, int? axis, bool keepdims, NPTypeCode? typeCode) => a.TensorEngine.Sum(a, axis: axis, typeCode: typeCode, keepdims: keepdims); @@ -85,7 +85,7 @@ public static NDArray sum(in NDArray a, int? axis, bool keepdims, NPTypeCode? ty /// The type of the returned array and of the accumulator in which the elements are summed. The dtype of a is used by default unless a has an integer dtype of less precision than the default platform integer. In that case, if a is signed then the platform integer is used while if a is unsigned then an unsigned integer of the same precision as the platform integer is used. /// If this is set to True, the axes which are reduced are left in the result as dimensions with size one. With this option, the result will broadcast correctly against the input array. If the default value is passed, then keepdims will not be passed through to the sum method of sub-classes of ndarray, however any non-default value will be.If the sub-class’ method does not implement keepdims any exceptions will be raised. /// An array with the same shape as a, with the specified axis removed. If a is a 0-d array, or if axis is None, a scalar is returned. If an output array is specified, a reference to out is returned. - /// https://docs.scipy.org/doc/numpy/reference/generated/numpy.sum.html + /// https://numpy.org/doc/stable/reference/generated/numpy.sum.html public static NDArray sum(in NDArray a, int? axis, Type dtype) => a.TensorEngine.Sum(a, axis: axis, typeCode: dtype?.GetTypeCode(), keepdims: false); @@ -96,7 +96,7 @@ public static NDArray sum(in NDArray a, int? axis, Type dtype) /// Axis or axes along which a sum is performed. The default, axis=None, will sum all of the elements of the input array. If axis is negative it counts from the last to the first axis. /// The type of the returned array and of the accumulator in which the elements are summed. The dtype of a is used by default unless a has an integer dtype of less precision than the default platform integer. In that case, if a is signed then the platform integer is used while if a is unsigned then an unsigned integer of the same precision as the platform integer is used. /// An array with the same shape as a, with the specified axis removed. If a is a 0-d array, or if axis is None, a scalar is returned. If an output array is specified, a reference to out is returned. - /// https://docs.scipy.org/doc/numpy/reference/generated/numpy.sum.html + /// https://numpy.org/doc/stable/reference/generated/numpy.sum.html public static NDArray sum(in NDArray a, int? axis, NPTypeCode? typeCode) => a.TensorEngine.Sum(a, axis: axis, typeCode: typeCode, keepdims: false); @@ -108,7 +108,7 @@ public static NDArray sum(in NDArray a, int? axis, NPTypeCode? typeCode) /// The type of the returned array and of the accumulator in which the elements are summed. The dtype of a is used by default unless a has an integer dtype of less precision than the default platform integer. In that case, if a is signed then the platform integer is used while if a is unsigned then an unsigned integer of the same precision as the platform integer is used. /// If this is set to True, the axes which are reduced are left in the result as dimensions with size one. With this option, the result will broadcast correctly against the input array. If the default value is passed, then keepdims will not be passed through to the sum method of sub-classes of ndarray, however any non-default value will be.If the sub-class’ method does not implement keepdims any exceptions will be raised. /// An array with the same shape as a, with the specified axis removed. If a is a 0-d array, or if axis is None, a scalar is returned. If an output array is specified, a reference to out is returned. - /// https://docs.scipy.org/doc/numpy/reference/generated/numpy.sum.html + /// https://numpy.org/doc/stable/reference/generated/numpy.sum.html public static NDArray sum(in NDArray a, Type dtype) => a.TensorEngine.Sum(a, axis: null, typeCode: dtype?.GetTypeCode(), keepdims: false); @@ -120,7 +120,7 @@ public static NDArray sum(in NDArray a, Type dtype) /// The type of the returned array and of the accumulator in which the elements are summed. The dtype of a is used by default unless a has an integer dtype of less precision than the default platform integer. In that case, if a is signed then the platform integer is used while if a is unsigned then an unsigned integer of the same precision as the platform integer is used. /// If this is set to True, the axes which are reduced are left in the result as dimensions with size one. With this option, the result will broadcast correctly against the input array. If the default value is passed, then keepdims will not be passed through to the sum method of sub-classes of ndarray, however any non-default value will be.If the sub-class’ method does not implement keepdims any exceptions will be raised. /// An array with the same shape as a, with the specified axis removed. If a is a 0-d array, or if axis is None, a scalar is returned. If an output array is specified, a reference to out is returned. - /// https://docs.scipy.org/doc/numpy/reference/generated/numpy.sum.html + /// https://numpy.org/doc/stable/reference/generated/numpy.sum.html public static NDArray sum(in NDArray a, NPTypeCode? typeCode) => a.TensorEngine.Sum(a, axis: null, typeCode: typeCode, keepdims: false); } diff --git a/src/NumSharp.Core/Math/np.tan.cs b/src/NumSharp.Core/Math/np.tan.cs index 25fe75c5..c8acc59a 100644 --- a/src/NumSharp.Core/Math/np.tan.cs +++ b/src/NumSharp.Core/Math/np.tan.cs @@ -12,7 +12,7 @@ public static partial class np /// Angle, in radians (2 \pi rad equals 360 degrees). /// The dtype the returned ndarray should be of, only non integer values are supported. /// The sine of each element of x. This is a scalar if x is a scalar. - /// https://docs.scipy.org/doc/numpy/reference/generated/numpy.tan.html + /// https://numpy.org/doc/stable/reference/generated/numpy.tan.html public static NDArray tan(in NDArray x, NPTypeCode? outType = null) => x.TensorEngine.Tan(x, outType); @@ -22,7 +22,7 @@ public static NDArray tan(in NDArray x, NPTypeCode? outType = null) /// Angle, in radians (2 \pi rad equals 360 degrees). /// The dtype the returned ndarray should be of, only non integer values are supported. /// The sine of each element of x. This is a scalar if x is a scalar. - /// https://docs.scipy.org/doc/numpy/reference/generated/numpy.tan.html + /// https://numpy.org/doc/stable/reference/generated/numpy.tan.html public static NDArray tan(in NDArray x, Type outType) => x.TensorEngine.Tan(x, outType); @@ -33,7 +33,7 @@ public static NDArray tan(in NDArray x, Type outType) /// Input array. /// The dtype the returned ndarray should be of, only non integer values are supported. /// The sine of each element of x. This is a scalar if x is a scalar. - /// https://docs.scipy.org/doc/numpy/reference/generated/numpy.tanh.html + /// https://numpy.org/doc/stable/reference/generated/numpy.tanh.html public static NDArray tanh(in NDArray x, NPTypeCode? outType = null) => x.TensorEngine.Tanh(x, outType); @@ -44,7 +44,7 @@ public static NDArray tanh(in NDArray x, NPTypeCode? outType = null) /// Input array. /// The dtype the returned ndarray should be of, only non integer values are supported. /// The sine of each element of x. This is a scalar if x is a scalar. - /// https://docs.scipy.org/doc/numpy/reference/generated/numpy.tanh.html + /// https://numpy.org/doc/stable/reference/generated/numpy.tanh.html public static NDArray tanh(in NDArray x, Type outType) => x.TensorEngine.Tanh(x, outType); @@ -55,7 +55,7 @@ public static NDArray tanh(in NDArray x, Type outType) /// Input array. /// The dtype the returned ndarray should be of, only non integer values are supported. /// Return has the same shape as x. Its real part is in [-pi/2, pi/2] (arctan(+/-inf) returns +/-pi/2). This is a scalar if x is a scalar. - /// https://docs.scipy.org/doc/numpy/reference/generated/numpy.arctan.html + /// https://numpy.org/doc/stable/reference/generated/numpy.arctan.html public static NDArray arctan(in NDArray x, NPTypeCode? outType = null) => x.TensorEngine.ATan(x, outType); @@ -66,7 +66,7 @@ public static NDArray arctan(in NDArray x, NPTypeCode? outType = null) /// Input array. /// The dtype the returned ndarray should be of, only non integer values are supported. /// Return has the same shape as x. Its real part is in [-pi/2, pi/2] (arctan(+/-inf) returns +/-pi/2). This is a scalar if x is a scalar. - /// https://docs.scipy.org/doc/numpy/reference/generated/numpy.arctan.html + /// https://numpy.org/doc/stable/reference/generated/numpy.arctan.html public static NDArray arctan(in NDArray x, Type outType) => x.TensorEngine.ATan(x, outType); @@ -78,7 +78,7 @@ public static NDArray arctan(in NDArray x, Type outType) /// x-coordinates. If x1.shape != x2.shape, they must be broadcastable to a common shape (which becomes the shape of the output). /// The dtype the returned ndarray should be of, only non integer values are supported. /// The Array of angles in radians, in the range [-pi, pi]. This is a scalar if both x1 and x2 are scalars. - /// https://docs.scipy.org/doc/numpy/reference/generated/numpy.arctan2.html + /// https://numpy.org/doc/stable/reference/generated/numpy.arctan2.html public static NDArray arctan2(in NDArray y, in NDArray x, NPTypeCode? outType = null) => x.TensorEngine.ATan2(y, x, outType); @@ -90,7 +90,7 @@ public static NDArray arctan2(in NDArray y, in NDArray x, NPTypeCode? outType = /// x-coordinates. If x1.shape != x2.shape, they must be broadcastable to a common shape (which becomes the shape of the output). /// The dtype the returned ndarray should be of, only non integer values are supported. /// The Array of angles in radians, in the range [-pi, pi]. This is a scalar if both x1 and x2 are scalars. - /// https://docs.scipy.org/doc/numpy/reference/generated/numpy.arctan2.html + /// https://numpy.org/doc/stable/reference/generated/numpy.arctan2.html public static NDArray arctan2(in NDArray y, in NDArray x, Type outType) => x.TensorEngine.ATan2(y, x, outType); } diff --git a/src/NumSharp.Core/Operations/Elementwise/NDArray.Equals.cs b/src/NumSharp.Core/Operations/Elementwise/NDArray.Equals.cs index f777f0b8..1e00a220 100644 --- a/src/NumSharp.Core/Operations/Elementwise/NDArray.Equals.cs +++ b/src/NumSharp.Core/Operations/Elementwise/NDArray.Equals.cs @@ -66,7 +66,7 @@ private NDArray equal(NDArray np2) /// Input array. /// Input array. /// Returns True if the arrays are equal. - /// https://docs.scipy.org/doc/numpy-1.16.0/reference/generated/numpy.array_equal.html + /// https://numpy.org/doc/stable/reference/generated/numpy.array_equal.html public bool array_equal(NDArray rhs) { unsafe diff --git a/src/NumSharp.Core/RandomSampling/np.random.binomial.cs b/src/NumSharp.Core/RandomSampling/np.random.binomial.cs index 4169ea21..9d0f7ffc 100644 --- a/src/NumSharp.Core/RandomSampling/np.random.binomial.cs +++ b/src/NumSharp.Core/RandomSampling/np.random.binomial.cs @@ -17,7 +17,7 @@ public partial class NumPyRandom /// Parameter of the distribution, >= 0 and <=1. /// Output Shape /// Drawn samples from the parameterized binomial distribution, where each sample is equal to the number of successes over the n trials. - /// https://docs.scipy.org/doc/numpy-1.14.0/reference/generated/numpy.random.binomial.html + /// https://numpy.org/doc/stable/reference/generated/numpy.random.binomial.html public NDArray binomial(int n, double p, Shape shape) => binomial(n, p, shape.dimensions); /// @@ -28,7 +28,7 @@ public partial class NumPyRandom /// Parameter of the distribution, >= 0 and <=1. /// Output Shape /// Drawn samples from the parameterized binomial distribution, where each sample is equal to the number of successes over the n trials. - /// https://docs.scipy.org/doc/numpy-1.14.0/reference/generated/numpy.random.binomial.html + /// https://numpy.org/doc/stable/reference/generated/numpy.random.binomial.html public NDArray binomial(int n, double p, params int[] dims) { var x = np.zeros(dims); diff --git a/src/NumSharp.Core/RandomSampling/np.random.chisquare.cs b/src/NumSharp.Core/RandomSampling/np.random.chisquare.cs index 5b08db61..2369f7a3 100644 --- a/src/NumSharp.Core/RandomSampling/np.random.chisquare.cs +++ b/src/NumSharp.Core/RandomSampling/np.random.chisquare.cs @@ -15,7 +15,7 @@ public partial class NumPyRandom /// Number of degrees of freedom, should be > 0. /// Output Shape /// Drawn samples from the parameterized chi-square distribution. - /// https://docs.scipy.org/doc/numpy-1.15.0/reference/generated/numpy.random.chisquare.html + /// https://numpy.org/doc/stable/reference/generated/numpy.random.chisquare.html public NDArray chisquare(double df, Shape shape) => chisquare(df, shape.dimensions); /// @@ -26,7 +26,7 @@ public partial class NumPyRandom /// Number of degrees of freedom, should be > 0. /// Output Shape /// Drawn samples from the parameterized chi-square distribution. - /// https://docs.scipy.org/doc/numpy-1.15.0/reference/generated/numpy.random.chisquare.html + /// https://numpy.org/doc/stable/reference/generated/numpy.random.chisquare.html public NDArray chisquare(double df, params int[] dims) { if (df <= 0) diff --git a/src/NumSharp.Core/RandomSampling/np.random.choice.cs b/src/NumSharp.Core/RandomSampling/np.random.choice.cs index 5172546c..2cad2e79 100644 --- a/src/NumSharp.Core/RandomSampling/np.random.choice.cs +++ b/src/NumSharp.Core/RandomSampling/np.random.choice.cs @@ -9,7 +9,7 @@ public partial class NumPyRandom /// Output shape. If the given shape is, e.g., (m, n, k), then m * n * k samples are drawn. Default is None, in which case a single value is returned. /// Whether the sample is with or without replacement /// The probabilities associated with each entry in a. If not given the sample assumes a uniform distribution over all entries in a. - /// https://docs.scipy.org/doc/numpy/reference/generated/numpy.random.choice.html + /// https://numpy.org/doc/stable/reference/generated/numpy.random.choice.html public NDArray choice(NDArray arr, Shape shape = default, bool replace = true, double[] probabilities = null) { int arrSize = arr.size; @@ -24,7 +24,7 @@ public NDArray choice(NDArray arr, Shape shape = default, bool replace = true, d /// Output shape. If the given shape is, e.g., (m, n, k), then m * n * k samples are drawn. Default is None, in which case a single value is returned. /// Whether the sample is with or without replacement /// The probabilities associated with each entry in a. If not given the sample assumes a uniform distribution over all entries in a. - /// https://docs.scipy.org/doc/numpy/reference/generated/numpy.random.choice.html + /// https://numpy.org/doc/stable/reference/generated/numpy.random.choice.html public NDArray choice(int a, Shape shape = default, bool replace = true, double[] probabilities = null) { if (shape.IsEmpty) diff --git a/src/NumSharp.Core/RandomSampling/np.random.cs b/src/NumSharp.Core/RandomSampling/np.random.cs index 4d15b5b5..4b258bd5 100644 --- a/src/NumSharp.Core/RandomSampling/np.random.cs +++ b/src/NumSharp.Core/RandomSampling/np.random.cs @@ -3,7 +3,7 @@ /// /// A class that serves as numpy.random.RandomState in python. /// - /// https://docs.scipy.org/doc/numpy-1.16.1/reference/routines.random.html + /// https://numpy.org/doc/stable/reference/routines.random.html public partial class NumPyRandom { protected internal Randomizer randomizer; diff --git a/src/NumSharp.Core/RandomSampling/np.random.exponential.cs b/src/NumSharp.Core/RandomSampling/np.random.exponential.cs index c0b41f14..218350c5 100644 --- a/src/NumSharp.Core/RandomSampling/np.random.exponential.cs +++ b/src/NumSharp.Core/RandomSampling/np.random.exponential.cs @@ -14,7 +14,7 @@ public partial class NumPyRandom /// The scale parameter, \beta = 1/\lambda. /// Output Shape /// Drawn samples from the parameterized exponential distribution. - /// https://docs.scipy.org/doc/numpy-1.15.0/reference/generated/numpy.random.exponential.html + /// https://numpy.org/doc/stable/reference/generated/numpy.random.exponential.html public NDArray exponential(double scale, Shape shape) => exponential(scale, shape.dimensions); /// @@ -24,7 +24,7 @@ public partial class NumPyRandom /// The scale parameter, \beta = 1/\lambda. /// Output Shape /// Drawn samples from the parameterized exponential distribution. - /// https://docs.scipy.org/doc/numpy-1.15.0/reference/generated/numpy.random.exponential.html + /// https://numpy.org/doc/stable/reference/generated/numpy.random.exponential.html public NDArray exponential(double scale, params int[] dims) { var x = np.log(1 - np.random.uniform(0, 1, dims)); diff --git a/src/NumSharp.Core/RandomSampling/np.random.gamma.cs b/src/NumSharp.Core/RandomSampling/np.random.gamma.cs index f662bfc5..ade87de3 100644 --- a/src/NumSharp.Core/RandomSampling/np.random.gamma.cs +++ b/src/NumSharp.Core/RandomSampling/np.random.gamma.cs @@ -19,7 +19,7 @@ public partial class NumPyRandom /// The scale of the gamma distribution. Should be greater than zero. Default is equal to 1. /// Output shape. /// Drawn samples from the parameterized gamma distribution. - /// https://docs.scipy.org/doc/numpy-1.15.0/reference/generated/numpy.random.gamma.html + /// https://numpy.org/doc/stable/reference/generated/numpy.random.gamma.html public NDArray gamma(double shapeV, double scale, Shape shape) => gamma(shapeV, scale, shape.dimensions); /// @@ -31,7 +31,7 @@ public partial class NumPyRandom /// The scale of the gamma distribution. Should be greater than zero. Default is equal to 1. /// Output shape. /// Drawn samples from the parameterized gamma distribution. - /// https://docs.scipy.org/doc/numpy-1.15.0/reference/generated/numpy.random.gamma.html + /// https://numpy.org/doc/stable/reference/generated/numpy.random.gamma.html public NDArray gamma(double shape, double scale, params int[] dims) { if (shape < 1) diff --git a/src/NumSharp.Core/RandomSampling/np.random.geometric.cs b/src/NumSharp.Core/RandomSampling/np.random.geometric.cs index df552d75..9685c138 100644 --- a/src/NumSharp.Core/RandomSampling/np.random.geometric.cs +++ b/src/NumSharp.Core/RandomSampling/np.random.geometric.cs @@ -15,7 +15,7 @@ public partial class NumPyRandom /// The probability of success of an individual trial. /// Output Shape /// Drawn samples from the parameterized geometric distribution. - /// https://docs.scipy.org/doc/numpy-1.16.0/reference/generated/numpy.random.geometric.html + /// https://numpy.org/doc/stable/reference/generated/numpy.random.geometric.html public NDArray geometric(double p, Shape shape) => geometric(p, shape.dimensions); /// @@ -26,7 +26,7 @@ public partial class NumPyRandom /// The probability of success of an individual trial. /// Output Shape /// Drawn samples from the parameterized geometric distribution. - /// https://docs.scipy.org/doc/numpy-1.16.0/reference/generated/numpy.random.geometric.html + /// https://numpy.org/doc/stable/reference/generated/numpy.random.geometric.html public NDArray geometric(double p, params int[] dims) { var x = np.log(1 - np.random.uniform(0, 1, dims)); diff --git a/src/NumSharp.Core/RandomSampling/np.random.lognormal.cs b/src/NumSharp.Core/RandomSampling/np.random.lognormal.cs index 593974e4..399c9feb 100644 --- a/src/NumSharp.Core/RandomSampling/np.random.lognormal.cs +++ b/src/NumSharp.Core/RandomSampling/np.random.lognormal.cs @@ -18,7 +18,7 @@ public partial class NumPyRandom /// Standard deviation of the underlying normal distribution. Should be greater than zero. Default is 1. /// Output Shape /// Drawn samples from the parameterized bernoulli distribution. - /// https://docs.scipy.org/doc/numpy-1.16.0/reference/generated/numpy.random.lognormal.html + /// https://numpy.org/doc/stable/reference/generated/numpy.random.lognormal.html public NDArray lognormal(double mean, double sigma, Shape shape) => lognormal(mean, sigma, shape.dimensions); /// @@ -30,7 +30,7 @@ public partial class NumPyRandom /// Standard deviation of the underlying normal distribution. Should be greater than zero. Default is 1. /// Output Shape /// Drawn samples from the parameterized bernoulli distribution. - /// https://docs.scipy.org/doc/numpy-1.16.0/reference/generated/numpy.random.lognormal.html + /// https://numpy.org/doc/stable/reference/generated/numpy.random.lognormal.html public NDArray lognormal(double mean, double sigma, params int[] dims) { double zm = mean * mean; diff --git a/src/NumSharp.Core/RandomSampling/np.random.permutation.cs b/src/NumSharp.Core/RandomSampling/np.random.permutation.cs index 88e3b916..e348c9d9 100644 --- a/src/NumSharp.Core/RandomSampling/np.random.permutation.cs +++ b/src/NumSharp.Core/RandomSampling/np.random.permutation.cs @@ -7,7 +7,7 @@ public partial class NumPyRandom /// /// If x is an integer, randomly permute np.arange(x). /// Permuted sequence or array range. - /// https://docs.scipy.org/doc/numpy/reference/generated/numpy.random.permutation.html + /// https://numpy.org/doc/stable/reference/generated/numpy.random.permutation.html public NDArray permutation(int x) { var nd = np.arange(x); @@ -21,7 +21,7 @@ public NDArray permutation(int x) /// /// If x is an integer, randomly permute np.arange(x). /// Permuted sequence or array range. - /// https://docs.scipy.org/doc/numpy/reference/generated/numpy.random.permutation.html + /// https://numpy.org/doc/stable/reference/generated/numpy.random.permutation.html public NDArray permutation(NDArray x) { x = x.copy(); diff --git a/src/NumSharp.Core/RandomSampling/np.random.poisson.cs b/src/NumSharp.Core/RandomSampling/np.random.poisson.cs index 585b2714..4630b85f 100644 --- a/src/NumSharp.Core/RandomSampling/np.random.poisson.cs +++ b/src/NumSharp.Core/RandomSampling/np.random.poisson.cs @@ -16,7 +16,7 @@ public partial class NumPyRandom /// Expectation of interval, should be >= 0. A sequence of expectation intervals must be broadcastable over the requested size. /// Output Shape /// Drawn samples from the parameterized binomial distribution, where each sample is equal to the number of successes over the n trials. - /// https://docs.scipy.org/doc/numpy-1.16.0/reference/generated/numpy.random.poisson.html + /// https://numpy.org/doc/stable/reference/generated/numpy.random.poisson.html public NDArray poisson(double lam, Shape shape) => poisson(lam, shape.dimensions); /// @@ -25,7 +25,7 @@ public partial class NumPyRandom /// Expectation of interval, should be >= 0. A sequence of expectation intervals must be broadcastable over the requested size. /// Output Shape /// Drawn samples from the parameterized binomial distribution, where each sample is equal to the number of successes over the n trials. - /// https://docs.scipy.org/doc/numpy-1.16.0/reference/generated/numpy.random.poisson.html + /// https://numpy.org/doc/stable/reference/generated/numpy.random.poisson.html public NDArray poisson(double lam, params int[] dims) { if (lam < 0) diff --git a/src/NumSharp.Core/RandomSampling/np.random.randint.cs b/src/NumSharp.Core/RandomSampling/np.random.randint.cs index 0b744023..504e1dd2 100644 --- a/src/NumSharp.Core/RandomSampling/np.random.randint.cs +++ b/src/NumSharp.Core/RandomSampling/np.random.randint.cs @@ -15,7 +15,7 @@ public partial class NumPyRandom /// The shape of the array. /// Desired dtype of the result. All dtypes are determined by their name, i.e., ‘int64’, ‘int’, etc, so byteorder is not available and a specific precision may have different C types depending on the platform. The default value is ‘np.int’. /// - /// https://docs.scipy.org/doc/numpy/reference/generated/numpy.random.randint.html + /// https://numpy.org/doc/stable/reference/generated/numpy.random.randint.html public NDArray randint(long low, long high = -1, Shape size = default, Type dtype = null) { dtype = dtype ?? np.int32; diff --git a/src/NumSharp.Core/RandomSampling/np.random.shuffle.cs b/src/NumSharp.Core/RandomSampling/np.random.shuffle.cs index dad2a680..1d1c4878 100644 --- a/src/NumSharp.Core/RandomSampling/np.random.shuffle.cs +++ b/src/NumSharp.Core/RandomSampling/np.random.shuffle.cs @@ -11,7 +11,7 @@ public partial class NumPyRandom /// /// The array or list to be shuffled. /// How many times to pass all items in a complexity of O(n*passes) - /// https://docs.scipy.org/doc/numpy/reference/generated/numpy.random.shuffle.html

Does not copy
+ /// https://numpy.org/doc/stable/reference/generated/numpy.random.shuffle.html

Does not copy
[SuppressMessage("ReSharper", "TooWideLocalVariableScope")] public void shuffle(NDArray x, int passes = 2) { diff --git a/src/NumSharp.Core/Selection/NDArray.Indexing.Masking.cs b/src/NumSharp.Core/Selection/NDArray.Indexing.Masking.cs index d0b4f9ae..cc6a05cc 100644 --- a/src/NumSharp.Core/Selection/NDArray.Indexing.Masking.cs +++ b/src/NumSharp.Core/Selection/NDArray.Indexing.Masking.cs @@ -14,7 +14,7 @@ public partial class NDArray /// /// Used to perform selection based on a boolean mask. /// - /// https://docs.scipy.org/doc/numpy-1.17.0/user/basics.indexing.html + /// https://numpy.org/doc/stable/user/basics.indexing.html /// When one of the indices exceeds limits. /// indices must be of Int type (byte, u/short, u/int, u/long). [SuppressMessage("ReSharper", "CoVariantArrayConversion")] diff --git a/src/NumSharp.Core/Selection/NDArray.Indexing.Selection.Getter.cs b/src/NumSharp.Core/Selection/NDArray.Indexing.Selection.Getter.cs index 3f784b41..e0839036 100644 --- a/src/NumSharp.Core/Selection/NDArray.Indexing.Selection.Getter.cs +++ b/src/NumSharp.Core/Selection/NDArray.Indexing.Selection.Getter.cs @@ -16,7 +16,7 @@ public partial class NDArray /// Used to perform selection based on indices, equivalent to nd[NDArray[]]. ///
/// Alternative output array in which to place the result. It must have the same shape as the expected output and be of dtype . - /// https://docs.scipy.org/doc/numpy-1.17.0/user/basics.indexing.html + /// https://numpy.org/doc/stable/user/basics.indexing.html /// When one of the indices exceeds limits. /// indices must be of Int type (byte, u/short, u/int, u/long). public NDArray GetIndices(NDArray @out, NDArray[] indices) diff --git a/src/NumSharp.Core/Selection/NDArray.Indexing.Selection.Setter.cs b/src/NumSharp.Core/Selection/NDArray.Indexing.Selection.Setter.cs index 89836fed..3c15129f 100644 --- a/src/NumSharp.Core/Selection/NDArray.Indexing.Selection.Setter.cs +++ b/src/NumSharp.Core/Selection/NDArray.Indexing.Selection.Setter.cs @@ -16,7 +16,7 @@ public partial class NDArray /// Used to perform set a selection based on indices, equivalent to nd[NDArray[]] = values. ///
/// The values to set via . - /// https://docs.scipy.org/doc/numpy-1.17.0/user/basics.indexing.html + /// https://numpy.org/doc/stable/user/basics.indexing.html /// When one of the indices exceeds limits. /// indices must be of Int type (byte, u/short, u/int, u/long). /// If this array is not writeable (e.g., broadcast array). diff --git a/src/NumSharp.Core/Selection/NDArray.Indexing.cs b/src/NumSharp.Core/Selection/NDArray.Indexing.cs index 990d2405..3329f4cf 100644 --- a/src/NumSharp.Core/Selection/NDArray.Indexing.cs +++ b/src/NumSharp.Core/Selection/NDArray.Indexing.cs @@ -38,7 +38,7 @@ private void ThrowIfNotWriteable() /// /// Used to perform selection based on a selection indices. /// - /// https://docs.scipy.org/doc/numpy-1.17.0/user/basics.indexing.html + /// https://numpy.org/doc/stable/user/basics.indexing.html /// When one of the indices exceeds limits. /// indices must be of Int type (byte, u/short, u/int, u/long). public NDArray this[params NDArray[] selection] diff --git a/src/NumSharp.Core/Sorting_Searching_Counting/np.amax.cs b/src/NumSharp.Core/Sorting_Searching_Counting/np.amax.cs index c1ce8218..6d18e35c 100644 --- a/src/NumSharp.Core/Sorting_Searching_Counting/np.amax.cs +++ b/src/NumSharp.Core/Sorting_Searching_Counting/np.amax.cs @@ -9,7 +9,7 @@ public static partial class np ///
/// the type expected as a return, cast is performed if necessary. /// Maximum of a. If axis is None, the result is a scalar value. If axis is given, the result is an array of dimension a.ndim - 1. - /// https://docs.scipy.org/doc/numpy/reference/generated/numpy.amax.html + /// https://numpy.org/doc/stable/reference/generated/numpy.amax.html public static T amax(NDArray a) where T : unmanaged => a.amax(); /// @@ -19,7 +19,7 @@ public static partial class np /// If this is set to True, the axes which are reduced are left in the result as dimensions with size one. With this option, the result will broadcast correctly against the input array. /// the type expected as a return, null will remain the same dtype. /// Maximum of a. If axis is None, the result is a scalar value. If axis is given, the result is an array of dimension a.ndim - 1. - /// https://docs.scipy.org/doc/numpy/reference/generated/numpy.amax.html + /// https://numpy.org/doc/stable/reference/generated/numpy.amax.html public static NDArray amax(NDArray a, int? axis = null, bool keepdims = false, Type dtype = null) { if (!axis.HasValue) @@ -34,7 +34,7 @@ public static NDArray amax(NDArray a, int? axis = null, bool keepdims = false, T /// If this is set to True, the axes which are reduced are left in the result as dimensions with size one. With this option, the result will broadcast correctly against the input array. /// the type expected as a return, null will remain the same dtype. /// Maximum of a. If axis is None, the result is a scalar value. If axis is given, the result is an array of dimension a.ndim - 1. - /// https://docs.scipy.org/doc/numpy/reference/generated/numpy.amax.html + /// https://numpy.org/doc/stable/reference/generated/numpy.amax.html public static NDArray max(NDArray a, int? axis = null, bool keepdims = false, Type dtype = null) { if (!axis.HasValue) diff --git a/src/NumSharp.Core/Sorting_Searching_Counting/np.argmax.cs b/src/NumSharp.Core/Sorting_Searching_Counting/np.argmax.cs index e9105bf5..216e4229 100644 --- a/src/NumSharp.Core/Sorting_Searching_Counting/np.argmax.cs +++ b/src/NumSharp.Core/Sorting_Searching_Counting/np.argmax.cs @@ -9,7 +9,7 @@ public static partial class np /// Input array. /// By default, the index is into the flattened array, otherwise along the specified axis. /// Array of indices into the array. It has the same shape as a.shape with the dimension along axis removed. - /// https://docs.scipy.org/doc/numpy/reference/generated/numpy.argmax.html + /// https://numpy.org/doc/stable/reference/generated/numpy.argmax.html public static NDArray argmax(NDArray a, int axis) => a.TensorEngine.ArgMax(a, axis: axis); @@ -18,7 +18,7 @@ public static NDArray argmax(NDArray a, int axis) /// /// Input array. /// Array of indices into the array. It has the same shape as a.shape with the dimension along axis removed. - /// https://docs.scipy.org/doc/numpy/reference/generated/numpy.argmax.html + /// https://numpy.org/doc/stable/reference/generated/numpy.argmax.html public static int argmax(NDArray a) => a.TensorEngine.ArgMax(a); @@ -28,7 +28,7 @@ public static int argmax(NDArray a) /// Input array. /// By default, the index is into the flattened array, otherwise along the specified axis. /// Array of indices into the array. It has the same shape as a.shape with the dimension along axis removed. - /// https://docs.scipy.org/doc/numpy/reference/generated/numpy.argmin.html + /// https://numpy.org/doc/stable/reference/generated/numpy.argmin.html public static NDArray argmin(NDArray a, int axis) => a.TensorEngine.ArgMin(a, axis: axis); @@ -37,7 +37,7 @@ public static NDArray argmin(NDArray a, int axis) ///
/// Input array. /// Array of indices into the array. It has the same shape as a.shape with the dimension along axis removed. - /// https://docs.scipy.org/doc/numpy/reference/generated/numpy.argmin.html + /// https://numpy.org/doc/stable/reference/generated/numpy.argmin.html public static int argmin(NDArray a) => a.TensorEngine.ArgMin(a); } diff --git a/src/NumSharp.Core/Sorting_Searching_Counting/np.min.cs b/src/NumSharp.Core/Sorting_Searching_Counting/np.min.cs index 44c40677..d6f45033 100644 --- a/src/NumSharp.Core/Sorting_Searching_Counting/np.min.cs +++ b/src/NumSharp.Core/Sorting_Searching_Counting/np.min.cs @@ -10,7 +10,7 @@ public static partial class np /// Input data. /// the type expected as a return, cast is performed if necessary. /// Minimum of a. If axis is None, the result is a scalar value. If axis is given, the result is an array of dimension a.ndim - 1. - /// https://docs.scipy.org/doc/numpy/reference/generated/numpy.amin.html + /// https://numpy.org/doc/stable/reference/generated/numpy.amin.html public static T amin(in NDArray a) where T : unmanaged => a.amin(); /// @@ -21,7 +21,7 @@ public static partial class np /// If this is set to True, the axes which are reduced are left in the result as dimensions with size one. With this option, the result will broadcast correctly against the input array. /// the type expected as a return, null will remain the same dtype. /// Minimum of a. If axis is None, the result is a scalar value. If axis is given, the result is an array of dimension a.ndim - 1. - /// https://docs.scipy.org/doc/numpy/reference/generated/numpy.amin.html + /// https://numpy.org/doc/stable/reference/generated/numpy.amin.html public static NDArray amin(in NDArray a, int? axis = null, bool keepdims = false, Type dtype = null) { if (!axis.HasValue) @@ -38,7 +38,7 @@ public static NDArray amin(in NDArray a, int? axis = null, bool keepdims = false /// If this is set to True, the axes which are reduced are left in the result as dimensions with size one. With this option, the result will broadcast correctly against the input array. /// the type expected as a return, null will remain the same dtype. /// Minimum of a. If axis is None, the result is a scalar value. If axis is given, the result is an array of dimension a.ndim - 1. - /// https://docs.scipy.org/doc/numpy/reference/generated/numpy.amin.html + /// https://numpy.org/doc/stable/reference/generated/numpy.amin.html public static NDArray min(in NDArray a, int? axis = null, bool keepdims = false, Type dtype = null) { if (!axis.HasValue) diff --git a/src/NumSharp.Core/Sorting_Searching_Counting/np.searchsorted.cs b/src/NumSharp.Core/Sorting_Searching_Counting/np.searchsorted.cs index ca6367a0..dcb99555 100644 --- a/src/NumSharp.Core/Sorting_Searching_Counting/np.searchsorted.cs +++ b/src/NumSharp.Core/Sorting_Searching_Counting/np.searchsorted.cs @@ -10,7 +10,7 @@ public static partial class np /// Input array. Must be sorted in ascending order. /// Values to insert into a. /// Array of insertion points with the same shape as v. - /// https://docs.scipy.org/doc/numpy/reference/generated/numpy.searchsorted.html + /// https://numpy.org/doc/stable/reference/generated/numpy.searchsorted.html public static NDArray searchsorted(NDArray a, NDArray v) { // TODO currently no support for multidimensional a diff --git a/src/NumSharp.Core/Statistics/NDArray.amax.cs b/src/NumSharp.Core/Statistics/NDArray.amax.cs index ca642f58..be7a285e 100644 --- a/src/NumSharp.Core/Statistics/NDArray.amax.cs +++ b/src/NumSharp.Core/Statistics/NDArray.amax.cs @@ -11,7 +11,7 @@ public partial class NDArray /// /// The expected return type, cast will be performed if necessary. /// Maximum of a. If axis is None, the result is a scalar value. If axis is given, the result is an array of dimension a.ndim - 1. - /// https://docs.scipy.org/doc/numpy/reference/generated/numpy.amax.html + /// https://numpy.org/doc/stable/reference/generated/numpy.amax.html public T amax() where T : unmanaged { return np.asscalar(TensorEngine.AMax(this, null, typeof(T).GetTypeCode(), false)); @@ -24,7 +24,7 @@ public T amax() where T : unmanaged /// If this is set to True, the axes which are reduced are left in the result as dimensions with size one. With this option, the result will broadcast correctly against the input array. /// the type expected as a return, null will remain the same dtype. /// Maximum of a. If axis is None, the result is a scalar value. If axis is given, the result is an array of dimension a.ndim - 1. - /// https://docs.scipy.org/doc/numpy/reference/generated/numpy.amax.html + /// https://numpy.org/doc/stable/reference/generated/numpy.amax.html [SuppressMessage("ReSharper", "TooWideLocalVariableScope")] [SuppressMessage("ReSharper", "ParameterHidesMember")] public NDArray amax(int axis, bool keepdims = false, Type dtype = null) @@ -37,7 +37,7 @@ public NDArray amax(int axis, bool keepdims = false, Type dtype = null) ///
/// the type expected as a return, null will remain the same dtype. /// Maximum of a. If axis is None, the result is a scalar value. If axis is given, the result is an array of dimension a.ndim - 1. - /// https://docs.scipy.org/doc/numpy/reference/generated/numpy.amax.html + /// https://numpy.org/doc/stable/reference/generated/numpy.amax.html [SuppressMessage("ReSharper", "TooWideLocalVariableScope")] [SuppressMessage("ReSharper", "ParameterHidesMember")] public NDArray amax(Type dtype = null) @@ -50,7 +50,7 @@ public NDArray amax(Type dtype = null) ///
/// The expected return type, cast will be performed if necessary. /// Maximum of a. If axis is None, the result is a scalar value. If axis is given, the result is an array of dimension a.ndim - 1. - /// https://docs.scipy.org/doc/numpy/reference/generated/numpy.amax.html + /// https://numpy.org/doc/stable/reference/generated/numpy.amax.html public T max() where T : unmanaged { return amax(); @@ -63,7 +63,7 @@ public T max() where T : unmanaged /// If this is set to True, the axes which are reduced are left in the result as dimensions with size one. With this option, the result will broadcast correctly against the input array. /// the type expected as a return, null will remain the same dtype. /// Maximum of a. If axis is None, the result is a scalar value. If axis is given, the result is an array of dimension a.ndim - 1. - /// https://docs.scipy.org/doc/numpy/reference/generated/numpy.amax.html + /// https://numpy.org/doc/stable/reference/generated/numpy.amax.html [SuppressMessage("ReSharper", "TooWideLocalVariableScope")] [SuppressMessage("ReSharper", "ParameterHidesMember")] public NDArray max(int axis, bool keepdims = false, Type dtype = null) @@ -76,7 +76,7 @@ public NDArray max(int axis, bool keepdims = false, Type dtype = null) ///
/// the type expected as a return, null will remain the same dtype. /// Maximum of a. If axis is None, the result is a scalar value. If axis is given, the result is an array of dimension a.ndim - 1. - /// https://docs.scipy.org/doc/numpy/reference/generated/numpy.amax.html + /// https://numpy.org/doc/stable/reference/generated/numpy.amax.html [SuppressMessage("ReSharper", "TooWideLocalVariableScope")] [SuppressMessage("ReSharper", "ParameterHidesMember")] public NDArray max(Type dtype = null) diff --git a/src/NumSharp.Core/Statistics/NDArray.amin.cs b/src/NumSharp.Core/Statistics/NDArray.amin.cs index 224c05a1..6b834a5a 100644 --- a/src/NumSharp.Core/Statistics/NDArray.amin.cs +++ b/src/NumSharp.Core/Statistics/NDArray.amin.cs @@ -11,7 +11,7 @@ public partial class NDArray ///
/// The expected return type, cast will be performed if necessary. /// Minimum of a. If axis is None, the result is a scalar value. If axis is given, the result is an array of dimension a.ndim - 1. - /// https://docs.scipy.org/doc/numpy/reference/generated/numpy.amin.html + /// https://numpy.org/doc/stable/reference/generated/numpy.amin.html public T amin() where T : unmanaged { return np.asscalar(TensorEngine.AMin(this, null, typeof(T).GetTypeCode(), false)); @@ -24,7 +24,7 @@ public T amin() where T : unmanaged /// If this is set to True, the axes which are reduced are left in the result as dimensions with size one. With this option, the result will broadcast correctly against the input array. /// the type expected as a return, null will remain the same dtype. /// Minimum of a. If axis is None, the result is a scalar value. If axis is given, the result is an array of dimension a.ndim - 1. - /// https://docs.scipy.org/doc/numpy/reference/generated/numpy.amin.html + /// https://numpy.org/doc/stable/reference/generated/numpy.amin.html [SuppressMessage("ReSharper", "TooWideLocalVariableScope")] [SuppressMessage("ReSharper", "ParameterHidesMember")] public NDArray amin(int axis, bool keepdims = false, Type dtype = null) @@ -37,7 +37,7 @@ public NDArray amin(int axis, bool keepdims = false, Type dtype = null) ///
/// the type expected as a return, null will remain the same dtype. /// Minimum of a. If axis is None, the result is a scalar value. If axis is given, the result is an array of dimension a.ndim - 1. - /// https://docs.scipy.org/doc/numpy/reference/generated/numpy.amin.html + /// https://numpy.org/doc/stable/reference/generated/numpy.amin.html [SuppressMessage("ReSharper", "TooWideLocalVariableScope")] [SuppressMessage("ReSharper", "ParameterHidesMember")] public NDArray amin(Type dtype = null) @@ -50,7 +50,7 @@ public NDArray amin(Type dtype = null) ///
/// The expected return type, cast will be performed if necessary. /// Minimum of a. If axis is None, the result is a scalar value. If axis is given, the result is an array of dimension a.ndim - 1. - /// https://docs.scipy.org/doc/numpy/reference/generated/numpy.amin.html + /// https://numpy.org/doc/stable/reference/generated/numpy.amin.html public T min() where T : unmanaged { return amin(); @@ -63,7 +63,7 @@ public T min() where T : unmanaged /// If this is set to True, the axes which are reduced are left in the result as dimensions with size one. With this option, the result will broadcast correctly against the input array. /// the type expected as a return, null will remain the same dtype. /// Minimum of a. If axis is None, the result is a scalar value. If axis is given, the result is an array of dimension a.ndim - 1. - /// https://docs.scipy.org/doc/numpy/reference/generated/numpy.amin.html + /// https://numpy.org/doc/stable/reference/generated/numpy.amin.html [SuppressMessage("ReSharper", "TooWideLocalVariableScope")] [SuppressMessage("ReSharper", "ParameterHidesMember")] public NDArray min(int axis, bool keepdims = false, Type dtype = null) @@ -76,7 +76,7 @@ public NDArray min(int axis, bool keepdims = false, Type dtype = null) /// /// the type expected as a return, null will remain the same dtype. /// Minimum of a. If axis is None, the result is a scalar value. If axis is given, the result is an array of dimension a.ndim - 1. - /// https://docs.scipy.org/doc/numpy/reference/generated/numpy.amin.html + /// https://numpy.org/doc/stable/reference/generated/numpy.amin.html [SuppressMessage("ReSharper", "TooWideLocalVariableScope")] [SuppressMessage("ReSharper", "ParameterHidesMember")] public NDArray min(Type dtype = null) diff --git a/src/NumSharp.Core/Statistics/NDArray.argmax.cs b/src/NumSharp.Core/Statistics/NDArray.argmax.cs index eac2a3c5..c959e26f 100644 --- a/src/NumSharp.Core/Statistics/NDArray.argmax.cs +++ b/src/NumSharp.Core/Statistics/NDArray.argmax.cs @@ -6,7 +6,7 @@ public partial class NDArray /// Returns the indices of the maximum values along an axis. /// /// The index of the maximal value in the array. - /// https://docs.scipy.org/doc/numpy/reference/generated/numpy.argmax.html + /// https://numpy.org/doc/stable/reference/generated/numpy.argmax.html public int argmax() { return np.argmax(this); @@ -16,7 +16,7 @@ public int argmax() /// Returns the indices of the maximum values along an axis. /// /// Array of indices into the array. It has the same shape as a.shape with the dimension along axis removed. - /// https://docs.scipy.org/doc/numpy/reference/generated/numpy.argmax.html + /// https://numpy.org/doc/stable/reference/generated/numpy.argmax.html public int argmax(int axis) { return np.argmax(this, axis); diff --git a/src/NumSharp.Core/Statistics/NDArray.argmin.cs b/src/NumSharp.Core/Statistics/NDArray.argmin.cs index 5df96385..28fcf843 100644 --- a/src/NumSharp.Core/Statistics/NDArray.argmin.cs +++ b/src/NumSharp.Core/Statistics/NDArray.argmin.cs @@ -6,7 +6,7 @@ public partial class NDArray /// Returns the indices of the minimum values along an axis. /// /// The index of the minimum value in the array. - /// https://docs.scipy.org/doc/numpy/reference/generated/numpy.argmin.html + /// https://numpy.org/doc/stable/reference/generated/numpy.argmin.html public int argmin() { return np.argmin(this); @@ -16,7 +16,7 @@ public int argmin() /// Returns the indices of the minimum values along an axis. /// /// Array of indices into the array. It has the same shape as a.shape with the dimension along axis removed. - /// https://docs.scipy.org/doc/numpy/reference/generated/numpy.argmin.html + /// https://numpy.org/doc/stable/reference/generated/numpy.argmin.html public int argmin(int axis) { return np.argmin(this, axis); diff --git a/src/NumSharp.Core/Statistics/NDArray.mean.cs b/src/NumSharp.Core/Statistics/NDArray.mean.cs index 7caaefa2..83ff8917 100644 --- a/src/NumSharp.Core/Statistics/NDArray.mean.cs +++ b/src/NumSharp.Core/Statistics/NDArray.mean.cs @@ -19,7 +19,7 @@ public partial class NDArray /// If the default value is passed, then keepdims will not be passed through to the mean method of sub-classes of ndarray, however any non-default value will be.If the sub-class’ method does not implement keepdims any exceptions will be raised. /// /// returns a new array containing the mean values, otherwise a reference to the output array is returned. - /// https://docs.scipy.org/doc/numpy/reference/generated/numpy.mean.html + /// https://numpy.org/doc/stable/reference/generated/numpy.mean.html public NDArray mean() => TensorEngine.Mean(this); @@ -37,7 +37,7 @@ public NDArray mean() /// If the default value is passed, then keepdims will not be passed through to the mean method of sub-classes of ndarray, however any non-default value will be.If the sub-class’ method does not implement keepdims any exceptions will be raised. /// /// returns a new array containing the mean values, otherwise a reference to the output array is returned. - /// https://docs.scipy.org/doc/numpy/reference/generated/numpy.mean.html + /// https://numpy.org/doc/stable/reference/generated/numpy.mean.html public NDArray mean(int axis) => TensorEngine.Mean(this, axis); @@ -55,7 +55,7 @@ public NDArray mean(int axis) /// If the default value is passed, then keepdims will not be passed through to the mean method of sub-classes of ndarray, however any non-default value will be.If the sub-class’ method does not implement keepdims any exceptions will be raised. /// /// returns a new array containing the mean values, otherwise a reference to the output array is returned. - /// https://docs.scipy.org/doc/numpy/reference/generated/numpy.mean.html + /// https://numpy.org/doc/stable/reference/generated/numpy.mean.html public NDArray mean(int axis, Type type, bool keepdims = false) => TensorEngine.Mean(this, axis, dtype, keepdims); @@ -73,7 +73,7 @@ public NDArray mean(int axis, Type type, bool keepdims = false) /// If the default value is passed, then keepdims will not be passed through to the mean method of sub-classes of ndarray, however any non-default value will be.If the sub-class’ method does not implement keepdims any exceptions will be raised. /// /// returns a new array containing the mean values, otherwise a reference to the output array is returned. - /// https://docs.scipy.org/doc/numpy/reference/generated/numpy.mean.html + /// https://numpy.org/doc/stable/reference/generated/numpy.mean.html public NDArray mean(int axis, NPTypeCode type, bool keepdims = false) => TensorEngine.Mean(this, axis, type, keepdims); diff --git a/src/NumSharp.Core/Statistics/NDArray.std.cs b/src/NumSharp.Core/Statistics/NDArray.std.cs index d48893e6..b7eebb41 100644 --- a/src/NumSharp.Core/Statistics/NDArray.std.cs +++ b/src/NumSharp.Core/Statistics/NDArray.std.cs @@ -15,7 +15,7 @@ public partial class NDArray /// /// Means Delta Degrees of Freedom. The divisor used in calculations is N - ddof, where N represents the number of elements. By default ddof is zero. /// returns a new array containing the std values, otherwise a reference to the output array is returned. - /// https://docs.scipy.org/doc/numpy/reference/generated/numpy.std.html + /// https://numpy.org/doc/stable/reference/generated/numpy.std.html public NDArray std(bool keepdims = false, int? ddof = null, NPTypeCode? dtype = null) { return np.std(this, keepdims, ddof, dtype); @@ -31,7 +31,7 @@ public NDArray std(bool keepdims = false, int? ddof = null, NPTypeCode? dtype = /// /// Means Delta Degrees of Freedom. The divisor used in calculations is N - ddof, where N represents the number of elements. By default ddof is zero. /// returns a new array containing the std values, otherwise a reference to the output array is returned. - /// https://docs.scipy.org/doc/numpy/reference/generated/numpy.std.html + /// https://numpy.org/doc/stable/reference/generated/numpy.std.html public NDArray std(int axis, bool keepdims = false, int? ddof = null, NPTypeCode? dtype = null) { return np.std(this, axis, keepdims, ddof, dtype); diff --git a/src/NumSharp.Core/Statistics/NDArray.var.cs b/src/NumSharp.Core/Statistics/NDArray.var.cs index 12424b48..abae053a 100644 --- a/src/NumSharp.Core/Statistics/NDArray.var.cs +++ b/src/NumSharp.Core/Statistics/NDArray.var.cs @@ -16,7 +16,7 @@ public partial class NDArray /// /// Means Delta Degrees of Freedom. The divisor used in calculations is N - ddof, where N represents the number of elements. By default ddof is zero. /// returns a new array containing the std values, otherwise a reference to the output array is returned. - /// https://docs.scipy.org/doc/numpy/reference/generated/numpy.std.html + /// https://numpy.org/doc/stable/reference/generated/numpy.std.html public NDArray var(bool keepdims = false, int? ddof = null, NPTypeCode? dtype = null) { return np.var(this, keepdims, ddof, dtype); @@ -32,7 +32,7 @@ public NDArray var(bool keepdims = false, int? ddof = null, NPTypeCode? dtype = /// /// Means Delta Degrees of Freedom. The divisor used in calculations is N - ddof, where N represents the number of elements. By default ddof is zero. /// returns a new array containing the std values, otherwise a reference to the output array is returned. - /// https://docs.scipy.org/doc/numpy/reference/generated/numpy.std.html + /// https://numpy.org/doc/stable/reference/generated/numpy.std.html public NDArray var(int axis, bool keepdims = false, int? ddof = null, NPTypeCode? dtype = null) { return np.var(this, axis, keepdims, ddof, dtype); diff --git a/src/NumSharp.Core/Statistics/np.exp.cs b/src/NumSharp.Core/Statistics/np.exp.cs index 62765e69..3277d436 100644 --- a/src/NumSharp.Core/Statistics/np.exp.cs +++ b/src/NumSharp.Core/Statistics/np.exp.cs @@ -11,7 +11,7 @@ public partial class np /// Input value. /// The dtype of the returned NDArray /// The natural logarithm of x, element-wise. This is a scalar NDArray. - /// https://docs.scipy.org/doc/numpy/reference/generated/numpy.exp.html + /// https://numpy.org/doc/stable/reference/generated/numpy.exp.html public static NDArray exp(in NDArray a, Type dtype) => a.TensorEngine.Exp(a, dtype); /// @@ -20,7 +20,7 @@ public partial class np /// Input value. /// The dtype of the returned NDArray /// The natural logarithm of x, element-wise. This is a scalar NDArray. - /// https://docs.scipy.org/doc/numpy/reference/generated/numpy.exp.html + /// https://numpy.org/doc/stable/reference/generated/numpy.exp.html public static NDArray exp(in NDArray a, NPTypeCode typeCode) => a.TensorEngine.Exp(a, typeCode); /// @@ -28,7 +28,7 @@ public partial class np /// /// Input value. /// The natural logarithm of x, element-wise. This is a scalar NDArray. - /// https://docs.scipy.org/doc/numpy/reference/generated/numpy.exp.html + /// https://numpy.org/doc/stable/reference/generated/numpy.exp.html public static NDArray exp(in NDArray a) => a.TensorEngine.Exp(a); /// @@ -36,7 +36,7 @@ public partial class np /// /// Input value. /// Element-wise 2 to the power x. This is a scalar if x is a scalar. - /// https://docs.scipy.org/doc/numpy/reference/generated/numpy.exp2.html + /// https://numpy.org/doc/stable/reference/generated/numpy.exp2.html public static NDArray exp2(in NDArray a, Type dtype) => a.TensorEngine.Exp2(a, dtype); /// @@ -44,7 +44,7 @@ public partial class np /// /// Input value. /// Element-wise 2 to the power x. This is a scalar if x is a scalar. - /// https://docs.scipy.org/doc/numpy/reference/generated/numpy.exp2.html + /// https://numpy.org/doc/stable/reference/generated/numpy.exp2.html public static NDArray exp2(in NDArray a, NPTypeCode typeCode) => a.TensorEngine.Exp2(a, typeCode); /// @@ -52,7 +52,7 @@ public partial class np /// /// Input value. /// Element-wise 2 to the power x. This is a scalar if x is a scalar. - /// https://docs.scipy.org/doc/numpy/reference/generated/numpy.exp2.html + /// https://numpy.org/doc/stable/reference/generated/numpy.exp2.html public static NDArray exp2(in NDArray a) => a.TensorEngine.Exp2(a); /// @@ -60,7 +60,7 @@ public partial class np /// /// Input value. /// Element-wise exponential minus one: out = exp(x) - 1. This is a scalar if x is a scalar. - /// https://docs.scipy.org/doc/numpy-1.15.0/reference/generated/numpy.expm1.html + /// https://numpy.org/doc/stable/reference/generated/numpy.expm1.html public static NDArray expm1(in NDArray a, Type dtype) => a.TensorEngine.Expm1(a, dtype); /// @@ -68,7 +68,7 @@ public partial class np /// /// Input value. /// Element-wise exponential minus one: out = exp(x) - 1. This is a scalar if x is a scalar. - /// https://docs.scipy.org/doc/numpy-1.15.0/reference/generated/numpy.expm1.html + /// https://numpy.org/doc/stable/reference/generated/numpy.expm1.html public static NDArray expm1(in NDArray a, NPTypeCode typeCode) => a.TensorEngine.Expm1(a, typeCode); /// @@ -76,7 +76,7 @@ public partial class np /// /// Input value. /// Element-wise exponential minus one: out = exp(x) - 1. This is a scalar if x is a scalar. - /// https://docs.scipy.org/doc/numpy-1.15.0/reference/generated/numpy.expm1.html + /// https://numpy.org/doc/stable/reference/generated/numpy.expm1.html public static NDArray expm1(in NDArray a) => a.TensorEngine.Expm1(a); } } diff --git a/src/NumSharp.Core/Statistics/np.mean.cs b/src/NumSharp.Core/Statistics/np.mean.cs index 27288f24..5da71133 100644 --- a/src/NumSharp.Core/Statistics/np.mean.cs +++ b/src/NumSharp.Core/Statistics/np.mean.cs @@ -13,7 +13,7 @@ public static partial class np /// /// Array containing numbers whose mean is desired. If a is not an array, a conversion is attempted. /// returns a new array containing the mean values, otherwise a reference to the output array is returned. - /// https://docs.scipy.org/doc/numpy/reference/generated/numpy.mean.html + /// https://numpy.org/doc/stable/reference/generated/numpy.mean.html public static NDArray mean(in NDArray a) => a.TensorEngine.Mean(a); @@ -26,7 +26,7 @@ public static NDArray mean(in NDArray a) /// Array containing numbers whose mean is desired. If a is not an array, a conversion is attempted. /// Axis or axes along which the means are computed. The default is to compute the mean of the flattened array. /// returns a new array containing the mean values, otherwise a reference to the output array is returned. - /// https://docs.scipy.org/doc/numpy/reference/generated/numpy.mean.html + /// https://numpy.org/doc/stable/reference/generated/numpy.mean.html public static NDArray mean(in NDArray a, int axis) => a.TensorEngine.Mean(a, axis); @@ -42,7 +42,7 @@ public static NDArray mean(in NDArray a, int axis) /// If the default value is passed, then keepdims will not be passed through to the mean method of sub-classes of ndarray, however any non-default value will be.If the sub-class’ method does not implement keepdims any exceptions will be raised. /// /// returns a new array containing the mean values, otherwise a reference to the output array is returned. - /// https://docs.scipy.org/doc/numpy/reference/generated/numpy.mean.html + /// https://numpy.org/doc/stable/reference/generated/numpy.mean.html public static NDArray mean(in NDArray a, bool keepdims) => a.TensorEngine.Mean(a, null, null, keepdims); @@ -60,7 +60,7 @@ public static NDArray mean(in NDArray a, bool keepdims) /// If the default value is passed, then keepdims will not be passed through to the mean method of sub-classes of ndarray, however any non-default value will be.If the sub-class’ method does not implement keepdims any exceptions will be raised. /// /// returns a new array containing the mean values, otherwise a reference to the output array is returned. - /// https://docs.scipy.org/doc/numpy/reference/generated/numpy.mean.html + /// https://numpy.org/doc/stable/reference/generated/numpy.mean.html public static NDArray mean(in NDArray a, int axis, Type dtype, bool keepdims = false) => a.TensorEngine.Mean(a, axis, dtype, keepdims); @@ -78,7 +78,7 @@ public static NDArray mean(in NDArray a, int axis, Type dtype, bool keepdims = f /// If the default value is passed, then keepdims will not be passed through to the mean method of sub-classes of ndarray, however any non-default value will be.If the sub-class’ method does not implement keepdims any exceptions will be raised. /// /// returns a new array containing the mean values, otherwise a reference to the output array is returned. - /// https://docs.scipy.org/doc/numpy/reference/generated/numpy.mean.html + /// https://numpy.org/doc/stable/reference/generated/numpy.mean.html public static NDArray mean(in NDArray a, int axis, NPTypeCode type, bool keepdims = false) => a.TensorEngine.Mean(a, axis, type, keepdims); diff --git a/src/NumSharp.Core/Statistics/np.std.cs b/src/NumSharp.Core/Statistics/np.std.cs index aff74522..2517d000 100644 --- a/src/NumSharp.Core/Statistics/np.std.cs +++ b/src/NumSharp.Core/Statistics/np.std.cs @@ -16,7 +16,7 @@ public static partial class np /// /// Means Delta Degrees of Freedom. The divisor used in calculations is N - ddof, where N represents the number of elements. By default ddof is zero. /// returns a new array containing the std values, otherwise a reference to the output array is returned. - /// https://docs.scipy.org/doc/numpy/reference/generated/numpy.std.html + /// https://numpy.org/doc/stable/reference/generated/numpy.std.html public static NDArray std(NDArray a, bool keepdims = false, int? ddof = null, NPTypeCode? dtype = null) { return a.TensorEngine.ReduceStd(a, null, keepdims, ddof, dtype); @@ -29,7 +29,7 @@ public static NDArray std(NDArray a, bool keepdims = false, int? ddof = null, NP /// Calculate the standard deviation of these values. /// Means Delta Degrees of Freedom. The divisor used in calculations is N - ddof, where N represents the number of elements. By default ddof is zero. /// returns a new array containing the std values, otherwise a reference to the output array is returned. - /// https://docs.scipy.org/doc/numpy/reference/generated/numpy.std.html + /// https://numpy.org/doc/stable/reference/generated/numpy.std.html public static NDArray std(in NDArray a, int? ddof = null) => a.TensorEngine.ReduceStd(a, null); @@ -41,7 +41,7 @@ public static NDArray std(in NDArray a, int? ddof = null) /// Axis or axes along which the standard deviation is computed. The default is to compute the standard deviation of the flattened array. /// Means Delta Degrees of Freedom. The divisor used in calculations is N - ddof, where N represents the number of elements. By default ddof is zero. /// returns a new array containing the std values, otherwise a reference to the output array is returned. - /// https://docs.scipy.org/doc/numpy/reference/generated/numpy.std.html + /// https://numpy.org/doc/stable/reference/generated/numpy.std.html public static NDArray std(in NDArray a, int axis, int? ddof = null) => a.TensorEngine.ReduceStd(a, axis, ddof: ddof); @@ -55,7 +55,7 @@ public static NDArray std(in NDArray a, int axis, int? ddof = null) /// /// Means Delta Degrees of Freedom. The divisor used in calculations is N - ddof, where N represents the number of elements. By default ddof is zero. /// returns a new array containing the std values, otherwise a reference to the output array is returned. - /// https://docs.scipy.org/doc/numpy/reference/generated/numpy.std.html + /// https://numpy.org/doc/stable/reference/generated/numpy.std.html public static NDArray std(in NDArray a, bool keepdims, int? ddof = null) => a.TensorEngine.ReduceStd(a, null, keepdims, ddof: ddof); @@ -70,7 +70,7 @@ public static NDArray std(in NDArray a, bool keepdims, int? ddof = null) /// /// Means Delta Degrees of Freedom. The divisor used in calculations is N - ddof, where N represents the number of elements. By default ddof is zero. /// returns a new array containing the std values, otherwise a reference to the output array is returned. - /// https://docs.scipy.org/doc/numpy/reference/generated/numpy.std.html + /// https://numpy.org/doc/stable/reference/generated/numpy.std.html public static NDArray std(in NDArray a, int axis, Type dtype, bool keepdims = false, int? ddof = null) => a.TensorEngine.ReduceStd(a, axis, keepdims, ddof, dtype != null ? dtype.GetTypeCode() : (NPTypeCode?)null); @@ -85,7 +85,7 @@ public static NDArray std(in NDArray a, int axis, Type dtype, bool keepdims = fa /// /// Means Delta Degrees of Freedom. The divisor used in calculations is N - ddof, where N represents the number of elements. By default ddof is zero. /// returns a new array containing the std values, otherwise a reference to the output array is returned. - /// https://docs.scipy.org/doc/numpy/reference/generated/numpy.std.html + /// https://numpy.org/doc/stable/reference/generated/numpy.std.html public static NDArray std(in NDArray a, int axis, NPTypeCode type, bool keepdims = false, int? ddof = null) => a.TensorEngine.ReduceStd(a, axis, keepdims, ddof, type); @@ -100,7 +100,7 @@ public static NDArray std(in NDArray a, int axis, NPTypeCode type, bool keepdims /// /// Means Delta Degrees of Freedom. The divisor used in calculations is N - ddof, where N represents the number of elements. By default ddof is zero. /// returns a new array containing the std values, otherwise a reference to the output array is returned. - /// https://docs.scipy.org/doc/numpy/reference/generated/numpy.std.html + /// https://numpy.org/doc/stable/reference/generated/numpy.std.html public static NDArray std(in NDArray a, int axis, bool keepdims, int? ddof = null) => a.TensorEngine.ReduceStd(a, axis, keepdims, ddof: ddof); @@ -115,7 +115,7 @@ public static NDArray std(in NDArray a, int axis, bool keepdims, int? ddof = nul /// /// Means Delta Degrees of Freedom. The divisor used in calculations is N - ddof, where N represents the number of elements. By default ddof is zero. /// returns a new array containing the std values, otherwise a reference to the output array is returned. - /// https://docs.scipy.org/doc/numpy/reference/generated/numpy.std.html + /// https://numpy.org/doc/stable/reference/generated/numpy.std.html public static NDArray std(NDArray a, int axis, bool keepdims = false, int? ddof = null, NPTypeCode? dtype = null) { return a.TensorEngine.ReduceStd(a, axis, keepdims, ddof, dtype); diff --git a/src/NumSharp.Core/Statistics/np.var.cs b/src/NumSharp.Core/Statistics/np.var.cs index 4c29665c..882d7666 100644 --- a/src/NumSharp.Core/Statistics/np.var.cs +++ b/src/NumSharp.Core/Statistics/np.var.cs @@ -18,7 +18,7 @@ public static partial class np /// /// Means Delta Degrees of Freedom. The divisor used in calculations is N - ddof, where N represents the number of elements. By default ddof is zero. /// returns a new array containing the var values, otherwise a reference to the output array is returned. - /// https://docs.scipy.org/doc/numpy/reference/generated/numpy.var.html + /// https://numpy.org/doc/stable/reference/generated/numpy.var.html public static NDArray var(NDArray a, bool keepdims = false, int? ddof = null, NPTypeCode? dtype = null) { return a.TensorEngine.ReduceVar(a, null, keepdims, ddof, dtype); @@ -37,7 +37,7 @@ public static NDArray var(NDArray a, bool keepdims = false, int? ddof = null, NP /// /// Means Delta Degrees of Freedom. The divisor used in calculations is N - ddof, where N represents the number of elements. By default ddof is zero. /// returns a new array containing the var values, otherwise a reference to the output array is returned. - /// https://docs.scipy.org/doc/numpy/reference/generated/numpy.var.html + /// https://numpy.org/doc/stable/reference/generated/numpy.var.html public static NDArray var(in NDArray a, int? ddof = null) => a.TensorEngine.ReduceVar(a, null); @@ -54,7 +54,7 @@ public static NDArray var(in NDArray a, int? ddof = null) /// /// Means Delta Degrees of Freedom. The divisor used in calculations is N - ddof, where N represents the number of elements. By default ddof is zero. /// returns a new array containing the var values, otherwise a reference to the output array is returned. - /// https://docs.scipy.org/doc/numpy/reference/generated/numpy.var.html + /// https://numpy.org/doc/stable/reference/generated/numpy.var.html public static NDArray var(in NDArray a, int axis, int? ddof = null) => a.TensorEngine.ReduceVar(a, axis, ddof: ddof); @@ -71,7 +71,7 @@ public static NDArray var(in NDArray a, int axis, int? ddof = null) /// /// Means Delta Degrees of Freedom. The divisor used in calculations is N - ddof, where N represents the number of elements. By default ddof is zero. /// returns a new array containing the var values, otherwise a reference to the output array is returned. - /// https://docs.scipy.org/doc/numpy/reference/generated/numpy.var.html + /// https://numpy.org/doc/stable/reference/generated/numpy.var.html public static NDArray var(in NDArray a, bool keepdims, int? ddof = null) => a.TensorEngine.ReduceVar(a, null, keepdims, ddof: ddof); @@ -88,7 +88,7 @@ public static NDArray var(in NDArray a, bool keepdims, int? ddof = null) /// /// Means Delta Degrees of Freedom. The divisor used in calculations is N - ddof, where N represents the number of elements. By default ddof is zero. /// returns a new array containing the var values, otherwise a reference to the output array is returned. - /// https://docs.scipy.org/doc/numpy/reference/generated/numpy.var.html + /// https://numpy.org/doc/stable/reference/generated/numpy.var.html public static NDArray var(in NDArray a, int axis, Type dtype, bool keepdims = false, int? ddof = null) => a.TensorEngine.ReduceVar(a, axis, keepdims, ddof, dtype != null ? dtype.GetTypeCode() : (NPTypeCode?)null); @@ -105,7 +105,7 @@ public static NDArray var(in NDArray a, int axis, Type dtype, bool keepdims = fa /// /// Means Delta Degrees of Freedom. The divisor used in calculations is N - ddof, where N represents the number of elements. By default ddof is zero. /// returns a new array containing the var values, otherwise a reference to the output array is returned. - /// https://docs.scipy.org/doc/numpy/reference/generated/numpy.var.html + /// https://numpy.org/doc/stable/reference/generated/numpy.var.html public static NDArray var(in NDArray a, int axis, NPTypeCode type, bool keepdims = false, int? ddof = null) => a.TensorEngine.ReduceVar(a, axis, keepdims, ddof, type); @@ -122,7 +122,7 @@ public static NDArray var(in NDArray a, int axis, NPTypeCode type, bool keepdims /// /// Means Delta Degrees of Freedom. The divisor used in calculations is N - ddof, where N represents the number of elements. By default ddof is zero. /// returns a new array containing the var values, otherwise a reference to the output array is returned. - /// https://docs.scipy.org/doc/numpy/reference/generated/numpy.var.html + /// https://numpy.org/doc/stable/reference/generated/numpy.var.html public static NDArray var(in NDArray a, int axis, bool keepdims, int? ddof = null) => a.TensorEngine.ReduceVar(a, axis, keepdims, ddof: ddof); @@ -139,7 +139,7 @@ public static NDArray var(in NDArray a, int axis, bool keepdims, int? ddof = nul /// /// Means Delta Degrees of Freedom. The divisor used in calculations is N - ddof, where N represents the number of elements. By default ddof is zero. /// returns a new array containing the var values, otherwise a reference to the output array is returned. - /// https://docs.scipy.org/doc/numpy/reference/generated/numpy.var.html + /// https://numpy.org/doc/stable/reference/generated/numpy.var.html public static NDArray var(NDArray a, int axis, bool keepdims = false, int? ddof = null, NPTypeCode? dtype = null) { return a.TensorEngine.ReduceVar(a, axis, keepdims, ddof, dtype); diff --git a/test/NumSharp.UnitTest/Creation/np.broadcast.Tests.cs b/test/NumSharp.UnitTest/Creation/np.broadcast.Tests.cs index 9f7db5c7..061a567e 100644 --- a/test/NumSharp.UnitTest/Creation/np.broadcast.Tests.cs +++ b/test/NumSharp.UnitTest/Creation/np.broadcast.Tests.cs @@ -34,7 +34,7 @@ public void BroadcastArrayTest() } /// - /// Taken from https://docs.scipy.org/doc/numpy/user/basics.broadcasting.html + /// Taken from https://numpy.org/doc/stable/user/basics.broadcasting.html /// [Test] public void basics_ResolveReturnShape() @@ -73,7 +73,7 @@ public void basics_ResolveReturnShape() } /// - /// Taken from https://docs.scipy.org/doc/numpy/user/basics.broadcasting.html + /// Taken from https://numpy.org/doc/stable/user/basics.broadcasting.html /// [Test] public void basics_broadcasting() @@ -140,7 +140,7 @@ public void basics_broadcasting() } /// - /// Taken from https://docs.scipy.org/doc/numpy/user/basics.broadcasting.html + /// Taken from https://numpy.org/doc/stable/user/basics.broadcasting.html /// [Test] public void basics_broadcasting_narrays() diff --git a/test/NumSharp.UnitTest/Extensions/ndarray.argsort.Test.cs b/test/NumSharp.UnitTest/Extensions/ndarray.argsort.Test.cs index aa73b239..ee4af716 100644 --- a/test/NumSharp.UnitTest/Extensions/ndarray.argsort.Test.cs +++ b/test/NumSharp.UnitTest/Extensions/ndarray.argsort.Test.cs @@ -8,7 +8,7 @@ namespace NumSharp.UnitTest.Extensions { /// - /// Tests following https://docs.scipy.org/doc/numpy-1.15.0/reference/generated/numpy.hstack.html + /// Tests following https://numpy.org/doc/stable/reference/generated/numpy.hstack.html /// public class NdArrayArgSortTest { diff --git a/test/NumSharp.UnitTest/Manipulation/np.dstack.Test.cs b/test/NumSharp.UnitTest/Manipulation/np.dstack.Test.cs index b81af1b7..889b3940 100644 --- a/test/NumSharp.UnitTest/Manipulation/np.dstack.Test.cs +++ b/test/NumSharp.UnitTest/Manipulation/np.dstack.Test.cs @@ -4,7 +4,7 @@ namespace NumSharp.UnitTest.Manipulation { /// - /// Tests following https://docs.scipy.org/doc/numpy/reference/generated/numpy.dstack.html + /// Tests following https://numpy.org/doc/stable/reference/generated/numpy.dstack.html /// public class np_dstack_tests { diff --git a/test/NumSharp.UnitTest/Manipulation/np.hstack.Test.cs b/test/NumSharp.UnitTest/Manipulation/np.hstack.Test.cs index 30bc19ce..6e3f7ee4 100644 --- a/test/NumSharp.UnitTest/Manipulation/np.hstack.Test.cs +++ b/test/NumSharp.UnitTest/Manipulation/np.hstack.Test.cs @@ -3,7 +3,7 @@ namespace NumSharp.UnitTest.Manipulation { /// - /// Tests following https://docs.scipy.org/doc/numpy-1.15.0/reference/generated/numpy.hstack.html + /// Tests following https://numpy.org/doc/stable/reference/generated/numpy.hstack.html /// public class np_hstack_tests { diff --git a/test/NumSharp.UnitTest/Manipulation/np.stack.Test.cs b/test/NumSharp.UnitTest/Manipulation/np.stack.Test.cs index 29a8d81b..8f8b7b15 100644 --- a/test/NumSharp.UnitTest/Manipulation/np.stack.Test.cs +++ b/test/NumSharp.UnitTest/Manipulation/np.stack.Test.cs @@ -4,7 +4,7 @@ namespace NumSharp.UnitTest.Manipulation { /// - /// Tests following https://docs.scipy.org/doc/numpy/reference/generated/numpy.dstack.html + /// Tests following https://numpy.org/doc/stable/reference/generated/numpy.dstack.html /// public class np_stack_tests { diff --git a/test/NumSharp.UnitTest/Manipulation/np.vstack.Test.cs b/test/NumSharp.UnitTest/Manipulation/np.vstack.Test.cs index 1b1b27eb..264aa05e 100644 --- a/test/NumSharp.UnitTest/Manipulation/np.vstack.Test.cs +++ b/test/NumSharp.UnitTest/Manipulation/np.vstack.Test.cs @@ -3,7 +3,7 @@ namespace NumSharp.UnitTest.Manipulation { /// - /// Tests following https://docs.scipy.org/doc/numpy-1.15.0/reference/generated/numpy.vstack.html + /// Tests following https://numpy.org/doc/stable/reference/generated/numpy.vstack.html /// public class np_vstack_tests { diff --git a/test/NumSharp.UnitTest/RandomSampling/np.random.normal.Test.cs b/test/NumSharp.UnitTest/RandomSampling/np.random.normal.Test.cs index 7209ed0d..8ed81144 100644 --- a/test/NumSharp.UnitTest/RandomSampling/np.random.normal.Test.cs +++ b/test/NumSharp.UnitTest/RandomSampling/np.random.normal.Test.cs @@ -13,7 +13,7 @@ public class NpRandomNormalTest [Test] public void NormalDistributionTest() { - // https://docs.scipy.org/doc/numpy-1.15.0/reference/generated/numpy.random.normal.html + // https://numpy.org/doc/stable/reference/generated/numpy.random.normal.html double mu = 0; // mean double sigma = 0.1; // standard deviation var s = np.random.normal(mu, sigma, 10, 100); From ca7c4722adf75a27ca088eec27876518d3d99db3 Mon Sep 17 00:00:00 2001 From: Eli Belash Date: Sat, 21 Feb 2026 14:15:34 +0200 Subject: [PATCH 2/2] fix: correct 18 broken NumPy documentation URLs MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Updates URLs that were pointing to incorrect paths: 1. Random functions (12 URLs): Added /random/ directory - reference/generated/numpy.random.* → reference/random/generated/numpy.random.* 2. arrays.indexing (1 URL): Corrected section path - reference/arrays.indexing.html → user/basics.indexing.html 3. c-api.dtype (1 URL): Fixed path format - reference/c-api.dtype.html → reference/c-api/dtype.html 4. routines.random (1 URL): Updated to new location - reference/routines.random.html → reference/random/index.html 5. asscalar (6 URLs): Function removed in NumPy 1.23, now links to replacement - numpy.asscalar.html → numpy.ndarray.item.html 6. find_common_type (6 URLs): Function deprecated, now links to replacement - numpy.find_common_type.html → numpy.result_type.html 7. itemset (4 URLs): Function removed in NumPy 2.4, now links to alternative - numpy.ndarray.itemset.html → numpy.put.html All 126 URLs now return HTTP 200. Co-Authored-By: Claude Opus 4.6 --- src/NumSharp.Core/APIs/np.cs | 2 +- src/NumSharp.Core/Creation/np.dtype.cs | 2 +- src/NumSharp.Core/Logic/np.find_common_type.cs | 12 ++++++------ src/NumSharp.Core/Manipulation/NDArray.itemset.cs | 8 ++++---- src/NumSharp.Core/Manipulation/np.asscalar.cs | 12 ++++++------ .../RandomSampling/np.random.binomial.cs | 4 ++-- .../RandomSampling/np.random.chisquare.cs | 4 ++-- src/NumSharp.Core/RandomSampling/np.random.choice.cs | 4 ++-- src/NumSharp.Core/RandomSampling/np.random.cs | 2 +- .../RandomSampling/np.random.exponential.cs | 4 ++-- src/NumSharp.Core/RandomSampling/np.random.gamma.cs | 4 ++-- .../RandomSampling/np.random.geometric.cs | 4 ++-- .../RandomSampling/np.random.lognormal.cs | 4 ++-- .../RandomSampling/np.random.permutation.cs | 4 ++-- .../RandomSampling/np.random.poisson.cs | 4 ++-- .../RandomSampling/np.random.randint.cs | 2 +- .../RandomSampling/np.random.shuffle.cs | 2 +- .../RandomSampling/np.random.normal.Test.cs | 2 +- 18 files changed, 40 insertions(+), 40 deletions(-) diff --git a/src/NumSharp.Core/APIs/np.cs b/src/NumSharp.Core/APIs/np.cs index 83f8d852..e7f19bc6 100644 --- a/src/NumSharp.Core/APIs/np.cs +++ b/src/NumSharp.Core/APIs/np.cs @@ -13,7 +13,7 @@ public static partial class np /// /// A convenient alias for None, useful for indexing arrays. /// - /// https://numpy.org/doc/stable/reference/arrays.indexing.html



https://stackoverflow.com/questions/42190783/what-does-three-dots-in-python-mean-when-indexing-what-looks-like-a-number
+ /// https://numpy.org/doc/stable/user/basics.indexing.html



https://stackoverflow.com/questions/42190783/what-does-three-dots-in-python-mean-when-indexing-what-looks-like-a-number
public static readonly Slice newaxis = new Slice(null, null, 1) {IsNewAxis = true}; // https://numpy.org/doc/stable/user/basics.types.html diff --git a/src/NumSharp.Core/Creation/np.dtype.cs b/src/NumSharp.Core/Creation/np.dtype.cs index 9bd5ce2f..8b80319c 100644 --- a/src/NumSharp.Core/Creation/np.dtype.cs +++ b/src/NumSharp.Core/Creation/np.dtype.cs @@ -377,7 +377,7 @@ internal enum NPY_SCALARKIND }; /// - /// https://numpy.org/doc/stable/reference/c-api.dtype.html#enumerated-types + /// https://numpy.org/doc/stable/reference/c-api/dtype.html#enumerated-types /// internal enum NPY_TYPECHAR { diff --git a/src/NumSharp.Core/Logic/np.find_common_type.cs b/src/NumSharp.Core/Logic/np.find_common_type.cs index c2d844cc..a2b8ec35 100644 --- a/src/NumSharp.Core/Logic/np.find_common_type.cs +++ b/src/NumSharp.Core/Logic/np.find_common_type.cs @@ -644,7 +644,7 @@ private static readonly (NPTypeCode Type, int Priority)[] powerPriorities = /// A list of dtypes or dtype convertible objects representing arrays. Can be null. /// A list of dtypes or dtype convertible objects representing scalars.Can be null. /// The common data type, which is the maximum of array_types ignoring scalar_types, unless the maximum of scalar_types is of a different kind (dtype.kind). If the kind is not understood, then None is returned. - /// https://numpy.org/doc/stable/reference/generated/numpy.find_common_type.html + /// https://numpy.org/doc/stable/reference/generated/numpy.result_type.html public static NPTypeCode find_common_type(NPTypeCode[] array_types, NPTypeCode[] scalar_types) { return _FindCommonType(array_types ?? Array.Empty(), scalar_types ?? Array.Empty()); @@ -658,7 +658,7 @@ public static NPTypeCode find_common_type(NPTypeCode[] array_types, NPTypeCode[] /// A list of dtypes or dtype convertible objects representing arrays. Can be null. /// A list of dtypes or dtype convertible objects representing scalars.Can be null. /// The common data type, which is the maximum of array_types ignoring scalar_types, unless the maximum of scalar_types is of a different kind (dtype.kind). If the kind is not understood, then None is returned. - /// https://numpy.org/doc/stable/reference/generated/numpy.find_common_type.html + /// https://numpy.org/doc/stable/reference/generated/numpy.result_type.html public static NPTypeCode find_common_type(Type[] array_types) { return _FindCommonType(array_types?.Select(v => v.GetTypeCode()).ToArray() ?? Array.Empty(), Array.Empty()); @@ -670,7 +670,7 @@ public static NPTypeCode find_common_type(Type[] array_types) /// A list of dtypes or dtype convertible objects representing arrays. Can be null. /// A list of dtypes or dtype convertible objects representing scalars.Can be null. /// The common data type, which is the maximum of array_types ignoring scalar_types, unless the maximum of scalar_types is of a different kind (dtype.kind). If the kind is not understood, then None is returned. - /// https://numpy.org/doc/stable/reference/generated/numpy.find_common_type.html + /// https://numpy.org/doc/stable/reference/generated/numpy.result_type.html public static NPTypeCode find_common_type(Type[] array_types, Type[] scalar_types) { return _FindCommonType(array_types?.Select(v => v.GetTypeCode()).ToArray() ?? Array.Empty(), scalar_types?.Select(v => v.GetTypeCode()).ToArray() ?? Array.Empty()); @@ -682,7 +682,7 @@ public static NPTypeCode find_common_type(Type[] array_types, Type[] scalar_type /// A list of dtypes or dtype convertible objects representing arrays. Can be null. /// A list of dtypes or dtype convertible objects representing scalars.Can be null. /// The common data type, which is the maximum of array_types ignoring scalar_types, unless the maximum of scalar_types is of a different kind (dtype.kind). If the kind is not understood, then None is returned. - /// https://numpy.org/doc/stable/reference/generated/numpy.find_common_type.html + /// https://numpy.org/doc/stable/reference/generated/numpy.result_type.html public static NPTypeCode find_common_type(string[] array_types, string[] scalar_types) { return _FindCommonType(array_types?.Select(v => np.dtype(v).typecode).ToArray() ?? Array.Empty(), scalar_types?.Select(v => np.dtype(v).typecode).ToArray() ?? Array.Empty()); @@ -694,7 +694,7 @@ public static NPTypeCode find_common_type(string[] array_types, string[] scalar_ /// A list of dtypes or dtype convertible objects representing arrays. Can be null. /// A list of dtypes or dtype convertible objects representing scalars.Can be null. /// The common data type, which is the maximum of array_types ignoring scalar_types, unless the maximum of scalar_types is of a different kind (dtype.kind). If the kind is not understood, then None is returned. - /// https://numpy.org/doc/stable/reference/generated/numpy.find_common_type.html + /// https://numpy.org/doc/stable/reference/generated/numpy.result_type.html public static NPTypeCode find_common_type(Type[] array_types, NPTypeCode[] scalar_types) { return _FindCommonType(array_types?.Select(v => v.GetTypeCode()).ToArray() ?? Array.Empty(), scalar_types ?? Array.Empty()); @@ -706,7 +706,7 @@ public static NPTypeCode find_common_type(Type[] array_types, NPTypeCode[] scala /// A list of dtypes or dtype convertible objects representing arrays. Can be null. /// A list of dtypes or dtype convertible objects representing scalars.Can be null. /// The common data type, which is the maximum of array_types ignoring scalar_types, unless the maximum of scalar_types is of a different kind (dtype.kind). If the kind is not understood, then None is returned. - /// https://numpy.org/doc/stable/reference/generated/numpy.find_common_type.html + /// https://numpy.org/doc/stable/reference/generated/numpy.result_type.html public static NPTypeCode find_common_type(NPTypeCode[] array_types, Type[] scalar_types) { return _FindCommonType(array_types ?? Array.Empty(), scalar_types?.Select(v => v.GetTypeCode()).ToArray() ?? Array.Empty()); diff --git a/src/NumSharp.Core/Manipulation/NDArray.itemset.cs b/src/NumSharp.Core/Manipulation/NDArray.itemset.cs index 6e7bf19a..f587f4d4 100644 --- a/src/NumSharp.Core/Manipulation/NDArray.itemset.cs +++ b/src/NumSharp.Core/Manipulation/NDArray.itemset.cs @@ -7,7 +7,7 @@ public partial class NDArray /// /// Insert scalar into an array (scalar is cast to array’s dtype, if possible) /// - /// https://numpy.org/doc/stable/reference/generated/numpy.ndarray.itemset.html + /// https://numpy.org/doc/stable/reference/generated/numpy.put.html public void itemset(ref Shape shape, ValueType val) { SetValue(val, shape.dimensions); //TODO! if T != dtype, we need to cast! @@ -16,7 +16,7 @@ public void itemset(ref Shape shape, ValueType val) /// /// Insert scalar into an array (scalar is cast to array’s dtype, if possible) /// - /// https://numpy.org/doc/stable/reference/generated/numpy.ndarray.itemset.html + /// https://numpy.org/doc/stable/reference/generated/numpy.put.html public void itemset(Shape shape, ValueType val) { SetValue(val, shape.dimensions); //TODO! if T != dtype, we need to cast! @@ -25,7 +25,7 @@ public void itemset(Shape shape, ValueType val) /// /// Insert scalar into an array (scalar is cast to array’s dtype, if possible) /// - /// https://numpy.org/doc/stable/reference/generated/numpy.ndarray.itemset.html + /// https://numpy.org/doc/stable/reference/generated/numpy.put.html public void itemset(int[] shape, ValueType val) { SetValue(val, shape); //TODO! if T != dtype, we need to cast! @@ -34,7 +34,7 @@ public void itemset(int[] shape, ValueType val) /// /// Insert scalar into an array (scalar is cast to array’s dtype, if possible) /// - /// https://numpy.org/doc/stable/reference/generated/numpy.ndarray.itemset.html + /// https://numpy.org/doc/stable/reference/generated/numpy.put.html public void itemset(int[] shape, T val) where T : unmanaged { SetValue(val, shape); //TODO! if T != dtype, we need to cast! diff --git a/src/NumSharp.Core/Manipulation/np.asscalar.cs b/src/NumSharp.Core/Manipulation/np.asscalar.cs index 1a0247a5..cc8ffb97 100644 --- a/src/NumSharp.Core/Manipulation/np.asscalar.cs +++ b/src/NumSharp.Core/Manipulation/np.asscalar.cs @@ -11,7 +11,7 @@ public static partial class np /// /// Input NDArray of size 1. /// - /// https://numpy.org/doc/stable/reference/generated/numpy.asscalar.html + /// https://numpy.org/doc/stable/reference/generated/numpy.ndarray.item.html public static T asscalar(NDArray nd) where T : unmanaged { if (nd.size != 1) @@ -27,7 +27,7 @@ public static T asscalar(NDArray nd) where T : unmanaged /// /// Input array of size 1. /// - /// https://numpy.org/doc/stable/reference/generated/numpy.asscalar.html + /// https://numpy.org/doc/stable/reference/generated/numpy.ndarray.item.html public static T asscalar(Array arr) { if (arr.Length != 1) @@ -43,7 +43,7 @@ public static T asscalar(Array arr) /// /// Input NDArray of size 1. /// - /// https://numpy.org/doc/stable/reference/generated/numpy.asscalar.html + /// https://numpy.org/doc/stable/reference/generated/numpy.ndarray.item.html public static ValueType asscalar(NDArray nd) { if (nd.size != 1) @@ -56,7 +56,7 @@ public static ValueType asscalar(NDArray nd) /// /// Input array of size 1. /// - /// https://numpy.org/doc/stable/reference/generated/numpy.asscalar.html + /// https://numpy.org/doc/stable/reference/generated/numpy.ndarray.item.html public static ValueType asscalar(Array arr) { if (arr.Length != 1) @@ -69,7 +69,7 @@ public static ValueType asscalar(Array arr) /// /// Input array of size 1. /// - /// https://numpy.org/doc/stable/reference/generated/numpy.asscalar.html + /// https://numpy.org/doc/stable/reference/generated/numpy.ndarray.item.html public static T asscalar(ArraySlice arr) where T : unmanaged { if (arr.Count != 1) @@ -82,7 +82,7 @@ public static T asscalar(ArraySlice arr) where T : unmanaged /// /// Input array of size 1. /// - /// https://numpy.org/doc/stable/reference/generated/numpy.asscalar.html + /// https://numpy.org/doc/stable/reference/generated/numpy.ndarray.item.html public static T asscalar(IArraySlice arr) where T : unmanaged { if (arr.Count != 1) diff --git a/src/NumSharp.Core/RandomSampling/np.random.binomial.cs b/src/NumSharp.Core/RandomSampling/np.random.binomial.cs index 9d0f7ffc..d4403e3b 100644 --- a/src/NumSharp.Core/RandomSampling/np.random.binomial.cs +++ b/src/NumSharp.Core/RandomSampling/np.random.binomial.cs @@ -17,7 +17,7 @@ public partial class NumPyRandom /// Parameter of the distribution, >= 0 and <=1. /// Output Shape /// Drawn samples from the parameterized binomial distribution, where each sample is equal to the number of successes over the n trials. - /// https://numpy.org/doc/stable/reference/generated/numpy.random.binomial.html + /// https://numpy.org/doc/stable/reference/random/generated/numpy.random.binomial.html public NDArray binomial(int n, double p, Shape shape) => binomial(n, p, shape.dimensions); /// @@ -28,7 +28,7 @@ public partial class NumPyRandom /// Parameter of the distribution, >= 0 and <=1. /// Output Shape /// Drawn samples from the parameterized binomial distribution, where each sample is equal to the number of successes over the n trials. - /// https://numpy.org/doc/stable/reference/generated/numpy.random.binomial.html + /// https://numpy.org/doc/stable/reference/random/generated/numpy.random.binomial.html public NDArray binomial(int n, double p, params int[] dims) { var x = np.zeros(dims); diff --git a/src/NumSharp.Core/RandomSampling/np.random.chisquare.cs b/src/NumSharp.Core/RandomSampling/np.random.chisquare.cs index 2369f7a3..426498f1 100644 --- a/src/NumSharp.Core/RandomSampling/np.random.chisquare.cs +++ b/src/NumSharp.Core/RandomSampling/np.random.chisquare.cs @@ -15,7 +15,7 @@ public partial class NumPyRandom /// Number of degrees of freedom, should be > 0. /// Output Shape /// Drawn samples from the parameterized chi-square distribution. - /// https://numpy.org/doc/stable/reference/generated/numpy.random.chisquare.html + /// https://numpy.org/doc/stable/reference/random/generated/numpy.random.chisquare.html public NDArray chisquare(double df, Shape shape) => chisquare(df, shape.dimensions); /// @@ -26,7 +26,7 @@ public partial class NumPyRandom /// Number of degrees of freedom, should be > 0. /// Output Shape /// Drawn samples from the parameterized chi-square distribution. - /// https://numpy.org/doc/stable/reference/generated/numpy.random.chisquare.html + /// https://numpy.org/doc/stable/reference/random/generated/numpy.random.chisquare.html public NDArray chisquare(double df, params int[] dims) { if (df <= 0) diff --git a/src/NumSharp.Core/RandomSampling/np.random.choice.cs b/src/NumSharp.Core/RandomSampling/np.random.choice.cs index 2cad2e79..8ce0479c 100644 --- a/src/NumSharp.Core/RandomSampling/np.random.choice.cs +++ b/src/NumSharp.Core/RandomSampling/np.random.choice.cs @@ -9,7 +9,7 @@ public partial class NumPyRandom /// Output shape. If the given shape is, e.g., (m, n, k), then m * n * k samples are drawn. Default is None, in which case a single value is returned. /// Whether the sample is with or without replacement /// The probabilities associated with each entry in a. If not given the sample assumes a uniform distribution over all entries in a. - /// https://numpy.org/doc/stable/reference/generated/numpy.random.choice.html + /// https://numpy.org/doc/stable/reference/random/generated/numpy.random.choice.html public NDArray choice(NDArray arr, Shape shape = default, bool replace = true, double[] probabilities = null) { int arrSize = arr.size; @@ -24,7 +24,7 @@ public NDArray choice(NDArray arr, Shape shape = default, bool replace = true, d /// Output shape. If the given shape is, e.g., (m, n, k), then m * n * k samples are drawn. Default is None, in which case a single value is returned. /// Whether the sample is with or without replacement /// The probabilities associated with each entry in a. If not given the sample assumes a uniform distribution over all entries in a. - /// https://numpy.org/doc/stable/reference/generated/numpy.random.choice.html + /// https://numpy.org/doc/stable/reference/random/generated/numpy.random.choice.html public NDArray choice(int a, Shape shape = default, bool replace = true, double[] probabilities = null) { if (shape.IsEmpty) diff --git a/src/NumSharp.Core/RandomSampling/np.random.cs b/src/NumSharp.Core/RandomSampling/np.random.cs index 4b258bd5..6a9363cd 100644 --- a/src/NumSharp.Core/RandomSampling/np.random.cs +++ b/src/NumSharp.Core/RandomSampling/np.random.cs @@ -3,7 +3,7 @@ /// /// A class that serves as numpy.random.RandomState in python. /// - /// https://numpy.org/doc/stable/reference/routines.random.html + /// https://numpy.org/doc/stable/reference/random/index.html public partial class NumPyRandom { protected internal Randomizer randomizer; diff --git a/src/NumSharp.Core/RandomSampling/np.random.exponential.cs b/src/NumSharp.Core/RandomSampling/np.random.exponential.cs index 218350c5..6cb5caa1 100644 --- a/src/NumSharp.Core/RandomSampling/np.random.exponential.cs +++ b/src/NumSharp.Core/RandomSampling/np.random.exponential.cs @@ -14,7 +14,7 @@ public partial class NumPyRandom /// The scale parameter, \beta = 1/\lambda. /// Output Shape /// Drawn samples from the parameterized exponential distribution. - /// https://numpy.org/doc/stable/reference/generated/numpy.random.exponential.html + /// https://numpy.org/doc/stable/reference/random/generated/numpy.random.exponential.html public NDArray exponential(double scale, Shape shape) => exponential(scale, shape.dimensions); /// @@ -24,7 +24,7 @@ public partial class NumPyRandom /// The scale parameter, \beta = 1/\lambda. /// Output Shape /// Drawn samples from the parameterized exponential distribution. - /// https://numpy.org/doc/stable/reference/generated/numpy.random.exponential.html + /// https://numpy.org/doc/stable/reference/random/generated/numpy.random.exponential.html public NDArray exponential(double scale, params int[] dims) { var x = np.log(1 - np.random.uniform(0, 1, dims)); diff --git a/src/NumSharp.Core/RandomSampling/np.random.gamma.cs b/src/NumSharp.Core/RandomSampling/np.random.gamma.cs index ade87de3..355b41a7 100644 --- a/src/NumSharp.Core/RandomSampling/np.random.gamma.cs +++ b/src/NumSharp.Core/RandomSampling/np.random.gamma.cs @@ -19,7 +19,7 @@ public partial class NumPyRandom /// The scale of the gamma distribution. Should be greater than zero. Default is equal to 1. /// Output shape. /// Drawn samples from the parameterized gamma distribution. - /// https://numpy.org/doc/stable/reference/generated/numpy.random.gamma.html + /// https://numpy.org/doc/stable/reference/random/generated/numpy.random.gamma.html public NDArray gamma(double shapeV, double scale, Shape shape) => gamma(shapeV, scale, shape.dimensions); /// @@ -31,7 +31,7 @@ public partial class NumPyRandom /// The scale of the gamma distribution. Should be greater than zero. Default is equal to 1. /// Output shape. /// Drawn samples from the parameterized gamma distribution. - /// https://numpy.org/doc/stable/reference/generated/numpy.random.gamma.html + /// https://numpy.org/doc/stable/reference/random/generated/numpy.random.gamma.html public NDArray gamma(double shape, double scale, params int[] dims) { if (shape < 1) diff --git a/src/NumSharp.Core/RandomSampling/np.random.geometric.cs b/src/NumSharp.Core/RandomSampling/np.random.geometric.cs index 9685c138..b33a0ff9 100644 --- a/src/NumSharp.Core/RandomSampling/np.random.geometric.cs +++ b/src/NumSharp.Core/RandomSampling/np.random.geometric.cs @@ -15,7 +15,7 @@ public partial class NumPyRandom /// The probability of success of an individual trial. /// Output Shape /// Drawn samples from the parameterized geometric distribution. - /// https://numpy.org/doc/stable/reference/generated/numpy.random.geometric.html + /// https://numpy.org/doc/stable/reference/random/generated/numpy.random.geometric.html public NDArray geometric(double p, Shape shape) => geometric(p, shape.dimensions); /// @@ -26,7 +26,7 @@ public partial class NumPyRandom /// The probability of success of an individual trial. /// Output Shape /// Drawn samples from the parameterized geometric distribution. - /// https://numpy.org/doc/stable/reference/generated/numpy.random.geometric.html + /// https://numpy.org/doc/stable/reference/random/generated/numpy.random.geometric.html public NDArray geometric(double p, params int[] dims) { var x = np.log(1 - np.random.uniform(0, 1, dims)); diff --git a/src/NumSharp.Core/RandomSampling/np.random.lognormal.cs b/src/NumSharp.Core/RandomSampling/np.random.lognormal.cs index 399c9feb..395b7c30 100644 --- a/src/NumSharp.Core/RandomSampling/np.random.lognormal.cs +++ b/src/NumSharp.Core/RandomSampling/np.random.lognormal.cs @@ -18,7 +18,7 @@ public partial class NumPyRandom /// Standard deviation of the underlying normal distribution. Should be greater than zero. Default is 1. /// Output Shape /// Drawn samples from the parameterized bernoulli distribution. - /// https://numpy.org/doc/stable/reference/generated/numpy.random.lognormal.html + /// https://numpy.org/doc/stable/reference/random/generated/numpy.random.lognormal.html public NDArray lognormal(double mean, double sigma, Shape shape) => lognormal(mean, sigma, shape.dimensions); /// @@ -30,7 +30,7 @@ public partial class NumPyRandom /// Standard deviation of the underlying normal distribution. Should be greater than zero. Default is 1. /// Output Shape /// Drawn samples from the parameterized bernoulli distribution. - /// https://numpy.org/doc/stable/reference/generated/numpy.random.lognormal.html + /// https://numpy.org/doc/stable/reference/random/generated/numpy.random.lognormal.html public NDArray lognormal(double mean, double sigma, params int[] dims) { double zm = mean * mean; diff --git a/src/NumSharp.Core/RandomSampling/np.random.permutation.cs b/src/NumSharp.Core/RandomSampling/np.random.permutation.cs index e348c9d9..f000a60d 100644 --- a/src/NumSharp.Core/RandomSampling/np.random.permutation.cs +++ b/src/NumSharp.Core/RandomSampling/np.random.permutation.cs @@ -7,7 +7,7 @@ public partial class NumPyRandom /// /// If x is an integer, randomly permute np.arange(x). /// Permuted sequence or array range. - /// https://numpy.org/doc/stable/reference/generated/numpy.random.permutation.html + /// https://numpy.org/doc/stable/reference/random/generated/numpy.random.permutation.html public NDArray permutation(int x) { var nd = np.arange(x); @@ -21,7 +21,7 @@ public NDArray permutation(int x) /// /// If x is an integer, randomly permute np.arange(x). /// Permuted sequence or array range. - /// https://numpy.org/doc/stable/reference/generated/numpy.random.permutation.html + /// https://numpy.org/doc/stable/reference/random/generated/numpy.random.permutation.html public NDArray permutation(NDArray x) { x = x.copy(); diff --git a/src/NumSharp.Core/RandomSampling/np.random.poisson.cs b/src/NumSharp.Core/RandomSampling/np.random.poisson.cs index 4630b85f..b4260739 100644 --- a/src/NumSharp.Core/RandomSampling/np.random.poisson.cs +++ b/src/NumSharp.Core/RandomSampling/np.random.poisson.cs @@ -16,7 +16,7 @@ public partial class NumPyRandom /// Expectation of interval, should be >= 0. A sequence of expectation intervals must be broadcastable over the requested size. /// Output Shape /// Drawn samples from the parameterized binomial distribution, where each sample is equal to the number of successes over the n trials. - /// https://numpy.org/doc/stable/reference/generated/numpy.random.poisson.html + /// https://numpy.org/doc/stable/reference/random/generated/numpy.random.poisson.html public NDArray poisson(double lam, Shape shape) => poisson(lam, shape.dimensions); /// @@ -25,7 +25,7 @@ public partial class NumPyRandom /// Expectation of interval, should be >= 0. A sequence of expectation intervals must be broadcastable over the requested size. /// Output Shape /// Drawn samples from the parameterized binomial distribution, where each sample is equal to the number of successes over the n trials. - /// https://numpy.org/doc/stable/reference/generated/numpy.random.poisson.html + /// https://numpy.org/doc/stable/reference/random/generated/numpy.random.poisson.html public NDArray poisson(double lam, params int[] dims) { if (lam < 0) diff --git a/src/NumSharp.Core/RandomSampling/np.random.randint.cs b/src/NumSharp.Core/RandomSampling/np.random.randint.cs index 504e1dd2..c24a2a46 100644 --- a/src/NumSharp.Core/RandomSampling/np.random.randint.cs +++ b/src/NumSharp.Core/RandomSampling/np.random.randint.cs @@ -15,7 +15,7 @@ public partial class NumPyRandom /// The shape of the array. /// Desired dtype of the result. All dtypes are determined by their name, i.e., ‘int64’, ‘int’, etc, so byteorder is not available and a specific precision may have different C types depending on the platform. The default value is ‘np.int’. /// - /// https://numpy.org/doc/stable/reference/generated/numpy.random.randint.html + /// https://numpy.org/doc/stable/reference/random/generated/numpy.random.randint.html public NDArray randint(long low, long high = -1, Shape size = default, Type dtype = null) { dtype = dtype ?? np.int32; diff --git a/src/NumSharp.Core/RandomSampling/np.random.shuffle.cs b/src/NumSharp.Core/RandomSampling/np.random.shuffle.cs index 1d1c4878..ad7a0595 100644 --- a/src/NumSharp.Core/RandomSampling/np.random.shuffle.cs +++ b/src/NumSharp.Core/RandomSampling/np.random.shuffle.cs @@ -11,7 +11,7 @@ public partial class NumPyRandom /// /// The array or list to be shuffled. /// How many times to pass all items in a complexity of O(n*passes) - /// https://numpy.org/doc/stable/reference/generated/numpy.random.shuffle.html

Does not copy
+ /// https://numpy.org/doc/stable/reference/random/generated/numpy.random.shuffle.html

Does not copy
[SuppressMessage("ReSharper", "TooWideLocalVariableScope")] public void shuffle(NDArray x, int passes = 2) { diff --git a/test/NumSharp.UnitTest/RandomSampling/np.random.normal.Test.cs b/test/NumSharp.UnitTest/RandomSampling/np.random.normal.Test.cs index 8ed81144..e89eae21 100644 --- a/test/NumSharp.UnitTest/RandomSampling/np.random.normal.Test.cs +++ b/test/NumSharp.UnitTest/RandomSampling/np.random.normal.Test.cs @@ -13,7 +13,7 @@ public class NpRandomNormalTest [Test] public void NormalDistributionTest() { - // https://numpy.org/doc/stable/reference/generated/numpy.random.normal.html + // https://numpy.org/doc/stable/reference/random/generated/numpy.random.normal.html double mu = 0; // mean double sigma = 0.1; // standard deviation var s = np.random.normal(mu, sigma, 10, 100);