-
-
Notifications
You must be signed in to change notification settings - Fork 2.2k
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
__call__ explained with example #5390
base: main
Are you sure you want to change the base?
Conversation
Hello @hiren-2911! Thanks for updating this PR. We checked the lines you've touched for PEP 8 issues, and found:
Comment last updated at 2021-05-20 07:34:17 UTC |
Hello @hiren-2911, Thank you for your interest in the library! It looks like the description you've added is copied-pasted from popular Python courses. It's generic, not specific to geometric transformations. What is your intention with this contribution? To include examples in a docstring, please refer these docs for the syntax to use. Thanks again, |
I am really sorry for my previous commits, I am contributing to open source for the first time and I was totally unaware. |
Hello @hiren-2911, |
Perhaps the class comment could say:
|
skimage/transform/_geometric.py
Outdated
[7 8 9]]. | ||
|
||
A=ProjectiveTransform(matrix) #instance created. | ||
B=A(coords) #calling instance A as a function |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
B=A(coords) #calling instance A as a function | |
>>> B = A(coords) # calling instance A as a function | |
>>> print(B) |
can you provide the output of B?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Unresolving conversation because I don't see the output of B anywhere...
Co-authored-by: Mark Harfouche <mark.harfouche@gmail.com>
Co-authored-by: Mark Harfouche <mark.harfouche@gmail.com>
Co-authored-by: Mark Harfouche <mark.harfouche@gmail.com>
to behave like functions. The user can call | ||
these instances like functions. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
to behave like functions. The user can call | |
these instances like functions. | |
to behave like a function. |
Formatting-wise, I don't think lines need to be that short. Content-wise, have you seen the comments by @alexdesiqueira and @mjmdavis?
... [7, 8, 9]] | ||
|
||
>>> A = ProjectiveTransform(matrix) # instance created. | ||
>>> B = A(coords) # calling instance A as a function |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
>>> B = A(coords) # calling instance A as a function | |
>>> B = A(coords) # call instance A as a function |
... [4, 5, 6], | ||
... [7, 8, 9]] | ||
|
||
>>> A = ProjectiveTransform(matrix) # instance created. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
>>> A = ProjectiveTransform(matrix) # instance created. | |
>>> A = ProjectiveTransform(matrix) # create instance |
(for the sake of consistency)
>>> A = ProjectiveTransform(matrix) # instance created. | ||
>>> B = A(coords) # calling instance A as a function | ||
>>> print(B) | ||
with "coords" as argument. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What is this line doing out here?
Hey @hiren-2911, thank you for the contribution so far! Do you intend to and are you able to continue working on this? |
Yeah sure, I will be happy to contribute.
Regards,
Hiren Vaghela
…On Fri, 10 Mar 2023 at 3:30 PM, Lars Grüter ***@***.***> wrote:
Hey @hiren-2911 <https://github.com/hiren-2911>, thank you for the
contribution so far! Do you intend to and are you able to continue working
on this?
—
Reply to this email directly, view it on GitHub
<#5390 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AOAQIUE2POB7J665VCX3YTTW3L3S7ANCNFSM44YTOXNA>
.
You are receiving this because you were mentioned.Message ID:
***@***.***>
|
Additionally, it doesn't look like the docstring of methods such as |
Description
Checklist
./doc/examples
(new features only)./benchmarks
, if your changes aren't covered by anexisting benchmark
For reviewers
later.
__init__.py
.doc/release/release_dev.rst
.