원클릭으로
np-tests
// Write and migrate numpy tests for NumSharp functions. Use when adding tests for np.* methods, migrating numpy test suites, or battletesting NumSharp implementations against numpy 2.4.2.
// Write and migrate numpy tests for NumSharp functions. Use when adding tests for np.* methods, migrating numpy test suites, or battletesting NumSharp implementations against numpy 2.4.2.
| name | np-tests |
| description | Write and migrate numpy tests for NumSharp functions. Use when adding tests for np.* methods, migrating numpy test suites, or battletesting NumSharp implementations against numpy 2.4.2. |
We are looking to test numpy's np.* implementations to the fullest. we are aligning with numpy 2.4.2 as source of truth and are to validate exact same behavior as numpy does. This session we focusing on: """$ARGUMENTS""" Your job is around writing tests for np.* functions (no more than a few. more than one ONLY if they are closely related).
To interact/develop/create tests for np.* functions, high-level development cycle is as follows:
Use battletesting to validate behavior matches numpy: 'dotnet run << 'EOF'' and 'python << 'EOF'' side-by-side comparison.
[TestMethod]
public void FunctionName_Scenario_Dtype()
{
// Arrange
var input = np.array(new[] { 3, 1, 2 });
// Act
var result = np.sort(input);
// Assert - values from running actual numpy
Assert.IsTrue(result.IsContiguous);
Assert.AreEqual(1, result.GetAtIndex<int>(0));
}