Skip to content

Commit 1de9a02

Browse files
committed
Update to most recent array-api commit
1 parent dc3517f commit 1de9a02

File tree

3 files changed

+11
-9
lines changed

3 files changed

+11
-9
lines changed

array-api

Submodule array-api updated 211 files

array_api_tests/dtype_helpers.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -346,6 +346,10 @@ def result_type(*dtypes: DataType):
346346
"boolean": (xp.bool,),
347347
"integer": all_int_dtypes,
348348
"floating-point": real_float_dtypes,
349+
"real-valued": real_float_dtypes,
350+
"real-valued floating-point": real_float_dtypes,
351+
"complex floating-point": complex_dtypes,
352+
"complex-floating point": complex_dtypes,
349353
"numeric": numeric_dtypes,
350354
"integer or boolean": bool_and_all_int_dtypes,
351355
}
@@ -358,8 +362,6 @@ def result_type(*dtypes: DataType):
358362
dtype_category = "floating-point"
359363
dtypes = category_to_dtypes[dtype_category]
360364
func_in_dtypes[name] = dtypes
361-
# See https://github.com/data-apis/array-api/pull/413
362-
func_in_dtypes["expm1"] = real_float_dtypes
363365

364366

365367
func_returns_bool = {

array_api_tests/stubs.py

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -16,19 +16,19 @@
1616
]
1717

1818

19-
spec_dir = Path(__file__).parent.parent / "array-api" / "spec" / "API_specification"
19+
spec_dir = Path(__file__).parent.parent / "array-api" / "spec" / "2022.12" / "API_specification"
2020
assert spec_dir.exists(), f"{spec_dir} not found - try `git submodule update --init`"
21-
sigs_dir = spec_dir / "signatures"
21+
sigs_dir = Path(__file__).parent.parent / "array-api" / "src" / "array_api_stubs" / "_2022_12"
2222
assert sigs_dir.exists()
2323

24-
spec_abs_path: str = str(spec_dir.resolve())
25-
sys.path.append(spec_abs_path)
26-
assert find_spec("signatures") is not None
24+
sigs_abs_path: str = str(sigs_dir.parent.parent.resolve())
25+
sys.path.append(sigs_abs_path)
26+
assert find_spec("array_api_stubs._2022_12") is not None
2727

2828
name_to_mod: Dict[str, ModuleType] = {}
2929
for path in sigs_dir.glob("*.py"):
3030
name = path.name.replace(".py", "")
31-
name_to_mod[name] = import_module(f"signatures.{name}")
31+
name_to_mod[name] = import_module(f"array_api_stubs._2022_12.{name}")
3232

3333
array = name_to_mod["array_object"].array
3434
array_methods = [

0 commit comments

Comments
 (0)
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