Skip to content

Commit ac1363c

Browse files
authored
Merge pull request #574 from Zephyr-Blessed/fix/update-numpy-doc-urls
All 124 URLs validated. Fixes applied for 18 broken URLs including random function paths, deprecated API redirects, and documentation structure changes.
2 parents 1654307 + ca7c472 commit ac1363c

File tree

125 files changed

+391
-391
lines changed

Some content is hidden

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

125 files changed

+391
-391
lines changed

src/NumSharp.Core/APIs/np.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,10 +13,10 @@ public static partial class np
1313
/// <summary>
1414
/// A convenient alias for None, useful for indexing arrays.
1515
/// </summary>
16-
/// <remarks>https://docs.scipy.org/doc/numpy-1.17.0/reference/arrays.indexing.html<br></br><br></br>https://stackoverflow.com/questions/42190783/what-does-three-dots-in-python-mean-when-indexing-what-looks-like-a-number</remarks>
16+
/// <remarks>https://numpy.org/doc/stable/user/basics.indexing.html<br></br><br></br>https://stackoverflow.com/questions/42190783/what-does-three-dots-in-python-mean-when-indexing-what-looks-like-a-number</remarks>
1717
public static readonly Slice newaxis = new Slice(null, null, 1) {IsNewAxis = true};
1818

19-
// https://docs.scipy.org/doc/numpy-1.16.0/user/basics.types.html
19+
// https://numpy.org/doc/stable/user/basics.types.html
2020
public static readonly Type bool_ = typeof(bool);
2121
public static readonly Type bool8 = bool_;
2222
public static readonly Type @bool = bool_;

