Skip to content
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

Update the macros to properly account for arrays #76

Open
FL03 opened this issue Apr 12, 2024 · 0 comments
Open

Update the macros to properly account for arrays #76

FL03 opened this issue Apr 12, 2024 · 0 comments
Assignees
Labels
bug Something isn't working macro Any additions or improvements to procedural macros rust Improvements or additions that update the Rust code
Milestone

Comments

@FL03
Copy link
Owner

FL03 commented Apr 12, 2024

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]);

}
@FL03 FL03 added bug Something isn't working rust Improvements or additions that update the Rust code macro Any additions or improvements to procedural macros labels Apr 12, 2024
@FL03 FL03 added this to the v0.3.1 milestone Apr 12, 2024
@FL03 FL03 self-assigned this Apr 12, 2024
@FL03 FL03 modified the milestones: v0.3.1, Future Apr 21, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working macro Any additions or improvements to procedural macros rust Improvements or additions that update the Rust code
Projects
None yet
Development

No branches or pull requests

1 participant