- Notifications
You must be signed in to change notification settings - Fork0
Implements ArrayAPI#17
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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.
Already on GitHub?Sign in to your account
Uh oh!
There was an error while loading.Please reload this page.
Merged
Changes fromall commits
Commits
Show all changes
27 commits Select commitHold shift + click to select a range
945749c
rename ArrayApi into BaseArrayApi
xadupre38c3c0e
Implements ArrayAPI
xadupre178185f
Merge branch 'main' of https://github.com/sdpython/onnx-array-api int…
xadupref0d4eba
documentation
xadupre0ffa4b4
ci
xadupre293c570
fix ci
xaduprecaf2324
xi
xadupre768eb85
ci
xadupre692774e
ci
xadupre5c7dae1
ci
xadupre1a1cd35
ci
xadupreda3a7c8
many changes to follow the Array API
xaduprec600890
more changes
xadupre535cc4a
fix unit test
xadupre5a07911
fix ci
xadupre3481d27
ci
xadupre1990fe8
api
xadupree0ca8c4
ci
xadupre1e218b5
improvments
xadupree344011
refactorign
xadupre178e3e9
fix asarray
xadupre550d0dc
new udpates
sdpython0169b85
fix two bugs
xaduprecb11e55
Add one unit test for empty input
xaduprecaa99a7
fix all when shape is empty and has one dimension
xadupre8945d16
fix missing return
xadupre7a979a2
remove the full tests
xadupreFile filter
Filter by extension
Conversations
Failed to load comments.
Loading
Uh oh!
There was an error while loading.Please reload this page.
Jump to
Jump to file
Failed to load files.
Loading
Uh oh!
There was an error while loading.Please reload this page.
Diff view
Diff view
There are no files selected for viewing
3 changes: 2 additions & 1 deletionCHANGELOGS.rst
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -4,4 +4,5 @@ Change Logs | ||
0.2.0 | ||
+++++ | ||
* :pr:`17`: implements ArrayAPI | ||
* :pr:`3`: fixes Array API with onnxruntime and scikit-learn |
7 changes: 7 additions & 0 deletions_doc/api/array_api.rst
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
onnx_array_api.array_api | ||
======================== | ||
.. toctree:: | ||
array_api_onnx_numpy | ||
array_api_onnx_ort |
5 changes: 5 additions & 0 deletions_doc/api/array_api_numpy.rst
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
onnx_array_api.array_api.onnx_numpy | ||
============================================= | ||
.. automodule:: onnx_array_api.array_api.onnx_numpy | ||
:members: |
5 changes: 5 additions & 0 deletions_doc/api/array_api_ort.rst
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
onnx_array_api.array_api.onnx_ort | ||
================================= | ||
.. automodule:: onnx_array_api.array_api.onnx_ort | ||
:members: |
1 change: 1 addition & 0 deletions_doc/api/index.rst
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -6,6 +6,7 @@ API | ||
.. toctree:: | ||
:maxdepth: 1 | ||
array_api | ||
npx_functions | ||
npx_var | ||
npx_jit | ||
29 changes: 27 additions & 2 deletions_doc/api/npx_annot.rst
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.Learn more about bidirectional Unicode characters
2 changes: 2 additions & 0 deletions_unittests/test_array_api.sh
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
export ARRAY_API_TESTS_MODULE=onnx_array_api.array_api.onnx_numpy | ||
pytest ../array-api-tests/array_api_tests/test_creation_functions.py::test_zeros |
20 changes: 20 additions & 0 deletions_unittests/ut_array_api/test_onnx_numpy.py
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
import unittest | ||
import numpy as np | ||
from onnx_array_api.ext_test_case import ExtTestCase | ||
from onnx_array_api.array_api import onnx_numpy as xp | ||
from onnx_array_api.npx.npx_numpy_tensors import EagerNumpyTensor | ||
class TestOnnxNumpy(ExtTestCase): | ||
def test_abs(self): | ||
c = EagerNumpyTensor(np.array([4, 5], dtype=np.int64)) | ||
mat = xp.zeros(c, dtype=xp.int64) | ||
matnp = mat.numpy() | ||
self.assertEqual(matnp.shape, (4, 5)) | ||
self.assertNotEmpty(matnp[0, 0]) | ||
a = xp.absolute(mat) | ||
self.assertEqualArray(np.absolute(mat.numpy()), a.numpy()) | ||
if __name__ == "__main__": | ||
unittest.main(verbosity=2) |
93 changes: 88 additions & 5 deletions_unittests/ut_npx/test_npx.py
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.Learn more about bidirectional Unicode characters
5 changes: 4 additions & 1 deletion_unittests/ut_npx/test_sklearn_array_api.py
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.Learn more about bidirectional Unicode characters
Oops, something went wrong.
Uh oh!
There was an error while loading.Please reload this page.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.