src/NumSharp.Core/APIs/np.cumsum.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ public static partial class np
1111
/// <param name="axis">Axis along which the cumulative sum is computed. The default (None) is to compute the cumsum over the flattened array.</param>
1212
/// <param name="typeCode">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.</param>
1313
/// <returns>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.</returns>
14-
/// <remarks>https://docs.scipy.org/doc/numpy/reference/generated/numpy.cumsum.html</remarks>
14+
/// <remarks>https://numpy.org/doc/stable/reference/generated/numpy.cumsum.html</remarks>
1515
public static NDArray cumsum(NDArray arr, int? axis = null, NPTypeCode? typeCode = null)
1616
{
1717
return arr.TensorEngine.ReduceCumAdd(arr, axis, typeCode);

src/NumSharp.Core/APIs/np.fromfile.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ public static partial class np
1414
/// <param name="file">filename.</param>
1515
/// <param name="dtype">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.</param>
1616
/// <returns></returns>
17-
/// <remarks>https://docs.scipy.org/doc/numpy/reference/generated/numpy.fromfile.html</remarks>
17+
/// <remarks>https://numpy.org/doc/stable/reference/generated/numpy.fromfile.html</remarks>
1818
public static NDArray fromfile(string file, NPTypeCode dtype)
1919
{
2020
return fromfile(file, dtype.AsType());
@@ -27,7 +27,7 @@ public static NDArray fromfile(string file, NPTypeCode dtype)
2727
/// <param name="file">filename.</param>
2828
/// <param name="dtype">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.</param>
2929
/// <returns></returns>
30-
/// <remarks>https://docs.scipy.org/doc/numpy/reference/generated/numpy.fromfile.html</remarks>
30+
/// <remarks>https://numpy.org/doc/stable/reference/generated/numpy.fromfile.html</remarks>
3131
public static NDArray fromfile(string file, Type dtype)
3232
{
3333
unsafe

src/NumSharp.Core/APIs/np.size.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ public partial class np
1010
/// <param name="a">Input data.</param>
1111
/// <param name="axis">Axis along which the elements are counted. By default, give the total number of elements.</param>
1212
/// <returns>Number of elements along the specified axis.</returns>
13-
/// <remarks>https://docs.scipy.org/doc/numpy/reference/generated/numpy.ma.size.html</remarks>
13+
/// <remarks>https://numpy.org/doc/stable/reference/generated/numpy.ma.size.html</remarks>
1414
public static int size(NDArray a, int? axis = null)
1515
{
1616
if (a == null)

src/NumSharp.Core/APIs/np.tofile.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ public partial class NDArray
1010
/// Data is always written in ‘C’ order, independent of the order of a. <br></br>The data produced by this method can be recovered using the function fromfile().
1111
/// </summary>
1212
/// <param name="fid">An open file object, or a string containing a filename.</param>
13-
/// <remarks>https://docs.scipy.org/doc/numpy/reference/generated/numpy.ndarray.tofile.html</remarks>
13+
/// <remarks>https://numpy.org/doc/stable/reference/generated/numpy.ndarray.tofile.html</remarks>
1414
public void tofile(string fid)
1515
{
1616
//TODO! support for sliced data (if sliced, clone and then save)

src/NumSharp.Core/Backends/Default/ArrayManipulation/Default.Broadcasting.cs

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ namespace NumSharp.Backends
66
{
77
public partial class DefaultEngine
88
{
9-
/// <remarks>Based on https://docs.scipy.org/doc/numpy-1.16.1/user/basics.broadcasting.html </remarks>
9+
/// <remarks>Based on https://numpy.org/doc/stable/user/basics.broadcasting.html </remarks>
1010
public static Shape ResolveReturnShape(Shape leftShape, Shape rightShape)
1111
{
1212
if (leftShape == rightShape)
@@ -78,7 +78,7 @@ public static Shape ResolveReturnShape(Shape leftShape, Shape rightShape)
7878
return mit; //implicit cast
7979
}
8080

81-
/// <remarks>Based on https://docs.scipy.org/doc/numpy-1.16.1/user/basics.broadcasting.html </remarks>
81+
/// <remarks>Based on https://numpy.org/doc/stable/user/basics.broadcasting.html </remarks>
8282
public static Shape ResolveReturnShape(params Shape[] shapes)
8383
{
8484
if (shapes.Length == 0)
@@ -134,7 +134,7 @@ public static Shape ResolveReturnShape(params Shape[] shapes)
134134
return mit.Clean();
135135
}
136136

137-
/// <remarks>Based on https://docs.scipy.org/doc/numpy-1.16.1/user/basics.broadcasting.html </remarks>
137+
/// <remarks>Based on https://numpy.org/doc/stable/user/basics.broadcasting.html </remarks>
138138
public static Shape ResolveReturnShape(params NDArray[] shapes)
139139
{
140140
if (shapes.Length == 0)
@@ -191,7 +191,7 @@ public static Shape ResolveReturnShape(params NDArray[] shapes)
191191
return mit.Clean();
192192
}
193193

194-
/// <remarks>Based on https://docs.scipy.org/doc/numpy-1.16.1/user/basics.broadcasting.html </remarks>
194+
/// <remarks>Based on https://numpy.org/doc/stable/user/basics.broadcasting.html </remarks>
195195
public static Shape[] Broadcast(params Shape[] shapes)
196196
{
197197
if (shapes.Length == 0)
@@ -268,7 +268,7 @@ public static Shape[] Broadcast(params Shape[] shapes)
268268

269269
//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},};
270270

271-
/// <remarks>Based on https://docs.scipy.org/doc/numpy-1.16.1/user/basics.broadcasting.html </remarks>
271+
/// <remarks>Based on https://numpy.org/doc/stable/user/basics.broadcasting.html </remarks>
272272
public static (Shape LeftShape, Shape RightShape) Broadcast(Shape leftShape, Shape rightShape)
273273
{
274274
if (leftShape._hashCode != 0 && leftShape._hashCode == rightShape._hashCode)
@@ -373,7 +373,7 @@ public static (Shape LeftShape, Shape RightShape) Broadcast(Shape leftShape, Sha
373373
return (leftResult, rightResult);
374374
}
375375

376-
/// <remarks>Based on https://docs.scipy.org/doc/numpy-1.16.1/user/basics.broadcasting.html </remarks>
376+
/// <remarks>Based on https://numpy.org/doc/stable/user/basics.broadcasting.html </remarks>
377377
public static NDArray[] Broadcast(params NDArray[] arrays)
378378
{
379379
if (arrays.Length == 0)
@@ -390,7 +390,7 @@ public static NDArray[] Broadcast(params NDArray[] arrays)
390390
return arrays;
391391
}
392392

393-
/// <remarks>Based on https://docs.scipy.org/doc/numpy-1.16.1/user/basics.broadcasting.html </remarks>
393+
/// <remarks>Based on https://numpy.org/doc/stable/user/basics.broadcasting.html </remarks>
394394
public unsafe static bool AreBroadcastable(params Shape[] shapes)
395395
{
396396
if (shapes.Length <= 1)
@@ -442,7 +442,7 @@ public unsafe static bool AreBroadcastable(params Shape[] shapes)
442442
return true;
443443
}
444444

445-
/// <remarks>Based on https://docs.scipy.org/doc/numpy-1.16.1/user/basics.broadcasting.html </remarks>
445+
/// <remarks>Based on https://numpy.org/doc/stable/user/basics.broadcasting.html </remarks>
446446
public unsafe static bool AreBroadcastable(params int[][] shapes)
447447
{
448448
if (shapes.Length <= 1)
@@ -494,7 +494,7 @@ public unsafe static bool AreBroadcastable(params int[][] shapes)
494494
return true;
495495
}
496496

497-
/// <remarks>Based on https://docs.scipy.org/doc/numpy-1.16.1/user/basics.broadcasting.html </remarks>
497+
/// <remarks>Based on https://numpy.org/doc/stable/user/basics.broadcasting.html </remarks>
498498
public static bool AreBroadcastable(params NDArray[] arrays)
499499
{
500500
if (arrays.Length <= 1)

src/NumSharp.Core/Backends/Default/Math/BLAS/Default.Dot.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ namespace NumSharp.Backends
1111
public partial class DefaultEngine
1212
{
1313

14-
/// <remarks>https://docs.scipy.org/doc/numpy/reference/generated/numpy.dot.html</remarks>
14+
/// <remarks>https://numpy.org/doc/stable/reference/generated/numpy.dot.html</remarks>
1515
public override NDArray Dot(in NDArray left, in NDArray right)
1616
{
1717
//Dot product of two arrays.Specifically,

src/NumSharp.Core/Backends/Default/Math/BLAS/Default.MatMul.2D2D.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ protected static NDArray MultiplyMatrix(NDArray left, NDArray right, NDArray @ou
1717
return null;
1818
}
1919
#else
20-
/// <remarks>https://docs.scipy.org/doc/numpy/reference/generated/numpy.multiply.html</remarks>
20+
/// <remarks>https://numpy.org/doc/stable/reference/generated/numpy.multiply.html</remarks>
2121
[SuppressMessage("ReSharper", "JoinDeclarationAndInitializer")]
2222
[MethodImpl(OptimizeAndInline)]
2323
protected static NDArray MultiplyMatrix(NDArray left, NDArray right, NDArray @out = null)

src/NumSharp.Core/Backends/Default/Math/BLAS/Default.MatMul.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ namespace NumSharp.Backends
1010
{
1111
public partial class DefaultEngine
1212
{
13-
/// <remarks>https://docs.scipy.org/doc/numpy/reference/generated/numpy.matmul.html</remarks>
13+
/// <remarks>https://numpy.org/doc/stable/reference/generated/numpy.matmul.html</remarks>
1414
public override NDArray Matmul(NDArray lhs, NDArray rhs)
1515
{
1616
if (lhs.Shape.IsScalar || rhs.Shape.IsScalar)

src/NumSharp.Core/Backends/NDArray.cs

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ namespace NumSharp
3535
/// An associated data-type object describes the format of each element in the array (its byte-order,<br></br>
3636
/// how many bytes it occupies in memory, whether it is an integer, a floating point number, or something else, etc.)
3737
/// </summary>
38-
/// <remarks>https://docs.scipy.org/doc/numpy/reference/generated/numpy.ndarray.html</remarks>
38+
/// <remarks>https://numpy.org/doc/stable/reference/generated/numpy.ndarray.html</remarks>
3939
[DebuggerTypeProxy(nameof(NDArrayDebuggerProxy))]
4040
[SuppressMessage("ReSharper", "ParameterHidesMember")]
4141
public partial class NDArray : IIndex, ICloneable, IEnumerable
@@ -342,7 +342,7 @@ public int[] shape
342342
/// <summary>
343343
/// A 1-D iterator over the array.
344344
/// </summary>
345-
/// <remarks>https://docs.scipy.org/doc/numpy/reference/generated/numpy.ndarray.flat.html</remarks>
345+
/// <remarks>https://numpy.org/doc/stable/reference/generated/numpy.ndarray.flat.html</remarks>
346346
public NDArray flat
347347
{
348348
get
@@ -357,7 +357,7 @@ public NDArray flat
357357
/// The transposed array. <br></br>
358358
/// Same as self.transpose().
359359
/// </summary>
360-
/// <remarks>https://docs.scipy.org/doc/numpy/reference/generated/numpy.ndarray.T.html</remarks>
360+
/// <remarks>https://numpy.org/doc/stable/reference/generated/numpy.ndarray.T.html</remarks>
361361
public NDArray T
362362
{
363363
get
@@ -422,7 +422,7 @@ protected internal IArraySlice Array
422422
/// <param name="dtype">The dtype to cast this array.</param>
423423
/// <param name="copy">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.</param>
424424
/// <returns>An <see cref="NDArray"/> of given <paramref name="dtype"/>.</returns>
425-
/// <remarks>https://docs.scipy.org/doc/numpy/reference/generated/numpy.ndarray.astype.html</remarks>
425+
/// <remarks>https://numpy.org/doc/stable/reference/generated/numpy.ndarray.astype.html</remarks>
426426
[SuppressMessage("ReSharper", "ParameterHidesMember")]
427427
public NDArray astype(Type dtype, bool copy = true) => TensorEngine.Cast(this, dtype, copy);
428428

@@ -432,7 +432,7 @@ protected internal IArraySlice Array
432432
/// <param name="dtype">The dtype to cast this array.</param>
433433
/// <param name="copy">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.</param>
434434
/// <returns>An <see cref="NDArray"/> of given <paramref name="dtype"/>.</returns>
435-
/// <remarks>https://docs.scipy.org/doc/numpy/reference/generated/numpy.ndarray.astype.html</remarks>
435+
/// <remarks>https://numpy.org/doc/stable/reference/generated/numpy.ndarray.astype.html</remarks>
436436
public NDArray astype(NPTypeCode typeCode, bool copy = true) => TensorEngine.Cast(this, typeCode, copy);
437437

438438
/// <summary>
@@ -505,7 +505,7 @@ IEnumerable _empty()
505505
/// 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).
506506
/// </param>
507507
/// <returns></returns>
508-
/// <remarks>https://docs.scipy.org/doc/numpy/reference/generated/numpy.ndarray.view.html</remarks>
508+
/// <remarks>https://numpy.org/doc/stable/reference/generated/numpy.ndarray.view.html</remarks>
509509
public NDArray view(Type dtype = null)
510510
{
511511
//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)
525525
/// 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).
526526
/// </param>
527527
/// <returns></returns>
528-
/// <remarks>https://docs.scipy.org/doc/numpy/reference/generated/numpy.ndarray.view.html</remarks>
528+
/// <remarks>https://numpy.org/doc/stable/reference/generated/numpy.ndarray.view.html</remarks>
529529
public NDArray<T> view<T>() where T : unmanaged
530530
=> view(typeof(T)).AsGeneric<T>();
531531

0 commit comments

Comments
 (0)