Skip to content

Commit b13d90d

Browse files
authored
Fix some Tensor docs (#115548)
1 parent 9acc0d9 commit b13d90d

File tree

5 files changed

+87
-87
lines changed

5 files changed

+87
-87
lines changed

src/libraries/System.Numerics.Tensors/src/System/Numerics/Tensors/netcore/IReadOnlyTensor.cs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,9 +14,9 @@ public interface IReadOnlyTensor
1414
/// <param name="indexes">The index of the element for which to get.</param>
1515
/// <returns>The element that exists at <paramref name="indexes" />.</returns>
1616
/// <exception cref="ArgumentOutOfRangeException">
17-
/// Thrown when one of the following conditions is met:
18-
/// * <paramref name="indexes" /> does not contain <see cref="Rank" /> elements
19-
/// * <paramref name="indexes" /> contains an element that is negative or greater than or equal to the corresponding dimension length
17+
/// One of the following conditions is met:
18+
/// * <paramref name="indexes" /> does not contain <see cref="Rank" /> elements.
19+
/// * <paramref name="indexes" /> contains an element that is negative or greater than or equal to the corresponding dimension length.
2020
/// </exception>
2121
object? this[params scoped ReadOnlySpan<nint> indexes] { get; }
2222

src/libraries/System.Numerics.Tensors/src/System/Numerics/Tensors/netcore/IReadOnlyTensor_1.cs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -21,9 +21,9 @@ public interface IReadOnlyTensor<TSelf, T> : IReadOnlyTensor, IEnumerable<T>
2121
/// <param name="indexes">The index of the element for which to get a reference.</param>
2222
/// <returns>A reference to the element that exists at <paramref name="indexes" />.</returns>
2323
/// <exception cref="ArgumentOutOfRangeException">
24-
/// Thrown when one of the following conditions is met:
25-
/// * <paramref name="indexes" /> does not contain <see cref="IReadOnlyTensor.Rank" /> elements
26-
/// * <paramref name="indexes" /> contains an element that is negative or greater than or equal to the corresponding dimension length
24+
/// One of the following conditions is met:
25+
/// * <paramref name="indexes" /> does not contain <see cref="IReadOnlyTensor.Rank" /> elements.
26+
/// * <paramref name="indexes" /> contains an element that is negative or greater than or equal to the corresponding dimension length.
2727
/// </exception>
2828
new ref readonly T this[params scoped ReadOnlySpan<nint> indexes] { get; }
2929

src/libraries/System.Numerics.Tensors/src/System/Numerics/Tensors/netcore/ITensor.cs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,9 +14,9 @@ public interface ITensor : IReadOnlyTensor
1414
/// <param name="indexes">The index of the element for which to get.</param>
1515
/// <returns>The element that exists at <paramref name="indexes" />.</returns>
1616
/// <exception cref="ArgumentOutOfRangeException">
17-
/// Thrown when one of the following conditions is met:
18-
/// * <paramref name="indexes" /> does not contain <see cref="IReadOnlyTensor.Rank" /> elements
19-
/// * <paramref name="indexes" /> contains an element that is negative or greater than or equal to the corresponding dimension length
17+
/// One of the following conditions is met:
18+
/// * <paramref name="indexes" /> does not contain <see cref="IReadOnlyTensor.Rank" /> elements.
19+
/// * <paramref name="indexes" /> contains an element that is negative or greater than or equal to the corresponding dimension length.
2020
/// </exception>
2121
new object? this[params scoped ReadOnlySpan<nint> indexes] { get; set; }
2222

src/libraries/System.Numerics.Tensors/src/System/Numerics/Tensors/netcore/ReadOnlyTensorSpan_1.cs

Lines changed: 49 additions & 49 deletions
Original file line numberDiff line numberDiff line change
@@ -48,10 +48,10 @@ public ReadOnlyTensorSpan(T[]? array)
4848
/// <param name="lengths">The lengths of the dimensions. If an empty span is provided, the created tensor will have a single dimension that is the same length as <paramref name="array" />.</param>
4949
/// <remarks>Returns default when <paramref name="array"/> is null.</remarks>
5050
/// <exception cref="ArgumentOutOfRangeException">
51-
/// Thrown when one of the following conditions is met:
52-
/// * <paramref name="array" /> is null and <paramref name="lengths" /> is not empty
53-
/// * <paramref name="lengths" /> is not empty and contains an element that is either zero or negative
54-
/// * <paramref name="lengths" /> is not empty and has a flattened length greater than <paramref name="array" />.Length
51+
/// One of the following conditions is met:
52+
/// * <paramref name="array" /> is null and <paramref name="lengths" /> is not empty.
53+
/// * <paramref name="lengths" /> is not empty and contains an element that is either zero or negative.
54+
/// * <paramref name="lengths" /> is not empty and has a flattened length greater than <paramref name="array" />.Length.
5555
/// </exception>
5656
public ReadOnlyTensorSpan(T[]? array, scoped ReadOnlySpan<nint> lengths)
5757
{
@@ -67,13 +67,13 @@ public ReadOnlyTensorSpan(T[]? array, scoped ReadOnlySpan<nint> lengths)
6767
/// <param name="strides">The strides of each dimension. If an empty span is provided, then strides will be automatically calculated from <paramref name="lengths" />.</param>
6868
/// <remarks>Returns default when <paramref name="array"/> is null.</remarks>
6969
/// <exception cref="ArgumentOutOfRangeException">
70-
/// Thrown when one of the following conditions is met:
71-
/// * <paramref name="array" /> is null and <paramref name="lengths" /> or <paramref name="strides" /> is not empty
72-
/// * <paramref name="lengths" /> is not empty and contains an element that is either zero or negative
73-
/// * <paramref name="lengths" /> is not empty and has a flattened length greater than <paramref name="array" />.Length
74-
/// * <paramref name="strides" /> is not empty and has a length different from <paramref name="lengths"/>
75-
/// * <paramref name="strides" /> is not empty and contains an element that is negative
76-
/// * <paramref name="strides" /> is not empty and contains an element that is zero in a non leading position
70+
/// One of the following conditions is met:
71+
/// * <paramref name="array" /> is null and <paramref name="lengths" /> or <paramref name="strides" /> is not empty.
72+
/// * <paramref name="lengths" /> is not empty and contains an element that is either zero or negative.
73+
/// * <paramref name="lengths" /> is not empty and has a flattened length greater than <paramref name="array" />.Length.
74+
/// * <paramref name="strides" /> is not empty and has a length different from <paramref name="lengths"/>.
75+
/// * <paramref name="strides" /> is not empty and contains an element that is negative.
76+
/// * <paramref name="strides" /> is not empty and contains an element that is zero in a non leading position.
7777
/// </exception>
7878
public ReadOnlyTensorSpan(T[]? array, scoped ReadOnlySpan<nint> lengths, scoped ReadOnlySpan<nint> strides)
7979
{
@@ -90,14 +90,14 @@ public ReadOnlyTensorSpan(T[]? array, scoped ReadOnlySpan<nint> lengths, scoped
9090
/// <param name="strides">The strides of each dimension. If an empty span is provided, then strides will be automatically calculated from <paramref name="lengths" />.</param>
9191
/// <remarks>Returns default when <paramref name="array"/> is null.</remarks>
9292
/// <exception cref="ArgumentOutOfRangeException">
93-
/// Thrown when one of the following conditions is met:
94-
/// * <paramref name="array" /> is null and <paramref name="lengths" /> or <paramref name="strides" /> is not empty
95-
/// * <paramref name="start" /> is not in range of <paramref name="array" />
96-
/// * <paramref name="lengths" /> is not empty and contains an element that is either zero or negative
97-
/// * <paramref name="lengths" /> is not empty and has a flattened length greater than <paramref name="array" />.Length
98-
/// * <paramref name="strides" /> is not empty and has a length different from <paramref name="lengths"/>
99-
/// * <paramref name="strides" /> is not empty and contains an element that is negative
100-
/// * <paramref name="strides" /> is not empty and contains an element that is zero in a non leading position
93+
/// One of the following conditions is met:
94+
/// * <paramref name="array" /> is null and <paramref name="lengths" /> or <paramref name="strides" /> is not empty.
95+
/// * <paramref name="start" /> is not in range of <paramref name="array" />.
96+
/// * <paramref name="lengths" /> is not empty and contains an element that is either zero or negative.
97+
/// * <paramref name="lengths" /> is not empty and has a flattened length greater than <paramref name="array" />.Length.
98+
/// * <paramref name="strides" /> is not empty and has a length different from <paramref name="lengths"/>.
99+
/// * <paramref name="strides" /> is not empty and contains an element that is negative.
100+
/// * <paramref name="strides" /> is not empty and contains an element that is zero in a non leading position.
101101
/// </exception>
102102
public ReadOnlyTensorSpan(T[]? array, int start, scoped ReadOnlySpan<nint> lengths, scoped ReadOnlySpan<nint> strides)
103103
{
@@ -121,9 +121,9 @@ public ReadOnlyTensorSpan(ReadOnlySpan<T> span)
121121
/// <param name="span">The target span.</param>
122122
/// <param name="lengths">The lengths of the dimensions. If an empty span is provided, the created tensor span will have a single dimension that is the same length as <paramref name="span" />.</param>
123123
/// <exception cref="ArgumentOutOfRangeException">
124-
/// Thrown when one of the following conditions is met:
125-
/// * <paramref name="lengths" /> is not empty and contains an element that is either zero or negative
126-
/// * <paramref name="lengths" /> is not empty and has a flattened length greater than <paramref name="span" />.Length
124+
/// One of the following conditions is met:
125+
/// * <paramref name="lengths" /> is not empty and contains an element that is either zero or negative.
126+
/// * <paramref name="lengths" /> is not empty and has a flattened length greater than <paramref name="span" />.Length.
127127
/// </exception>
128128
public ReadOnlyTensorSpan(ReadOnlySpan<T> span, scoped ReadOnlySpan<nint> lengths)
129129
{
@@ -137,12 +137,12 @@ public ReadOnlyTensorSpan(ReadOnlySpan<T> span, scoped ReadOnlySpan<nint> length
137137
/// <param name="lengths">The lengths of the dimensions. If an empty span is provided, the created tensor span will have a single dimension that is the same length as <paramref name="span" />.</param>
138138
/// <param name="strides">The strides of each dimension. If an empty span is provided, then strides will be automatically calculated from <paramref name="lengths" />.</param>
139139
/// <exception cref="ArgumentOutOfRangeException">
140-
/// Thrown when one of the following conditions is met:
141-
/// * <paramref name="lengths" /> is not empty and contains an element that is either zero or negative
142-
/// * <paramref name="lengths" /> is not empty and has a flattened length greater than <paramref name="span" />.Length
143-
/// * <paramref name="strides" /> is not empty and has a length different from <paramref name="lengths"/>
144-
/// * <paramref name="strides" /> is not empty and contains an element that is negative
145-
/// * <paramref name="strides" /> is not empty and contains an element that is zero in a non leading position
140+
/// One of the following conditions is met:
141+
/// * <paramref name="lengths" /> is not empty and contains an element that is either zero or negative.
142+
/// * <paramref name="lengths" /> is not empty and has a flattened length greater than <paramref name="span" />.Length.
143+
/// * <paramref name="strides" /> is not empty and has a length different from <paramref name="lengths"/>.
144+
/// * <paramref name="strides" /> is not empty and contains an element that is negative.
145+
/// * <paramref name="strides" /> is not empty and contains an element that is zero in a non leading position.
146146
/// </exception>
147147
public ReadOnlyTensorSpan(ReadOnlySpan<T> span, scoped ReadOnlySpan<nint> lengths, scoped ReadOnlySpan<nint> strides)
148148
{
@@ -175,14 +175,14 @@ public ReadOnlyTensorSpan(Array? array)
175175
/// <para></para>
176176
/// </remarks>
177177
/// <exception cref="ArgumentOutOfRangeException">
178-
/// Thrown when one of the following conditions is met:
179-
/// * <paramref name="array" /> is null and <paramref name="lengths" /> or <paramref name="strides" /> is not empty
180-
/// * <paramref name="start" /> is not in range of <paramref name="array" />
181-
/// * <paramref name="lengths" /> is not empty and contains an element that is either zero or negative
182-
/// * <paramref name="lengths" /> is not empty and has a flattened length greater than <paramref name="array" />.Length
183-
/// * <paramref name="strides" /> is not empty and has a length different from <paramref name="lengths"/>
184-
/// * <paramref name="strides" /> is not empty and contains an element that is negative
185-
/// * <paramref name="strides" /> is not empty and contains an element that is zero in a non leading position
178+
/// One of the following conditions is met:
179+
/// * <paramref name="array" /> is null and <paramref name="lengths" /> or <paramref name="strides" /> is not empty.
180+
/// * <paramref name="start" /> is not in range of <paramref name="array" />.
181+
/// * <paramref name="lengths" /> is not empty and contains an element that is either zero or negative.
182+
/// * <paramref name="lengths" /> is not empty and has a flattened length greater than <paramref name="array" />.Length.
183+
/// * <paramref name="strides" /> is not empty and has a length different from <paramref name="lengths"/>.
184+
/// * <paramref name="strides" /> is not empty and contains an element that is negative.
185+
/// * <paramref name="strides" /> is not empty and contains an element that is zero in a non leading position.
186186
/// </exception>
187187
public ReadOnlyTensorSpan(Array? array, scoped ReadOnlySpan<int> start, scoped ReadOnlySpan<nint> lengths, scoped ReadOnlySpan<nint> strides)
188188
{
@@ -211,11 +211,11 @@ public unsafe ReadOnlyTensorSpan(T* data, nint dataLength)
211211
/// <param name="lengths">The lengths of the dimensions. If an empty span is provided, the created tensor span will have a single dimension that is the same length as <paramref name="dataLength" />.</param>
212212
/// <remarks>Returns default when <paramref name="data" /> is null.</remarks>
213213
/// <exception cref="ArgumentOutOfRangeException">
214-
/// Thrown when one of the following conditions is met:
215-
/// * <paramref name="data" /> is <c>null</c> and <paramref name="dataLength" /> is not zero
216-
/// * <paramref name="data" /> is null and <paramref name="lengths" />
217-
/// * <paramref name="lengths" /> is not empty and contains an element that is either zero or negative
218-
/// * <paramref name="lengths" /> is not empty and has a flattened length greater than <paramref name="dataLength" />
214+
/// One of the following conditions is met:
215+
/// * <paramref name="data" /> is <c>null</c> and <paramref name="dataLength" /> is not zero.
216+
/// * <paramref name="data" /> is null and <paramref name="lengths" />.
217+
/// * <paramref name="lengths" /> is not empty and contains an element that is either zero or negative.
218+
/// * <paramref name="lengths" /> is not empty and has a flattened length greater than <paramref name="dataLength" />.
219219
/// </exception>
220220
[CLSCompliant(false)]
221221
public unsafe ReadOnlyTensorSpan(T* data, nint dataLength, scoped ReadOnlySpan<nint> lengths)
@@ -231,14 +231,14 @@ public unsafe ReadOnlyTensorSpan(T* data, nint dataLength, scoped ReadOnlySpan<n
231231
/// <param name="strides">The strides of each dimension. If an empty span is provided, then strides will be automatically calculated from <paramref name="lengths" />.</param>
232232
/// <remarks>Returns default when <paramref name="data" /> is null.</remarks>
233233
/// <exception cref="ArgumentOutOfRangeException">
234-
/// Thrown when one of the following conditions is met:
235-
/// * <paramref name="data" /> is <c>null</c> and <paramref name="dataLength" /> is not zero
236-
/// * <paramref name="data" /> is null and <paramref name="lengths" /> or <paramref name="strides" /> is not empty
237-
/// * <paramref name="lengths" /> is not empty and contains an element that is either zero or negative
238-
/// * <paramref name="lengths" /> is not empty and has a flattened length greater than <paramref name="dataLength" />
239-
/// * <paramref name="strides" /> is not empty and has a length different from <paramref name="lengths"/>
240-
/// * <paramref name="strides" /> is not empty and contains an element that is negative
241-
/// * <paramref name="strides" /> is not empty and contains an element that is zero in a non leading position
234+
/// One of the following conditions is met:
235+
/// * <paramref name="data" /> is <c>null</c> and <paramref name="dataLength" /> is not zero.
236+
/// * <paramref name="data" /> is null and <paramref name="lengths" /> or <paramref name="strides" /> is not empty.
237+
/// * <paramref name="lengths" /> is not empty and contains an element that is either zero or negative.
238+
/// * <paramref name="lengths" /> is not empty and has a flattened length greater than <paramref name="dataLength" />.
239+
/// * <paramref name="strides" /> is not empty and has a length different from <paramref name="lengths"/>.
240+
/// * <paramref name="strides" /> is not empty and contains an element that is negative.
241+
/// * <paramref name="strides" /> is not empty and contains an element that is zero in a non leading position.
242242
/// </exception>
243243
[CLSCompliant(false)]
244244
public unsafe ReadOnlyTensorSpan(T* data, nint dataLength, scoped ReadOnlySpan<nint> lengths, scoped ReadOnlySpan<nint> strides)

0 commit comments

Comments
 (0)