albumentations-team / albucore

A high-performance image processing library designed to optimize and extend the Albumentations library with specialized functions for advanced image transformations. Perfect for developers working in computer vision who require efficient and scalable image augmentation.
MIT License
12 stars 3 forks source link

fix test_add #23

Closed ayasyrev closed 4 months ago

ayasyrev commented 4 months ago

change dtype uint to int when adds negative value

Summary by Sourcery

This pull request addresses a bug in the test_add function by correcting the dtype from unsigned integer to signed integer when adding negative values. This ensures that the tests handle negative values correctly.

sourcery-ai[bot] commented 4 months ago

Reviewer's Guide by Sourcery

This pull request addresses an issue in the test_add function where negative values were being added to unsigned integers (np.uint8). The dtype has been changed to signed integers (np.int8 and np.int16) to handle negative values correctly. Additionally, an indentation issue was fixed, and a blank line was added for better readability.

File-Level Changes

Files Changes
tests/test_add.py Updated dtype to handle negative values correctly, fixed indentation, and added a blank line for readability.

Tips - Trigger a new Sourcery review by commenting `@sourcery-ai review` on the pull request. - You can change your review settings at any time by accessing your [dashboard](https://app.sourcery.ai): - Enable or disable the Sourcery-generated pull request summary or reviewer's guide; - Change the review language; - You can always [contact us](mailto:support@sourcery.ai) if you have any questions or feedback.