Skip to content

Update the macros to properly account for arrays  #76

Open
@FL03

Description

@FL03
extern crate acme;

use acme::autodiff;

#[test]
fn test_array() {
    let x = [1.0, 2.0];
    let y = [2.0, 2.0];
    assert_eq!(autodiff!(x: x + y), 1f64);
    // panics here
    // assert_eq!(autodiff!(x: x + y), [1.0, 0.0]);

}

Metadata

Metadata

Assignees

Labels

bugSomething isn't workingmacroAny additions or improvements to procedural macrosrustImprovements or additions that update the Rust code

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions