-
Notifications
You must be signed in to change notification settings - Fork 5.7k
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
Implemented min in paddle.tensor #17680
Conversation
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.
Hi,
Can you remove the changes from the .idea files.
Also you have to add a test for the function that you've added. You can go through our docs here to get an idea how you would do that.
Thanks
5e8c40f
to
d386d83
Compare
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.
Hi,
The changes in the .idea folder are still there. Can you remove those.
I think you've added the min function twice by accident, can you remove one implementation.'
Thanks
7b750cd
to
4e8f544
Compare
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.
minor changes,
other than that works fine
Thanks
init_tree="paddle.to_tensor", | ||
method_name="min", | ||
dtype_x_axis=helpers.dtype_values_axis( | ||
available_dtypes=st.one_of(helpers.get_dtypes("float", "integer")), |
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.
You can add helpers.get_dtypes("numeric")
instead
@@ -355,3 +355,10 @@ def max(self, axis=None, keepdim=False, name=None): | |||
@with_unsupported_dtypes({"2.5.0 and below": ("float16", "bfloat16")}, "paddle") | |||
def deg2rad(self, name=None): | |||
return ivy.deg2rad(self._ivy_array) | |||
|
|||
@with_supported_dtypes( | |||
{"2.5.0 and below": ("float16", "float32", "float64", "int32", "int64")}, |
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.
float16
is not supported for this
"paddle", | ||
) | ||
def min(self, axis=None, keepdim=False, name=None): | ||
return ivy.min(self._ivy_array, axis=axis, keepdim=keepdim) |
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.
ivy.min
takes keepdims
with the "s".
d6ef5dc
to
edb7640
Compare
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.
minor change
{"2.5.0 and below": ("float32", "float64", "int32", "int64")}, | ||
"paddle", | ||
) | ||
def min(self, axis=None, keepdims=False, name=None): |
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.
Its still keepdim
for paddle's min
function.
only ivy's function has keepdims
985375c
to
2f1bf55
Compare
ivy-gardener |
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.
lgtm!
Can you resolves the conflicts, I'll merge it as soon as you do. Also feel free to ask for a review when you're done making changes. 😄
Thanks
42997f2
to
d8389d0
Compare
Hello, I have resolved the conflicts. Please review my PR. |
ivy-gardener |
Co-authored-by: sherry30 <sherrytst30@gmail.com>
Fixes #17679