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

Added unit tests for the diagonal function #23

Merged
merged 9 commits into from
Mar 6, 2024

Conversation

sakchal
Copy link
Contributor

@sakchal sakchal commented Feb 29, 2024

This PR introduces a suite of unit tests for lower.py located within the within the create_array directory. The primary functions in this file facilitate the creation of an an array with a specified diagonal, where this specified diagonal is passed in as an AFArray.

Diagonal: Ensures that the diagonal of the new array matches the shape and the value of of the original array given.
Diagonal Invalid Shape: Ensures that proper error checking occurs if a diagonal array is trying to be constructed from an array with incorrect dimensions (can only be 1D or 2D).

# tests to include
# - if diagonal created is same shape as the input diagonal
# - if diagonal value is same value as input diagonal
# - if invalid diagonal is passed in
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is this comment necessary here?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

deleted them in the new commit

@sakchal
Copy link
Contributor Author

sakchal commented Mar 4, 2024

@roaffix getting black and other formatting errors in manage_array.py. Should I go in and fix that file's formatting or leave it?

@roaffix
Copy link
Collaborator

roaffix commented Mar 6, 2024

@roaffix getting black and other formatting errors in manage_array.py. Should I go in and fix that file's formatting or leave it?

Its fine. I'll fix them all in some time

@roaffix roaffix merged commit f90ef61 into arrayfire:master Mar 6, 2024
0 of 3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants