arrayfire / arrayfire-binary-python-wrapper

A python thin wrapper for ArrayFire library
https://arrayfire.com
BSD 3-Clause "New" or "Revised" License
2 stars 5 forks source link

Added unit tests for the diagonal function #23

Closed sakchal closed 6 months ago

sakchal commented 6 months ago

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).

sakchal commented 6 months ago

@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 commented 6 months ago

@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