-
Notifications
You must be signed in to change notification settings - Fork 65
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
Discussion: methods vs. function in R and Python #83
Comments
IMHO we should closely follow python here. Ie if a method exists in Python it should also exist in R.
|
Oh, I completely agree! Perfect. Yes, then it'd be nice to have a Why I thought there was no
(but tbh I didn't investigate) |
I think in this case, |
oh, right - it really does not exist (in Python) :-) Closing this and opening a separate one for |
Currently, with tensor modification, our strategy seems to be:
torch_
) only when a fresh object is returnedx$what()
) only when the existing object is modifiede.g.
tx$view()
buttorch_reshape
I assume this is why I don't see an
x$clone()
(also I notice we have
x$t_()
but notx$t()
)But, a person coming from Python might expect
$
access to work independently of whether there are side effects or not (there is anx.clone()
, etc.)Not saying we have to follow this ... but partly we do: For example, there is
x$mm
as well asx$mm_
in R ...What do you think?
The text was updated successfully, but these errors were encountered: