Skip to content

Implement the side keyword argument as in numpy #1

Open
@baldassarreFe

Description

@baldassarreFe

The Numpy version of searchsorted takes an additional parameter to specify the semantic of the returned index:

side returned index i satisfies
left a[i-1] < v <= a[i]
right a[i-1] <= v < a[i]

The current implementation of searchsorted for Pytorch follows the left behavior, is it possible to implement the right version to allow ordering from the right?

Metadata

Metadata

Assignees

Labels

No labels
No labels

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions