-
Notifications
You must be signed in to change notification settings - Fork 1.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Jitclass: support for __call__ etc #1606
Comments
Also multiple inheritance would be great. @sklam that probably deserves its own issue? |
I would also add the operators |
@moble ok thanks. I was also thinking of ways for easy code reuse and lightweight abstractions- how about abstract base classes and or user defined protocols/magic methods? (similar to traits). |
I want to re-iterate that overloading of math operators like How difficult would this be to implement? I'm happy to help if I can. |
It gets really tricky to match the exact python semantic due to the |
Does that mean JIT class support will stay as is? If not, what are the long term plans? |
I have plans to expand the JIT class support. Few months ago, I was working on various jitclass features but I was slowed down by many tricky details. Some of these details, like the operating overloading, can be implemented but with great cost in code complexity. I think it is partially due to the technical debts in the internals of numba. So, I am taking a pause in pushing new features for jitclasses and trying to clean things up a bit. |
Is this closed by #1851, as suggested by one of the improvements listed in the release notes for version 0.26.0? |
Wondering if there's any plans on reviving this? There's a few tricky magic methods, but would be very nice to at least have the 'easy' ones like |
Another nice one to have would be len. Great to see getitem and setitem work tho! |
|
|
One other super-annoying thing is copy and deepcopy. Since jitclasses are nearly always leaf nodes in deepcopy, would it not make it possible to define copy and deepcopy methods to make it possible to deepcopy lists with numba objects in them? |
does #5877 implement |
Whoops, it does not. I'll reopen this to keep track of that. |
Despite #1571 (comment), would it be possible for
jitclass
to support special methods such as__call__
__getitem__
,__setitem__
__repr__
,__str__
__iter__
and others?
__call__
would be especially useful since it will allow the instance to look like a jitted function that can be passed to another jitted function as an argument. See also https://groups.google.com/a/continuum.io/forum/#!topic/numba-users/YE12tE2dIwY.The text was updated successfully, but these errors were encountered: