Skip to content

Add numba dispatch for sort and argsort #1151

Open
@jessegrabowski

Description

@jessegrabowski

Description

import pytensor.tensor as pt
import pytensor

x = pt.dvector('x')
y = pt.sort(x)

f = pytensor.function([x], y, mode='NUMBA')

We can support this graph when sort = "quicksort", so we should. Numba does not support the kind argument for np.sort. For argsort, the kind argument is support for quicksort and mergesort, so we can support those.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions