-
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
Add standard_t
function to numpy frontend
#21549
Changes from 5 commits
717ac8c
4528b4c
9c6e534
4bd46e0
0b0989a
1cbb8f6
bc6942c
ae58f52
3e0c5c2
5b53f80
1689679
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -410,6 +410,40 @@ def test_numpy_standard_gamma( | |
) | ||
|
||
|
||
@handle_frontend_test( | ||
fn_tree="numpy.random.standard_t", | ||
df=st.floats(min_value=1, max_value=20), | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @aparajith21 The tests failed when There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Alright, thanks for the contribution! LGTM now then. Sorry for the late review, really busy personally. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Please request review again once you resolve merge conflicts, and will then merge it There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @aparajith21 No problem at all. Have resolved the merge conflict but now some tests fail on the There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. No issues, sorry for the late review, believe it's not directly related to your PR, will go ahead and merge, thanks! |
||
df_dtypes=helpers.get_dtypes("integer", full=False), | ||
size=st.tuples( | ||
st.integers(min_value=2, max_value=5), st.integers(min_value=2, max_value=5) | ||
), | ||
size_dtypes=helpers.get_dtypes("integer", full=False), | ||
test_with_out=st.just(False), | ||
) | ||
def test_numpy_standard_t( | ||
df, | ||
df_dtypes, | ||
size, | ||
size_dtypes, | ||
frontend, | ||
test_flags, | ||
fn_tree, | ||
backend_fw, | ||
on_device, | ||
): | ||
helpers.test_frontend_function( | ||
input_dtypes=df_dtypes + size_dtypes, | ||
backend_to_test=backend_fw, | ||
test_flags=test_flags, | ||
frontend=frontend, | ||
fn_tree=fn_tree, | ||
on_device=on_device, | ||
test_values=False, | ||
df=df, | ||
size=size, | ||
) | ||
|
||
|
||
# binomial | ||
@handle_frontend_test( | ||
fn_tree="numpy.random.binomial", | ||
|
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.
Should I be using the division function implemented in ivy here (
ivy.divide
)? I tried to do that but the gamma function fails because it expects to haveintegers
orfloats
as inputs rather thanivy.arrays
.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.
Gamma accepts both
Array
andNativeArray
so this shouldn't be an issueThere 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.
When I run the tests locally with
ivy.divide
I get an error saying: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.
Error on the CI seems to be somewhat different anbd suggest input issues. Please check the same and request a review once done
https://github.com/unifyai/ivy/actions/runs/5811559595/job/15755368193?pr=21549#step:3:543