Skip to content

Conversation

sakchal
Copy link
Contributor

@sakchal sakchal commented Feb 27, 2024

This PR introduces a suite of unit tests for pad.py located within the create_array directory. The primary function in this file is to add padding to a given array.

No Padding: Ensures that when given 0 padding, the array remains its original shape
Negative Padding: Ensures that when given negative padding, the pad function properly handles this case
Padding Shape: Ensures that when padding is added, the correct padding shape is seen in the padded array

Pad Return Value Fix: Pad originally returned "Not Implemented"

@@ -22,4 +22,4 @@ def pad(arr: AFArray, begin_shape: tuple[int, ...], end_shape: tuple[int, ...],
end_c_shape.c_array,
border_type.value,
)
return NotImplemented
Copy link
Collaborator

Choose a reason for hiding this comment

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

Nice catch!

@roaffix roaffix merged commit a657583 into arrayfire:master Mar 2, 2024
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