Skip to content
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

Merged
merged 1 commit into from
Jun 17, 2024
Merged

Conversation

mtsokol
Copy link
Collaborator

@mtsokol mtsokol commented Jun 17, 2024

Hi @hameerabbasi,

This is the last PR with the creation functions. empty and empty_like are implemented the same way as in Numba backend. arange and linspase are strictly dense functions therefore I decided to use NumPy functions and pass results to Tensor (no-copy operation).

@mtsokol mtsokol added the enhancement New feature or request label Jun 17, 2024
@mtsokol mtsokol self-assigned this Jun 17, 2024
Copy link
Collaborator

@hameerabbasi hameerabbasi left a 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?

@mtsokol
Copy link
Collaborator Author

mtsokol commented Jun 17, 2024

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

@hameerabbasi
Copy link
Collaborator

From the CI failures, looks like we need a NumPy 2.0 compat PR. 🤔

@mtsokol
Copy link
Collaborator Author

mtsokol commented Jun 17, 2024

It was a typo in the test change. Rebased.

@codecov-commenter
Copy link

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 89.86%. Comparing base (aa2f8fb) to head (d61c579).

Current head d61c579 differs from pull request most recent head 0bfed32

Please upload reports for the commit 0bfed32 to get more accurate results.

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.
📢 Have feedback on the report? Share it here.

@mtsokol mtsokol merged commit 5f9a222 into main Jun 17, 2024
5 checks passed
@mtsokol mtsokol deleted the last-creation-funcs branch June 17, 2024 12:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants