Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/daniel-e/rustml
/ test_map
Function
test_map
src/matrix.rs:1161–1169 ·
view source on GitHub ↗
()
Source
from the content-addressed store, hash-verified
1159
1160
#[test]
1161
fn test_map() {
1162
1163
let y = mat![
1164
1u8, 2;
1165
3, 4
1166
].map(|&val| val as f32).mul_scalar(0.5);
1167
1168
assert_eq!(y.buf(), &vec![0.5, 1.0, 1.5, 2.0]);
1169
}
1170
1171
#[test]
1172
fn test_row_mut() {
Callers
nothing calls this directly
Calls
1
map
Method · 0.80
Tested by
no test coverage detected