Skip to content

Format debug trait output #275

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 4 commits into from
Jan 20, 2021

Conversation

9prady9
Copy link
Member

@9prady9 9prady9 commented Jan 20, 2021

Code to illustrate the debug output

    let a = randu!(3, 3);
    let b = randu!(3, 3);

    af_print!("a", a);

    println!("a {:?}", &a);
    println!("a {:#?}", &a);
    println!("b {:?}", &b);
    println!("b {:#?}", &b);

Sample Output

a
[3 3 1 1]
    0.6010     0.2126     0.2864 
    0.0278     0.0655     0.3410 
    0.9806     0.5497     0.7509 

a Array { dtype: F32, shape: [3, 3, 1, 1], af_array: 0x560e508ba330 }
a Array {
    dtype: F32,
    shape: [3, 3, 1, 1],
    data: [
        0.6009535,
        0.027758777,
        0.9805506,
        0.21263224,
        0.06546384,
        0.5496738,
        0.28638768,
        0.34101695,
        0.7508749,
    ],
}
b Array { dtype: F32, shape: [3, 3, 1, 1], af_array: 0x560e503c1cb0 }
b Array {
    dtype: F32,
    shape: [3, 3, 1, 1],
    data: [
        0.41050708,
        0.15832818,
        0.3712476,
        0.3543455,
        0.6450288,
        0.9674888,
        0.36364043,
        0.41647816,
        0.5814448,
    ],
}

@9prady9 9prady9 added this to the 3.8.1 milestone Jan 20, 2021
@9prady9 9prady9 force-pushed the format_debug_trait_output branch from 1390b27 to f070d5c Compare January 20, 2021 12:15
@9prady9 9prady9 force-pushed the format_debug_trait_output branch from f070d5c to 207efd0 Compare January 20, 2021 12:38
@9prady9 9prady9 merged commit 6431cba into arrayfire:master Jan 20, 2021
@9prady9 9prady9 deleted the format_debug_trait_output branch January 20, 2021 13:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant