X Tutup
Skip to content

Add assert that check if topk is called with a negative value for k#3176

Merged
umar456 merged 1 commit intoarrayfire:masterfrom
umar456:topk_negk
Sep 30, 2021
Merged

Add assert that check if topk is called with a negative value for k#3176
umar456 merged 1 commit intoarrayfire:masterfrom
umar456:topk_negk

Conversation

@umar456
Copy link
Member

@umar456 umar456 commented Sep 29, 2021

Add checks to make sure K is greater than 0 for topk

Description

TopK fails if k is negative. This is not a proper value for TopK so we are adding assertions to make sure K is grater than 0.

Changes to Users

  • Users must make sure that k is greater than 0 for the topk function

Checklist

  • Rebased on latest master
  • Code compiles
  • Tests pass
  • [ ] Functions added to unified API
  • [ ] Functions documented

@umar456 umar456 requested a review from syurkevi September 29, 2021 19:13
@umar456 umar456 merged commit 6fbf5fb into arrayfire:master Sep 30, 2021
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

X Tutup