Skip to content

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 our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 27 commits into from
Jun 10, 2023
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
fix missing return
  • Loading branch information
xadupre committed Jun 10, 2023
commit 8945d16f3189c39e3e34d720e778c037fd1a23e7
3 changes: 3 additions & 0 deletions _unittests/ut_array_api/test_onnx_numpy.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,9 @@ 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())

Expand Down
12 changes: 6 additions & 6 deletions azure-pipelines.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ jobs:
python -m pip install . -v -v -v
displayName: 'install wheel'
- script: |
python -m pytest -v
python -m pytest
displayName: 'Runs Unit Tests'
- task: PublishPipelineArtifact@0
inputs:
Expand Down Expand Up @@ -87,7 +87,7 @@ jobs:
black --diff .
displayName: 'Black'
- script: |
python -m pytest -v
python -m pytest
displayName: 'Runs Unit Tests'

- job: 'TestLinuxArrayApi'
Expand Down Expand Up @@ -129,7 +129,7 @@ jobs:
- script: |
export ARRAY_API_TESTS_MODULE=onnx_array_api.array_api.onnx_numpy
cd array-api-tests
python -m pytest -xv array_api_tests/test_creation_functions.py::test_zeros
python -m pytest -x array_api_tests/test_creation_functions.py::test_zeros
displayName: "test_creation_functions.py::test_zeros"
- script: |
export ARRAY_API_TESTS_MODULE=onnx_array_api.array_api.onnx_numpy
Expand Down Expand Up @@ -177,7 +177,7 @@ jobs:
black --diff .
displayName: 'Black'
- script: |
python -m pytest -v
python -m pytest
displayName: 'Runs Unit Tests'
- script: |
python -u setup.py bdist_wheel
Expand Down Expand Up @@ -213,7 +213,7 @@ jobs:
- script: pip install onnxmltools --no-deps
displayName: 'Install onnxmltools'
- script: |
python -m pytest -v
python -m pytest
displayName: 'Runs Unit Tests'
- script: |
python -u setup.py bdist_wheel
Expand Down Expand Up @@ -263,7 +263,7 @@ jobs:
- script: pip install onnxmltools --no-deps
displayName: 'Install onnxmltools'
- script: |
python -m pytest -v -v
python -m pytest
displayName: 'Runs Unit Tests'
- script: |
python -u setup.py bdist_wheel
Expand Down
1 change: 1 addition & 0 deletions onnx_array_api/npx/npx_numpy_tensors_ops.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ def _process(value):
),
):
raise TypeError(f"value must be a real not {type(cst)}")
return cst

def _run(self, data, value=None):
cst = self._process(value)
Expand Down
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy