File tree 3 files changed +11
-9
lines changed
3 files changed +11
-9
lines changed Original file line number Diff line number Diff line change @@ -346,6 +346,10 @@ def result_type(*dtypes: DataType):
346
346
"boolean" : (xp .bool ,),
347
347
"integer" : all_int_dtypes ,
348
348
"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 ,
349
353
"numeric" : numeric_dtypes ,
350
354
"integer or boolean" : bool_and_all_int_dtypes ,
351
355
}
@@ -358,8 +362,6 @@ def result_type(*dtypes: DataType):
358
362
dtype_category = "floating-point"
359
363
dtypes = category_to_dtypes [dtype_category ]
360
364
func_in_dtypes [name ] = dtypes
361
- # See https://github.com/data-apis/array-api/pull/413
362
- func_in_dtypes ["expm1" ] = real_float_dtypes
363
365
364
366
365
367
func_returns_bool = {
Original file line number Diff line number Diff line change 16
16
]
17
17
18
18
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"
20
20
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 "
22
22
assert sigs_dir .exists ()
23
23
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
27
27
28
28
name_to_mod : Dict [str , ModuleType ] = {}
29
29
for path in sigs_dir .glob ("*.py" ):
30
30
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 } " )
32
32
33
33
array = name_to_mod ["array_object" ].array
34
34
array_methods = [
You can’t perform that action at this time.
0 commit comments