-
Notifications
You must be signed in to change notification settings - Fork 201
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
None
Default Arguments
#5
Comments
Hi, we don't currently provide a way of creating a "void"/"None" Tensor in our C++ extension API. Would it be enough for you to use something like Let me know whether this would be sufficient for you. |
Thanks! However, calling the function in Python with a
|
We don't have any conversion from None to a C++ type (it's questionable what it would convert to), but you can just omit the argument. I assume that's the default argument behavior you want? Or do you specifically want to pass None?
On Apr 26, 2018, at 18:58, Matthias Fey <notifications@github.com<mailto:notifications@github.com>> wrote:
Thanks! python setup.py install now works perfectly.
However, calling the function in Python with a None argument gives the following error message:
incompatible function arguments. The following argument types are supported:
1. (tensor1: at::Tensor, tensor2 = tensor([], dtype=torch.float64)) -> at::Tensor
Invoked with: tensor([2, 2]), None
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub<#5 (comment)>, or mute the thread<https://github.com/notifications/unsubscribe-auth/AGIcm7TFFmZu8AKHezCc4mRq3kdYVacvks5tsnskgaJpZM4TmVvM>.
|
Yeah, I see. Actually, I wanted to pass |
I will keep the possibility of |
@goldsborough how about we expose |
Yes that's a good idea, I'll do that |
@rusty1s you can now pass |
Hello and thanks for this great repository!
Can you give me a hint on how to implement default arguments? I tried the following so far but it does not work:
I would be very grateful for help.
The text was updated successfully, but these errors were encountered: