-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
refactor: organize submodules and tests by spec.
- Loading branch information
Showing
19 changed files
with
288 additions
and
62 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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
This file contains 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,13 @@ | ||
# BSD 3-Clause License; see https://github.com/scikit-hep/ragged/blob/main/LICENSE | ||
|
||
""" | ||
https://data-apis.org/array-api/latest/API_specification/array_object.html | ||
""" | ||
|
||
from __future__ import annotations | ||
|
||
import ragged | ||
|
||
|
||
def test_existence(): | ||
assert ragged.array is not None |
This file contains 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,11 @@ | ||
# BSD 3-Clause License; see https://github.com/scikit-hep/ragged/blob/main/LICENSE | ||
|
||
""" | ||
https://data-apis.org/array-api/latest/API_specification/broadcasting.html | ||
""" | ||
|
||
from __future__ import annotations | ||
|
||
|
||
def test(): | ||
pass |
This file contains 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 @@ | ||
# BSD 3-Clause License; see https://github.com/scikit-hep/ragged/blob/main/LICENSE | ||
|
||
""" | ||
https://data-apis.org/array-api/latest/API_specification/constants.html | ||
""" | ||
|
||
from __future__ import annotations | ||
|
||
import math | ||
|
||
import ragged | ||
|
||
|
||
def test_values(): | ||
assert ragged.e == math.e | ||
assert not math.isfinite(ragged.inf) | ||
assert ragged.inf > 0 | ||
assert math.isnan(ragged.nan) | ||
assert ragged.newaxis is None | ||
assert ragged.pi == math.pi |
This file contains 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,28 @@ | ||
# BSD 3-Clause License; see https://github.com/scikit-hep/ragged/blob/main/LICENSE | ||
|
||
""" | ||
https://data-apis.org/array-api/latest/API_specification/creation_functions.html | ||
""" | ||
|
||
from __future__ import annotations | ||
|
||
import ragged | ||
|
||
|
||
def test_existence(): | ||
assert ragged.arange is not None | ||
assert ragged.asarray is not None | ||
assert ragged.empty is not None | ||
assert ragged.empty_like is not None | ||
assert ragged.eye is not None | ||
assert ragged.from_dlpack is not None | ||
assert ragged.full is not None | ||
assert ragged.full_like is not None | ||
assert ragged.linspace is not None | ||
assert ragged.meshgrid is not None | ||
assert ragged.ones is not None | ||
assert ragged.ones_like is not None | ||
assert ragged.tril is not None | ||
assert ragged.triu is not None | ||
assert ragged.zeros is not None | ||
assert ragged.zeros_like is not None |
This file contains 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,18 @@ | ||
# BSD 3-Clause License; see https://github.com/scikit-hep/ragged/blob/main/LICENSE | ||
|
||
""" | ||
https://data-apis.org/array-api/latest/API_specification/data_type_functions.html | ||
""" | ||
|
||
from __future__ import annotations | ||
|
||
import ragged | ||
|
||
|
||
def test_existence(): | ||
assert ragged.astype is not None | ||
assert ragged.can_cast is not None | ||
assert ragged.finfo is not None | ||
assert ragged.iinfo is not None | ||
assert ragged.isdtype is not None | ||
assert ragged.result_type is not None |
This file contains 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
This file contains 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,11 @@ | ||
# BSD 3-Clause License; see https://github.com/scikit-hep/ragged/blob/main/LICENSE | ||
|
||
""" | ||
https://data-apis.org/array-api/latest/API_specification/indexing.html | ||
""" | ||
|
||
from __future__ import annotations | ||
|
||
|
||
def test(): | ||
pass |
This file contains 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,13 @@ | ||
# BSD 3-Clause License; see https://github.com/scikit-hep/ragged/blob/main/LICENSE | ||
|
||
""" | ||
https://data-apis.org/array-api/latest/API_specification/indexing_functions.html | ||
""" | ||
|
||
from __future__ import annotations | ||
|
||
import ragged | ||
|
||
|
||
def test_existence(): | ||
assert ragged.take is not None |
This file contains 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,16 @@ | ||
# BSD 3-Clause License; see https://github.com/scikit-hep/ragged/blob/main/LICENSE | ||
|
||
""" | ||
https://data-apis.org/array-api/latest/API_specification/linear_algebra_functions.html | ||
""" | ||
|
||
from __future__ import annotations | ||
|
||
import ragged | ||
|
||
|
||
def test_existence(): | ||
assert ragged.matmul is not None | ||
assert ragged.matrix_transpose is not None | ||
assert ragged.tensordot is not None | ||
assert ragged.vecdot is not None |
This file contains 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,22 @@ | ||
# BSD 3-Clause License; see https://github.com/scikit-hep/ragged/blob/main/LICENSE | ||
|
||
""" | ||
https://data-apis.org/array-api/latest/API_specification/manipulation_functions.html | ||
""" | ||
|
||
from __future__ import annotations | ||
|
||
import ragged | ||
|
||
|
||
def test_existence(): | ||
assert ragged.broadcast_arrays is not None | ||
assert ragged.broadcast_to is not None | ||
assert ragged.concat is not None | ||
assert ragged.expand_dims is not None | ||
assert ragged.flip is not None | ||
assert ragged.permute_dims is not None | ||
assert ragged.reshape is not None | ||
assert ragged.roll is not None | ||
assert ragged.squeeze is not None | ||
assert ragged.stack is not None |
This file contains 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,16 @@ | ||
# BSD 3-Clause License; see https://github.com/scikit-hep/ragged/blob/main/LICENSE | ||
|
||
""" | ||
https://data-apis.org/array-api/latest/API_specification/searching_functions.html | ||
""" | ||
|
||
from __future__ import annotations | ||
|
||
import ragged | ||
|
||
|
||
def test_existence(): | ||
assert ragged.argmax is not None | ||
assert ragged.argmin is not None | ||
assert ragged.nonzero is not None | ||
assert ragged.where is not None |
This file contains 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,16 @@ | ||
# BSD 3-Clause License; see https://github.com/scikit-hep/ragged/blob/main/LICENSE | ||
|
||
""" | ||
https://data-apis.org/array-api/latest/API_specification/set_functions.html | ||
""" | ||
|
||
from __future__ import annotations | ||
|
||
import ragged | ||
|
||
|
||
def test_existence(): | ||
assert ragged.unique_all is not None | ||
assert ragged.unique_counts is not None | ||
assert ragged.unique_inverse is not None | ||
assert ragged.unique_values is not None |
This file contains 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,14 @@ | ||
# BSD 3-Clause License; see https://github.com/scikit-hep/ragged/blob/main/LICENSE | ||
|
||
""" | ||
https://data-apis.org/array-api/latest/API_specification/sorting_functions.html | ||
""" | ||
|
||
from __future__ import annotations | ||
|
||
import ragged | ||
|
||
|
||
def test_existence(): | ||
assert ragged.argsort is not None | ||
assert ragged.sort is not None |
This file contains 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,19 @@ | ||
# BSD 3-Clause License; see https://github.com/scikit-hep/ragged/blob/main/LICENSE | ||
|
||
""" | ||
https://data-apis.org/array-api/latest/API_specification/statistical_functions.html | ||
""" | ||
|
||
from __future__ import annotations | ||
|
||
import ragged | ||
|
||
|
||
def test_existence(): | ||
assert ragged.max is not None | ||
assert ragged.mean is not None | ||
assert ragged.min is not None | ||
assert ragged.prod is not None | ||
assert ragged.std is not None | ||
assert ragged.sum is not None | ||
assert ragged.var is not None |
This file contains 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,14 @@ | ||
# BSD 3-Clause License; see https://github.com/scikit-hep/ragged/blob/main/LICENSE | ||
|
||
""" | ||
https://data-apis.org/array-api/latest/API_specification/utility_functions.html | ||
""" | ||
|
||
from __future__ import annotations | ||
|
||
import ragged | ||
|
||
|
||
def test_existence(): | ||
assert ragged.all is not None | ||
assert ragged.any is not None |
This file contains 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,15 @@ | ||
# BSD 3-Clause License; see https://github.com/scikit-hep/ragged/blob/main/LICENSE | ||
|
||
""" | ||
https://data-apis.org/array-api/latest/API_specification/version.html | ||
""" | ||
|
||
from __future__ import annotations | ||
|
||
import ragged | ||
|
||
|
||
def test_values(): | ||
assert ragged.v202212.__array_api_version__ == "2022.12" | ||
|
||
assert ragged.__array_api_version__ == "2022.12" |
Oops, something went wrong.