Our CpuMathUtils class is public with public methods, but we don't have any xml summary comments, and only use asserts for argument checking.
Since these are public members, we should have xml doc comments and real argument checking.
See example:
|
} |
|
|
|
public static void Add(float a, float[] dst, int count) |
|
{ |
|
Contracts.AssertNonEmpty(dst); |
|
Contracts.Assert(count > 0); |
|
Contracts.Assert(count <= dst.Length); |
|
|
|
Add(a, new Span<float>(dst, 0, count)); |
|
} |
Also, see PR comment here: #1229 (comment)
Our
CpuMathUtilsclass is public with public methods, but we don't have any xml summary comments, and only useassertsfor argument checking.Since these are public members, we should have xml doc comments and real argument checking.
See example:
machinelearning/src/Microsoft.ML.CpuMath/CpuMathUtils.netcoreapp.cs
Lines 198 to 207 in 7e9e468
Also, see PR comment here: #1229 (comment)