python-blosc2
python-blosc2 copied to clipboard
Array API compliance
The following is a summary of the failing tests in the array-api-tests suite. When you have managed to make the test pass, mark the box next to the file.
There are three main groups of tests: 1 - lazy expression and chunking related things (unique_counts, cumulative_sum etc.) 2 - indexing related things (chiefly implement fancy indexing for .slice method) 3 - improving numexpr (add op_codes such as ge_bcd etc.)
- [ ]
test_utility_functions.py: addblosc2.difffunction,squeezeneeds to be modified to return a view (at C-level, follow expand_dims) - [ ]
test_statistical_functions.py: addcumulative_sumandcumulative_prod - [ ]
test_special_cases.py: everything - [ ]
test_sorting_functions.py: addargsort - [ ]
test_signatures.py: everything - [ ]
test_set_functions.py: addunique_counts,unique_inverse,unique_all,unique_values - [ ]
test_searching_functions.py: addargmax,argmin,whereattribute toNDArray,nonzero,count_nonzero - [ ]
test_operators_and_elementwise_functions.py: everything - [ ]
test_manipulation_functions.py: SERIOUS (Fatal Python error: Floating-point exception) - [ ]
test_linalg.py: haven't implemented most things (see #476), which is fine, but some tests also fail because numexpr needs a ge_bcd opcode. - [x] ~
test_inspection_functions: passes all~ - [ ]
test_indexing_functions.py: need to improvetakeandtake_along_axis(latter fails tests) - [ ]
test_has_names: fails 23 tests, need to add functions listed in comment below - [ ]
test_fft.py: skips all tests - [ ]
test_data_type_functions.py: a few different things (11 tests), addbroadcast_arrays - [ ]
test_creation_functions.py: addreshapefor N-D arrays. - [x] ~
test_constants.py: passes all~ - [ ]
test_array_object.py: one test takes too long for some reason sometimes
In order to run the tests, follow these steps:
- Git clone array-api test suite https://github.com/data-apis/array-api-tests
- Navigate to array-api-tests and
$ pip install -r requirements.txtinto environment. - Return to home directory, git clone blosc2, navigate to resulting directory and
pip install -e .in your environment. - Run tests from python-blosc2 directory via
ARRAY_API_TESTS_MODULE=blosc2 pytest ../array-api-tests/array_api_tests/test_has_names.py
Seems like the remaining functions we need are:
- [ ]
tril - [ ]
triu - [ ]
flip - [ ]
repeat - [ ]
roll - [ ]
tile - [ ]
argmax/argmin - [ ]
searchsorted - [ ]
cumulative_sum/cumulative_prod - [ ]
argsort - [ ]
diff - [ ]
unique_counts/unique_inverse/unique_values/unique_all - [ ]
broadcast_arrays - [ ]
moveaxis - [ ]
unstack - [ ]
from_dlpack/__dlpack__/__dlpack_device__