-
Notifications
You must be signed in to change notification settings - Fork 4
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 empty
, empty_like
, arange
, and linspace
#72
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.
Do the tests now pass in the Array API for these functions?
Yes! Here's the diff: --- a/ci/Finch-array-api-xfails.txt
+++ b/ci/Finch-array-api-xfails.txt
@@ -72,10 +72,6 @@ array_api_tests/test_signatures.py::test_array_method_signature[__setitem__]
# test_creation_functions
# not implemented
-array_api_tests/test_creation_functions.py::test_arange
-array_api_tests/test_creation_functions.py::test_empty
-array_api_tests/test_creation_functions.py::test_empty_like
-array_api_tests/test_creation_functions.py::test_linspace
array_api_tests/test_creation_functions.py::test_meshgrid
# test_array_object |
From the CI failures, looks like we need a NumPy 2.0 compat PR. 🤔 |
99e8162
to
d61c579
Compare
d61c579
to
0bfed32
Compare
It was a typo in the test change. Rebased. |
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #72 +/- ##
==========================================
+ Coverage 89.73% 89.86% +0.13%
==========================================
Files 9 9
Lines 828 839 +11
==========================================
+ Hits 743 754 +11
Misses 85 85 ☔ View full report in Codecov by Sentry. |
Hi @hameerabbasi,
This is the last PR with the creation functions.
empty
andempty_like
are implemented the same way as in Numba backend.arange
andlinspase
are strictly dense functions therefore I decided to use NumPy functions and pass results to Tensor (no-copy operation).