numba / numba

NumPy aware dynamic Python compiler using LLVM

Home Page:https://numba.pydata.org/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

support __call__ in jitclass

nbecker opened this issue · comments

Add support for __call__ in jitclass. Doesn't seem to be available in numba-0.59.0

Overloading of __call__ is widely used. Two important use cases are:

  1. Functions which have state are conveniently represented as classes.
  2. Existing python code e.g., scipy root-finding, expect to call a function. Using a class which overloads __call__ is a convenient way to provide parameters to this function.

@nbecker I think the formatting is a bit broken for this feature request, can you fix it up please? Thanks!