Add the erf function. (#917)

This commit is contained in:
Laurent Mazare
2023-09-21 06:19:10 +01:00
committed by GitHub
parent ab1d40ea97
commit 7b26e513f1
4 changed files with 45 additions and 0 deletions

View File

@ -61,6 +61,13 @@ fn unary_op(device: &Device) -> Result<()> {
[2.6906, -0.0647, -0.1091, 1.7353, 2.7928]
]
);
assert_eq!(
test_utils::to_vec2_round(&tensor.erf()?, 4)?,
[
[-1.0, 0.8427, 1.0, -0.1125, 0.5205],
[0.9999, -0.9891, -0.3079, 0.9891, 0.9999]
]
);
Ok(())
}