0s autopkgtest [16:51:49]: starting date and time: 2025-07-03 16:51:49+0000 0s autopkgtest [16:51:49]: git checkout: 508d4a25 a-v-ssh wait_for_ssh: demote "ssh connection failed" to a debug message 0s autopkgtest [16:51:49]: host juju-7f2275-prod-proposed-migration-environment-23; command line: /home/ubuntu/autopkgtest/runner/autopkgtest --output-dir /tmp/autopkgtest-work.k6hv9yta/out --timeout-copy=6000 --setup-commands /home/ubuntu/autopkgtest-cloud/worker-config-production/setup-canonical.sh --apt-pocket=proposed=src:python-anndata --apt-upgrade python-anndata --timeout-short=300 --timeout-copy=20000 --timeout-build=20000 '--env=ADT_TEST_TRIGGERS=python-anndata/0.12.0~rc1-1' -- ssh -s /home/ubuntu/autopkgtest/ssh-setup/nova -- --flavor autopkgtest-cpu2-ram4-disk20-amd64 --security-groups autopkgtest-juju-7f2275-prod-proposed-migration-environment-23@sto01-13.secgroup --name adt-questing-amd64-python-anndata-20250703-154234-juju-7f2275-prod-proposed-migration-environment-23-ca351508-c131-4127-b2a6-a6e71d629c8d --image adt/ubuntu-questing-amd64-server --keyname testbed-juju-7f2275-prod-proposed-migration-environment-23 --net-id=net_prod-autopkgtest-workers-amd64 -e TERM=linux --mirror=http://ftpmaster.internal/ubuntu/ 4s Creating nova instance adt-questing-amd64-python-anndata-20250703-154234-juju-7f2275-prod-proposed-migration-environment-23-ca351508-c131-4127-b2a6-a6e71d629c8d from image adt/ubuntu-questing-amd64-server-20250703.img (UUID a8c9fe9f-e571-4802-ba4c-154ce99a087c)... 57s autopkgtest [16:52:46]: testbed dpkg architecture: amd64 57s autopkgtest [16:52:46]: testbed apt version: 3.1.2 57s autopkgtest [16:52:46]: @@@@@@@@@@@@@@@@@@@@ test bed setup 58s autopkgtest [16:52:47]: testbed release detected to be: None 58s autopkgtest [16:52:47]: updating testbed package index (apt update) 58s Get:1 http://ftpmaster.internal/ubuntu questing-proposed InRelease [249 kB] 58s Hit:2 http://ftpmaster.internal/ubuntu questing InRelease 58s Hit:3 http://ftpmaster.internal/ubuntu questing-updates InRelease 59s Hit:4 http://ftpmaster.internal/ubuntu questing-security InRelease 59s Get:5 http://ftpmaster.internal/ubuntu questing-proposed/main Sources [27.4 kB] 59s Get:6 http://ftpmaster.internal/ubuntu questing-proposed/universe Sources [357 kB] 59s Get:7 http://ftpmaster.internal/ubuntu questing-proposed/multiverse Sources [16.8 kB] 59s Get:8 http://ftpmaster.internal/ubuntu questing-proposed/main i386 Packages [25.6 kB] 59s Get:9 http://ftpmaster.internal/ubuntu questing-proposed/main amd64 Packages [39.1 kB] 59s Get:10 http://ftpmaster.internal/ubuntu questing-proposed/universe i386 Packages [114 kB] 59s Get:11 http://ftpmaster.internal/ubuntu questing-proposed/universe amd64 Packages [257 kB] 59s Get:12 http://ftpmaster.internal/ubuntu questing-proposed/multiverse i386 Packages [10.1 kB] 59s Get:13 http://ftpmaster.internal/ubuntu questing-proposed/multiverse amd64 Packages [16.6 kB] 59s Fetched 1113 kB in 1s (1982 kB/s) 60s Reading package lists... 60s autopkgtest [16:52:49]: upgrading testbed (apt dist-upgrade and autopurge) 60s Reading package lists... 60s Building dependency tree... 60s Reading state information... 60s Calculating upgrade... 61s The following packages will be upgraded: 61s libdrm-amdgpu1 libdrm-common libdrm2 libpython3.13 libpython3.13-minimal 61s libpython3.13-stdlib python3.13 python3.13-gdbm python3.13-minimal 61s 9 upgraded, 0 newly installed, 0 to remove and 0 not upgraded. 61s Need to get 8523 kB of archives. 61s After this operation, 9216 B disk space will be freed. 61s Get:1 http://ftpmaster.internal/ubuntu questing/main amd64 python3.13 amd64 3.13.5-2 [745 kB] 61s Get:2 http://ftpmaster.internal/ubuntu questing/main amd64 python3.13-minimal amd64 3.13.5-2 [2373 kB] 61s Get:3 http://ftpmaster.internal/ubuntu questing/main amd64 libpython3.13 amd64 3.13.5-2 [2346 kB] 61s Get:4 http://ftpmaster.internal/ubuntu questing/main amd64 libpython3.13-stdlib amd64 3.13.5-2 [2069 kB] 61s Get:5 http://ftpmaster.internal/ubuntu questing/main amd64 libpython3.13-minimal amd64 3.13.5-2 [885 kB] 61s Get:6 http://ftpmaster.internal/ubuntu questing/main amd64 libdrm-common all 2.4.125-1 [9012 B] 61s Get:7 http://ftpmaster.internal/ubuntu questing/main amd64 libdrm2 amd64 2.4.125-1 [41.4 kB] 61s Get:8 http://ftpmaster.internal/ubuntu questing/main amd64 libdrm-amdgpu1 amd64 2.4.125-1 [21.6 kB] 61s Get:9 http://ftpmaster.internal/ubuntu questing/main amd64 python3.13-gdbm amd64 3.13.5-2 [32.3 kB] 61s Fetched 8523 kB in 1s (16.1 MB/s) 62s (Reading database ... (Reading database ... 5% (Reading database ... 10% (Reading database ... 15% (Reading database ... 20% (Reading database ... 25% (Reading database ... 30% (Reading database ... 35% (Reading database ... 40% (Reading database ... 45% (Reading database ... 50% (Reading database ... 55% (Reading database ... 60% (Reading database ... 65% (Reading database ... 70% (Reading database ... 75% (Reading database ... 80% (Reading database ... 85% (Reading database ... 90% (Reading database ... 95% (Reading database ... 100% (Reading database ... 120968 files and directories currently installed.) 62s Preparing to unpack .../0-python3.13_3.13.5-2_amd64.deb ... 62s Unpacking python3.13 (3.13.5-2) over (3.13.5-1) ... 62s Preparing to unpack .../1-python3.13-minimal_3.13.5-2_amd64.deb ... 62s Unpacking python3.13-minimal (3.13.5-2) over (3.13.5-1) ... 62s Preparing to unpack .../2-libpython3.13_3.13.5-2_amd64.deb ... 62s Unpacking libpython3.13:amd64 (3.13.5-2) over (3.13.5-1) ... 62s Preparing to unpack .../3-libpython3.13-stdlib_3.13.5-2_amd64.deb ... 62s Unpacking libpython3.13-stdlib:amd64 (3.13.5-2) over (3.13.5-1) ... 62s Preparing to unpack .../4-libpython3.13-minimal_3.13.5-2_amd64.deb ... 62s Unpacking libpython3.13-minimal:amd64 (3.13.5-2) over (3.13.5-1) ... 62s Preparing to unpack .../5-libdrm-common_2.4.125-1_all.deb ... 62s Unpacking libdrm-common (2.4.125-1) over (2.4.124-2) ... 62s Preparing to unpack .../6-libdrm2_2.4.125-1_amd64.deb ... 62s Unpacking libdrm2:amd64 (2.4.125-1) over (2.4.124-2) ... 62s Preparing to unpack .../7-libdrm-amdgpu1_2.4.125-1_amd64.deb ... 62s Unpacking libdrm-amdgpu1:amd64 (2.4.125-1) over (2.4.124-2) ... 62s Preparing to unpack .../8-python3.13-gdbm_3.13.5-2_amd64.deb ... 62s Unpacking python3.13-gdbm (3.13.5-2) over (3.13.5-1) ... 62s Setting up libpython3.13-minimal:amd64 (3.13.5-2) ... 62s Setting up python3.13-minimal (3.13.5-2) ... 63s Setting up libdrm-common (2.4.125-1) ... 63s Setting up libpython3.13-stdlib:amd64 (3.13.5-2) ... 63s Setting up python3.13-gdbm (3.13.5-2) ... 63s Setting up libpython3.13:amd64 (3.13.5-2) ... 63s Setting up python3.13 (3.13.5-2) ... 63s Setting up libdrm2:amd64 (2.4.125-1) ... 63s Setting up libdrm-amdgpu1:amd64 (2.4.125-1) ... 63s Processing triggers for systemd (257.6-1ubuntu1) ... 63s Processing triggers for man-db (2.13.1-1) ... 64s Processing triggers for libc-bin (2.41-6ubuntu2) ... 64s Reading package lists... 64s Building dependency tree... 64s Reading state information... 64s Solving dependencies... 65s 0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded. 67s autopkgtest [16:52:56]: testbed running kernel: Linux 6.15.0-3-generic #3-Ubuntu SMP PREEMPT_DYNAMIC Wed Jun 4 08:34:48 UTC 2025 67s autopkgtest [16:52:56]: @@@@@@@@@@@@@@@@@@@@ apt-source python-anndata 68s Get:1 http://ftpmaster.internal/ubuntu questing-proposed/universe python-anndata 0.12.0~rc1-1 (dsc) [3137 B] 68s Get:2 http://ftpmaster.internal/ubuntu questing-proposed/universe python-anndata 0.12.0~rc1-1 (tar) [575 kB] 68s Get:3 http://ftpmaster.internal/ubuntu questing-proposed/universe python-anndata 0.12.0~rc1-1 (diff) [6956 B] 68s gpgv: Signature made Wed Jul 2 21:48:07 2025 UTC 68s gpgv: using RSA key 8F6DE104377F3B11E741748731F3144544A1741A 68s gpgv: issuer "tchet@debian.org" 68s gpgv: Can't check signature: No public key 68s dpkg-source: warning: cannot verify inline signature for ./python-anndata_0.12.0~rc1-1.dsc: no acceptable signature found 68s autopkgtest [16:52:57]: testing package python-anndata version 0.12.0~rc1-1 68s autopkgtest [16:52:57]: build not needed 69s autopkgtest [16:52:58]: test run-unit-test: preparing testbed 69s Reading package lists... 69s Building dependency tree... 69s Reading state information... 69s Solving dependencies... 69s The following NEW packages will be installed: 69s blt diffstat docutils-common fontconfig-config fonts-dejavu-core 69s fonts-dejavu-mono fonts-lyx gettext libaec0 libblas3 libblosc1 libdeflate0 69s libfontconfig1 libgfortran5 libgomp1 libgraphite2-3 libharfbuzz0b 69s libhdf5-310 libhdf5-hl-310 libhwloc15 libimagequant0 libjbig0 libjpeg-turbo8 69s libjpeg8 libjs-jquery libjs-jquery-hotkeys libjs-jquery-isonscreen 69s libjs-jquery-metadata libjs-jquery-tablesorter 69s libjs-jquery-throttle-debounce libjs-jquery-ui libjs-sphinxdoc 69s libjs-underscore libjson-perl liblapack3 liblcms2-2 liblerc4 libllvm19 69s liblzf1 libopenjp2-7 libpfm4 libqhull-r8.0 libraqm0 libsharpyuv0 69s libsnappy1v5 libsz2 libtbb12 libtbbbind-2-5 libtbbmalloc2 libtcl8.6 libtiff6 69s libtk8.6 libwebp7 libwebpdemux2 libwebpmux3 libxft2 libxrender1 libxslt1.1 69s libxss1 llvm-19 llvm-19-linker-tools llvm-19-runtime 69s node-fortawesome-fontawesome-free python-matplotlib-data 69s python3-accessible-pygments python3-alabaster python3-all python3-anndata 69s python3-array-api-compat python3-awkward python3-boltons python3-brotli 69s python3-bs4 python3-click python3-cloudpickle python3-contourpy 69s python3-coverage python3-crc32c python3-cycler python3-dask 69s python3-decorator python3-defusedxml python3-distributed python3-docutils 69s python3-donfig python3-et-xmlfile python3-execnet python3-filelock 69s python3-fonttools python3-fs python3-fsspec python3-h5py python3-h5py-serial 69s python3-imagesize python3-iniconfig python3-joblib python3-kiwisolver 69s python3-llvmlite python3-locket python3-lxml python3-lz4 python3-matplotlib 69s python3-mpmath python3-msgpack python3-natsort python3-numba 69s python3-numcodecs python3-numpy python3-numpy-dev python3-openpyxl 69s python3-pandas python3-pandas-lib python3-partd python3-pil 69s python3-pil.imagetk python3-platformdirs python3-pluggy python3-psutil 69s python3-pydata-sphinx-theme python3-pytest python3-pytest-cov 69s python3-pytest-mock python3-pytest-xdist python3-pytz python3-roman 69s python3-scipy python3-sklearn python3-sklearn-lib python3-snowballstemmer 69s python3-sortedcontainers python3-soupsieve python3-sphinx 69s python3-sphinx-copybutton python3-sympy python3-tblib python3-threadpoolctl 69s python3-tk python3-toolz python3-tornado python3-ufolib2 python3-xarray 69s python3-xlrd python3-zarr python3-zict python3.13-tk quilt sgml-base 69s sphinx-common tk8.6-blt2.5 unicode-data x11-common xml-core 69s 0 upgraded, 152 newly installed, 0 to remove and 0 not upgraded. 69s Need to get 158 MB of archives. 69s After this operation, 730 MB of additional disk space will be used. 69s Get:1 http://ftpmaster.internal/ubuntu questing/main amd64 python3-numpy-dev amd64 1:2.2.4+ds-1ubuntu1 [147 kB] 69s Get:2 http://ftpmaster.internal/ubuntu questing/main amd64 libblas3 amd64 3.12.1-2build1 [262 kB] 69s Get:3 http://ftpmaster.internal/ubuntu questing/main amd64 libgfortran5 amd64 15.1.0-8ubuntu1 [940 kB] 69s Get:4 http://ftpmaster.internal/ubuntu questing/main amd64 liblapack3 amd64 3.12.1-2build1 [2672 kB] 69s Get:5 http://ftpmaster.internal/ubuntu questing/main amd64 python3-numpy amd64 1:2.2.4+ds-1ubuntu1 [5377 kB] 70s Get:6 http://ftpmaster.internal/ubuntu questing/main amd64 libtcl8.6 amd64 8.6.16+dfsg-1 [1086 kB] 70s Get:7 http://ftpmaster.internal/ubuntu questing/main amd64 fonts-dejavu-mono all 2.37-8 [502 kB] 70s Get:8 http://ftpmaster.internal/ubuntu questing/main amd64 fonts-dejavu-core all 2.37-8 [835 kB] 70s Get:9 http://ftpmaster.internal/ubuntu questing/main amd64 fontconfig-config amd64 2.15.0-2.2ubuntu1 [37.8 kB] 70s Get:10 http://ftpmaster.internal/ubuntu questing/main amd64 libfontconfig1 amd64 2.15.0-2.2ubuntu1 [164 kB] 70s Get:11 http://ftpmaster.internal/ubuntu questing/main amd64 libxrender1 amd64 1:0.9.12-1 [19.8 kB] 70s Get:12 http://ftpmaster.internal/ubuntu questing/main amd64 libxft2 amd64 2.3.6-1build1 [45.3 kB] 70s Get:13 http://ftpmaster.internal/ubuntu questing/main amd64 x11-common all 1:7.7+24ubuntu1 [22.4 kB] 70s Get:14 http://ftpmaster.internal/ubuntu questing/main amd64 libxss1 amd64 1:1.2.3-1build3 [7204 B] 70s Get:15 http://ftpmaster.internal/ubuntu questing/main amd64 libtk8.6 amd64 8.6.16-1 [868 kB] 70s Get:16 http://ftpmaster.internal/ubuntu questing/main amd64 tk8.6-blt2.5 amd64 2.5.3+dfsg-8 [694 kB] 70s Get:17 http://ftpmaster.internal/ubuntu questing/main amd64 blt amd64 2.5.3+dfsg-8 [4824 B] 70s Get:18 http://ftpmaster.internal/ubuntu questing/main amd64 diffstat amd64 1.68-0ubuntu1 [31.1 kB] 70s Get:19 http://ftpmaster.internal/ubuntu questing/main amd64 sgml-base all 1.31+nmu1 [11.0 kB] 70s Get:20 http://ftpmaster.internal/ubuntu questing/main amd64 xml-core all 0.19 [20.3 kB] 70s Get:21 http://ftpmaster.internal/ubuntu questing/main amd64 docutils-common all 0.21.2+dfsg-2 [131 kB] 70s Get:22 http://ftpmaster.internal/ubuntu questing/universe amd64 fonts-lyx all 2.4.3-1 [171 kB] 70s Get:23 http://ftpmaster.internal/ubuntu questing/main amd64 libgomp1 amd64 15.1.0-8ubuntu1 [151 kB] 70s Get:24 http://ftpmaster.internal/ubuntu questing/main amd64 gettext amd64 0.23.1-2build1 [1472 kB] 70s Get:25 http://ftpmaster.internal/ubuntu questing/universe amd64 libaec0 amd64 1.1.3-1 [22.7 kB] 70s Get:26 http://ftpmaster.internal/ubuntu questing/main amd64 libsnappy1v5 amd64 1.2.2-1 [30.9 kB] 70s Get:27 http://ftpmaster.internal/ubuntu questing/universe amd64 libblosc1 amd64 1.21.5+ds-1build1 [36.2 kB] 70s Get:28 http://ftpmaster.internal/ubuntu questing/main amd64 libdeflate0 amd64 1.23-2 [49.9 kB] 70s Get:29 http://ftpmaster.internal/ubuntu questing/main amd64 libgraphite2-3 amd64 1.3.14-2ubuntu1 [73.1 kB] 70s Get:30 http://ftpmaster.internal/ubuntu questing/main amd64 libharfbuzz0b amd64 10.2.0-1 [543 kB] 70s Get:31 http://ftpmaster.internal/ubuntu questing/universe amd64 libsz2 amd64 1.1.3-1 [5456 B] 70s Get:32 http://ftpmaster.internal/ubuntu questing/universe amd64 libhdf5-310 amd64 1.14.5+repack-3build1 [1411 kB] 70s Get:33 http://ftpmaster.internal/ubuntu questing/universe amd64 libhdf5-hl-310 amd64 1.14.5+repack-3build1 [59.8 kB] 70s Get:34 http://ftpmaster.internal/ubuntu questing/universe amd64 libhwloc15 amd64 2.12.0-4build1 [175 kB] 70s Get:35 http://ftpmaster.internal/ubuntu questing/main amd64 libimagequant0 amd64 2.18.0-1build1 [36.3 kB] 70s Get:36 http://ftpmaster.internal/ubuntu questing/main amd64 libjpeg-turbo8 amd64 2.1.5-3ubuntu2 [179 kB] 70s Get:37 http://ftpmaster.internal/ubuntu questing/main amd64 libjpeg8 amd64 8c-2ubuntu11 [2148 B] 70s Get:38 http://ftpmaster.internal/ubuntu questing/main amd64 libjs-jquery all 3.6.1+dfsg+~3.5.14-1 [328 kB] 70s Get:39 http://ftpmaster.internal/ubuntu questing/universe amd64 libjs-jquery-metadata all 12-4 [6582 B] 70s Get:40 http://ftpmaster.internal/ubuntu questing/universe amd64 libjs-jquery-tablesorter all 1:2.31.3+dfsg1-4 [192 kB] 70s Get:41 http://ftpmaster.internal/ubuntu questing/universe amd64 libjs-jquery-throttle-debounce all 1.1+dfsg.1-2 [12.5 kB] 70s Get:42 http://ftpmaster.internal/ubuntu questing/universe amd64 libjs-jquery-ui all 1.13.2+dfsg-1 [252 kB] 70s Get:43 http://ftpmaster.internal/ubuntu questing/main amd64 libjs-underscore all 1.13.4~dfsg+~1.11.4-3 [118 kB] 70s Get:44 http://ftpmaster.internal/ubuntu questing/main amd64 libjs-sphinxdoc all 8.2.3-1ubuntu2 [28.0 kB] 70s Get:45 http://ftpmaster.internal/ubuntu questing/main amd64 libjson-perl all 4.10000-1 [81.9 kB] 70s Get:46 http://ftpmaster.internal/ubuntu questing/main amd64 liblcms2-2 amd64 2.16-2 [212 kB] 70s Get:47 http://ftpmaster.internal/ubuntu questing/main amd64 liblerc4 amd64 4.0.0+ds-5ubuntu1 [271 kB] 70s Get:48 http://ftpmaster.internal/ubuntu questing/main amd64 libllvm19 amd64 1:19.1.7-5ubuntu2 [28.6 MB] 70s Get:49 http://ftpmaster.internal/ubuntu questing/universe amd64 liblzf1 amd64 3.6-4 [7624 B] 70s Get:50 http://ftpmaster.internal/ubuntu questing/universe amd64 libqhull-r8.0 amd64 2020.2-6build1 [193 kB] 70s Get:51 http://ftpmaster.internal/ubuntu questing/main amd64 libraqm0 amd64 0.10.2-1 [17.2 kB] 70s Get:52 http://ftpmaster.internal/ubuntu questing/main amd64 libsharpyuv0 amd64 1.5.0-0.1 [25.9 kB] 70s Get:53 http://ftpmaster.internal/ubuntu questing/universe amd64 libtbbbind-2-5 amd64 2022.1.0-1 [14.7 kB] 70s Get:54 http://ftpmaster.internal/ubuntu questing/universe amd64 libtbbmalloc2 amd64 2022.1.0-1 [53.7 kB] 70s Get:55 http://ftpmaster.internal/ubuntu questing/universe amd64 libtbb12 amd64 2022.1.0-1 [93.5 kB] 70s Get:56 http://ftpmaster.internal/ubuntu questing/main amd64 libjbig0 amd64 2.1-6.1ubuntu2 [29.7 kB] 70s Get:57 http://ftpmaster.internal/ubuntu questing/main amd64 libwebp7 amd64 1.5.0-0.1 [378 kB] 70s Get:58 http://ftpmaster.internal/ubuntu questing/main amd64 libtiff6 amd64 4.7.0-3ubuntu1 [204 kB] 70s Get:59 http://ftpmaster.internal/ubuntu questing/main amd64 libwebpdemux2 amd64 1.5.0-0.1 [13.0 kB] 70s Get:60 http://ftpmaster.internal/ubuntu questing/main amd64 libwebpmux3 amd64 1.5.0-0.1 [27.6 kB] 70s Get:61 http://ftpmaster.internal/ubuntu questing/main amd64 libxslt1.1 amd64 1.1.43-0exp1 [163 kB] 70s Get:62 http://ftpmaster.internal/ubuntu questing/universe amd64 llvm-19-runtime amd64 1:19.1.7-5ubuntu2 [553 kB] 70s Get:63 http://ftpmaster.internal/ubuntu questing/universe amd64 llvm-19-linker-tools amd64 1:19.1.7-5ubuntu2 [1324 kB] 70s Get:64 http://ftpmaster.internal/ubuntu questing/universe amd64 libpfm4 amd64 4.13.0+git99-gc5587f9-1 [437 kB] 71s Get:65 http://ftpmaster.internal/ubuntu questing/universe amd64 llvm-19 amd64 1:19.1.7-5ubuntu2 [17.8 MB] 71s Get:66 http://ftpmaster.internal/ubuntu questing/universe amd64 node-fortawesome-fontawesome-free all 6.7.2+ds1-1 [1653 kB] 71s Get:67 http://ftpmaster.internal/ubuntu questing/universe amd64 python-matplotlib-data all 3.10.1+dfsg1-4 [2930 kB] 71s Get:68 http://ftpmaster.internal/ubuntu questing/universe amd64 python3-accessible-pygments all 0.0.5-2 [790 kB] 71s Get:69 http://ftpmaster.internal/ubuntu questing/main amd64 python3-all amd64 3.13.4-1 [880 B] 71s Get:70 http://ftpmaster.internal/ubuntu questing/universe amd64 python3-array-api-compat all 1.11.2-1 [33.4 kB] 71s Get:71 http://ftpmaster.internal/ubuntu questing/universe amd64 python3-h5py-serial amd64 3.13.0-1ubuntu1 [1184 kB] 71s Get:72 http://ftpmaster.internal/ubuntu questing/universe amd64 python3-h5py all 3.13.0-1ubuntu1 [8230 B] 71s Get:73 http://ftpmaster.internal/ubuntu questing/universe amd64 python3-natsort all 8.0.2-2 [33.8 kB] 71s Get:74 http://ftpmaster.internal/ubuntu questing/main amd64 python3-pytz all 2025.2-3 [163 kB] 71s Get:75 http://ftpmaster.internal/ubuntu questing/universe amd64 python3-pandas-lib amd64 2.2.3+dfsg-9 [4949 kB] 72s Get:76 http://ftpmaster.internal/ubuntu questing/universe amd64 python3-pandas all 2.2.3+dfsg-9 [3112 kB] 72s Get:77 http://ftpmaster.internal/ubuntu questing/main amd64 python3-decorator all 5.2.1-2 [28.1 kB] 72s Get:78 http://ftpmaster.internal/ubuntu questing/universe amd64 python3-scipy amd64 1.15.3-1 [16.6 MB] 72s Get:79 http://ftpmaster.internal/ubuntu questing/universe amd64 python3-crc32c amd64 2.7.1-1 [24.2 kB] 72s Get:80 http://ftpmaster.internal/ubuntu questing/main amd64 python3-defusedxml all 0.7.1-3 [42.2 kB] 72s Get:81 http://ftpmaster.internal/ubuntu questing/main amd64 sphinx-common all 8.2.3-1ubuntu2 [656 kB] 72s Get:82 http://ftpmaster.internal/ubuntu questing/main amd64 python3-alabaster all 0.7.16-0.1 [18.5 kB] 72s Get:83 http://ftpmaster.internal/ubuntu questing/main amd64 python3-roman all 5.0-1 [10.3 kB] 72s Get:84 http://ftpmaster.internal/ubuntu questing/main amd64 python3-docutils all 0.21.2+dfsg-2 [409 kB] 72s Get:85 http://ftpmaster.internal/ubuntu questing/main amd64 python3-imagesize all 1.4.1-1 [6844 B] 72s Get:86 http://ftpmaster.internal/ubuntu questing/main amd64 python3-snowballstemmer all 2.2.0-4build1 [59.8 kB] 72s Get:87 http://ftpmaster.internal/ubuntu questing/main amd64 python3-sphinx all 8.2.3-1ubuntu2 [482 kB] 72s Get:88 http://ftpmaster.internal/ubuntu questing/universe amd64 python3-sphinx-copybutton all 0.5.2-2 [16.6 kB] 72s Get:89 http://ftpmaster.internal/ubuntu questing/main amd64 python3-soupsieve all 2.7-1 [33.5 kB] 72s Get:90 http://ftpmaster.internal/ubuntu questing/main amd64 python3-bs4 all 4.13.4-3 [137 kB] 72s Get:91 http://ftpmaster.internal/ubuntu questing/universe amd64 python3-pydata-sphinx-theme all 0.16.1+dfsg-3 [959 kB] 72s Get:92 http://ftpmaster.internal/ubuntu questing/universe amd64 python3-donfig all 0.8.1+dfsg-3 [17.3 kB] 72s Get:93 http://ftpmaster.internal/ubuntu questing/universe amd64 python3-numcodecs amd64 0.16.0+ds-1 [413 kB] 72s Get:94 http://ftpmaster.internal/ubuntu questing/universe amd64 python3-zarr all 3.0.6-2 [2009 kB] 72s Get:95 http://ftpmaster.internal/ubuntu questing-proposed/universe amd64 python3-anndata all 0.12.0~rc1-1 [117 kB] 72s Get:96 http://ftpmaster.internal/ubuntu questing/universe amd64 python3-fsspec all 2025.3.0-1 [216 kB] 72s Get:97 http://ftpmaster.internal/ubuntu questing/universe amd64 python3-awkward amd64 2.6.5-1build1 [877 kB] 72s Get:98 http://ftpmaster.internal/ubuntu questing/universe amd64 python3-boltons all 25.0.0-1 [134 kB] 72s Get:99 http://ftpmaster.internal/ubuntu questing/universe amd64 python3-brotli amd64 1.1.0-2build4 [367 kB] 72s Get:100 http://ftpmaster.internal/ubuntu questing/main amd64 python3-click all 8.2.0+0.really.8.1.8-1 [80.0 kB] 72s Get:101 http://ftpmaster.internal/ubuntu questing/universe amd64 python3-cloudpickle all 3.1.1-1 [22.4 kB] 72s Get:102 http://ftpmaster.internal/ubuntu questing/universe amd64 python3-contourpy amd64 1.3.1-1build1 [218 kB] 73s Get:103 http://ftpmaster.internal/ubuntu questing/universe amd64 python3-coverage amd64 7.8.2+dfsg1-1 [157 kB] 73s Get:104 http://ftpmaster.internal/ubuntu questing/universe amd64 python3-cycler all 0.12.1-1 [9716 B] 73s Get:105 http://ftpmaster.internal/ubuntu questing/universe amd64 python3-toolz all 1.0.0-2 [45.0 kB] 73s Get:106 http://ftpmaster.internal/ubuntu questing/universe amd64 python3-locket all 1.0.0-2 [5872 B] 73s Get:107 http://ftpmaster.internal/ubuntu questing/universe amd64 python3-partd all 1.4.2-1 [15.7 kB] 73s Get:108 http://ftpmaster.internal/ubuntu questing/universe amd64 python3-dask all 2024.12.1+dfsg-2 [875 kB] 73s Get:109 http://ftpmaster.internal/ubuntu questing/main amd64 python3-msgpack amd64 1.0.3-3build4 [87.7 kB] 73s Get:110 http://ftpmaster.internal/ubuntu questing/main amd64 python3-psutil amd64 5.9.8-2build3 [196 kB] 73s Get:111 http://ftpmaster.internal/ubuntu questing/main amd64 python3-sortedcontainers all 2.4.0-2 [27.6 kB] 73s Get:112 http://ftpmaster.internal/ubuntu questing/universe amd64 python3-tblib all 3.1.0-1 [13.0 kB] 73s Get:113 http://ftpmaster.internal/ubuntu questing/main amd64 python3-tornado amd64 6.4.2-3 [299 kB] 73s Get:114 http://ftpmaster.internal/ubuntu questing/universe amd64 python3-zict all 3.0.0-2ubuntu1 [30.4 kB] 73s Get:115 http://ftpmaster.internal/ubuntu questing/universe amd64 python3-distributed all 2024.12.1+ds-1 [1019 kB] 73s Get:116 http://ftpmaster.internal/ubuntu questing/universe amd64 python3-et-xmlfile all 2.0.0-1 [79.4 kB] 73s Get:117 http://ftpmaster.internal/ubuntu questing/universe amd64 python3-execnet all 2.1.1-1 [33.4 kB] 73s Get:118 http://ftpmaster.internal/ubuntu questing/universe amd64 python3-filelock all 3.18.0-1 [13.0 kB] 73s Get:119 http://ftpmaster.internal/ubuntu questing/main amd64 python3-platformdirs all 4.3.7-1 [16.9 kB] 73s Get:120 http://ftpmaster.internal/ubuntu questing/universe amd64 python3-fs all 2.4.16-7 [90.8 kB] 73s Get:121 http://ftpmaster.internal/ubuntu questing/main amd64 python3-lxml amd64 5.4.0-1build1 [1383 kB] 73s Get:122 http://ftpmaster.internal/ubuntu questing/universe amd64 python3-lz4 amd64 4.4.0+dfsg-2 [26.6 kB] 73s Get:123 http://ftpmaster.internal/ubuntu questing/universe amd64 python3-mpmath all 1.3.0-1 [425 kB] 73s Get:124 http://ftpmaster.internal/ubuntu questing/universe amd64 python3-sympy all 1.13.3-5 [4229 kB] 73s Get:125 http://ftpmaster.internal/ubuntu questing/universe amd64 python3-ufolib2 all 0.17.1+dfsg1-1 [33.5 kB] 73s Get:126 http://ftpmaster.internal/ubuntu questing/universe amd64 unicode-data all 15.1.0-1 [8878 kB] 73s Get:127 http://ftpmaster.internal/ubuntu questing/universe amd64 python3-fonttools amd64 4.55.3-2build1 [1536 kB] 73s Get:128 http://ftpmaster.internal/ubuntu questing/universe amd64 python3-iniconfig all 1.1.1-2 [6024 B] 73s Get:129 http://ftpmaster.internal/ubuntu questing/universe amd64 python3-joblib all 1.4.2-4 [205 kB] 73s Get:130 http://ftpmaster.internal/ubuntu questing/universe amd64 python3-kiwisolver amd64 1.4.7-3build1 [55.6 kB] 73s Get:131 http://ftpmaster.internal/ubuntu questing/universe amd64 python3-llvmlite amd64 0.44.0-1 [207 kB] 73s Get:132 http://ftpmaster.internal/ubuntu questing/main amd64 libopenjp2-7 amd64 2.5.3-2 [218 kB] 73s Get:133 http://ftpmaster.internal/ubuntu questing/main amd64 python3-pil amd64 11.1.0-5build1 [583 kB] 73s Get:134 http://ftpmaster.internal/ubuntu questing/main amd64 python3.13-tk amd64 3.13.5-2 [107 kB] 73s Get:135 http://ftpmaster.internal/ubuntu questing/main amd64 python3-tk amd64 3.13.4-1 [9884 B] 73s Get:136 http://ftpmaster.internal/ubuntu questing/universe amd64 python3-pil.imagetk amd64 11.1.0-5build1 [9828 B] 74s Get:137 http://ftpmaster.internal/ubuntu questing/universe amd64 python3-matplotlib amd64 3.10.1+dfsg1-4 [18.0 MB] 75s Get:138 http://ftpmaster.internal/ubuntu questing/universe amd64 python3-numba amd64 0.61.2+dfsg-1 [1811 kB] 75s Get:139 http://ftpmaster.internal/ubuntu questing/universe amd64 python3-openpyxl all 3.1.5+dfsg-2 [152 kB] 75s Get:140 http://ftpmaster.internal/ubuntu questing/universe amd64 python3-pluggy all 1.5.0-1 [21.0 kB] 75s Get:141 http://ftpmaster.internal/ubuntu questing/universe amd64 python3-pytest all 8.3.5-2 [252 kB] 75s Get:142 http://ftpmaster.internal/ubuntu questing/universe amd64 libjs-jquery-hotkeys all 0.2.0-1 [13.3 kB] 75s Get:143 http://ftpmaster.internal/ubuntu questing/universe amd64 libjs-jquery-isonscreen all 1.2.0-1.1 [3244 B] 75s Get:144 http://ftpmaster.internal/ubuntu questing/universe amd64 python3-pytest-cov all 5.0.0-1 [21.3 kB] 75s Get:145 http://ftpmaster.internal/ubuntu questing/universe amd64 python3-pytest-mock all 3.14.0-3 [11.8 kB] 75s Get:146 http://ftpmaster.internal/ubuntu questing/universe amd64 python3-pytest-xdist all 3.6.1-1 [33.8 kB] 75s Get:147 http://ftpmaster.internal/ubuntu questing/universe amd64 python3-threadpoolctl all 3.1.0-1 [21.3 kB] 75s Get:148 http://ftpmaster.internal/ubuntu questing/universe amd64 python3-sklearn-lib amd64 1.4.2+dfsg-8 [4359 kB] 75s Get:149 http://ftpmaster.internal/ubuntu questing/universe amd64 python3-sklearn all 1.4.2+dfsg-8 [2258 kB] 75s Get:150 http://ftpmaster.internal/ubuntu questing/universe amd64 python3-xarray all 2025.03.1-8 [831 kB] 75s Get:151 http://ftpmaster.internal/ubuntu questing/universe amd64 python3-xlrd all 2.0.1-2 [83.1 kB] 75s Get:152 http://ftpmaster.internal/ubuntu questing/universe amd64 quilt all 0.68-1 [439 kB] 76s Fetched 158 MB in 6s (25.7 MB/s) 76s Selecting previously unselected package python3-numpy-dev:amd64. 76s (Reading database ... (Reading database ... 5% (Reading database ... 10% (Reading database ... 15% (Reading database ... 20% (Reading database ... 25% (Reading database ... 30% (Reading database ... 35% (Reading database ... 40% (Reading database ... 45% (Reading database ... 50% (Reading database ... 55% (Reading database ... 60% (Reading database ... 65% (Reading database ... 70% (Reading database ... 75% (Reading database ... 80% (Reading database ... 85% (Reading database ... 90% (Reading database ... 95% (Reading database ... 100% (Reading database ... 120968 files and directories currently installed.) 76s Preparing to unpack .../000-python3-numpy-dev_1%3a2.2.4+ds-1ubuntu1_amd64.deb ... 76s Unpacking python3-numpy-dev:amd64 (1:2.2.4+ds-1ubuntu1) ... 76s Selecting previously unselected package libblas3:amd64. 76s Preparing to unpack .../001-libblas3_3.12.1-2build1_amd64.deb ... 76s Unpacking libblas3:amd64 (3.12.1-2build1) ... 76s Selecting previously unselected package libgfortran5:amd64. 76s Preparing to unpack .../002-libgfortran5_15.1.0-8ubuntu1_amd64.deb ... 76s Unpacking libgfortran5:amd64 (15.1.0-8ubuntu1) ... 76s Selecting previously unselected package liblapack3:amd64. 76s Preparing to unpack .../003-liblapack3_3.12.1-2build1_amd64.deb ... 76s Unpacking liblapack3:amd64 (3.12.1-2build1) ... 76s Selecting previously unselected package python3-numpy. 76s Preparing to unpack .../004-python3-numpy_1%3a2.2.4+ds-1ubuntu1_amd64.deb ... 76s Unpacking python3-numpy (1:2.2.4+ds-1ubuntu1) ... 76s Selecting previously unselected package libtcl8.6:amd64. 76s Preparing to unpack .../005-libtcl8.6_8.6.16+dfsg-1_amd64.deb ... 76s Unpacking libtcl8.6:amd64 (8.6.16+dfsg-1) ... 76s Selecting previously unselected package fonts-dejavu-mono. 76s Preparing to unpack .../006-fonts-dejavu-mono_2.37-8_all.deb ... 76s Unpacking fonts-dejavu-mono (2.37-8) ... 76s Selecting previously unselected package fonts-dejavu-core. 76s Preparing to unpack .../007-fonts-dejavu-core_2.37-8_all.deb ... 76s Unpacking fonts-dejavu-core (2.37-8) ... 76s Selecting previously unselected package fontconfig-config. 76s Preparing to unpack .../008-fontconfig-config_2.15.0-2.2ubuntu1_amd64.deb ... 76s Unpacking fontconfig-config (2.15.0-2.2ubuntu1) ... 76s Selecting previously unselected package libfontconfig1:amd64. 76s Preparing to unpack .../009-libfontconfig1_2.15.0-2.2ubuntu1_amd64.deb ... 76s Unpacking libfontconfig1:amd64 (2.15.0-2.2ubuntu1) ... 76s Selecting previously unselected package libxrender1:amd64. 76s Preparing to unpack .../010-libxrender1_1%3a0.9.12-1_amd64.deb ... 76s Unpacking libxrender1:amd64 (1:0.9.12-1) ... 76s Selecting previously unselected package libxft2:amd64. 76s Preparing to unpack .../011-libxft2_2.3.6-1build1_amd64.deb ... 76s Unpacking libxft2:amd64 (2.3.6-1build1) ... 76s Selecting previously unselected package x11-common. 76s Preparing to unpack .../012-x11-common_1%3a7.7+24ubuntu1_all.deb ... 76s Unpacking x11-common (1:7.7+24ubuntu1) ... 76s Selecting previously unselected package libxss1:amd64. 76s Preparing to unpack .../013-libxss1_1%3a1.2.3-1build3_amd64.deb ... 76s Unpacking libxss1:amd64 (1:1.2.3-1build3) ... 76s Selecting previously unselected package libtk8.6:amd64. 77s Preparing to unpack .../014-libtk8.6_8.6.16-1_amd64.deb ... 77s Unpacking libtk8.6:amd64 (8.6.16-1) ... 77s Selecting previously unselected package tk8.6-blt2.5. 77s Preparing to unpack .../015-tk8.6-blt2.5_2.5.3+dfsg-8_amd64.deb ... 77s Unpacking tk8.6-blt2.5 (2.5.3+dfsg-8) ... 77s Selecting previously unselected package blt. 77s Preparing to unpack .../016-blt_2.5.3+dfsg-8_amd64.deb ... 77s Unpacking blt (2.5.3+dfsg-8) ... 77s Selecting previously unselected package diffstat. 77s Preparing to unpack .../017-diffstat_1.68-0ubuntu1_amd64.deb ... 77s Unpacking diffstat (1.68-0ubuntu1) ... 77s Selecting previously unselected package sgml-base. 77s Preparing to unpack .../018-sgml-base_1.31+nmu1_all.deb ... 77s Unpacking sgml-base (1.31+nmu1) ... 77s Selecting previously unselected package xml-core. 77s Preparing to unpack .../019-xml-core_0.19_all.deb ... 77s Unpacking xml-core (0.19) ... 77s Selecting previously unselected package docutils-common. 77s Preparing to unpack .../020-docutils-common_0.21.2+dfsg-2_all.deb ... 77s Unpacking docutils-common (0.21.2+dfsg-2) ... 77s Selecting previously unselected package fonts-lyx. 77s Preparing to unpack .../021-fonts-lyx_2.4.3-1_all.deb ... 77s Unpacking fonts-lyx (2.4.3-1) ... 77s Selecting previously unselected package libgomp1:amd64. 77s Preparing to unpack .../022-libgomp1_15.1.0-8ubuntu1_amd64.deb ... 77s Unpacking libgomp1:amd64 (15.1.0-8ubuntu1) ... 77s Selecting previously unselected package gettext. 77s Preparing to unpack .../023-gettext_0.23.1-2build1_amd64.deb ... 77s Unpacking gettext (0.23.1-2build1) ... 77s Selecting previously unselected package libaec0:amd64. 77s Preparing to unpack .../024-libaec0_1.1.3-1_amd64.deb ... 77s Unpacking libaec0:amd64 (1.1.3-1) ... 77s Selecting previously unselected package libsnappy1v5:amd64. 77s Preparing to unpack .../025-libsnappy1v5_1.2.2-1_amd64.deb ... 77s Unpacking libsnappy1v5:amd64 (1.2.2-1) ... 77s Selecting previously unselected package libblosc1:amd64. 77s Preparing to unpack .../026-libblosc1_1.21.5+ds-1build1_amd64.deb ... 77s Unpacking libblosc1:amd64 (1.21.5+ds-1build1) ... 77s Selecting previously unselected package libdeflate0:amd64. 77s Preparing to unpack .../027-libdeflate0_1.23-2_amd64.deb ... 77s Unpacking libdeflate0:amd64 (1.23-2) ... 77s Selecting previously unselected package libgraphite2-3:amd64. 77s Preparing to unpack .../028-libgraphite2-3_1.3.14-2ubuntu1_amd64.deb ... 77s Unpacking libgraphite2-3:amd64 (1.3.14-2ubuntu1) ... 77s Selecting previously unselected package libharfbuzz0b:amd64. 77s Preparing to unpack .../029-libharfbuzz0b_10.2.0-1_amd64.deb ... 77s Unpacking libharfbuzz0b:amd64 (10.2.0-1) ... 77s Selecting previously unselected package libsz2:amd64. 77s Preparing to unpack .../030-libsz2_1.1.3-1_amd64.deb ... 77s Unpacking libsz2:amd64 (1.1.3-1) ... 77s Selecting previously unselected package libhdf5-310:amd64. 77s Preparing to unpack .../031-libhdf5-310_1.14.5+repack-3build1_amd64.deb ... 77s Unpacking libhdf5-310:amd64 (1.14.5+repack-3build1) ... 77s Selecting previously unselected package libhdf5-hl-310:amd64. 77s Preparing to unpack .../032-libhdf5-hl-310_1.14.5+repack-3build1_amd64.deb ... 77s Unpacking libhdf5-hl-310:amd64 (1.14.5+repack-3build1) ... 77s Selecting previously unselected package libhwloc15:amd64. 77s Preparing to unpack .../033-libhwloc15_2.12.0-4build1_amd64.deb ... 77s Unpacking libhwloc15:amd64 (2.12.0-4build1) ... 77s Selecting previously unselected package libimagequant0:amd64. 77s Preparing to unpack .../034-libimagequant0_2.18.0-1build1_amd64.deb ... 77s Unpacking libimagequant0:amd64 (2.18.0-1build1) ... 77s Selecting previously unselected package libjpeg-turbo8:amd64. 77s Preparing to unpack .../035-libjpeg-turbo8_2.1.5-3ubuntu2_amd64.deb ... 77s Unpacking libjpeg-turbo8:amd64 (2.1.5-3ubuntu2) ... 77s Selecting previously unselected package libjpeg8:amd64. 77s Preparing to unpack .../036-libjpeg8_8c-2ubuntu11_amd64.deb ... 77s Unpacking libjpeg8:amd64 (8c-2ubuntu11) ... 77s Selecting previously unselected package libjs-jquery. 77s Preparing to unpack .../037-libjs-jquery_3.6.1+dfsg+~3.5.14-1_all.deb ... 77s Unpacking libjs-jquery (3.6.1+dfsg+~3.5.14-1) ... 77s Selecting previously unselected package libjs-jquery-metadata. 77s Preparing to unpack .../038-libjs-jquery-metadata_12-4_all.deb ... 77s Unpacking libjs-jquery-metadata (12-4) ... 77s Selecting previously unselected package libjs-jquery-tablesorter. 77s Preparing to unpack .../039-libjs-jquery-tablesorter_1%3a2.31.3+dfsg1-4_all.deb ... 77s Unpacking libjs-jquery-tablesorter (1:2.31.3+dfsg1-4) ... 77s Selecting previously unselected package libjs-jquery-throttle-debounce. 77s Preparing to unpack .../040-libjs-jquery-throttle-debounce_1.1+dfsg.1-2_all.deb ... 77s Unpacking libjs-jquery-throttle-debounce (1.1+dfsg.1-2) ... 77s Selecting previously unselected package libjs-jquery-ui. 77s Preparing to unpack .../041-libjs-jquery-ui_1.13.2+dfsg-1_all.deb ... 77s Unpacking libjs-jquery-ui (1.13.2+dfsg-1) ... 77s Selecting previously unselected package libjs-underscore. 77s Preparing to unpack .../042-libjs-underscore_1.13.4~dfsg+~1.11.4-3_all.deb ... 77s Unpacking libjs-underscore (1.13.4~dfsg+~1.11.4-3) ... 77s Selecting previously unselected package libjs-sphinxdoc. 77s Preparing to unpack .../043-libjs-sphinxdoc_8.2.3-1ubuntu2_all.deb ... 77s Unpacking libjs-sphinxdoc (8.2.3-1ubuntu2) ... 77s Selecting previously unselected package libjson-perl. 77s Preparing to unpack .../044-libjson-perl_4.10000-1_all.deb ... 77s Unpacking libjson-perl (4.10000-1) ... 77s Selecting previously unselected package liblcms2-2:amd64. 77s Preparing to unpack .../045-liblcms2-2_2.16-2_amd64.deb ... 77s Unpacking liblcms2-2:amd64 (2.16-2) ... 77s Selecting previously unselected package liblerc4:amd64. 77s Preparing to unpack .../046-liblerc4_4.0.0+ds-5ubuntu1_amd64.deb ... 77s Unpacking liblerc4:amd64 (4.0.0+ds-5ubuntu1) ... 77s Selecting previously unselected package libllvm19. 77s Preparing to unpack .../047-libllvm19_1%3a19.1.7-5ubuntu2_amd64.deb ... 77s Unpacking libllvm19 (1:19.1.7-5ubuntu2) ... 78s Selecting previously unselected package liblzf1:amd64. 78s Preparing to unpack .../048-liblzf1_3.6-4_amd64.deb ... 78s Unpacking liblzf1:amd64 (3.6-4) ... 78s Selecting previously unselected package libqhull-r8.0:amd64. 78s Preparing to unpack .../049-libqhull-r8.0_2020.2-6build1_amd64.deb ... 78s Unpacking libqhull-r8.0:amd64 (2020.2-6build1) ... 78s Selecting previously unselected package libraqm0:amd64. 78s Preparing to unpack .../050-libraqm0_0.10.2-1_amd64.deb ... 78s Unpacking libraqm0:amd64 (0.10.2-1) ... 78s Selecting previously unselected package libsharpyuv0:amd64. 78s Preparing to unpack .../051-libsharpyuv0_1.5.0-0.1_amd64.deb ... 78s Unpacking libsharpyuv0:amd64 (1.5.0-0.1) ... 78s Selecting previously unselected package libtbbbind-2-5:amd64. 78s Preparing to unpack .../052-libtbbbind-2-5_2022.1.0-1_amd64.deb ... 78s Unpacking libtbbbind-2-5:amd64 (2022.1.0-1) ... 78s Selecting previously unselected package libtbbmalloc2:amd64. 78s Preparing to unpack .../053-libtbbmalloc2_2022.1.0-1_amd64.deb ... 78s Unpacking libtbbmalloc2:amd64 (2022.1.0-1) ... 78s Selecting previously unselected package libtbb12:amd64. 78s Preparing to unpack .../054-libtbb12_2022.1.0-1_amd64.deb ... 78s Unpacking libtbb12:amd64 (2022.1.0-1) ... 78s Selecting previously unselected package libjbig0:amd64. 78s Preparing to unpack .../055-libjbig0_2.1-6.1ubuntu2_amd64.deb ... 78s Unpacking libjbig0:amd64 (2.1-6.1ubuntu2) ... 78s Selecting previously unselected package libwebp7:amd64. 78s Preparing to unpack .../056-libwebp7_1.5.0-0.1_amd64.deb ... 78s Unpacking libwebp7:amd64 (1.5.0-0.1) ... 78s Selecting previously unselected package libtiff6:amd64. 78s Preparing to unpack .../057-libtiff6_4.7.0-3ubuntu1_amd64.deb ... 78s Unpacking libtiff6:amd64 (4.7.0-3ubuntu1) ... 78s Selecting previously unselected package libwebpdemux2:amd64. 78s Preparing to unpack .../058-libwebpdemux2_1.5.0-0.1_amd64.deb ... 78s Unpacking libwebpdemux2:amd64 (1.5.0-0.1) ... 78s Selecting previously unselected package libwebpmux3:amd64. 78s Preparing to unpack .../059-libwebpmux3_1.5.0-0.1_amd64.deb ... 78s Unpacking libwebpmux3:amd64 (1.5.0-0.1) ... 78s Selecting previously unselected package libxslt1.1:amd64. 78s Preparing to unpack .../060-libxslt1.1_1.1.43-0exp1_amd64.deb ... 78s Unpacking libxslt1.1:amd64 (1.1.43-0exp1) ... 78s Selecting previously unselected package llvm-19-runtime. 78s Preparing to unpack .../061-llvm-19-runtime_1%3a19.1.7-5ubuntu2_amd64.deb ... 78s Unpacking llvm-19-runtime (1:19.1.7-5ubuntu2) ... 78s Selecting previously unselected package llvm-19-linker-tools. 78s Preparing to unpack .../062-llvm-19-linker-tools_1%3a19.1.7-5ubuntu2_amd64.deb ... 78s Unpacking llvm-19-linker-tools (1:19.1.7-5ubuntu2) ... 78s Selecting previously unselected package libpfm4:amd64. 78s Preparing to unpack .../063-libpfm4_4.13.0+git99-gc5587f9-1_amd64.deb ... 78s Unpacking libpfm4:amd64 (4.13.0+git99-gc5587f9-1) ... 78s Selecting previously unselected package llvm-19. 78s Preparing to unpack .../064-llvm-19_1%3a19.1.7-5ubuntu2_amd64.deb ... 78s Unpacking llvm-19 (1:19.1.7-5ubuntu2) ... 79s Selecting previously unselected package node-fortawesome-fontawesome-free. 79s Preparing to unpack .../065-node-fortawesome-fontawesome-free_6.7.2+ds1-1_all.deb ... 79s Unpacking node-fortawesome-fontawesome-free (6.7.2+ds1-1) ... 79s Selecting previously unselected package python-matplotlib-data. 79s Preparing to unpack .../066-python-matplotlib-data_3.10.1+dfsg1-4_all.deb ... 79s Unpacking python-matplotlib-data (3.10.1+dfsg1-4) ... 79s Selecting previously unselected package python3-accessible-pygments. 79s Preparing to unpack .../067-python3-accessible-pygments_0.0.5-2_all.deb ... 79s Unpacking python3-accessible-pygments (0.0.5-2) ... 79s Selecting previously unselected package python3-all. 79s Preparing to unpack .../068-python3-all_3.13.4-1_amd64.deb ... 79s Unpacking python3-all (3.13.4-1) ... 79s Selecting previously unselected package python3-array-api-compat. 79s Preparing to unpack .../069-python3-array-api-compat_1.11.2-1_all.deb ... 79s Unpacking python3-array-api-compat (1.11.2-1) ... 79s Selecting previously unselected package python3-h5py-serial. 79s Preparing to unpack .../070-python3-h5py-serial_3.13.0-1ubuntu1_amd64.deb ... 79s Unpacking python3-h5py-serial (3.13.0-1ubuntu1) ... 79s Selecting previously unselected package python3-h5py. 79s Preparing to unpack .../071-python3-h5py_3.13.0-1ubuntu1_all.deb ... 79s Unpacking python3-h5py (3.13.0-1ubuntu1) ... 79s Selecting previously unselected package python3-natsort. 79s Preparing to unpack .../072-python3-natsort_8.0.2-2_all.deb ... 79s Unpacking python3-natsort (8.0.2-2) ... 79s Selecting previously unselected package python3-pytz. 79s Preparing to unpack .../073-python3-pytz_2025.2-3_all.deb ... 79s Unpacking python3-pytz (2025.2-3) ... 79s Selecting previously unselected package python3-pandas-lib:amd64. 79s Preparing to unpack .../074-python3-pandas-lib_2.2.3+dfsg-9_amd64.deb ... 79s Unpacking python3-pandas-lib:amd64 (2.2.3+dfsg-9) ... 79s Selecting previously unselected package python3-pandas. 79s Preparing to unpack .../075-python3-pandas_2.2.3+dfsg-9_all.deb ... 79s Unpacking python3-pandas (2.2.3+dfsg-9) ... 79s Selecting previously unselected package python3-decorator. 79s Preparing to unpack .../076-python3-decorator_5.2.1-2_all.deb ... 79s Unpacking python3-decorator (5.2.1-2) ... 79s Selecting previously unselected package python3-scipy. 79s Preparing to unpack .../077-python3-scipy_1.15.3-1_amd64.deb ... 79s Unpacking python3-scipy (1.15.3-1) ... 80s Selecting previously unselected package python3-crc32c. 80s Preparing to unpack .../078-python3-crc32c_2.7.1-1_amd64.deb ... 80s Unpacking python3-crc32c (2.7.1-1) ... 80s Selecting previously unselected package python3-defusedxml. 80s Preparing to unpack .../079-python3-defusedxml_0.7.1-3_all.deb ... 80s Unpacking python3-defusedxml (0.7.1-3) ... 80s Selecting previously unselected package sphinx-common. 80s Preparing to unpack .../080-sphinx-common_8.2.3-1ubuntu2_all.deb ... 80s Unpacking sphinx-common (8.2.3-1ubuntu2) ... 80s Selecting previously unselected package python3-alabaster. 80s Preparing to unpack .../081-python3-alabaster_0.7.16-0.1_all.deb ... 80s Unpacking python3-alabaster (0.7.16-0.1) ... 80s Selecting previously unselected package python3-roman. 80s Preparing to unpack .../082-python3-roman_5.0-1_all.deb ... 80s Unpacking python3-roman (5.0-1) ... 80s Selecting previously unselected package python3-docutils. 80s Preparing to unpack .../083-python3-docutils_0.21.2+dfsg-2_all.deb ... 80s Unpacking python3-docutils (0.21.2+dfsg-2) ... 80s Selecting previously unselected package python3-imagesize. 80s Preparing to unpack .../084-python3-imagesize_1.4.1-1_all.deb ... 80s Unpacking python3-imagesize (1.4.1-1) ... 80s Selecting previously unselected package python3-snowballstemmer. 80s Preparing to unpack .../085-python3-snowballstemmer_2.2.0-4build1_all.deb ... 80s Unpacking python3-snowballstemmer (2.2.0-4build1) ... 80s Selecting previously unselected package python3-sphinx. 80s Preparing to unpack .../086-python3-sphinx_8.2.3-1ubuntu2_all.deb ... 80s Unpacking python3-sphinx (8.2.3-1ubuntu2) ... 80s Selecting previously unselected package python3-sphinx-copybutton. 80s Preparing to unpack .../087-python3-sphinx-copybutton_0.5.2-2_all.deb ... 80s Unpacking python3-sphinx-copybutton (0.5.2-2) ... 80s Selecting previously unselected package python3-soupsieve. 80s Preparing to unpack .../088-python3-soupsieve_2.7-1_all.deb ... 80s Unpacking python3-soupsieve (2.7-1) ... 80s Selecting previously unselected package python3-bs4. 80s Preparing to unpack .../089-python3-bs4_4.13.4-3_all.deb ... 80s Unpacking python3-bs4 (4.13.4-3) ... 80s Selecting previously unselected package python3-pydata-sphinx-theme. 80s Preparing to unpack .../090-python3-pydata-sphinx-theme_0.16.1+dfsg-3_all.deb ... 80s Unpacking python3-pydata-sphinx-theme (0.16.1+dfsg-3) ... 80s Selecting previously unselected package python3-donfig. 80s Preparing to unpack .../091-python3-donfig_0.8.1+dfsg-3_all.deb ... 80s Unpacking python3-donfig (0.8.1+dfsg-3) ... 80s Selecting previously unselected package python3-numcodecs. 80s Preparing to unpack .../092-python3-numcodecs_0.16.0+ds-1_amd64.deb ... 80s Unpacking python3-numcodecs (0.16.0+ds-1) ... 80s Selecting previously unselected package python3-zarr. 80s Preparing to unpack .../093-python3-zarr_3.0.6-2_all.deb ... 80s Unpacking python3-zarr (3.0.6-2) ... 80s Selecting previously unselected package python3-anndata. 80s Preparing to unpack .../094-python3-anndata_0.12.0~rc1-1_all.deb ... 80s Unpacking python3-anndata (0.12.0~rc1-1) ... 80s Selecting previously unselected package python3-fsspec. 80s Preparing to unpack .../095-python3-fsspec_2025.3.0-1_all.deb ... 80s Unpacking python3-fsspec (2025.3.0-1) ... 80s Selecting previously unselected package python3-awkward. 80s Preparing to unpack .../096-python3-awkward_2.6.5-1build1_amd64.deb ... 80s Unpacking python3-awkward (2.6.5-1build1) ... 80s Selecting previously unselected package python3-boltons. 80s Preparing to unpack .../097-python3-boltons_25.0.0-1_all.deb ... 80s Unpacking python3-boltons (25.0.0-1) ... 80s Selecting previously unselected package python3-brotli. 80s Preparing to unpack .../098-python3-brotli_1.1.0-2build4_amd64.deb ... 80s Unpacking python3-brotli (1.1.0-2build4) ... 81s Selecting previously unselected package python3-click. 81s Preparing to unpack .../099-python3-click_8.2.0+0.really.8.1.8-1_all.deb ... 81s Unpacking python3-click (8.2.0+0.really.8.1.8-1) ... 81s Selecting previously unselected package python3-cloudpickle. 81s Preparing to unpack .../100-python3-cloudpickle_3.1.1-1_all.deb ... 81s Unpacking python3-cloudpickle (3.1.1-1) ... 81s Selecting previously unselected package python3-contourpy. 81s Preparing to unpack .../101-python3-contourpy_1.3.1-1build1_amd64.deb ... 81s Unpacking python3-contourpy (1.3.1-1build1) ... 81s Selecting previously unselected package python3-coverage. 81s Preparing to unpack .../102-python3-coverage_7.8.2+dfsg1-1_amd64.deb ... 81s Unpacking python3-coverage (7.8.2+dfsg1-1) ... 81s Selecting previously unselected package python3-cycler. 81s Preparing to unpack .../103-python3-cycler_0.12.1-1_all.deb ... 81s Unpacking python3-cycler (0.12.1-1) ... 81s Selecting previously unselected package python3-toolz. 81s Preparing to unpack .../104-python3-toolz_1.0.0-2_all.deb ... 81s Unpacking python3-toolz (1.0.0-2) ... 81s Selecting previously unselected package python3-locket. 81s Preparing to unpack .../105-python3-locket_1.0.0-2_all.deb ... 81s Unpacking python3-locket (1.0.0-2) ... 81s Selecting previously unselected package python3-partd. 81s Preparing to unpack .../106-python3-partd_1.4.2-1_all.deb ... 81s Unpacking python3-partd (1.4.2-1) ... 81s Selecting previously unselected package python3-dask. 81s Preparing to unpack .../107-python3-dask_2024.12.1+dfsg-2_all.deb ... 81s Unpacking python3-dask (2024.12.1+dfsg-2) ... 81s Selecting previously unselected package python3-msgpack. 81s Preparing to unpack .../108-python3-msgpack_1.0.3-3build4_amd64.deb ... 81s Unpacking python3-msgpack (1.0.3-3build4) ... 81s Selecting previously unselected package python3-psutil. 81s Preparing to unpack .../109-python3-psutil_5.9.8-2build3_amd64.deb ... 81s Unpacking python3-psutil (5.9.8-2build3) ... 81s Selecting previously unselected package python3-sortedcontainers. 81s Preparing to unpack .../110-python3-sortedcontainers_2.4.0-2_all.deb ... 81s Unpacking python3-sortedcontainers (2.4.0-2) ... 81s Selecting previously unselected package python3-tblib. 81s Preparing to unpack .../111-python3-tblib_3.1.0-1_all.deb ... 81s Unpacking python3-tblib (3.1.0-1) ... 81s Selecting previously unselected package python3-tornado. 81s Preparing to unpack .../112-python3-tornado_6.4.2-3_amd64.deb ... 81s Unpacking python3-tornado (6.4.2-3) ... 81s Selecting previously unselected package python3-zict. 81s Preparing to unpack .../113-python3-zict_3.0.0-2ubuntu1_all.deb ... 81s Unpacking python3-zict (3.0.0-2ubuntu1) ... 81s Selecting previously unselected package python3-distributed. 81s Preparing to unpack .../114-python3-distributed_2024.12.1+ds-1_all.deb ... 81s Unpacking python3-distributed (2024.12.1+ds-1) ... 81s Selecting previously unselected package python3-et-xmlfile. 81s Preparing to unpack .../115-python3-et-xmlfile_2.0.0-1_all.deb ... 81s Unpacking python3-et-xmlfile (2.0.0-1) ... 81s Selecting previously unselected package python3-execnet. 81s Preparing to unpack .../116-python3-execnet_2.1.1-1_all.deb ... 81s Unpacking python3-execnet (2.1.1-1) ... 81s Selecting previously unselected package python3-filelock. 81s Preparing to unpack .../117-python3-filelock_3.18.0-1_all.deb ... 81s Unpacking python3-filelock (3.18.0-1) ... 81s Selecting previously unselected package python3-platformdirs. 81s Preparing to unpack .../118-python3-platformdirs_4.3.7-1_all.deb ... 81s Unpacking python3-platformdirs (4.3.7-1) ... 81s Selecting previously unselected package python3-fs. 81s Preparing to unpack .../119-python3-fs_2.4.16-7_all.deb ... 81s Unpacking python3-fs (2.4.16-7) ... 81s Selecting previously unselected package python3-lxml:amd64. 81s Preparing to unpack .../120-python3-lxml_5.4.0-1build1_amd64.deb ... 81s Unpacking python3-lxml:amd64 (5.4.0-1build1) ... 81s Selecting previously unselected package python3-lz4. 81s Preparing to unpack .../121-python3-lz4_4.4.0+dfsg-2_amd64.deb ... 81s Unpacking python3-lz4 (4.4.0+dfsg-2) ... 81s Selecting previously unselected package python3-mpmath. 81s Preparing to unpack .../122-python3-mpmath_1.3.0-1_all.deb ... 81s Unpacking python3-mpmath (1.3.0-1) ... 81s Selecting previously unselected package python3-sympy. 81s Preparing to unpack .../123-python3-sympy_1.13.3-5_all.deb ... 81s Unpacking python3-sympy (1.13.3-5) ... 81s Selecting previously unselected package python3-ufolib2. 81s Preparing to unpack .../124-python3-ufolib2_0.17.1+dfsg1-1_all.deb ... 81s Unpacking python3-ufolib2 (0.17.1+dfsg1-1) ... 81s Selecting previously unselected package unicode-data. 81s Preparing to unpack .../125-unicode-data_15.1.0-1_all.deb ... 81s Unpacking unicode-data (15.1.0-1) ... 82s Selecting previously unselected package python3-fonttools. 82s Preparing to unpack .../126-python3-fonttools_4.55.3-2build1_amd64.deb ... 82s Unpacking python3-fonttools (4.55.3-2build1) ... 82s Selecting previously unselected package python3-iniconfig. 82s Preparing to unpack .../127-python3-iniconfig_1.1.1-2_all.deb ... 82s Unpacking python3-iniconfig (1.1.1-2) ... 82s Selecting previously unselected package python3-joblib. 82s Preparing to unpack .../128-python3-joblib_1.4.2-4_all.deb ... 82s Unpacking python3-joblib (1.4.2-4) ... 82s Selecting previously unselected package python3-kiwisolver. 82s Preparing to unpack .../129-python3-kiwisolver_1.4.7-3build1_amd64.deb ... 82s Unpacking python3-kiwisolver (1.4.7-3build1) ... 82s Selecting previously unselected package python3-llvmlite. 82s Preparing to unpack .../130-python3-llvmlite_0.44.0-1_amd64.deb ... 82s Unpacking python3-llvmlite (0.44.0-1) ... 82s Selecting previously unselected package libopenjp2-7:amd64. 82s Preparing to unpack .../131-libopenjp2-7_2.5.3-2_amd64.deb ... 82s Unpacking libopenjp2-7:amd64 (2.5.3-2) ... 82s Selecting previously unselected package python3-pil:amd64. 82s Preparing to unpack .../132-python3-pil_11.1.0-5build1_amd64.deb ... 82s Unpacking python3-pil:amd64 (11.1.0-5build1) ... 82s Selecting previously unselected package python3.13-tk. 82s Preparing to unpack .../133-python3.13-tk_3.13.5-2_amd64.deb ... 82s Unpacking python3.13-tk (3.13.5-2) ... 82s Selecting previously unselected package python3-tk:amd64. 82s Preparing to unpack .../134-python3-tk_3.13.4-1_amd64.deb ... 82s Unpacking python3-tk:amd64 (3.13.4-1) ... 82s Selecting previously unselected package python3-pil.imagetk:amd64. 82s Preparing to unpack .../135-python3-pil.imagetk_11.1.0-5build1_amd64.deb ... 82s Unpacking python3-pil.imagetk:amd64 (11.1.0-5build1) ... 82s Selecting previously unselected package python3-matplotlib. 82s Preparing to unpack .../136-python3-matplotlib_3.10.1+dfsg1-4_amd64.deb ... 82s Unpacking python3-matplotlib (3.10.1+dfsg1-4) ... 82s Selecting previously unselected package python3-numba. 82s Preparing to unpack .../137-python3-numba_0.61.2+dfsg-1_amd64.deb ... 82s Unpacking python3-numba (0.61.2+dfsg-1) ... 82s Selecting previously unselected package python3-openpyxl. 82s Preparing to unpack .../138-python3-openpyxl_3.1.5+dfsg-2_all.deb ... 82s Unpacking python3-openpyxl (3.1.5+dfsg-2) ... 82s Selecting previously unselected package python3-pluggy. 82s Preparing to unpack .../139-python3-pluggy_1.5.0-1_all.deb ... 82s Unpacking python3-pluggy (1.5.0-1) ... 82s Selecting previously unselected package python3-pytest. 82s Preparing to unpack .../140-python3-pytest_8.3.5-2_all.deb ... 82s Unpacking python3-pytest (8.3.5-2) ... 82s Selecting previously unselected package libjs-jquery-hotkeys. 82s Preparing to unpack .../141-libjs-jquery-hotkeys_0.2.0-1_all.deb ... 82s Unpacking libjs-jquery-hotkeys (0.2.0-1) ... 83s Selecting previously unselected package libjs-jquery-isonscreen. 83s Preparing to unpack .../142-libjs-jquery-isonscreen_1.2.0-1.1_all.deb ... 83s Unpacking libjs-jquery-isonscreen (1.2.0-1.1) ... 83s Selecting previously unselected package python3-pytest-cov. 83s Preparing to unpack .../143-python3-pytest-cov_5.0.0-1_all.deb ... 83s Unpacking python3-pytest-cov (5.0.0-1) ... 83s Selecting previously unselected package python3-pytest-mock. 83s Preparing to unpack .../144-python3-pytest-mock_3.14.0-3_all.deb ... 83s Unpacking python3-pytest-mock (3.14.0-3) ... 83s Selecting previously unselected package python3-pytest-xdist. 83s Preparing to unpack .../145-python3-pytest-xdist_3.6.1-1_all.deb ... 83s Unpacking python3-pytest-xdist (3.6.1-1) ... 83s Selecting previously unselected package python3-threadpoolctl. 83s Preparing to unpack .../146-python3-threadpoolctl_3.1.0-1_all.deb ... 83s Unpacking python3-threadpoolctl (3.1.0-1) ... 83s Selecting previously unselected package python3-sklearn-lib:amd64. 83s Preparing to unpack .../147-python3-sklearn-lib_1.4.2+dfsg-8_amd64.deb ... 83s Unpacking python3-sklearn-lib:amd64 (1.4.2+dfsg-8) ... 83s Selecting previously unselected package python3-sklearn. 83s Preparing to unpack .../148-python3-sklearn_1.4.2+dfsg-8_all.deb ... 83s Unpacking python3-sklearn (1.4.2+dfsg-8) ... 83s Selecting previously unselected package python3-xarray. 83s Preparing to unpack .../149-python3-xarray_2025.03.1-8_all.deb ... 83s Unpacking python3-xarray (2025.03.1-8) ... 83s Selecting previously unselected package python3-xlrd. 83s Preparing to unpack .../150-python3-xlrd_2.0.1-2_all.deb ... 83s Unpacking python3-xlrd (2.0.1-2) ... 83s Selecting previously unselected package quilt. 83s Preparing to unpack .../151-quilt_0.68-1_all.deb ... 83s Unpacking quilt (0.68-1) ... 83s Setting up libgraphite2-3:amd64 (1.3.14-2ubuntu1) ... 83s Setting up liblcms2-2:amd64 (2.16-2) ... 83s Setting up python3-iniconfig (1.1.1-2) ... 83s Setting up libtbbmalloc2:amd64 (2022.1.0-1) ... 83s Setting up libllvm19 (1:19.1.7-5ubuntu2) ... 83s Setting up python3-tornado (6.4.2-3) ... 83s Setting up libsharpyuv0:amd64 (1.5.0-0.1) ... 83s Setting up python3-filelock (3.18.0-1) ... 83s Setting up liblerc4:amd64 (4.0.0+ds-5ubuntu1) ... 83s Setting up python3-tblib (3.1.0-1) ... 84s Setting up libxrender1:amd64 (1:0.9.12-1) ... 84s Setting up python3-joblib (1.4.2-4) ... 84s Setting up python3-lz4 (4.4.0+dfsg-2) ... 84s Setting up python3-boltons (25.0.0-1) ... 84s Setting up python3-defusedxml (0.7.1-3) ... 84s Setting up python3-alabaster (0.7.16-0.1) ... 84s Setting up fonts-lyx (2.4.3-1) ... 84s Setting up python3-fsspec (2025.3.0-1) ... 84s Setting up python3-threadpoolctl (3.1.0-1) ... 85s Setting up x11-common (1:7.7+24ubuntu1) ... 85s Setting up libdeflate0:amd64 (1.23-2) ... 85s Setting up python3-array-api-compat (1.11.2-1) ... 85s Setting up libqhull-r8.0:amd64 (2020.2-6build1) ... 85s Setting up python3-all (3.13.4-1) ... 85s Setting up python3-coverage (7.8.2+dfsg1-1) ... 85s Setting up python3-pytz (2025.2-3) ... 85s Setting up python3-sortedcontainers (2.4.0-2) ... 85s Setting up node-fortawesome-fontawesome-free (6.7.2+ds1-1) ... 85s Setting up libjs-jquery-throttle-debounce (1.1+dfsg.1-2) ... 85s Setting up libgomp1:amd64 (15.1.0-8ubuntu1) ... 85s Setting up python3-click (8.2.0+0.really.8.1.8-1) ... 85s Setting up libjbig0:amd64 (2.1-6.1ubuntu2) ... 85s Setting up libaec0:amd64 (1.1.3-1) ... 85s Setting up python3-platformdirs (4.3.7-1) ... 86s Setting up python3-psutil (5.9.8-2build3) ... 86s Setting up python3-natsort (8.0.2-2) ... 86s Setting up python3-cloudpickle (3.1.1-1) ... 86s Setting up libsnappy1v5:amd64 (1.2.2-1) ... 86s Setting up python3-fs (2.4.16-7) ... 86s Setting up unicode-data (15.1.0-1) ... 86s Setting up python3-roman (5.0-1) ... 86s Setting up python3-decorator (5.2.1-2) ... 86s Setting up libblas3:amd64 (3.12.1-2build1) ... 86s update-alternatives: using /usr/lib/x86_64-linux-gnu/blas/libblas.so.3 to provide /usr/lib/x86_64-linux-gnu/libblas.so.3 (libblas.so.3-x86_64-linux-gnu) in auto mode 86s Setting up libpfm4:amd64 (4.13.0+git99-gc5587f9-1) ... 86s Setting up python3-accessible-pygments (0.0.5-2) ... 86s Setting up python3-snowballstemmer (2.2.0-4build1) ... 87s Setting up python3-brotli (1.1.0-2build4) ... 87s Setting up liblzf1:amd64 (3.6-4) ... 87s Setting up python3-cycler (0.12.1-1) ... 87s Setting up diffstat (1.68-0ubuntu1) ... 87s Setting up libimagequant0:amd64 (2.18.0-1build1) ... 87s Setting up fonts-dejavu-mono (2.37-8) ... 87s Setting up python3-kiwisolver (1.4.7-3build1) ... 87s Setting up libhwloc15:amd64 (2.12.0-4build1) ... 87s Setting up python3-numpy-dev:amd64 (1:2.2.4+ds-1ubuntu1) ... 87s Setting up libtcl8.6:amd64 (8.6.16+dfsg-1) ... 87s Setting up fonts-dejavu-core (2.37-8) ... 87s Setting up libjpeg-turbo8:amd64 (2.1.5-3ubuntu2) ... 87s Setting up python3-crc32c (2.7.1-1) ... 87s Setting up libgfortran5:amd64 (15.1.0-8ubuntu1) ... 87s Setting up python3-pluggy (1.5.0-1) ... 87s Setting up libwebp7:amd64 (1.5.0-0.1) ... 87s Setting up libjson-perl (4.10000-1) ... 87s Setting up libxslt1.1:amd64 (1.1.43-0exp1) ... 87s Setting up libblosc1:amd64 (1.21.5+ds-1build1) ... 87s Setting up python3-et-xmlfile (2.0.0-1) ... 87s Setting up python3-xlrd (2.0.1-2) ... 87s Setting up libopenjp2-7:amd64 (2.5.3-2) ... 87s Setting up python3-toolz (1.0.0-2) ... 87s Setting up libharfbuzz0b:amd64 (10.2.0-1) ... 87s Setting up sgml-base (1.31+nmu1) ... 87s Setting up python3-msgpack (1.0.3-3build4) ... 88s Setting up llvm-19-linker-tools (1:19.1.7-5ubuntu2) ... 88s Setting up python3-donfig (0.8.1+dfsg-3) ... 88s Setting up libxss1:amd64 (1:1.2.3-1build3) ... 88s Setting up libjs-jquery (3.6.1+dfsg+~3.5.14-1) ... 88s Setting up python3-mpmath (1.3.0-1) ... 88s Setting up libjs-jquery-hotkeys (0.2.0-1) ... 88s Setting up llvm-19-runtime (1:19.1.7-5ubuntu2) ... 88s Setting up python3-execnet (2.1.1-1) ... 88s Setting up python3-zict (3.0.0-2ubuntu1) ... 88s Setting up python-matplotlib-data (3.10.1+dfsg1-4) ... 88s Setting up libwebpmux3:amd64 (1.5.0-0.1) ... 88s Setting up python3-locket (1.0.0-2) ... 88s Setting up python3-soupsieve (2.7-1) ... 88s Setting up libsz2:amd64 (1.1.3-1) ... 88s Setting up libjs-underscore (1.13.4~dfsg+~1.11.4-3) ... 88s Setting up python3-imagesize (1.4.1-1) ... 88s Setting up libjpeg8:amd64 (8c-2ubuntu11) ... 88s Setting up python3-partd (1.4.2-1) ... 89s Setting up python3-sympy (1.13.3-5) ... 93s Setting up liblapack3:amd64 (3.12.1-2build1) ... 93s update-alternatives: using /usr/lib/x86_64-linux-gnu/lapack/liblapack.so.3 to provide /usr/lib/x86_64-linux-gnu/liblapack.so.3 (liblapack.so.3-x86_64-linux-gnu) in auto mode 93s Setting up gettext (0.23.1-2build1) ... 93s Setting up fontconfig-config (2.15.0-2.2ubuntu1) ... 93s Setting up python3-pytest (8.3.5-2) ... 93s Setting up libwebpdemux2:amd64 (1.5.0-0.1) ... 93s Setting up python3-dask (2024.12.1+dfsg-2) ... 94s Setting up quilt (0.68-1) ... 94s Setting up python3-bs4 (4.13.4-3) ... 94s Setting up libtbbbind-2-5:amd64 (2022.1.0-1) ... 94s Setting up python3-distributed (2024.12.1+ds-1) ... 95s Setting up libjs-jquery-ui (1.13.2+dfsg-1) ... 95s Setting up libjs-jquery-metadata (12-4) ... 95s Setting up libraqm0:amd64 (0.10.2-1) ... 95s Setting up libjs-jquery-isonscreen (1.2.0-1.1) ... 95s Setting up python3-numpy (1:2.2.4+ds-1ubuntu1) ... 96s Setting up libjs-sphinxdoc (8.2.3-1ubuntu2) ... 96s Setting up libjs-jquery-tablesorter (1:2.31.3+dfsg1-4) ... 96s Setting up libhdf5-310:amd64 (1.14.5+repack-3build1) ... 96s Setting up python3-pytest-mock (3.14.0-3) ... 97s Setting up python3-lxml:amd64 (5.4.0-1build1) ... 97s Setting up libtiff6:amd64 (4.7.0-3ubuntu1) ... 97s Setting up xml-core (0.19) ... 97s Setting up python3-awkward (2.6.5-1build1) ... 97s Setting up python3-contourpy (1.3.1-1build1) ... 97s Setting up llvm-19 (1:19.1.7-5ubuntu2) ... 97s Setting up libfontconfig1:amd64 (2.15.0-2.2ubuntu1) ... 97s Setting up libhdf5-hl-310:amd64 (1.14.5+repack-3build1) ... 97s Setting up libxft2:amd64 (2.3.6-1build1) ... 98s Setting up python3-scipy (1.15.3-1) ... 100s Setting up python3-pytest-xdist (3.6.1-1) ... 100s Setting up libtk8.6:amd64 (8.6.16-1) ... 100s Setting up python3-pandas-lib:amd64 (2.2.3+dfsg-9) ... 100s Setting up python3-sklearn-lib:amd64 (1.4.2+dfsg-8) ... 100s Setting up python3-h5py-serial (3.13.0-1ubuntu1) ... 100s Setting up python3-pytest-cov (5.0.0-1) ... 100s Setting up libtbb12:amd64 (2022.1.0-1) ... 100s Setting up python3.13-tk (3.13.5-2) ... 100s Setting up python3-pil:amd64 (11.1.0-5build1) ... 101s Setting up python3-llvmlite (0.44.0-1) ... 101s Setting up python3-pandas (2.2.3+dfsg-9) ... 104s Setting up python3-openpyxl (3.1.5+dfsg-2) ... 104s Setting up sphinx-common (8.2.3-1ubuntu2) ... 104s Setting up python3-h5py (3.13.0-1ubuntu1) ... 104s Setting up python3-sklearn (1.4.2+dfsg-8) ... 106s Setting up tk8.6-blt2.5 (2.5.3+dfsg-8) ... 106s Setting up blt (2.5.3+dfsg-8) ... 106s Setting up python3-xarray (2025.03.1-8) ... 107s Setting up python3-tk:amd64 (3.13.4-1) ... 107s Setting up python3-numba (0.61.2+dfsg-1) ... 107s update-alternatives: using /usr/share/python3-numba/numba to provide /usr/bin/numba (numba) in auto mode 109s Setting up python3-pil.imagetk:amd64 (11.1.0-5build1) ... 109s Setting up python3-fonttools (4.55.3-2build1) ... 109s Setting up python3-ufolib2 (0.17.1+dfsg1-1) ... 109s Setting up python3-matplotlib (3.10.1+dfsg1-4) ... 111s Processing triggers for libc-bin (2.41-6ubuntu2) ... 111s Processing triggers for systemd (257.6-1ubuntu1) ... 111s Processing triggers for man-db (2.13.1-1) ... 111s Processing triggers for install-info (7.1.1-1) ... 111s Processing triggers for sgml-base (1.31+nmu1) ... 111s Setting up docutils-common (0.21.2+dfsg-2) ... 111s Processing triggers for sgml-base (1.31+nmu1) ... 111s Setting up python3-docutils (0.21.2+dfsg-2) ... 112s Setting up python3-sphinx (8.2.3-1ubuntu2) ... 112s Setting up python3-sphinx-copybutton (0.5.2-2) ... 112s Setting up python3-pydata-sphinx-theme (0.16.1+dfsg-3) ... 112s Setting up python3-numcodecs (0.16.0+ds-1) ... 113s Setting up python3-zarr (3.0.6-2) ... 113s Setting up python3-anndata (0.12.0~rc1-1) ... 114s autopkgtest [16:53:43]: test run-unit-test: [----------------------- 114s ++ pwd 114s + CUR_DIR=/tmp/autopkgtest.zqx9Nf/build.YLK/src 114s + QUILT_PATCHES=debian/patches 114s + quilt push -a 114s File series fully applied, ends at patch debian/patches/skip_awkward.patch 114s + true 114s + '[' /tmp/autopkgtest.zqx9Nf/autopkgtest_tmp = '' ']' 114s + cp -a tests/ /tmp/autopkgtest.zqx9Nf/autopkgtest_tmp/ 114s + echo 114s + cd /tmp/autopkgtest.zqx9Nf/autopkgtest_tmp 114s ++ py3versions --supported 114s Testing with python3.13: 114s + for py in $(py3versions --supported) 114s + echo 'Testing with python3.13:' 114s + python3.13 -m pytest 117s ============================= test session starts ============================== 117s platform linux -- Python 3.13.5, pytest-8.3.5, pluggy-1.5.0 117s rootdir: /tmp/autopkgtest.zqx9Nf/autopkgtest_tmp 117s plugins: cov-5.0.0, xdist-3.6.1, mock-3.14.0, typeguard-4.4.2 117s collected 6026 items / 3 skipped 117s 131s tests/lazy/test_concat.py .............................................. [ 0%] 155s ................................................. [ 1%] 157s tests/lazy/test_read.py .... [ 1%] 170s tests/lazy/test_concat.py ........................ [ 2%] 172s tests/lazy/test_read.py .... [ 2%] 183s tests/lazy/test_concat.py ........................ [ 2%] 184s tests/lazy/test_read.py .... [ 2%] 195s tests/lazy/test_concat.py ........ssss........ssss [ 2%] 196s tests/lazy/test_read.py .... [ 3%] 207s tests/lazy/test_concat.py ........ssss........ssss [ 3%] 208s tests/lazy/test_read.py .... [ 3%] 219s tests/lazy/test_concat.py ........ssss........ssss [ 3%] 220s tests/lazy/test_read.py .... [ 3%] 232s tests/lazy/test_concat.py ........ssss........ssss [ 4%] 234s tests/lazy/test_read.py .... [ 4%] 245s tests/lazy/test_concat.py ........................ [ 4%] 246s tests/lazy/test_read.py .... [ 4%] 259s tests/lazy/test_concat.py ........................ [ 5%] 268s tests/lazy/test_read.py ................................... [ 5%] 278s tests/lazy/test_concat.py ........ssss........ssss [ 6%] 280s tests/lazy/test_read.py .... [ 6%] 292s tests/lazy/test_concat.py ........ssss........ssss [ 6%] 294s tests/lazy/test_read.py .... [ 6%] 305s tests/lazy/test_concat.py ........................ [ 7%] 306s tests/lazy/test_read.py .... [ 7%] 319s tests/lazy/test_concat.py ........................ [ 7%] 328s tests/lazy/test_read.py ................................... [ 8%] 340s tests/lazy/test_concat.py ........ssss........ssss [ 8%] 342s tests/lazy/test_read.py .... [ 8%] 354s tests/lazy/test_concat.py ........ssss........ssss [ 9%] 356s tests/lazy/test_read.py .... [ 9%] 367s tests/lazy/test_concat.py ........................ [ 9%] 379s tests/lazy/test_read.py ................................................ [ 10%] 383s .................. [ 10%] 398s tests/lazy/test_concat.py .............................................. [ 11%] 401s ........ [ 11%] 401s tests/lazy/test_write.py ................ [ 11%] 401s tests/test_anncollection.py ..... [ 11%] 401s tests/test_annot.py ...... [ 12%] 402s tests/test_backed_dense.py ........................... [ 12%] 408s tests/test_backed_hdf5.py ...........................x........x..x..x..x [ 13%] 431s ..x..x..x..............................................................x [ 14%] 450s ........x..x..x..x..x..x..x..x........x..x..x..x..x..x..x..x........x..x [ 15%] 469s ..x..x..x..x..x..x........x..x..x..x..x..x..x..x........x..x..x..x..x..x [ 16%] 487s ..x..x........x..x..x..x..x..x..x..x........x..x..x..x..x..x..x......... [ 18%] 487s . [ 18%] 493s tests/test_backed_sparse.py ............................................ [ 18%] 503s ........................................................................ [ 19%] 514s ........................................................................ [ 21%] 524s ........................................................................ [ 22%] 533s ........................................................................ [ 23%] 536s ........................................................................ [ 24%] 537s ........................................................................ [ 25%] 539s .................................................ss [ 26%] 539s tests/test_base.py ..................................................... [ 27%] 539s ......................... [ 28%] 543s tests/test_concatenate.py ...............FFFFFF..............FFFFFF..... [ 28%] 545s ..........FFFFFF......................FFFFFF.....................FFFFFFF [ 30%] 548s FF......................FFF.......FFF.......FFF.......FFF.......FFF..... [ 31%] 548s ..FFF................................................................... [ 32%] 549s ........................................................................ [ 33%] 550s ........................................................................ [ 34%] 553s ........................................................................ [ 35%] 558s ........................................................................ [ 37%] 564s ............................FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF [ 38%] 567s FFFFFFFFFFFFFFFF........................................................ [ 39%] 569s .....x.x................FFF.......FFF.......FFF.......FFF.......FFF..... [ 40%] 569s ...s.......FFF.......... [ 41%] 670s tests/test_concatenate_disk.py ......................................... [ 41%] 815s ............................................................... [ 42%] 839s tests/test_dask.py ..................................................... [ 43%] 843s ....................F... [ 44%] 843s tests/test_deprecations.py .................... [ 44%] 843s tests/test_extensions.py .................... [ 44%] 843s tests/test_get_vector.py . [ 44%] 845s tests/test_helpers.py .............................FFFFFFFFFF.......FFFF [ 45%] 846s FFFFFFFFFFF [ 45%] 848s tests/test_inplace_subset.py ........................................... [ 46%] 851s ........................................................................ [ 47%] 852s ......................... [ 48%] 852s tests/test_io_backwards_compat.py ..... [ 48%] 859s tests/test_io_conversion.py ................... [ 48%] 868s tests/test_io_dispatched.py ..... [ 48%] 870s tests/test_io_elementwise.py ........................................... [ 49%] 875s ............................................FFFFFFFFFFFFFFFFFFFFFFFF.... [ 50%] 961s ........................................................................ [ 51%] 980s ........................................................................ [ 52%] 985s ................. [ 53%] 986s tests/test_io_partial.py ......sss [ 53%] 986s tests/test_io_utils.py .......... [ 53%] 986s tests/test_io_warnings.py s. [ 53%] 986s tests/test_layers.py .......s... [ 53%] 986s tests/test_obsmvarm.py ....... [ 53%] 986s tests/test_obspvarp.py ......... [ 54%] 986s tests/test_raw.py ......xx.... [ 54%] 1002s tests/test_readwrite.py ...............FFFF....FFFF......FF............. [ 55%] 1013s ...........sssssssss........x....................................sssssss [ 56%] 1027s .................................s [ 56%] 1027s tests/test_repr.py ......... [ 56%] 1027s tests/test_settings.py .................. [ 57%] 1028s tests/test_structured_arrays.py ... [ 57%] 1028s tests/test_transpose.py .............. [ 57%] 1028s tests/test_uns.py . [ 57%] 1028s tests/test_utils.py .. [ 57%] 1028s tests/test_views.py ........................FFFFFFFFF................... [ 58%] 1029s ........................................................................ [ 59%] 1029s ........................................................................ [ 60%] 1030s ....................................................FFFFFFFFFFFFFFFFFFFF [ 62%] 1033s FFFFFFFFFF.............................................................. [ 63%] 1035s ........................................................................ [ 64%] 1038s ........................................................................ [ 65%] 1041s ........................................................................ [ 66%] 1044s ........................................................................ [ 68%] 1046s ........................................................................ [ 69%] 1049s ........................................................................ [ 70%] 1052s ........................................................................ [ 71%] 1055s ........................................................................ [ 72%] 1058s ........................................................................ [ 73%] 1061s ........................................................................ [ 75%] 1064s ........................................................................ [ 76%] 1067s ........................................................................ [ 77%] 1072s ...............xxxxxxxxxx............................................... [ 78%] 1078s ...........................................xxxxxxxxxx................... [ 79%] 1085s .......................................................................x [ 81%] 1091s xxxxxxxxx............................................................... [ 82%] 1097s ...........................xxxxxxxxxx................................... [ 83%] 1103s .......................................................xxxxxxxxxx....... [ 84%] 1110s ........................................................................ [ 85%] 1116s ...........xxxxxxxxxx................................................... [ 87%] 1124s .......................................xxxxxxxxxx....................... [ 88%] 1131s ...............................................FFFFFFFFFFFFFFFFFFFFFFFFF [ 89%] 1136s FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF [ 90%] 1140s FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF [ 91%] 1144s FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF [ 93%] 1148s FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF............. [ 94%] 1150s ........................................................................ [ 95%] 1152s .......................FFF.............................................. [ 96%] 1154s .......................................................FFFFFFFFFFFFFFFFF [ 97%] 1155s FFFF...... [ 98%] 1156s tests/test_x.py ........................................................ [ 98%] 1159s ........................x....x....x....x...................... [100%] 1159s 1159s =================================== FAILURES =================================== 1159s _______ test_concatenate_roundtrip[inner-cupy_array-concat_func0-False] ________ 1159s 1159s join_type = 'inner' 1159s array_type = functools.partial(, typ=) 1159s concat_func = functools.partial(, merge='unique') 1159s backwards_compat = False 1159s 1159s @mark_legacy_concatenate 1159s @pytest.mark.parametrize( 1159s ("concat_func", "backwards_compat"), 1159s [ 1159s (partial(concat, merge="unique"), False), 1159s (lambda x, **kwargs: x[0].concatenate(x[1:], **kwargs), True), 1159s ], 1159s ) 1159s def test_concatenate_roundtrip(join_type, array_type, concat_func, backwards_compat): 1159s > adata = gen_adata((100, 10), X_type=array_type, **GEN_ADATA_DASK_ARGS) 1159s 1159s tests/test_concatenate.py:185: 1159s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1159s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:346: in gen_adata 1159s X = X_type(random_state.binomial(100, 0.005, (M, N)).astype(X_dtype)) 1159s /usr/lib/python3.13/functools.py:934: in wrapper 1159s return dispatch(args[0].__class__)(*args, **kw) 1159s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1159s 1159s val = array([[1., 1., 0., 0., 2., 0., 2., 1., 1., 0.], 1159s [0., 0., 0., 0., 1., 0., 0., 0., 1., 1.], 1159s [0., 1., 2., ... 1.], 1159s [0., 1., 0., 0., 1., 0., 2., 0., 1., 1.], 1159s [0., 0., 0., 1., 2., 1., 1., 0., 0., 0.]], dtype=float32) 1159s typ = 1159s 1159s @singledispatch 1159s def as_cupy(val, typ=None): 1159s """ 1159s Rough conversion function 1159s 1159s Will try to infer target type from input type if not specified. 1159s """ 1159s if typ is None: 1159s typ = resolve_cupy_type(val) 1159s 1159s if issubclass(typ, CupyArray): 1159s > import cupy as cp 1159s E ModuleNotFoundError: No module named 'cupy' 1159s 1159s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:1010: ModuleNotFoundError 1159s __________ test_concatenate_roundtrip[inner-cupy_array--True] __________ 1159s 1159s join_type = 'inner' 1159s array_type = functools.partial(, typ=) 1159s concat_func = at 0x72050b540860>, backwards_compat = True 1159s 1159s @mark_legacy_concatenate 1159s @pytest.mark.parametrize( 1159s ("concat_func", "backwards_compat"), 1159s [ 1159s (partial(concat, merge="unique"), False), 1159s (lambda x, **kwargs: x[0].concatenate(x[1:], **kwargs), True), 1159s ], 1159s ) 1159s def test_concatenate_roundtrip(join_type, array_type, concat_func, backwards_compat): 1159s > adata = gen_adata((100, 10), X_type=array_type, **GEN_ADATA_DASK_ARGS) 1159s 1159s tests/test_concatenate.py:185: 1159s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1159s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:346: in gen_adata 1159s X = X_type(random_state.binomial(100, 0.005, (M, N)).astype(X_dtype)) 1159s /usr/lib/python3.13/functools.py:934: in wrapper 1159s return dispatch(args[0].__class__)(*args, **kw) 1159s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1159s 1159s val = array([[1., 1., 0., 0., 0., 1., 0., 0., 2., 1.], 1159s [0., 1., 0., 0., 1., 0., 0., 1., 1., 0.], 1159s [1., 0., 0., ... 0.], 1159s [0., 0., 0., 1., 0., 0., 0., 0., 0., 0.], 1159s [0., 2., 0., 3., 1., 0., 2., 0., 0., 0.]], dtype=float32) 1159s typ = 1159s 1159s @singledispatch 1159s def as_cupy(val, typ=None): 1159s """ 1159s Rough conversion function 1159s 1159s Will try to infer target type from input type if not specified. 1159s """ 1159s if typ is None: 1159s typ = resolve_cupy_type(val) 1159s 1159s if issubclass(typ, CupyArray): 1159s > import cupy as cp 1159s E ModuleNotFoundError: No module named 'cupy' 1159s 1159s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:1010: ModuleNotFoundError 1159s ________ test_concatenate_roundtrip[inner-cupy_csr-concat_func0-False] _________ 1159s 1159s join_type = 'inner' 1159s array_type = functools.partial(, typ=) 1159s concat_func = functools.partial(, merge='unique') 1159s backwards_compat = False 1159s 1159s @mark_legacy_concatenate 1159s @pytest.mark.parametrize( 1159s ("concat_func", "backwards_compat"), 1159s [ 1159s (partial(concat, merge="unique"), False), 1159s (lambda x, **kwargs: x[0].concatenate(x[1:], **kwargs), True), 1159s ], 1159s ) 1159s def test_concatenate_roundtrip(join_type, array_type, concat_func, backwards_compat): 1159s > adata = gen_adata((100, 10), X_type=array_type, **GEN_ADATA_DASK_ARGS) 1159s 1159s tests/test_concatenate.py:185: 1159s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1159s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:346: in gen_adata 1159s X = X_type(random_state.binomial(100, 0.005, (M, N)).astype(X_dtype)) 1159s /usr/lib/python3.13/functools.py:934: in wrapper 1159s return dispatch(args[0].__class__)(*args, **kw) 1159s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1159s 1159s val = array([[1., 1., 0., 0., 0., 0., 0., 1., 0., 0.], 1159s [2., 0., 0., 0., 1., 1., 0., 1., 1., 0.], 1159s [0., 0., 1., ... 1.], 1159s [0., 1., 2., 1., 0., 0., 0., 2., 1., 0.], 1159s [1., 1., 1., 2., 0., 0., 0., 0., 0., 0.]], dtype=float32) 1159s typ = 1159s 1159s @singledispatch 1159s def as_cupy(val, typ=None): 1159s """ 1159s Rough conversion function 1159s 1159s Will try to infer target type from input type if not specified. 1159s """ 1159s if typ is None: 1159s typ = resolve_cupy_type(val) 1159s 1159s if issubclass(typ, CupyArray): 1159s import cupy as cp 1159s 1159s if isinstance(val, CSMatrix): 1159s val = val.toarray() 1159s return cp.array(val) 1159s elif issubclass(typ, CupyCSRMatrix): 1159s > import cupy as cp 1159s E ModuleNotFoundError: No module named 'cupy' 1159s 1159s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:1016: ModuleNotFoundError 1159s ___________ test_concatenate_roundtrip[inner-cupy_csr--True] ___________ 1159s 1159s join_type = 'inner' 1159s array_type = functools.partial(, typ=) 1159s concat_func = at 0x72050b540860>, backwards_compat = True 1159s 1159s @mark_legacy_concatenate 1159s @pytest.mark.parametrize( 1159s ("concat_func", "backwards_compat"), 1159s [ 1159s (partial(concat, merge="unique"), False), 1159s (lambda x, **kwargs: x[0].concatenate(x[1:], **kwargs), True), 1159s ], 1159s ) 1159s def test_concatenate_roundtrip(join_type, array_type, concat_func, backwards_compat): 1159s > adata = gen_adata((100, 10), X_type=array_type, **GEN_ADATA_DASK_ARGS) 1159s 1159s tests/test_concatenate.py:185: 1159s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1159s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:346: in gen_adata 1159s X = X_type(random_state.binomial(100, 0.005, (M, N)).astype(X_dtype)) 1159s /usr/lib/python3.13/functools.py:934: in wrapper 1159s return dispatch(args[0].__class__)(*args, **kw) 1159s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1159s 1159s val = array([[0., 1., 2., 0., 2., 2., 0., 0., 0., 0.], 1159s [1., 0., 1., 0., 0., 0., 0., 0., 0., 1.], 1159s [0., 0., 0., ... 0.], 1159s [0., 0., 0., 1., 0., 1., 1., 0., 1., 1.], 1159s [0., 0., 0., 1., 1., 0., 1., 0., 0., 1.]], dtype=float32) 1159s typ = 1159s 1159s @singledispatch 1159s def as_cupy(val, typ=None): 1159s """ 1159s Rough conversion function 1159s 1159s Will try to infer target type from input type if not specified. 1159s """ 1159s if typ is None: 1159s typ = resolve_cupy_type(val) 1159s 1159s if issubclass(typ, CupyArray): 1159s import cupy as cp 1159s 1159s if isinstance(val, CSMatrix): 1159s val = val.toarray() 1159s return cp.array(val) 1159s elif issubclass(typ, CupyCSRMatrix): 1159s > import cupy as cp 1159s E ModuleNotFoundError: No module named 'cupy' 1159s 1159s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:1016: ModuleNotFoundError 1159s ________ test_concatenate_roundtrip[inner-cupy_csc-concat_func0-False] _________ 1159s 1159s join_type = 'inner' 1159s array_type = functools.partial(, typ=) 1159s concat_func = functools.partial(, merge='unique') 1159s backwards_compat = False 1159s 1159s @mark_legacy_concatenate 1159s @pytest.mark.parametrize( 1159s ("concat_func", "backwards_compat"), 1159s [ 1159s (partial(concat, merge="unique"), False), 1159s (lambda x, **kwargs: x[0].concatenate(x[1:], **kwargs), True), 1159s ], 1159s ) 1159s def test_concatenate_roundtrip(join_type, array_type, concat_func, backwards_compat): 1159s > adata = gen_adata((100, 10), X_type=array_type, **GEN_ADATA_DASK_ARGS) 1159s 1159s tests/test_concatenate.py:185: 1159s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1159s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:346: in gen_adata 1159s X = X_type(random_state.binomial(100, 0.005, (M, N)).astype(X_dtype)) 1159s /usr/lib/python3.13/functools.py:934: in wrapper 1159s return dispatch(args[0].__class__)(*args, **kw) 1159s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1159s 1159s val = array([[0., 0., 2., 0., 0., 1., 0., 1., 1., 0.], 1159s [0., 0., 0., 0., 0., 0., 0., 0., 0., 2.], 1159s [1., 0., 0., ... 0.], 1159s [1., 0., 0., 1., 1., 1., 1., 0., 1., 1.], 1159s [1., 0., 0., 0., 0., 0., 0., 0., 0., 0.]], dtype=float32) 1159s typ = 1159s 1159s @singledispatch 1159s def as_cupy(val, typ=None): 1159s """ 1159s Rough conversion function 1159s 1159s Will try to infer target type from input type if not specified. 1159s """ 1159s if typ is None: 1159s typ = resolve_cupy_type(val) 1159s 1159s if issubclass(typ, CupyArray): 1159s import cupy as cp 1159s 1159s if isinstance(val, CSMatrix): 1159s val = val.toarray() 1159s return cp.array(val) 1159s elif issubclass(typ, CupyCSRMatrix): 1159s import cupy as cp 1159s import cupyx.scipy.sparse as cpsparse 1159s 1159s if isinstance(val, np.ndarray): 1159s return cpsparse.csr_matrix(cp.array(val)) 1159s else: 1159s return cpsparse.csr_matrix(val) 1159s elif issubclass(typ, CupyCSCMatrix): 1159s > import cupy as cp 1159s E ModuleNotFoundError: No module named 'cupy' 1159s 1159s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:1024: ModuleNotFoundError 1159s ___________ test_concatenate_roundtrip[inner-cupy_csc--True] ___________ 1159s 1159s join_type = 'inner' 1159s array_type = functools.partial(, typ=) 1159s concat_func = at 0x72050b540860>, backwards_compat = True 1159s 1159s @mark_legacy_concatenate 1159s @pytest.mark.parametrize( 1159s ("concat_func", "backwards_compat"), 1159s [ 1159s (partial(concat, merge="unique"), False), 1159s (lambda x, **kwargs: x[0].concatenate(x[1:], **kwargs), True), 1159s ], 1159s ) 1159s def test_concatenate_roundtrip(join_type, array_type, concat_func, backwards_compat): 1159s > adata = gen_adata((100, 10), X_type=array_type, **GEN_ADATA_DASK_ARGS) 1159s 1159s tests/test_concatenate.py:185: 1159s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1159s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:346: in gen_adata 1159s X = X_type(random_state.binomial(100, 0.005, (M, N)).astype(X_dtype)) 1159s /usr/lib/python3.13/functools.py:934: in wrapper 1159s return dispatch(args[0].__class__)(*args, **kw) 1159s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1159s 1159s val = array([[0., 0., 1., 0., 0., 1., 0., 0., 0., 0.], 1159s [0., 0., 0., 0., 0., 1., 0., 0., 0., 0.], 1159s [1., 0., 2., ... 0.], 1159s [2., 0., 1., 0., 0., 0., 0., 1., 2., 0.], 1159s [2., 0., 0., 1., 1., 1., 0., 1., 0., 1.]], dtype=float32) 1159s typ = 1159s 1159s @singledispatch 1159s def as_cupy(val, typ=None): 1159s """ 1159s Rough conversion function 1159s 1159s Will try to infer target type from input type if not specified. 1159s """ 1159s if typ is None: 1159s typ = resolve_cupy_type(val) 1159s 1159s if issubclass(typ, CupyArray): 1159s import cupy as cp 1159s 1159s if isinstance(val, CSMatrix): 1159s val = val.toarray() 1159s return cp.array(val) 1159s elif issubclass(typ, CupyCSRMatrix): 1159s import cupy as cp 1159s import cupyx.scipy.sparse as cpsparse 1159s 1159s if isinstance(val, np.ndarray): 1159s return cpsparse.csr_matrix(cp.array(val)) 1159s else: 1159s return cpsparse.csr_matrix(val) 1159s elif issubclass(typ, CupyCSCMatrix): 1159s > import cupy as cp 1159s E ModuleNotFoundError: No module named 'cupy' 1159s 1159s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:1024: ModuleNotFoundError 1159s _______ test_concatenate_roundtrip[outer-cupy_array-concat_func0-False] ________ 1159s 1159s join_type = 'outer' 1159s array_type = functools.partial(, typ=) 1159s concat_func = functools.partial(, merge='unique') 1159s backwards_compat = False 1159s 1159s @mark_legacy_concatenate 1159s @pytest.mark.parametrize( 1159s ("concat_func", "backwards_compat"), 1159s [ 1159s (partial(concat, merge="unique"), False), 1159s (lambda x, **kwargs: x[0].concatenate(x[1:], **kwargs), True), 1159s ], 1159s ) 1159s def test_concatenate_roundtrip(join_type, array_type, concat_func, backwards_compat): 1159s > adata = gen_adata((100, 10), X_type=array_type, **GEN_ADATA_DASK_ARGS) 1159s 1159s tests/test_concatenate.py:185: 1159s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1159s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:346: in gen_adata 1159s X = X_type(random_state.binomial(100, 0.005, (M, N)).astype(X_dtype)) 1159s /usr/lib/python3.13/functools.py:934: in wrapper 1159s return dispatch(args[0].__class__)(*args, **kw) 1159s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1159s 1159s val = array([[2., 0., 1., 0., 0., 0., 0., 0., 0., 0.], 1159s [0., 2., 0., 1., 0., 0., 0., 0., 0., 1.], 1159s [0., 1., 1., ... 0.], 1159s [0., 0., 0., 2., 0., 0., 1., 1., 3., 0.], 1159s [0., 0., 0., 1., 0., 0., 0., 0., 1., 1.]], dtype=float32) 1159s typ = 1159s 1159s @singledispatch 1159s def as_cupy(val, typ=None): 1159s """ 1159s Rough conversion function 1159s 1159s Will try to infer target type from input type if not specified. 1159s """ 1159s if typ is None: 1159s typ = resolve_cupy_type(val) 1159s 1159s if issubclass(typ, CupyArray): 1159s > import cupy as cp 1159s E ModuleNotFoundError: No module named 'cupy' 1159s 1159s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:1010: ModuleNotFoundError 1159s __________ test_concatenate_roundtrip[outer-cupy_array--True] __________ 1159s 1159s join_type = 'outer' 1159s array_type = functools.partial(, typ=) 1159s concat_func = at 0x72050b540860>, backwards_compat = True 1159s 1159s @mark_legacy_concatenate 1159s @pytest.mark.parametrize( 1159s ("concat_func", "backwards_compat"), 1159s [ 1159s (partial(concat, merge="unique"), False), 1159s (lambda x, **kwargs: x[0].concatenate(x[1:], **kwargs), True), 1159s ], 1159s ) 1159s def test_concatenate_roundtrip(join_type, array_type, concat_func, backwards_compat): 1159s > adata = gen_adata((100, 10), X_type=array_type, **GEN_ADATA_DASK_ARGS) 1159s 1159s tests/test_concatenate.py:185: 1159s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1159s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:346: in gen_adata 1159s X = X_type(random_state.binomial(100, 0.005, (M, N)).astype(X_dtype)) 1159s /usr/lib/python3.13/functools.py:934: in wrapper 1159s return dispatch(args[0].__class__)(*args, **kw) 1159s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1159s 1159s val = array([[0., 0., 0., 1., 1., 0., 0., 0., 0., 3.], 1159s [0., 1., 0., 1., 0., 1., 0., 0., 0., 0.], 1159s [0., 2., 1., ... 0.], 1159s [0., 0., 1., 2., 0., 0., 0., 0., 0., 0.], 1159s [1., 0., 0., 1., 0., 1., 0., 0., 1., 0.]], dtype=float32) 1159s typ = 1159s 1159s @singledispatch 1159s def as_cupy(val, typ=None): 1159s """ 1159s Rough conversion function 1159s 1159s Will try to infer target type from input type if not specified. 1159s """ 1159s if typ is None: 1159s typ = resolve_cupy_type(val) 1159s 1159s if issubclass(typ, CupyArray): 1159s > import cupy as cp 1159s E ModuleNotFoundError: No module named 'cupy' 1159s 1159s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:1010: ModuleNotFoundError 1159s ________ test_concatenate_roundtrip[outer-cupy_csr-concat_func0-False] _________ 1159s 1159s join_type = 'outer' 1159s array_type = functools.partial(, typ=) 1159s concat_func = functools.partial(, merge='unique') 1159s backwards_compat = False 1159s 1159s @mark_legacy_concatenate 1159s @pytest.mark.parametrize( 1159s ("concat_func", "backwards_compat"), 1159s [ 1159s (partial(concat, merge="unique"), False), 1159s (lambda x, **kwargs: x[0].concatenate(x[1:], **kwargs), True), 1159s ], 1159s ) 1159s def test_concatenate_roundtrip(join_type, array_type, concat_func, backwards_compat): 1159s > adata = gen_adata((100, 10), X_type=array_type, **GEN_ADATA_DASK_ARGS) 1159s 1159s tests/test_concatenate.py:185: 1159s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1159s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:346: in gen_adata 1159s X = X_type(random_state.binomial(100, 0.005, (M, N)).astype(X_dtype)) 1159s /usr/lib/python3.13/functools.py:934: in wrapper 1159s return dispatch(args[0].__class__)(*args, **kw) 1159s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1159s 1159s val = array([[1., 0., 0., 1., 1., 0., 2., 0., 1., 0.], 1159s [3., 0., 0., 0., 0., 1., 0., 1., 1., 0.], 1159s [0., 0., 0., ... 0.], 1159s [1., 0., 0., 0., 0., 0., 1., 0., 0., 0.], 1159s [1., 0., 0., 0., 0., 1., 2., 1., 1., 1.]], dtype=float32) 1159s typ = 1159s 1159s @singledispatch 1159s def as_cupy(val, typ=None): 1159s """ 1159s Rough conversion function 1159s 1159s Will try to infer target type from input type if not specified. 1159s """ 1159s if typ is None: 1159s typ = resolve_cupy_type(val) 1159s 1159s if issubclass(typ, CupyArray): 1159s import cupy as cp 1159s 1159s if isinstance(val, CSMatrix): 1159s val = val.toarray() 1159s return cp.array(val) 1159s elif issubclass(typ, CupyCSRMatrix): 1159s > import cupy as cp 1159s E ModuleNotFoundError: No module named 'cupy' 1159s 1159s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:1016: ModuleNotFoundError 1159s ___________ test_concatenate_roundtrip[outer-cupy_csr--True] ___________ 1159s 1159s join_type = 'outer' 1159s array_type = functools.partial(, typ=) 1159s concat_func = at 0x72050b540860>, backwards_compat = True 1159s 1159s @mark_legacy_concatenate 1159s @pytest.mark.parametrize( 1159s ("concat_func", "backwards_compat"), 1159s [ 1159s (partial(concat, merge="unique"), False), 1159s (lambda x, **kwargs: x[0].concatenate(x[1:], **kwargs), True), 1159s ], 1159s ) 1159s def test_concatenate_roundtrip(join_type, array_type, concat_func, backwards_compat): 1159s > adata = gen_adata((100, 10), X_type=array_type, **GEN_ADATA_DASK_ARGS) 1159s 1159s tests/test_concatenate.py:185: 1159s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1159s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:346: in gen_adata 1159s X = X_type(random_state.binomial(100, 0.005, (M, N)).astype(X_dtype)) 1159s /usr/lib/python3.13/functools.py:934: in wrapper 1159s return dispatch(args[0].__class__)(*args, **kw) 1159s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1159s 1159s val = array([[1., 1., 0., 0., 1., 1., 0., 1., 1., 0.], 1159s [0., 0., 2., 0., 1., 0., 0., 0., 1., 2.], 1159s [0., 0., 0., ... 0.], 1159s [0., 0., 1., 0., 0., 0., 0., 0., 0., 0.], 1159s [0., 0., 1., 1., 0., 1., 0., 0., 0., 0.]], dtype=float32) 1159s typ = 1159s 1159s @singledispatch 1159s def as_cupy(val, typ=None): 1159s """ 1159s Rough conversion function 1159s 1159s Will try to infer target type from input type if not specified. 1159s """ 1159s if typ is None: 1159s typ = resolve_cupy_type(val) 1159s 1159s if issubclass(typ, CupyArray): 1159s import cupy as cp 1159s 1159s if isinstance(val, CSMatrix): 1159s val = val.toarray() 1159s return cp.array(val) 1159s elif issubclass(typ, CupyCSRMatrix): 1159s > import cupy as cp 1159s E ModuleNotFoundError: No module named 'cupy' 1159s 1159s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:1016: ModuleNotFoundError 1159s ________ test_concatenate_roundtrip[outer-cupy_csc-concat_func0-False] _________ 1159s 1159s join_type = 'outer' 1159s array_type = functools.partial(, typ=) 1159s concat_func = functools.partial(, merge='unique') 1159s backwards_compat = False 1159s 1159s @mark_legacy_concatenate 1159s @pytest.mark.parametrize( 1159s ("concat_func", "backwards_compat"), 1159s [ 1159s (partial(concat, merge="unique"), False), 1159s (lambda x, **kwargs: x[0].concatenate(x[1:], **kwargs), True), 1159s ], 1159s ) 1159s def test_concatenate_roundtrip(join_type, array_type, concat_func, backwards_compat): 1159s > adata = gen_adata((100, 10), X_type=array_type, **GEN_ADATA_DASK_ARGS) 1159s 1159s tests/test_concatenate.py:185: 1159s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1159s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:346: in gen_adata 1159s X = X_type(random_state.binomial(100, 0.005, (M, N)).astype(X_dtype)) 1159s /usr/lib/python3.13/functools.py:934: in wrapper 1159s return dispatch(args[0].__class__)(*args, **kw) 1159s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1159s 1159s val = array([[0., 0., 0., 0., 0., 1., 0., 0., 0., 0.], 1159s [1., 0., 0., 1., 0., 0., 1., 0., 2., 0.], 1159s [0., 1., 0., ... 0.], 1159s [0., 2., 0., 0., 0., 1., 1., 1., 0., 1.], 1159s [0., 0., 1., 3., 1., 0., 0., 0., 1., 2.]], dtype=float32) 1159s typ = 1159s 1159s @singledispatch 1159s def as_cupy(val, typ=None): 1159s """ 1159s Rough conversion function 1159s 1159s Will try to infer target type from input type if not specified. 1159s """ 1159s if typ is None: 1159s typ = resolve_cupy_type(val) 1159s 1159s if issubclass(typ, CupyArray): 1159s import cupy as cp 1159s 1159s if isinstance(val, CSMatrix): 1159s val = val.toarray() 1159s return cp.array(val) 1159s elif issubclass(typ, CupyCSRMatrix): 1159s import cupy as cp 1159s import cupyx.scipy.sparse as cpsparse 1159s 1159s if isinstance(val, np.ndarray): 1159s return cpsparse.csr_matrix(cp.array(val)) 1159s else: 1159s return cpsparse.csr_matrix(val) 1159s elif issubclass(typ, CupyCSCMatrix): 1159s > import cupy as cp 1159s E ModuleNotFoundError: No module named 'cupy' 1159s 1159s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:1024: ModuleNotFoundError 1159s ___________ test_concatenate_roundtrip[outer-cupy_csc--True] ___________ 1159s 1159s join_type = 'outer' 1159s array_type = functools.partial(, typ=) 1159s concat_func = at 0x72050b540860>, backwards_compat = True 1159s 1159s @mark_legacy_concatenate 1159s @pytest.mark.parametrize( 1159s ("concat_func", "backwards_compat"), 1159s [ 1159s (partial(concat, merge="unique"), False), 1159s (lambda x, **kwargs: x[0].concatenate(x[1:], **kwargs), True), 1159s ], 1159s ) 1159s def test_concatenate_roundtrip(join_type, array_type, concat_func, backwards_compat): 1159s > adata = gen_adata((100, 10), X_type=array_type, **GEN_ADATA_DASK_ARGS) 1159s 1159s tests/test_concatenate.py:185: 1159s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1159s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:346: in gen_adata 1159s X = X_type(random_state.binomial(100, 0.005, (M, N)).astype(X_dtype)) 1159s /usr/lib/python3.13/functools.py:934: in wrapper 1159s return dispatch(args[0].__class__)(*args, **kw) 1159s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1159s 1159s val = array([[0., 1., 2., 0., 1., 0., 2., 0., 2., 1.], 1159s [0., 2., 1., 0., 0., 0., 1., 0., 0., 1.], 1159s [0., 0., 2., ... 1.], 1159s [1., 1., 0., 0., 0., 1., 0., 0., 0., 0.], 1159s [0., 2., 0., 1., 0., 1., 0., 1., 0., 0.]], dtype=float32) 1159s typ = 1159s 1159s @singledispatch 1159s def as_cupy(val, typ=None): 1159s """ 1159s Rough conversion function 1159s 1159s Will try to infer target type from input type if not specified. 1159s """ 1159s if typ is None: 1159s typ = resolve_cupy_type(val) 1159s 1159s if issubclass(typ, CupyArray): 1159s import cupy as cp 1159s 1159s if isinstance(val, CSMatrix): 1159s val = val.toarray() 1159s return cp.array(val) 1159s elif issubclass(typ, CupyCSRMatrix): 1159s import cupy as cp 1159s import cupyx.scipy.sparse as cpsparse 1159s 1159s if isinstance(val, np.ndarray): 1159s return cpsparse.csr_matrix(cp.array(val)) 1159s else: 1159s return cpsparse.csr_matrix(val) 1159s elif issubclass(typ, CupyCSCMatrix): 1159s > import cupy as cp 1159s E ModuleNotFoundError: No module named 'cupy' 1159s 1159s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:1024: ModuleNotFoundError 1159s __________________ test_concatenate_layers[cupy_array-inner] ___________________ 1159s 1159s array_type = functools.partial(, typ=) 1159s join_type = 'inner' 1159s 1159s @mark_legacy_concatenate 1159s def test_concatenate_layers(array_type, join_type): 1159s adatas = [] 1159s for _ in range(5): 1159s > a = array_type(sparse.random(100, 200, format="csr")) 1159s 1159s tests/test_concatenate.py:291: 1159s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1159s /usr/lib/python3.13/functools.py:934: in wrapper 1159s return dispatch(args[0].__class__)(*args, **kw) 1159s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1159s 1159s val = 1159s typ = 1159s 1159s @singledispatch 1159s def as_cupy(val, typ=None): 1159s """ 1159s Rough conversion function 1159s 1159s Will try to infer target type from input type if not specified. 1159s """ 1159s if typ is None: 1159s typ = resolve_cupy_type(val) 1159s 1159s if issubclass(typ, CupyArray): 1159s > import cupy as cp 1159s E ModuleNotFoundError: No module named 'cupy' 1159s 1159s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:1010: ModuleNotFoundError 1159s __________________ test_concatenate_layers[cupy_array-outer] ___________________ 1159s 1159s array_type = functools.partial(, typ=) 1159s join_type = 'outer' 1159s 1159s @mark_legacy_concatenate 1159s def test_concatenate_layers(array_type, join_type): 1159s adatas = [] 1159s for _ in range(5): 1159s > a = array_type(sparse.random(100, 200, format="csr")) 1159s 1159s tests/test_concatenate.py:291: 1159s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1159s /usr/lib/python3.13/functools.py:934: in wrapper 1159s return dispatch(args[0].__class__)(*args, **kw) 1159s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1159s 1159s val = 1159s typ = 1159s 1159s @singledispatch 1159s def as_cupy(val, typ=None): 1159s """ 1159s Rough conversion function 1159s 1159s Will try to infer target type from input type if not specified. 1159s """ 1159s if typ is None: 1159s typ = resolve_cupy_type(val) 1159s 1159s if issubclass(typ, CupyArray): 1159s > import cupy as cp 1159s E ModuleNotFoundError: No module named 'cupy' 1159s 1159s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:1010: ModuleNotFoundError 1159s ___________________ test_concatenate_layers[cupy_csr-inner] ____________________ 1159s 1159s array_type = functools.partial(, typ=) 1159s join_type = 'inner' 1159s 1159s @mark_legacy_concatenate 1159s def test_concatenate_layers(array_type, join_type): 1159s adatas = [] 1159s for _ in range(5): 1159s > a = array_type(sparse.random(100, 200, format="csr")) 1159s 1159s tests/test_concatenate.py:291: 1159s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1159s /usr/lib/python3.13/functools.py:934: in wrapper 1159s return dispatch(args[0].__class__)(*args, **kw) 1159s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1159s 1159s val = 1159s typ = 1159s 1159s @singledispatch 1159s def as_cupy(val, typ=None): 1159s """ 1159s Rough conversion function 1159s 1159s Will try to infer target type from input type if not specified. 1159s """ 1159s if typ is None: 1159s typ = resolve_cupy_type(val) 1159s 1159s if issubclass(typ, CupyArray): 1159s import cupy as cp 1159s 1159s if isinstance(val, CSMatrix): 1159s val = val.toarray() 1159s return cp.array(val) 1159s elif issubclass(typ, CupyCSRMatrix): 1159s > import cupy as cp 1159s E ModuleNotFoundError: No module named 'cupy' 1159s 1159s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:1016: ModuleNotFoundError 1159s ___________________ test_concatenate_layers[cupy_csr-outer] ____________________ 1159s 1159s array_type = functools.partial(, typ=) 1159s join_type = 'outer' 1159s 1159s @mark_legacy_concatenate 1159s def test_concatenate_layers(array_type, join_type): 1159s adatas = [] 1159s for _ in range(5): 1159s > a = array_type(sparse.random(100, 200, format="csr")) 1159s 1159s tests/test_concatenate.py:291: 1159s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1159s /usr/lib/python3.13/functools.py:934: in wrapper 1159s return dispatch(args[0].__class__)(*args, **kw) 1159s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1159s 1159s val = 1159s typ = 1159s 1159s @singledispatch 1159s def as_cupy(val, typ=None): 1159s """ 1159s Rough conversion function 1159s 1159s Will try to infer target type from input type if not specified. 1159s """ 1159s if typ is None: 1159s typ = resolve_cupy_type(val) 1159s 1159s if issubclass(typ, CupyArray): 1159s import cupy as cp 1159s 1159s if isinstance(val, CSMatrix): 1159s val = val.toarray() 1159s return cp.array(val) 1159s elif issubclass(typ, CupyCSRMatrix): 1159s > import cupy as cp 1159s E ModuleNotFoundError: No module named 'cupy' 1159s 1159s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:1016: ModuleNotFoundError 1159s ___________________ test_concatenate_layers[cupy_csc-inner] ____________________ 1159s 1159s array_type = functools.partial(, typ=) 1159s join_type = 'inner' 1159s 1159s @mark_legacy_concatenate 1159s def test_concatenate_layers(array_type, join_type): 1159s adatas = [] 1159s for _ in range(5): 1159s > a = array_type(sparse.random(100, 200, format="csr")) 1159s 1159s tests/test_concatenate.py:291: 1159s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1159s /usr/lib/python3.13/functools.py:934: in wrapper 1159s return dispatch(args[0].__class__)(*args, **kw) 1159s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1159s 1159s val = 1159s typ = 1159s 1159s @singledispatch 1159s def as_cupy(val, typ=None): 1159s """ 1159s Rough conversion function 1159s 1159s Will try to infer target type from input type if not specified. 1159s """ 1159s if typ is None: 1159s typ = resolve_cupy_type(val) 1159s 1159s if issubclass(typ, CupyArray): 1159s import cupy as cp 1159s 1159s if isinstance(val, CSMatrix): 1159s val = val.toarray() 1159s return cp.array(val) 1159s elif issubclass(typ, CupyCSRMatrix): 1159s import cupy as cp 1159s import cupyx.scipy.sparse as cpsparse 1159s 1159s if isinstance(val, np.ndarray): 1159s return cpsparse.csr_matrix(cp.array(val)) 1159s else: 1159s return cpsparse.csr_matrix(val) 1159s elif issubclass(typ, CupyCSCMatrix): 1159s > import cupy as cp 1159s E ModuleNotFoundError: No module named 'cupy' 1159s 1159s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:1024: ModuleNotFoundError 1159s ___________________ test_concatenate_layers[cupy_csc-outer] ____________________ 1159s 1159s array_type = functools.partial(, typ=) 1159s join_type = 'outer' 1159s 1159s @mark_legacy_concatenate 1159s def test_concatenate_layers(array_type, join_type): 1159s adatas = [] 1159s for _ in range(5): 1159s > a = array_type(sparse.random(100, 200, format="csr")) 1159s 1159s tests/test_concatenate.py:291: 1159s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1159s /usr/lib/python3.13/functools.py:934: in wrapper 1159s return dispatch(args[0].__class__)(*args, **kw) 1159s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1159s 1159s val = 1159s typ = 1159s 1159s @singledispatch 1159s def as_cupy(val, typ=None): 1159s """ 1159s Rough conversion function 1159s 1159s Will try to infer target type from input type if not specified. 1159s """ 1159s if typ is None: 1159s typ = resolve_cupy_type(val) 1159s 1159s if issubclass(typ, CupyArray): 1159s import cupy as cp 1159s 1159s if isinstance(val, CSMatrix): 1159s val = val.toarray() 1159s return cp.array(val) 1159s elif issubclass(typ, CupyCSRMatrix): 1159s import cupy as cp 1159s import cupyx.scipy.sparse as cpsparse 1159s 1159s if isinstance(val, np.ndarray): 1159s return cpsparse.csr_matrix(cp.array(val)) 1159s else: 1159s return cpsparse.csr_matrix(val) 1159s elif issubclass(typ, CupyCSCMatrix): 1159s > import cupy as cp 1159s E ModuleNotFoundError: No module named 'cupy' 1159s 1159s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:1024: ModuleNotFoundError 1159s _____________ test_concatenate_layers_misaligned[cupy_array-inner] _____________ 1159s 1159s array_type = functools.partial(, typ=) 1159s join_type = 'inner' 1159s 1159s @mark_legacy_concatenate 1159s def test_concatenate_layers_misaligned(array_type, join_type): 1159s adatas = [] 1159s for _ in range(5): 1159s > a = array_type(sparse.random(100, 200, format="csr")) 1159s 1159s tests/test_concatenate.py:461: 1159s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1159s /usr/lib/python3.13/functools.py:934: in wrapper 1159s return dispatch(args[0].__class__)(*args, **kw) 1159s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1159s 1159s val = 1159s typ = 1159s 1159s @singledispatch 1159s def as_cupy(val, typ=None): 1159s """ 1159s Rough conversion function 1159s 1159s Will try to infer target type from input type if not specified. 1159s """ 1159s if typ is None: 1159s typ = resolve_cupy_type(val) 1159s 1159s if issubclass(typ, CupyArray): 1159s > import cupy as cp 1159s E ModuleNotFoundError: No module named 'cupy' 1159s 1159s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:1010: ModuleNotFoundError 1159s _____________ test_concatenate_layers_misaligned[cupy_array-outer] _____________ 1159s 1159s array_type = functools.partial(, typ=) 1159s join_type = 'outer' 1159s 1159s @mark_legacy_concatenate 1159s def test_concatenate_layers_misaligned(array_type, join_type): 1159s adatas = [] 1159s for _ in range(5): 1159s > a = array_type(sparse.random(100, 200, format="csr")) 1159s 1159s tests/test_concatenate.py:461: 1159s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1159s /usr/lib/python3.13/functools.py:934: in wrapper 1159s return dispatch(args[0].__class__)(*args, **kw) 1159s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1159s 1159s val = 1159s typ = 1159s 1159s @singledispatch 1159s def as_cupy(val, typ=None): 1159s """ 1159s Rough conversion function 1159s 1159s Will try to infer target type from input type if not specified. 1159s """ 1159s if typ is None: 1159s typ = resolve_cupy_type(val) 1159s 1159s if issubclass(typ, CupyArray): 1159s > import cupy as cp 1159s E ModuleNotFoundError: No module named 'cupy' 1159s 1159s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:1010: ModuleNotFoundError 1159s ______________ test_concatenate_layers_misaligned[cupy_csr-inner] ______________ 1159s 1159s array_type = functools.partial(, typ=) 1159s join_type = 'inner' 1159s 1159s @mark_legacy_concatenate 1159s def test_concatenate_layers_misaligned(array_type, join_type): 1159s adatas = [] 1159s for _ in range(5): 1159s > a = array_type(sparse.random(100, 200, format="csr")) 1159s 1159s tests/test_concatenate.py:461: 1159s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1159s /usr/lib/python3.13/functools.py:934: in wrapper 1159s return dispatch(args[0].__class__)(*args, **kw) 1159s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1159s 1159s val = 1159s typ = 1159s 1159s @singledispatch 1159s def as_cupy(val, typ=None): 1159s """ 1159s Rough conversion function 1159s 1159s Will try to infer target type from input type if not specified. 1159s """ 1159s if typ is None: 1159s typ = resolve_cupy_type(val) 1159s 1159s if issubclass(typ, CupyArray): 1159s import cupy as cp 1159s 1159s if isinstance(val, CSMatrix): 1159s val = val.toarray() 1159s return cp.array(val) 1159s elif issubclass(typ, CupyCSRMatrix): 1159s > import cupy as cp 1159s E ModuleNotFoundError: No module named 'cupy' 1159s 1159s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:1016: ModuleNotFoundError 1159s ______________ test_concatenate_layers_misaligned[cupy_csr-outer] ______________ 1159s 1159s array_type = functools.partial(, typ=) 1159s join_type = 'outer' 1159s 1159s @mark_legacy_concatenate 1159s def test_concatenate_layers_misaligned(array_type, join_type): 1159s adatas = [] 1159s for _ in range(5): 1159s > a = array_type(sparse.random(100, 200, format="csr")) 1159s 1159s tests/test_concatenate.py:461: 1159s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1159s /usr/lib/python3.13/functools.py:934: in wrapper 1159s return dispatch(args[0].__class__)(*args, **kw) 1159s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1159s 1159s val = 1159s typ = 1159s 1159s @singledispatch 1159s def as_cupy(val, typ=None): 1159s """ 1159s Rough conversion function 1159s 1159s Will try to infer target type from input type if not specified. 1159s """ 1159s if typ is None: 1159s typ = resolve_cupy_type(val) 1159s 1159s if issubclass(typ, CupyArray): 1159s import cupy as cp 1159s 1159s if isinstance(val, CSMatrix): 1159s val = val.toarray() 1159s return cp.array(val) 1159s elif issubclass(typ, CupyCSRMatrix): 1159s > import cupy as cp 1159s E ModuleNotFoundError: No module named 'cupy' 1159s 1159s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:1016: ModuleNotFoundError 1159s ______________ test_concatenate_layers_misaligned[cupy_csc-inner] ______________ 1159s 1159s array_type = functools.partial(, typ=) 1159s join_type = 'inner' 1159s 1159s @mark_legacy_concatenate 1159s def test_concatenate_layers_misaligned(array_type, join_type): 1159s adatas = [] 1159s for _ in range(5): 1159s > a = array_type(sparse.random(100, 200, format="csr")) 1159s 1159s tests/test_concatenate.py:461: 1159s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1159s /usr/lib/python3.13/functools.py:934: in wrapper 1159s return dispatch(args[0].__class__)(*args, **kw) 1159s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1159s 1159s val = 1159s typ = 1159s 1159s @singledispatch 1159s def as_cupy(val, typ=None): 1159s """ 1159s Rough conversion function 1159s 1159s Will try to infer target type from input type if not specified. 1159s """ 1159s if typ is None: 1159s typ = resolve_cupy_type(val) 1159s 1159s if issubclass(typ, CupyArray): 1159s import cupy as cp 1159s 1159s if isinstance(val, CSMatrix): 1159s val = val.toarray() 1159s return cp.array(val) 1159s elif issubclass(typ, CupyCSRMatrix): 1159s import cupy as cp 1159s import cupyx.scipy.sparse as cpsparse 1159s 1159s if isinstance(val, np.ndarray): 1159s return cpsparse.csr_matrix(cp.array(val)) 1159s else: 1159s return cpsparse.csr_matrix(val) 1159s elif issubclass(typ, CupyCSCMatrix): 1159s > import cupy as cp 1159s E ModuleNotFoundError: No module named 'cupy' 1159s 1159s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:1024: ModuleNotFoundError 1159s ______________ test_concatenate_layers_misaligned[cupy_csc-outer] ______________ 1159s 1159s array_type = functools.partial(, typ=) 1159s join_type = 'outer' 1159s 1159s @mark_legacy_concatenate 1159s def test_concatenate_layers_misaligned(array_type, join_type): 1159s adatas = [] 1159s for _ in range(5): 1159s > a = array_type(sparse.random(100, 200, format="csr")) 1159s 1159s tests/test_concatenate.py:461: 1159s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1159s /usr/lib/python3.13/functools.py:934: in wrapper 1159s return dispatch(args[0].__class__)(*args, **kw) 1159s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1159s 1159s val = 1159s typ = 1159s 1159s @singledispatch 1159s def as_cupy(val, typ=None): 1159s """ 1159s Rough conversion function 1159s 1159s Will try to infer target type from input type if not specified. 1159s """ 1159s if typ is None: 1159s typ = resolve_cupy_type(val) 1159s 1159s if issubclass(typ, CupyArray): 1159s import cupy as cp 1159s 1159s if isinstance(val, CSMatrix): 1159s val = val.toarray() 1159s return cp.array(val) 1159s elif issubclass(typ, CupyCSRMatrix): 1159s import cupy as cp 1159s import cupyx.scipy.sparse as cpsparse 1159s 1159s if isinstance(val, np.ndarray): 1159s return cpsparse.csr_matrix(cp.array(val)) 1159s else: 1159s return cpsparse.csr_matrix(val) 1159s elif issubclass(typ, CupyCSCMatrix): 1159s > import cupy as cp 1159s E ModuleNotFoundError: No module named 'cupy' 1159s 1159s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:1024: ModuleNotFoundError 1159s _________________ test_concatenate_layers_outer[cupy_array-0] __________________ 1159s 1159s array_type = functools.partial(, typ=) 1159s fill_val = 0 1159s 1159s @mark_legacy_concatenate 1159s def test_concatenate_layers_outer(array_type, fill_val): 1159s # Testing that issue #368 is fixed 1159s a = AnnData( 1159s X=np.ones((10, 20)), 1159s > layers={"a": array_type(sparse.random(10, 20, format="csr"))}, 1159s ) 1159s 1159s tests/test_concatenate.py:476: 1159s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1159s /usr/lib/python3.13/functools.py:934: in wrapper 1159s return dispatch(args[0].__class__)(*args, **kw) 1159s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1159s 1159s val = 1159s typ = 1159s 1159s @singledispatch 1159s def as_cupy(val, typ=None): 1159s """ 1159s Rough conversion function 1159s 1159s Will try to infer target type from input type if not specified. 1159s """ 1159s if typ is None: 1159s typ = resolve_cupy_type(val) 1159s 1159s if issubclass(typ, CupyArray): 1159s > import cupy as cp 1159s E ModuleNotFoundError: No module named 'cupy' 1159s 1159s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:1010: ModuleNotFoundError 1159s ________________ test_concatenate_layers_outer[cupy_array-nan] _________________ 1159s 1159s array_type = functools.partial(, typ=) 1159s fill_val = nan 1159s 1159s @mark_legacy_concatenate 1159s def test_concatenate_layers_outer(array_type, fill_val): 1159s # Testing that issue #368 is fixed 1159s a = AnnData( 1159s X=np.ones((10, 20)), 1159s > layers={"a": array_type(sparse.random(10, 20, format="csr"))}, 1159s ) 1159s 1159s tests/test_concatenate.py:476: 1159s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1159s /usr/lib/python3.13/functools.py:934: in wrapper 1159s return dispatch(args[0].__class__)(*args, **kw) 1159s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1159s 1159s val = 1159s typ = 1159s 1159s @singledispatch 1159s def as_cupy(val, typ=None): 1159s """ 1159s Rough conversion function 1159s 1159s Will try to infer target type from input type if not specified. 1159s """ 1159s if typ is None: 1159s typ = resolve_cupy_type(val) 1159s 1159s if issubclass(typ, CupyArray): 1159s > import cupy as cp 1159s E ModuleNotFoundError: No module named 'cupy' 1159s 1159s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:1010: ModuleNotFoundError 1159s _________ test_concatenate_layers_outer[cupy_array-3.141592653589793] __________ 1159s 1159s array_type = functools.partial(, typ=) 1159s fill_val = 3.141592653589793 1159s 1159s @mark_legacy_concatenate 1159s def test_concatenate_layers_outer(array_type, fill_val): 1159s # Testing that issue #368 is fixed 1159s a = AnnData( 1159s X=np.ones((10, 20)), 1159s > layers={"a": array_type(sparse.random(10, 20, format="csr"))}, 1159s ) 1159s 1159s tests/test_concatenate.py:476: 1159s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1159s /usr/lib/python3.13/functools.py:934: in wrapper 1159s return dispatch(args[0].__class__)(*args, **kw) 1159s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1159s 1159s val = 1159s typ = 1159s 1159s @singledispatch 1159s def as_cupy(val, typ=None): 1159s """ 1159s Rough conversion function 1159s 1159s Will try to infer target type from input type if not specified. 1159s """ 1159s if typ is None: 1159s typ = resolve_cupy_type(val) 1159s 1159s if issubclass(typ, CupyArray): 1159s > import cupy as cp 1159s E ModuleNotFoundError: No module named 'cupy' 1159s 1159s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:1010: ModuleNotFoundError 1159s __________________ test_concatenate_layers_outer[cupy_csr-0] ___________________ 1159s 1159s array_type = functools.partial(, typ=) 1159s fill_val = 0 1159s 1159s @mark_legacy_concatenate 1159s def test_concatenate_layers_outer(array_type, fill_val): 1159s # Testing that issue #368 is fixed 1159s a = AnnData( 1159s X=np.ones((10, 20)), 1159s > layers={"a": array_type(sparse.random(10, 20, format="csr"))}, 1159s ) 1159s 1159s tests/test_concatenate.py:476: 1159s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1159s /usr/lib/python3.13/functools.py:934: in wrapper 1159s return dispatch(args[0].__class__)(*args, **kw) 1159s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1159s 1159s val = 1159s typ = 1159s 1159s @singledispatch 1159s def as_cupy(val, typ=None): 1159s """ 1159s Rough conversion function 1159s 1159s Will try to infer target type from input type if not specified. 1159s """ 1159s if typ is None: 1159s typ = resolve_cupy_type(val) 1159s 1159s if issubclass(typ, CupyArray): 1159s import cupy as cp 1159s 1159s if isinstance(val, CSMatrix): 1159s val = val.toarray() 1159s return cp.array(val) 1159s elif issubclass(typ, CupyCSRMatrix): 1159s > import cupy as cp 1159s E ModuleNotFoundError: No module named 'cupy' 1159s 1159s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:1016: ModuleNotFoundError 1159s _________________ test_concatenate_layers_outer[cupy_csr-nan] __________________ 1159s 1159s array_type = functools.partial(, typ=) 1159s fill_val = nan 1159s 1159s @mark_legacy_concatenate 1159s def test_concatenate_layers_outer(array_type, fill_val): 1159s # Testing that issue #368 is fixed 1159s a = AnnData( 1159s X=np.ones((10, 20)), 1159s > layers={"a": array_type(sparse.random(10, 20, format="csr"))}, 1159s ) 1159s 1159s tests/test_concatenate.py:476: 1159s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1159s /usr/lib/python3.13/functools.py:934: in wrapper 1159s return dispatch(args[0].__class__)(*args, **kw) 1159s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1159s 1159s val = 1159s typ = 1159s 1159s @singledispatch 1159s def as_cupy(val, typ=None): 1159s """ 1159s Rough conversion function 1159s 1159s Will try to infer target type from input type if not specified. 1159s """ 1159s if typ is None: 1159s typ = resolve_cupy_type(val) 1159s 1159s if issubclass(typ, CupyArray): 1159s import cupy as cp 1159s 1159s if isinstance(val, CSMatrix): 1159s val = val.toarray() 1159s return cp.array(val) 1159s elif issubclass(typ, CupyCSRMatrix): 1159s > import cupy as cp 1159s E ModuleNotFoundError: No module named 'cupy' 1159s 1159s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:1016: ModuleNotFoundError 1159s __________ test_concatenate_layers_outer[cupy_csr-3.141592653589793] ___________ 1159s 1159s array_type = functools.partial(, typ=) 1159s fill_val = 3.141592653589793 1159s 1159s @mark_legacy_concatenate 1159s def test_concatenate_layers_outer(array_type, fill_val): 1159s # Testing that issue #368 is fixed 1159s a = AnnData( 1159s X=np.ones((10, 20)), 1159s > layers={"a": array_type(sparse.random(10, 20, format="csr"))}, 1159s ) 1159s 1159s tests/test_concatenate.py:476: 1159s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1159s /usr/lib/python3.13/functools.py:934: in wrapper 1159s return dispatch(args[0].__class__)(*args, **kw) 1159s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1159s 1159s val = 1159s typ = 1159s 1159s @singledispatch 1159s def as_cupy(val, typ=None): 1159s """ 1159s Rough conversion function 1159s 1159s Will try to infer target type from input type if not specified. 1159s """ 1159s if typ is None: 1159s typ = resolve_cupy_type(val) 1159s 1159s if issubclass(typ, CupyArray): 1159s import cupy as cp 1159s 1159s if isinstance(val, CSMatrix): 1159s val = val.toarray() 1159s return cp.array(val) 1159s elif issubclass(typ, CupyCSRMatrix): 1159s > import cupy as cp 1159s E ModuleNotFoundError: No module named 'cupy' 1159s 1159s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:1016: ModuleNotFoundError 1159s __________________ test_concatenate_layers_outer[cupy_csc-0] ___________________ 1159s 1159s array_type = functools.partial(, typ=) 1159s fill_val = 0 1159s 1159s @mark_legacy_concatenate 1159s def test_concatenate_layers_outer(array_type, fill_val): 1159s # Testing that issue #368 is fixed 1159s a = AnnData( 1159s X=np.ones((10, 20)), 1159s > layers={"a": array_type(sparse.random(10, 20, format="csr"))}, 1159s ) 1159s 1159s tests/test_concatenate.py:476: 1159s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1159s /usr/lib/python3.13/functools.py:934: in wrapper 1159s return dispatch(args[0].__class__)(*args, **kw) 1159s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1159s 1159s val = 1159s typ = 1159s 1159s @singledispatch 1159s def as_cupy(val, typ=None): 1159s """ 1159s Rough conversion function 1159s 1159s Will try to infer target type from input type if not specified. 1159s """ 1159s if typ is None: 1159s typ = resolve_cupy_type(val) 1159s 1159s if issubclass(typ, CupyArray): 1159s import cupy as cp 1159s 1159s if isinstance(val, CSMatrix): 1159s val = val.toarray() 1159s return cp.array(val) 1159s elif issubclass(typ, CupyCSRMatrix): 1159s import cupy as cp 1159s import cupyx.scipy.sparse as cpsparse 1159s 1159s if isinstance(val, np.ndarray): 1159s return cpsparse.csr_matrix(cp.array(val)) 1159s else: 1159s return cpsparse.csr_matrix(val) 1159s elif issubclass(typ, CupyCSCMatrix): 1159s > import cupy as cp 1159s E ModuleNotFoundError: No module named 'cupy' 1159s 1159s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:1024: ModuleNotFoundError 1159s _________________ test_concatenate_layers_outer[cupy_csc-nan] __________________ 1159s 1159s array_type = functools.partial(, typ=) 1159s fill_val = nan 1159s 1159s @mark_legacy_concatenate 1159s def test_concatenate_layers_outer(array_type, fill_val): 1159s # Testing that issue #368 is fixed 1159s a = AnnData( 1159s X=np.ones((10, 20)), 1159s > layers={"a": array_type(sparse.random(10, 20, format="csr"))}, 1159s ) 1159s 1159s tests/test_concatenate.py:476: 1159s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1159s /usr/lib/python3.13/functools.py:934: in wrapper 1159s return dispatch(args[0].__class__)(*args, **kw) 1159s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1159s 1159s val = 1159s typ = 1159s 1159s @singledispatch 1159s def as_cupy(val, typ=None): 1159s """ 1159s Rough conversion function 1159s 1159s Will try to infer target type from input type if not specified. 1159s """ 1159s if typ is None: 1159s typ = resolve_cupy_type(val) 1159s 1159s if issubclass(typ, CupyArray): 1159s import cupy as cp 1159s 1159s if isinstance(val, CSMatrix): 1159s val = val.toarray() 1159s return cp.array(val) 1159s elif issubclass(typ, CupyCSRMatrix): 1159s import cupy as cp 1159s import cupyx.scipy.sparse as cpsparse 1159s 1159s if isinstance(val, np.ndarray): 1159s return cpsparse.csr_matrix(cp.array(val)) 1159s else: 1159s return cpsparse.csr_matrix(val) 1159s elif issubclass(typ, CupyCSCMatrix): 1159s > import cupy as cp 1159s E ModuleNotFoundError: No module named 'cupy' 1159s 1159s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:1024: ModuleNotFoundError 1159s __________ test_concatenate_layers_outer[cupy_csc-3.141592653589793] ___________ 1159s 1159s array_type = functools.partial(, typ=) 1159s fill_val = 3.141592653589793 1159s 1159s @mark_legacy_concatenate 1159s def test_concatenate_layers_outer(array_type, fill_val): 1159s # Testing that issue #368 is fixed 1159s a = AnnData( 1159s X=np.ones((10, 20)), 1159s > layers={"a": array_type(sparse.random(10, 20, format="csr"))}, 1159s ) 1159s 1159s tests/test_concatenate.py:476: 1159s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1159s /usr/lib/python3.13/functools.py:934: in wrapper 1159s return dispatch(args[0].__class__)(*args, **kw) 1159s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1159s 1159s val = 1159s typ = 1159s 1159s @singledispatch 1159s def as_cupy(val, typ=None): 1159s """ 1159s Rough conversion function 1159s 1159s Will try to infer target type from input type if not specified. 1159s """ 1159s if typ is None: 1159s typ = resolve_cupy_type(val) 1159s 1159s if issubclass(typ, CupyArray): 1159s import cupy as cp 1159s 1159s if isinstance(val, CSMatrix): 1159s val = val.toarray() 1159s return cp.array(val) 1159s elif issubclass(typ, CupyCSRMatrix): 1159s import cupy as cp 1159s import cupyx.scipy.sparse as cpsparse 1159s 1159s if isinstance(val, np.ndarray): 1159s return cpsparse.csr_matrix(cp.array(val)) 1159s else: 1159s return cpsparse.csr_matrix(val) 1159s elif issubclass(typ, CupyCSCMatrix): 1159s > import cupy as cp 1159s E ModuleNotFoundError: No module named 'cupy' 1159s 1159s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:1024: ModuleNotFoundError 1159s _____________________ test_pairwise_concat[obs-cupy_array] _____________________ 1159s 1159s axis_name = 'obs' 1159s array_type = functools.partial(, typ=) 1159s 1159s def test_pairwise_concat(axis_name, array_type): 1159s axis, axis_name = merge._resolve_axis(axis_name) 1159s _, alt_axis_name = merge._resolve_axis(1 - axis) 1159s axis_sizes = [[100, 200, 50], [50, 50, 50]] 1159s if axis_name == "var": 1159s axis_sizes.reverse() 1159s Ms, Ns = axis_sizes 1159s axis_attr = f"{axis_name}p" 1159s alt_attr = f"{alt_axis_name}p" 1159s 1159s def gen_axis_array(m): 1159s return array_type(sparse.random(m, m, format="csr", density=0.1)) 1159s 1159s adatas = { 1159s k: AnnData( 1159s X=sparse.csr_matrix((m, n)), 1159s > obsp={"arr": gen_axis_array(m)}, 1159s varp={"arr": gen_axis_array(n)}, 1159s ) 1159s for k, m, n in zip("abc", Ms, Ns) 1159s } 1159s 1159s tests/test_concatenate.py:855: 1159s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1159s tests/test_concatenate.py:850: in gen_axis_array 1159s return array_type(sparse.random(m, m, format="csr", density=0.1)) 1159s /usr/lib/python3.13/functools.py:934: in wrapper 1159s return dispatch(args[0].__class__)(*args, **kw) 1159s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1159s 1159s val = 1159s typ = 1159s 1159s @singledispatch 1159s def as_cupy(val, typ=None): 1159s """ 1159s Rough conversion function 1159s 1159s Will try to infer target type from input type if not specified. 1159s """ 1159s if typ is None: 1159s typ = resolve_cupy_type(val) 1159s 1159s if issubclass(typ, CupyArray): 1159s > import cupy as cp 1159s E ModuleNotFoundError: No module named 'cupy' 1159s 1159s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:1010: ModuleNotFoundError 1159s ______________________ test_pairwise_concat[obs-cupy_csr] ______________________ 1159s 1159s axis_name = 'obs' 1159s array_type = functools.partial(, typ=) 1159s 1159s def test_pairwise_concat(axis_name, array_type): 1159s axis, axis_name = merge._resolve_axis(axis_name) 1159s _, alt_axis_name = merge._resolve_axis(1 - axis) 1159s axis_sizes = [[100, 200, 50], [50, 50, 50]] 1159s if axis_name == "var": 1159s axis_sizes.reverse() 1159s Ms, Ns = axis_sizes 1159s axis_attr = f"{axis_name}p" 1159s alt_attr = f"{alt_axis_name}p" 1159s 1159s def gen_axis_array(m): 1159s return array_type(sparse.random(m, m, format="csr", density=0.1)) 1159s 1159s adatas = { 1159s k: AnnData( 1159s X=sparse.csr_matrix((m, n)), 1159s > obsp={"arr": gen_axis_array(m)}, 1159s varp={"arr": gen_axis_array(n)}, 1159s ) 1159s for k, m, n in zip("abc", Ms, Ns) 1159s } 1159s 1159s tests/test_concatenate.py:855: 1159s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1159s tests/test_concatenate.py:850: in gen_axis_array 1159s return array_type(sparse.random(m, m, format="csr", density=0.1)) 1159s /usr/lib/python3.13/functools.py:934: in wrapper 1159s return dispatch(args[0].__class__)(*args, **kw) 1159s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1159s 1159s val = 1159s typ = 1159s 1159s @singledispatch 1159s def as_cupy(val, typ=None): 1159s """ 1159s Rough conversion function 1159s 1159s Will try to infer target type from input type if not specified. 1159s """ 1159s if typ is None: 1159s typ = resolve_cupy_type(val) 1159s 1159s if issubclass(typ, CupyArray): 1159s import cupy as cp 1159s 1159s if isinstance(val, CSMatrix): 1159s val = val.toarray() 1159s return cp.array(val) 1159s elif issubclass(typ, CupyCSRMatrix): 1159s > import cupy as cp 1159s E ModuleNotFoundError: No module named 'cupy' 1159s 1159s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:1016: ModuleNotFoundError 1159s ______________________ test_pairwise_concat[obs-cupy_csc] ______________________ 1159s 1159s axis_name = 'obs' 1159s array_type = functools.partial(, typ=) 1159s 1159s def test_pairwise_concat(axis_name, array_type): 1159s axis, axis_name = merge._resolve_axis(axis_name) 1159s _, alt_axis_name = merge._resolve_axis(1 - axis) 1159s axis_sizes = [[100, 200, 50], [50, 50, 50]] 1159s if axis_name == "var": 1159s axis_sizes.reverse() 1159s Ms, Ns = axis_sizes 1159s axis_attr = f"{axis_name}p" 1159s alt_attr = f"{alt_axis_name}p" 1159s 1159s def gen_axis_array(m): 1159s return array_type(sparse.random(m, m, format="csr", density=0.1)) 1159s 1159s adatas = { 1159s k: AnnData( 1159s X=sparse.csr_matrix((m, n)), 1159s > obsp={"arr": gen_axis_array(m)}, 1159s varp={"arr": gen_axis_array(n)}, 1159s ) 1159s for k, m, n in zip("abc", Ms, Ns) 1159s } 1159s 1159s tests/test_concatenate.py:855: 1159s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1159s tests/test_concatenate.py:850: in gen_axis_array 1159s return array_type(sparse.random(m, m, format="csr", density=0.1)) 1159s /usr/lib/python3.13/functools.py:934: in wrapper 1159s return dispatch(args[0].__class__)(*args, **kw) 1159s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1159s 1159s val = 1159s typ = 1159s 1159s @singledispatch 1159s def as_cupy(val, typ=None): 1159s """ 1159s Rough conversion function 1159s 1159s Will try to infer target type from input type if not specified. 1159s """ 1159s if typ is None: 1159s typ = resolve_cupy_type(val) 1159s 1159s if issubclass(typ, CupyArray): 1159s import cupy as cp 1159s 1159s if isinstance(val, CSMatrix): 1159s val = val.toarray() 1159s return cp.array(val) 1159s elif issubclass(typ, CupyCSRMatrix): 1159s import cupy as cp 1159s import cupyx.scipy.sparse as cpsparse 1159s 1159s if isinstance(val, np.ndarray): 1159s return cpsparse.csr_matrix(cp.array(val)) 1159s else: 1159s return cpsparse.csr_matrix(val) 1159s elif issubclass(typ, CupyCSCMatrix): 1159s > import cupy as cp 1159s E ModuleNotFoundError: No module named 'cupy' 1159s 1159s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:1024: ModuleNotFoundError 1159s _____________________ test_pairwise_concat[var-cupy_array] _____________________ 1159s 1159s axis_name = 'var' 1159s array_type = functools.partial(, typ=) 1159s 1159s def test_pairwise_concat(axis_name, array_type): 1159s axis, axis_name = merge._resolve_axis(axis_name) 1159s _, alt_axis_name = merge._resolve_axis(1 - axis) 1159s axis_sizes = [[100, 200, 50], [50, 50, 50]] 1159s if axis_name == "var": 1159s axis_sizes.reverse() 1159s Ms, Ns = axis_sizes 1159s axis_attr = f"{axis_name}p" 1159s alt_attr = f"{alt_axis_name}p" 1159s 1159s def gen_axis_array(m): 1159s return array_type(sparse.random(m, m, format="csr", density=0.1)) 1159s 1159s adatas = { 1159s k: AnnData( 1159s X=sparse.csr_matrix((m, n)), 1159s > obsp={"arr": gen_axis_array(m)}, 1159s varp={"arr": gen_axis_array(n)}, 1159s ) 1159s for k, m, n in zip("abc", Ms, Ns) 1159s } 1159s 1159s tests/test_concatenate.py:855: 1159s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1159s tests/test_concatenate.py:850: in gen_axis_array 1159s return array_type(sparse.random(m, m, format="csr", density=0.1)) 1159s /usr/lib/python3.13/functools.py:934: in wrapper 1159s return dispatch(args[0].__class__)(*args, **kw) 1159s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1159s 1159s val = 1159s typ = 1159s 1159s @singledispatch 1159s def as_cupy(val, typ=None): 1159s """ 1159s Rough conversion function 1159s 1159s Will try to infer target type from input type if not specified. 1159s """ 1159s if typ is None: 1159s typ = resolve_cupy_type(val) 1159s 1159s if issubclass(typ, CupyArray): 1159s > import cupy as cp 1159s E ModuleNotFoundError: No module named 'cupy' 1159s 1159s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:1010: ModuleNotFoundError 1159s ______________________ test_pairwise_concat[var-cupy_csr] ______________________ 1159s 1159s axis_name = 'var' 1159s array_type = functools.partial(, typ=) 1159s 1159s def test_pairwise_concat(axis_name, array_type): 1159s axis, axis_name = merge._resolve_axis(axis_name) 1159s _, alt_axis_name = merge._resolve_axis(1 - axis) 1159s axis_sizes = [[100, 200, 50], [50, 50, 50]] 1159s if axis_name == "var": 1159s axis_sizes.reverse() 1159s Ms, Ns = axis_sizes 1159s axis_attr = f"{axis_name}p" 1159s alt_attr = f"{alt_axis_name}p" 1159s 1159s def gen_axis_array(m): 1159s return array_type(sparse.random(m, m, format="csr", density=0.1)) 1159s 1159s adatas = { 1159s k: AnnData( 1159s X=sparse.csr_matrix((m, n)), 1159s > obsp={"arr": gen_axis_array(m)}, 1159s varp={"arr": gen_axis_array(n)}, 1159s ) 1159s for k, m, n in zip("abc", Ms, Ns) 1159s } 1159s 1159s tests/test_concatenate.py:855: 1159s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1159s tests/test_concatenate.py:850: in gen_axis_array 1159s return array_type(sparse.random(m, m, format="csr", density=0.1)) 1159s /usr/lib/python3.13/functools.py:934: in wrapper 1159s return dispatch(args[0].__class__)(*args, **kw) 1159s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1159s 1159s val = 1159s typ = 1159s 1159s @singledispatch 1159s def as_cupy(val, typ=None): 1159s """ 1159s Rough conversion function 1159s 1159s Will try to infer target type from input type if not specified. 1159s """ 1159s if typ is None: 1159s typ = resolve_cupy_type(val) 1159s 1159s if issubclass(typ, CupyArray): 1159s import cupy as cp 1159s 1159s if isinstance(val, CSMatrix): 1159s val = val.toarray() 1159s return cp.array(val) 1159s elif issubclass(typ, CupyCSRMatrix): 1159s > import cupy as cp 1159s E ModuleNotFoundError: No module named 'cupy' 1159s 1159s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:1016: ModuleNotFoundError 1159s ______________________ test_pairwise_concat[var-cupy_csc] ______________________ 1159s 1159s axis_name = 'var' 1159s array_type = functools.partial(, typ=) 1159s 1159s def test_pairwise_concat(axis_name, array_type): 1159s axis, axis_name = merge._resolve_axis(axis_name) 1159s _, alt_axis_name = merge._resolve_axis(1 - axis) 1159s axis_sizes = [[100, 200, 50], [50, 50, 50]] 1159s if axis_name == "var": 1159s axis_sizes.reverse() 1159s Ms, Ns = axis_sizes 1159s axis_attr = f"{axis_name}p" 1159s alt_attr = f"{alt_axis_name}p" 1159s 1159s def gen_axis_array(m): 1159s return array_type(sparse.random(m, m, format="csr", density=0.1)) 1159s 1159s adatas = { 1159s k: AnnData( 1159s X=sparse.csr_matrix((m, n)), 1159s > obsp={"arr": gen_axis_array(m)}, 1159s varp={"arr": gen_axis_array(n)}, 1159s ) 1159s for k, m, n in zip("abc", Ms, Ns) 1159s } 1159s 1159s tests/test_concatenate.py:855: 1159s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1159s tests/test_concatenate.py:850: in gen_axis_array 1159s return array_type(sparse.random(m, m, format="csr", density=0.1)) 1159s /usr/lib/python3.13/functools.py:934: in wrapper 1159s return dispatch(args[0].__class__)(*args, **kw) 1159s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1159s 1159s val = 1159s typ = 1159s 1159s @singledispatch 1159s def as_cupy(val, typ=None): 1159s """ 1159s Rough conversion function 1159s 1159s Will try to infer target type from input type if not specified. 1159s """ 1159s if typ is None: 1159s typ = resolve_cupy_type(val) 1159s 1159s if issubclass(typ, CupyArray): 1159s import cupy as cp 1159s 1159s if isinstance(val, CSMatrix): 1159s val = val.toarray() 1159s return cp.array(val) 1159s elif issubclass(typ, CupyCSRMatrix): 1159s import cupy as cp 1159s import cupyx.scipy.sparse as cpsparse 1159s 1159s if isinstance(val, np.ndarray): 1159s return cpsparse.csr_matrix(cp.array(val)) 1159s else: 1159s return cpsparse.csr_matrix(val) 1159s elif issubclass(typ, CupyCSCMatrix): 1159s > import cupy as cp 1159s E ModuleNotFoundError: No module named 'cupy' 1159s 1159s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:1024: ModuleNotFoundError 1159s _____________________ test_nan_merge[obs-inner-cupy_array] _____________________ 1159s 1159s axis_name = 'obs', join_type = 'inner' 1159s array_type = functools.partial(, typ=) 1159s 1159s def test_nan_merge(axis_name, join_type, array_type): 1159s axis, _ = merge._resolve_axis(axis_name) 1159s alt_axis, alt_axis_name = merge._resolve_axis(1 - axis) 1159s mapping_attr = f"{alt_axis_name}m" 1159s adata_shape = (20, 10) 1159s 1159s > arr = array_type( 1159s sparse.random(adata_shape[alt_axis], 10, density=0.1, format="csr") 1159s ) 1159s 1159s tests/test_concatenate.py:903: 1159s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1159s /usr/lib/python3.13/functools.py:934: in wrapper 1159s return dispatch(args[0].__class__)(*args, **kw) 1159s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1159s 1159s val = 1159s typ = 1159s 1159s @singledispatch 1159s def as_cupy(val, typ=None): 1159s """ 1159s Rough conversion function 1159s 1159s Will try to infer target type from input type if not specified. 1159s """ 1159s if typ is None: 1159s typ = resolve_cupy_type(val) 1159s 1159s if issubclass(typ, CupyArray): 1159s > import cupy as cp 1159s E ModuleNotFoundError: No module named 'cupy' 1159s 1159s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:1010: ModuleNotFoundError 1159s ______________________ test_nan_merge[obs-inner-cupy_csr] ______________________ 1159s 1159s axis_name = 'obs', join_type = 'inner' 1159s array_type = functools.partial(, typ=) 1159s 1159s def test_nan_merge(axis_name, join_type, array_type): 1159s axis, _ = merge._resolve_axis(axis_name) 1159s alt_axis, alt_axis_name = merge._resolve_axis(1 - axis) 1159s mapping_attr = f"{alt_axis_name}m" 1159s adata_shape = (20, 10) 1159s 1159s > arr = array_type( 1159s sparse.random(adata_shape[alt_axis], 10, density=0.1, format="csr") 1159s ) 1159s 1159s tests/test_concatenate.py:903: 1159s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1159s /usr/lib/python3.13/functools.py:934: in wrapper 1159s return dispatch(args[0].__class__)(*args, **kw) 1159s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1159s 1159s val = 1159s typ = 1159s 1159s @singledispatch 1159s def as_cupy(val, typ=None): 1159s """ 1159s Rough conversion function 1159s 1159s Will try to infer target type from input type if not specified. 1159s """ 1159s if typ is None: 1159s typ = resolve_cupy_type(val) 1159s 1159s if issubclass(typ, CupyArray): 1159s import cupy as cp 1159s 1159s if isinstance(val, CSMatrix): 1159s val = val.toarray() 1159s return cp.array(val) 1159s elif issubclass(typ, CupyCSRMatrix): 1159s > import cupy as cp 1159s E ModuleNotFoundError: No module named 'cupy' 1159s 1159s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:1016: ModuleNotFoundError 1159s ______________________ test_nan_merge[obs-inner-cupy_csc] ______________________ 1159s 1159s axis_name = 'obs', join_type = 'inner' 1159s array_type = functools.partial(, typ=) 1159s 1159s def test_nan_merge(axis_name, join_type, array_type): 1159s axis, _ = merge._resolve_axis(axis_name) 1159s alt_axis, alt_axis_name = merge._resolve_axis(1 - axis) 1159s mapping_attr = f"{alt_axis_name}m" 1159s adata_shape = (20, 10) 1159s 1159s > arr = array_type( 1159s sparse.random(adata_shape[alt_axis], 10, density=0.1, format="csr") 1159s ) 1159s 1159s tests/test_concatenate.py:903: 1159s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1159s /usr/lib/python3.13/functools.py:934: in wrapper 1159s return dispatch(args[0].__class__)(*args, **kw) 1159s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1159s 1159s val = 1159s typ = 1159s 1159s @singledispatch 1159s def as_cupy(val, typ=None): 1159s """ 1159s Rough conversion function 1159s 1159s Will try to infer target type from input type if not specified. 1159s """ 1159s if typ is None: 1159s typ = resolve_cupy_type(val) 1159s 1159s if issubclass(typ, CupyArray): 1159s import cupy as cp 1159s 1159s if isinstance(val, CSMatrix): 1159s val = val.toarray() 1159s return cp.array(val) 1159s elif issubclass(typ, CupyCSRMatrix): 1159s import cupy as cp 1159s import cupyx.scipy.sparse as cpsparse 1159s 1159s if isinstance(val, np.ndarray): 1159s return cpsparse.csr_matrix(cp.array(val)) 1159s else: 1159s return cpsparse.csr_matrix(val) 1159s elif issubclass(typ, CupyCSCMatrix): 1159s > import cupy as cp 1159s E ModuleNotFoundError: No module named 'cupy' 1159s 1159s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:1024: ModuleNotFoundError 1159s _____________________ test_nan_merge[obs-outer-cupy_array] _____________________ 1159s 1159s axis_name = 'obs', join_type = 'outer' 1159s array_type = functools.partial(, typ=) 1159s 1159s def test_nan_merge(axis_name, join_type, array_type): 1159s axis, _ = merge._resolve_axis(axis_name) 1159s alt_axis, alt_axis_name = merge._resolve_axis(1 - axis) 1159s mapping_attr = f"{alt_axis_name}m" 1159s adata_shape = (20, 10) 1159s 1159s > arr = array_type( 1159s sparse.random(adata_shape[alt_axis], 10, density=0.1, format="csr") 1159s ) 1159s 1159s tests/test_concatenate.py:903: 1159s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1159s /usr/lib/python3.13/functools.py:934: in wrapper 1159s return dispatch(args[0].__class__)(*args, **kw) 1159s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1159s 1159s val = 1159s typ = 1159s 1159s @singledispatch 1159s def as_cupy(val, typ=None): 1159s """ 1159s Rough conversion function 1159s 1159s Will try to infer target type from input type if not specified. 1159s """ 1159s if typ is None: 1159s typ = resolve_cupy_type(val) 1159s 1159s if issubclass(typ, CupyArray): 1159s > import cupy as cp 1159s E ModuleNotFoundError: No module named 'cupy' 1159s 1159s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:1010: ModuleNotFoundError 1159s ______________________ test_nan_merge[obs-outer-cupy_csr] ______________________ 1159s 1159s axis_name = 'obs', join_type = 'outer' 1159s array_type = functools.partial(, typ=) 1159s 1159s def test_nan_merge(axis_name, join_type, array_type): 1159s axis, _ = merge._resolve_axis(axis_name) 1159s alt_axis, alt_axis_name = merge._resolve_axis(1 - axis) 1159s mapping_attr = f"{alt_axis_name}m" 1159s adata_shape = (20, 10) 1159s 1159s > arr = array_type( 1159s sparse.random(adata_shape[alt_axis], 10, density=0.1, format="csr") 1159s ) 1159s 1159s tests/test_concatenate.py:903: 1159s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1159s /usr/lib/python3.13/functools.py:934: in wrapper 1159s return dispatch(args[0].__class__)(*args, **kw) 1159s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1159s 1159s val = 1159s typ = 1159s 1159s @singledispatch 1159s def as_cupy(val, typ=None): 1159s """ 1159s Rough conversion function 1159s 1159s Will try to infer target type from input type if not specified. 1159s """ 1159s if typ is None: 1159s typ = resolve_cupy_type(val) 1159s 1159s if issubclass(typ, CupyArray): 1159s import cupy as cp 1159s 1159s if isinstance(val, CSMatrix): 1159s val = val.toarray() 1159s return cp.array(val) 1159s elif issubclass(typ, CupyCSRMatrix): 1159s > import cupy as cp 1159s E ModuleNotFoundError: No module named 'cupy' 1159s 1159s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:1016: ModuleNotFoundError 1159s ______________________ test_nan_merge[obs-outer-cupy_csc] ______________________ 1159s 1159s axis_name = 'obs', join_type = 'outer' 1159s array_type = functools.partial(, typ=) 1159s 1159s def test_nan_merge(axis_name, join_type, array_type): 1159s axis, _ = merge._resolve_axis(axis_name) 1159s alt_axis, alt_axis_name = merge._resolve_axis(1 - axis) 1159s mapping_attr = f"{alt_axis_name}m" 1159s adata_shape = (20, 10) 1159s 1159s > arr = array_type( 1159s sparse.random(adata_shape[alt_axis], 10, density=0.1, format="csr") 1159s ) 1159s 1159s tests/test_concatenate.py:903: 1159s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1159s /usr/lib/python3.13/functools.py:934: in wrapper 1159s return dispatch(args[0].__class__)(*args, **kw) 1159s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1159s 1159s val = 1159s typ = 1159s 1159s @singledispatch 1159s def as_cupy(val, typ=None): 1159s """ 1159s Rough conversion function 1159s 1159s Will try to infer target type from input type if not specified. 1159s """ 1159s if typ is None: 1159s typ = resolve_cupy_type(val) 1159s 1159s if issubclass(typ, CupyArray): 1159s import cupy as cp 1159s 1159s if isinstance(val, CSMatrix): 1159s val = val.toarray() 1159s return cp.array(val) 1159s elif issubclass(typ, CupyCSRMatrix): 1159s import cupy as cp 1159s import cupyx.scipy.sparse as cpsparse 1159s 1159s if isinstance(val, np.ndarray): 1159s return cpsparse.csr_matrix(cp.array(val)) 1159s else: 1159s return cpsparse.csr_matrix(val) 1159s elif issubclass(typ, CupyCSCMatrix): 1159s > import cupy as cp 1159s E ModuleNotFoundError: No module named 'cupy' 1159s 1159s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:1024: ModuleNotFoundError 1159s _____________________ test_nan_merge[var-inner-cupy_array] _____________________ 1159s 1159s axis_name = 'var', join_type = 'inner' 1159s array_type = functools.partial(, typ=) 1159s 1159s def test_nan_merge(axis_name, join_type, array_type): 1159s axis, _ = merge._resolve_axis(axis_name) 1159s alt_axis, alt_axis_name = merge._resolve_axis(1 - axis) 1159s mapping_attr = f"{alt_axis_name}m" 1159s adata_shape = (20, 10) 1159s 1159s > arr = array_type( 1159s sparse.random(adata_shape[alt_axis], 10, density=0.1, format="csr") 1159s ) 1159s 1159s tests/test_concatenate.py:903: 1159s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1159s /usr/lib/python3.13/functools.py:934: in wrapper 1159s return dispatch(args[0].__class__)(*args, **kw) 1159s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1159s 1159s val = 1159s typ = 1159s 1159s @singledispatch 1159s def as_cupy(val, typ=None): 1159s """ 1159s Rough conversion function 1159s 1159s Will try to infer target type from input type if not specified. 1159s """ 1159s if typ is None: 1159s typ = resolve_cupy_type(val) 1159s 1159s if issubclass(typ, CupyArray): 1159s > import cupy as cp 1159s E ModuleNotFoundError: No module named 'cupy' 1159s 1159s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:1010: ModuleNotFoundError 1159s ______________________ test_nan_merge[var-inner-cupy_csr] ______________________ 1159s 1159s axis_name = 'var', join_type = 'inner' 1159s array_type = functools.partial(, typ=) 1159s 1159s def test_nan_merge(axis_name, join_type, array_type): 1159s axis, _ = merge._resolve_axis(axis_name) 1159s alt_axis, alt_axis_name = merge._resolve_axis(1 - axis) 1159s mapping_attr = f"{alt_axis_name}m" 1159s adata_shape = (20, 10) 1159s 1159s > arr = array_type( 1159s sparse.random(adata_shape[alt_axis], 10, density=0.1, format="csr") 1159s ) 1159s 1159s tests/test_concatenate.py:903: 1159s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1159s /usr/lib/python3.13/functools.py:934: in wrapper 1159s return dispatch(args[0].__class__)(*args, **kw) 1159s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1159s 1159s val = 1159s typ = 1159s 1159s @singledispatch 1159s def as_cupy(val, typ=None): 1159s """ 1159s Rough conversion function 1159s 1159s Will try to infer target type from input type if not specified. 1159s """ 1159s if typ is None: 1159s typ = resolve_cupy_type(val) 1159s 1159s if issubclass(typ, CupyArray): 1159s import cupy as cp 1159s 1159s if isinstance(val, CSMatrix): 1159s val = val.toarray() 1159s return cp.array(val) 1159s elif issubclass(typ, CupyCSRMatrix): 1159s > import cupy as cp 1159s E ModuleNotFoundError: No module named 'cupy' 1159s 1159s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:1016: ModuleNotFoundError 1159s ______________________ test_nan_merge[var-inner-cupy_csc] ______________________ 1159s 1159s axis_name = 'var', join_type = 'inner' 1159s array_type = functools.partial(, typ=) 1159s 1159s def test_nan_merge(axis_name, join_type, array_type): 1159s axis, _ = merge._resolve_axis(axis_name) 1159s alt_axis, alt_axis_name = merge._resolve_axis(1 - axis) 1159s mapping_attr = f"{alt_axis_name}m" 1159s adata_shape = (20, 10) 1159s 1159s > arr = array_type( 1159s sparse.random(adata_shape[alt_axis], 10, density=0.1, format="csr") 1159s ) 1159s 1159s tests/test_concatenate.py:903: 1159s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1159s /usr/lib/python3.13/functools.py:934: in wrapper 1159s return dispatch(args[0].__class__)(*args, **kw) 1159s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1159s 1159s val = 1159s typ = 1159s 1159s @singledispatch 1159s def as_cupy(val, typ=None): 1159s """ 1159s Rough conversion function 1159s 1159s Will try to infer target type from input type if not specified. 1159s """ 1159s if typ is None: 1159s typ = resolve_cupy_type(val) 1159s 1159s if issubclass(typ, CupyArray): 1159s import cupy as cp 1159s 1159s if isinstance(val, CSMatrix): 1159s val = val.toarray() 1159s return cp.array(val) 1159s elif issubclass(typ, CupyCSRMatrix): 1159s import cupy as cp 1159s import cupyx.scipy.sparse as cpsparse 1159s 1159s if isinstance(val, np.ndarray): 1159s return cpsparse.csr_matrix(cp.array(val)) 1159s else: 1159s return cpsparse.csr_matrix(val) 1159s elif issubclass(typ, CupyCSCMatrix): 1159s > import cupy as cp 1159s E ModuleNotFoundError: No module named 'cupy' 1159s 1159s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:1024: ModuleNotFoundError 1159s _____________________ test_nan_merge[var-outer-cupy_array] _____________________ 1159s 1159s axis_name = 'var', join_type = 'outer' 1159s array_type = functools.partial(, typ=) 1159s 1159s def test_nan_merge(axis_name, join_type, array_type): 1159s axis, _ = merge._resolve_axis(axis_name) 1159s alt_axis, alt_axis_name = merge._resolve_axis(1 - axis) 1159s mapping_attr = f"{alt_axis_name}m" 1159s adata_shape = (20, 10) 1159s 1159s > arr = array_type( 1159s sparse.random(adata_shape[alt_axis], 10, density=0.1, format="csr") 1159s ) 1159s 1159s tests/test_concatenate.py:903: 1159s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1159s /usr/lib/python3.13/functools.py:934: in wrapper 1159s return dispatch(args[0].__class__)(*args, **kw) 1159s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1159s 1159s val = 1159s typ = 1159s 1159s @singledispatch 1159s def as_cupy(val, typ=None): 1159s """ 1159s Rough conversion function 1159s 1159s Will try to infer target type from input type if not specified. 1159s """ 1159s if typ is None: 1159s typ = resolve_cupy_type(val) 1159s 1159s if issubclass(typ, CupyArray): 1159s > import cupy as cp 1159s E ModuleNotFoundError: No module named 'cupy' 1159s 1159s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:1010: ModuleNotFoundError 1159s ______________________ test_nan_merge[var-outer-cupy_csr] ______________________ 1159s 1159s axis_name = 'var', join_type = 'outer' 1159s array_type = functools.partial(, typ=) 1159s 1159s def test_nan_merge(axis_name, join_type, array_type): 1159s axis, _ = merge._resolve_axis(axis_name) 1159s alt_axis, alt_axis_name = merge._resolve_axis(1 - axis) 1159s mapping_attr = f"{alt_axis_name}m" 1159s adata_shape = (20, 10) 1159s 1159s > arr = array_type( 1159s sparse.random(adata_shape[alt_axis], 10, density=0.1, format="csr") 1159s ) 1159s 1159s tests/test_concatenate.py:903: 1159s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1159s /usr/lib/python3.13/functools.py:934: in wrapper 1159s return dispatch(args[0].__class__)(*args, **kw) 1159s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1159s 1159s val = 1159s typ = 1159s 1159s @singledispatch 1159s def as_cupy(val, typ=None): 1159s """ 1159s Rough conversion function 1159s 1159s Will try to infer target type from input type if not specified. 1159s """ 1159s if typ is None: 1159s typ = resolve_cupy_type(val) 1159s 1159s if issubclass(typ, CupyArray): 1159s import cupy as cp 1159s 1159s if isinstance(val, CSMatrix): 1159s val = val.toarray() 1159s return cp.array(val) 1159s elif issubclass(typ, CupyCSRMatrix): 1159s > import cupy as cp 1159s E ModuleNotFoundError: No module named 'cupy' 1159s 1159s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:1016: ModuleNotFoundError 1159s ______________________ test_nan_merge[var-outer-cupy_csc] ______________________ 1159s 1159s axis_name = 'var', join_type = 'outer' 1159s array_type = functools.partial(, typ=) 1159s 1159s def test_nan_merge(axis_name, join_type, array_type): 1159s axis, _ = merge._resolve_axis(axis_name) 1159s alt_axis, alt_axis_name = merge._resolve_axis(1 - axis) 1159s mapping_attr = f"{alt_axis_name}m" 1159s adata_shape = (20, 10) 1159s 1159s > arr = array_type( 1159s sparse.random(adata_shape[alt_axis], 10, density=0.1, format="csr") 1159s ) 1159s 1159s tests/test_concatenate.py:903: 1159s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1159s /usr/lib/python3.13/functools.py:934: in wrapper 1159s return dispatch(args[0].__class__)(*args, **kw) 1159s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1159s 1159s val = 1159s typ = 1159s 1159s @singledispatch 1159s def as_cupy(val, typ=None): 1159s """ 1159s Rough conversion function 1159s 1159s Will try to infer target type from input type if not specified. 1159s """ 1159s if typ is None: 1159s typ = resolve_cupy_type(val) 1159s 1159s if issubclass(typ, CupyArray): 1159s import cupy as cp 1159s 1159s if isinstance(val, CSMatrix): 1159s val = val.toarray() 1159s return cp.array(val) 1159s elif issubclass(typ, CupyCSRMatrix): 1159s import cupy as cp 1159s import cupyx.scipy.sparse as cpsparse 1159s 1159s if isinstance(val, np.ndarray): 1159s return cpsparse.csr_matrix(cp.array(val)) 1159s else: 1159s return cpsparse.csr_matrix(val) 1159s elif issubclass(typ, CupyCSCMatrix): 1159s > import cupy as cp 1159s E ModuleNotFoundError: No module named 'cupy' 1159s 1159s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:1024: ModuleNotFoundError 1159s ______________ test_transposed_concat[cupy_array-obs-inner-None] _______________ 1159s 1159s array_type = functools.partial(, typ=) 1159s axis_name = 'obs', join_type = 'inner', merge_strategy = None 1159s 1159s def test_transposed_concat(array_type, axis_name, join_type, merge_strategy): 1159s axis, axis_name = merge._resolve_axis(axis_name) 1159s alt_axis = 1 - axis 1159s > lhs = gen_adata((10, 10), X_type=array_type, **GEN_ADATA_DASK_ARGS) 1159s 1159s tests/test_concatenate.py:1167: 1159s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1159s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:346: in gen_adata 1159s X = X_type(random_state.binomial(100, 0.005, (M, N)).astype(X_dtype)) 1159s /usr/lib/python3.13/functools.py:934: in wrapper 1159s return dispatch(args[0].__class__)(*args, **kw) 1159s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1159s 1159s val = array([[1., 4., 0., 1., 2., 1., 1., 0., 0., 0.], 1159s [1., 1., 1., 1., 1., 1., 1., 2., 1., 2.], 1159s [1., 1., 1., ... 0.], 1159s [1., 0., 0., 1., 1., 0., 0., 0., 0., 0.], 1159s [0., 0., 2., 0., 0., 0., 0., 1., 1., 1.]], dtype=float32) 1159s typ = 1159s 1159s @singledispatch 1159s def as_cupy(val, typ=None): 1159s """ 1159s Rough conversion function 1159s 1159s Will try to infer target type from input type if not specified. 1159s """ 1159s if typ is None: 1159s typ = resolve_cupy_type(val) 1159s 1159s if issubclass(typ, CupyArray): 1159s > import cupy as cp 1159s E ModuleNotFoundError: No module named 'cupy' 1159s 1159s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:1010: ModuleNotFoundError 1159s ______________ test_transposed_concat[cupy_array-obs-inner-same] _______________ 1159s 1159s array_type = functools.partial(, typ=) 1159s axis_name = 'obs', join_type = 'inner', merge_strategy = 'same' 1159s 1159s def test_transposed_concat(array_type, axis_name, join_type, merge_strategy): 1159s axis, axis_name = merge._resolve_axis(axis_name) 1159s alt_axis = 1 - axis 1159s > lhs = gen_adata((10, 10), X_type=array_type, **GEN_ADATA_DASK_ARGS) 1159s 1159s tests/test_concatenate.py:1167: 1159s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1159s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:346: in gen_adata 1159s X = X_type(random_state.binomial(100, 0.005, (M, N)).astype(X_dtype)) 1159s /usr/lib/python3.13/functools.py:934: in wrapper 1159s return dispatch(args[0].__class__)(*args, **kw) 1159s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1159s 1159s val = array([[0., 0., 2., 0., 1., 1., 0., 0., 1., 0.], 1159s [1., 0., 0., 0., 1., 1., 0., 0., 0., 0.], 1159s [0., 0., 1., ... 2.], 1159s [0., 0., 2., 1., 0., 0., 2., 0., 0., 1.], 1159s [0., 0., 0., 0., 1., 0., 0., 1., 2., 0.]], dtype=float32) 1159s typ = 1159s 1159s @singledispatch 1159s def as_cupy(val, typ=None): 1159s """ 1159s Rough conversion function 1159s 1159s Will try to infer target type from input type if not specified. 1159s """ 1159s if typ is None: 1159s typ = resolve_cupy_type(val) 1159s 1159s if issubclass(typ, CupyArray): 1159s > import cupy as cp 1159s E ModuleNotFoundError: No module named 'cupy' 1159s 1159s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:1010: ModuleNotFoundError 1159s _____________ test_transposed_concat[cupy_array-obs-inner-unique] ______________ 1159s 1159s array_type = functools.partial(, typ=) 1159s axis_name = 'obs', join_type = 'inner', merge_strategy = 'unique' 1159s 1159s def test_transposed_concat(array_type, axis_name, join_type, merge_strategy): 1159s axis, axis_name = merge._resolve_axis(axis_name) 1159s alt_axis = 1 - axis 1159s > lhs = gen_adata((10, 10), X_type=array_type, **GEN_ADATA_DASK_ARGS) 1159s 1159s tests/test_concatenate.py:1167: 1159s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1159s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:346: in gen_adata 1159s X = X_type(random_state.binomial(100, 0.005, (M, N)).astype(X_dtype)) 1159s /usr/lib/python3.13/functools.py:934: in wrapper 1159s return dispatch(args[0].__class__)(*args, **kw) 1159s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1159s 1159s val = array([[1., 0., 0., 1., 0., 1., 0., 1., 0., 0.], 1159s [0., 0., 0., 0., 0., 0., 0., 3., 0., 0.], 1159s [0., 0., 1., ... 0.], 1159s [0., 0., 0., 0., 0., 0., 1., 0., 0., 0.], 1159s [0., 2., 0., 0., 0., 0., 0., 0., 0., 1.]], dtype=float32) 1159s typ = 1159s 1159s @singledispatch 1159s def as_cupy(val, typ=None): 1159s """ 1159s Rough conversion function 1159s 1159s Will try to infer target type from input type if not specified. 1159s """ 1159s if typ is None: 1159s typ = resolve_cupy_type(val) 1159s 1159s if issubclass(typ, CupyArray): 1159s > import cupy as cp 1159s E ModuleNotFoundError: No module named 'cupy' 1159s 1159s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:1010: ModuleNotFoundError 1159s ______________ test_transposed_concat[cupy_array-obs-inner-first] ______________ 1159s 1159s array_type = functools.partial(, typ=) 1159s axis_name = 'obs', join_type = 'inner', merge_strategy = 'first' 1159s 1159s def test_transposed_concat(array_type, axis_name, join_type, merge_strategy): 1159s axis, axis_name = merge._resolve_axis(axis_name) 1159s alt_axis = 1 - axis 1159s > lhs = gen_adata((10, 10), X_type=array_type, **GEN_ADATA_DASK_ARGS) 1159s 1159s tests/test_concatenate.py:1167: 1159s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1159s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:346: in gen_adata 1159s X = X_type(random_state.binomial(100, 0.005, (M, N)).astype(X_dtype)) 1159s /usr/lib/python3.13/functools.py:934: in wrapper 1159s return dispatch(args[0].__class__)(*args, **kw) 1159s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1159s 1159s val = array([[1., 1., 1., 1., 0., 0., 2., 2., 0., 1.], 1159s [1., 0., 0., 1., 0., 1., 0., 0., 2., 0.], 1159s [1., 0., 0., ... 1.], 1159s [1., 0., 1., 1., 1., 0., 1., 3., 0., 0.], 1159s [0., 0., 1., 2., 0., 2., 0., 1., 0., 2.]], dtype=float32) 1159s typ = 1159s 1159s @singledispatch 1159s def as_cupy(val, typ=None): 1159s """ 1159s Rough conversion function 1159s 1159s Will try to infer target type from input type if not specified. 1159s """ 1159s if typ is None: 1159s typ = resolve_cupy_type(val) 1159s 1159s if issubclass(typ, CupyArray): 1159s > import cupy as cp 1159s E ModuleNotFoundError: No module named 'cupy' 1159s 1159s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:1010: ModuleNotFoundError 1159s ______________ test_transposed_concat[cupy_array-obs-inner-only] _______________ 1159s 1159s array_type = functools.partial(, typ=) 1159s axis_name = 'obs', join_type = 'inner', merge_strategy = 'only' 1159s 1159s def test_transposed_concat(array_type, axis_name, join_type, merge_strategy): 1159s axis, axis_name = merge._resolve_axis(axis_name) 1159s alt_axis = 1 - axis 1159s > lhs = gen_adata((10, 10), X_type=array_type, **GEN_ADATA_DASK_ARGS) 1159s 1159s tests/test_concatenate.py:1167: 1159s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1159s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:346: in gen_adata 1159s X = X_type(random_state.binomial(100, 0.005, (M, N)).astype(X_dtype)) 1159s /usr/lib/python3.13/functools.py:934: in wrapper 1159s return dispatch(args[0].__class__)(*args, **kw) 1159s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1159s 1159s val = array([[0., 0., 0., 0., 0., 0., 0., 1., 0., 0.], 1159s [0., 0., 0., 2., 3., 1., 0., 0., 0., 1.], 1159s [2., 1., 0., ... 1.], 1159s [0., 1., 1., 1., 1., 1., 0., 0., 1., 0.], 1159s [0., 0., 0., 1., 0., 0., 0., 0., 0., 0.]], dtype=float32) 1159s typ = 1159s 1159s @singledispatch 1159s def as_cupy(val, typ=None): 1159s """ 1159s Rough conversion function 1159s 1159s Will try to infer target type from input type if not specified. 1159s """ 1159s if typ is None: 1159s typ = resolve_cupy_type(val) 1159s 1159s if issubclass(typ, CupyArray): 1159s > import cupy as cp 1159s E ModuleNotFoundError: No module named 'cupy' 1159s 1159s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:1010: ModuleNotFoundError 1159s ______________ test_transposed_concat[cupy_array-obs-outer-None] _______________ 1159s 1159s array_type = functools.partial(, typ=) 1159s axis_name = 'obs', join_type = 'outer', merge_strategy = None 1159s 1159s def test_transposed_concat(array_type, axis_name, join_type, merge_strategy): 1159s axis, axis_name = merge._resolve_axis(axis_name) 1159s alt_axis = 1 - axis 1159s > lhs = gen_adata((10, 10), X_type=array_type, **GEN_ADATA_DASK_ARGS) 1159s 1159s tests/test_concatenate.py:1167: 1159s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1159s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:346: in gen_adata 1159s X = X_type(random_state.binomial(100, 0.005, (M, N)).astype(X_dtype)) 1159s /usr/lib/python3.13/functools.py:934: in wrapper 1159s return dispatch(args[0].__class__)(*args, **kw) 1159s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1159s 1159s val = array([[0., 0., 0., 1., 0., 0., 0., 1., 0., 1.], 1159s [0., 1., 0., 0., 0., 1., 0., 0., 0., 1.], 1159s [1., 0., 0., ... 0.], 1159s [0., 0., 0., 1., 0., 1., 0., 1., 1., 0.], 1159s [1., 0., 0., 1., 2., 1., 0., 4., 1., 0.]], dtype=float32) 1159s typ = 1159s 1159s @singledispatch 1159s def as_cupy(val, typ=None): 1159s """ 1159s Rough conversion function 1159s 1159s Will try to infer target type from input type if not specified. 1159s """ 1159s if typ is None: 1159s typ = resolve_cupy_type(val) 1159s 1159s if issubclass(typ, CupyArray): 1159s > import cupy as cp 1159s E ModuleNotFoundError: No module named 'cupy' 1159s 1159s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:1010: ModuleNotFoundError 1159s ______________ test_transposed_concat[cupy_array-obs-outer-same] _______________ 1159s 1159s array_type = functools.partial(, typ=) 1159s axis_name = 'obs', join_type = 'outer', merge_strategy = 'same' 1159s 1159s def test_transposed_concat(array_type, axis_name, join_type, merge_strategy): 1159s axis, axis_name = merge._resolve_axis(axis_name) 1159s alt_axis = 1 - axis 1159s > lhs = gen_adata((10, 10), X_type=array_type, **GEN_ADATA_DASK_ARGS) 1159s 1159s tests/test_concatenate.py:1167: 1159s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1159s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:346: in gen_adata 1159s X = X_type(random_state.binomial(100, 0.005, (M, N)).astype(X_dtype)) 1159s /usr/lib/python3.13/functools.py:934: in wrapper 1159s return dispatch(args[0].__class__)(*args, **kw) 1159s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1159s 1159s val = array([[0., 0., 0., 0., 0., 1., 1., 0., 0., 1.], 1159s [0., 0., 1., 0., 1., 1., 1., 0., 0., 1.], 1159s [1., 1., 0., ... 0.], 1159s [0., 1., 0., 0., 1., 0., 0., 0., 0., 1.], 1159s [2., 1., 0., 1., 0., 0., 0., 0., 0., 2.]], dtype=float32) 1159s typ = 1159s 1159s @singledispatch 1159s def as_cupy(val, typ=None): 1159s """ 1159s Rough conversion function 1159s 1159s Will try to infer target type from input type if not specified. 1159s """ 1159s if typ is None: 1159s typ = resolve_cupy_type(val) 1159s 1159s if issubclass(typ, CupyArray): 1159s > import cupy as cp 1159s E ModuleNotFoundError: No module named 'cupy' 1159s 1159s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:1010: ModuleNotFoundError 1159s _____________ test_transposed_concat[cupy_array-obs-outer-unique] ______________ 1159s 1159s array_type = functools.partial(, typ=) 1159s axis_name = 'obs', join_type = 'outer', merge_strategy = 'unique' 1159s 1159s def test_transposed_concat(array_type, axis_name, join_type, merge_strategy): 1159s axis, axis_name = merge._resolve_axis(axis_name) 1159s alt_axis = 1 - axis 1159s > lhs = gen_adata((10, 10), X_type=array_type, **GEN_ADATA_DASK_ARGS) 1159s 1159s tests/test_concatenate.py:1167: 1159s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1159s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:346: in gen_adata 1159s X = X_type(random_state.binomial(100, 0.005, (M, N)).astype(X_dtype)) 1159s /usr/lib/python3.13/functools.py:934: in wrapper 1159s return dispatch(args[0].__class__)(*args, **kw) 1159s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1159s 1159s val = array([[0., 0., 0., 1., 0., 0., 3., 1., 0., 1.], 1159s [1., 1., 0., 1., 2., 0., 1., 0., 3., 1.], 1159s [0., 0., 0., ... 1.], 1159s [0., 0., 0., 0., 0., 1., 0., 0., 0., 0.], 1159s [0., 0., 0., 0., 0., 0., 0., 3., 0., 3.]], dtype=float32) 1159s typ = 1159s 1159s @singledispatch 1159s def as_cupy(val, typ=None): 1159s """ 1159s Rough conversion function 1159s 1159s Will try to infer target type from input type if not specified. 1159s """ 1159s if typ is None: 1159s typ = resolve_cupy_type(val) 1159s 1159s if issubclass(typ, CupyArray): 1159s > import cupy as cp 1159s E ModuleNotFoundError: No module named 'cupy' 1159s 1159s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:1010: ModuleNotFoundError 1159s ______________ test_transposed_concat[cupy_array-obs-outer-first] ______________ 1159s 1159s array_type = functools.partial(, typ=) 1159s axis_name = 'obs', join_type = 'outer', merge_strategy = 'first' 1159s 1159s def test_transposed_concat(array_type, axis_name, join_type, merge_strategy): 1159s axis, axis_name = merge._resolve_axis(axis_name) 1159s alt_axis = 1 - axis 1159s > lhs = gen_adata((10, 10), X_type=array_type, **GEN_ADATA_DASK_ARGS) 1159s 1159s tests/test_concatenate.py:1167: 1159s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1159s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:346: in gen_adata 1159s X = X_type(random_state.binomial(100, 0.005, (M, N)).astype(X_dtype)) 1159s /usr/lib/python3.13/functools.py:934: in wrapper 1159s return dispatch(args[0].__class__)(*args, **kw) 1159s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1159s 1159s val = array([[0., 0., 0., 0., 0., 0., 1., 0., 1., 1.], 1159s [1., 0., 1., 1., 1., 0., 0., 1., 0., 0.], 1159s [0., 0., 1., ... 0.], 1159s [2., 0., 0., 1., 1., 0., 1., 0., 1., 0.], 1159s [1., 0., 1., 1., 0., 1., 1., 0., 3., 1.]], dtype=float32) 1159s typ = 1159s 1159s @singledispatch 1159s def as_cupy(val, typ=None): 1159s """ 1159s Rough conversion function 1159s 1159s Will try to infer target type from input type if not specified. 1159s """ 1159s if typ is None: 1159s typ = resolve_cupy_type(val) 1159s 1159s if issubclass(typ, CupyArray): 1159s > import cupy as cp 1159s E ModuleNotFoundError: No module named 'cupy' 1159s 1159s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:1010: ModuleNotFoundError 1159s ______________ test_transposed_concat[cupy_array-obs-outer-only] _______________ 1159s 1159s array_type = functools.partial(, typ=) 1159s axis_name = 'obs', join_type = 'outer', merge_strategy = 'only' 1159s 1159s def test_transposed_concat(array_type, axis_name, join_type, merge_strategy): 1159s axis, axis_name = merge._resolve_axis(axis_name) 1159s alt_axis = 1 - axis 1159s > lhs = gen_adata((10, 10), X_type=array_type, **GEN_ADATA_DASK_ARGS) 1159s 1159s tests/test_concatenate.py:1167: 1159s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1159s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:346: in gen_adata 1159s X = X_type(random_state.binomial(100, 0.005, (M, N)).astype(X_dtype)) 1159s /usr/lib/python3.13/functools.py:934: in wrapper 1159s return dispatch(args[0].__class__)(*args, **kw) 1159s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1159s 1159s val = array([[1., 1., 1., 1., 2., 1., 1., 2., 0., 1.], 1159s [0., 1., 1., 0., 0., 0., 2., 1., 1., 0.], 1159s [2., 0., 0., ... 0.], 1159s [0., 0., 0., 0., 0., 0., 0., 1., 0., 1.], 1159s [0., 0., 1., 2., 1., 1., 0., 0., 0., 1.]], dtype=float32) 1159s typ = 1159s 1159s @singledispatch 1159s def as_cupy(val, typ=None): 1159s """ 1159s Rough conversion function 1159s 1159s Will try to infer target type from input type if not specified. 1159s """ 1159s if typ is None: 1159s typ = resolve_cupy_type(val) 1159s 1159s if issubclass(typ, CupyArray): 1159s > import cupy as cp 1159s E ModuleNotFoundError: No module named 'cupy' 1159s 1159s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:1010: ModuleNotFoundError 1159s ______________ test_transposed_concat[cupy_array-var-inner-None] _______________ 1159s 1159s array_type = functools.partial(, typ=) 1159s axis_name = 'var', join_type = 'inner', merge_strategy = None 1159s 1159s def test_transposed_concat(array_type, axis_name, join_type, merge_strategy): 1159s axis, axis_name = merge._resolve_axis(axis_name) 1159s alt_axis = 1 - axis 1159s > lhs = gen_adata((10, 10), X_type=array_type, **GEN_ADATA_DASK_ARGS) 1159s 1159s tests/test_concatenate.py:1167: 1159s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1159s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:346: in gen_adata 1159s X = X_type(random_state.binomial(100, 0.005, (M, N)).astype(X_dtype)) 1159s /usr/lib/python3.13/functools.py:934: in wrapper 1159s return dispatch(args[0].__class__)(*args, **kw) 1159s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1159s 1159s val = array([[1., 1., 0., 1., 0., 0., 1., 0., 0., 0.], 1159s [3., 2., 1., 1., 0., 0., 0., 2., 0., 0.], 1159s [0., 0., 0., ... 0.], 1159s [2., 1., 0., 0., 0., 0., 2., 0., 2., 0.], 1159s [1., 0., 0., 0., 0., 1., 0., 1., 0., 0.]], dtype=float32) 1159s typ = 1159s 1159s @singledispatch 1159s def as_cupy(val, typ=None): 1159s """ 1159s Rough conversion function 1159s 1159s Will try to infer target type from input type if not specified. 1159s """ 1159s if typ is None: 1159s typ = resolve_cupy_type(val) 1159s 1159s if issubclass(typ, CupyArray): 1159s > import cupy as cp 1159s E ModuleNotFoundError: No module named 'cupy' 1159s 1159s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:1010: ModuleNotFoundError 1159s ______________ test_transposed_concat[cupy_array-var-inner-same] _______________ 1159s 1159s array_type = functools.partial(, typ=) 1159s axis_name = 'var', join_type = 'inner', merge_strategy = 'same' 1159s 1159s def test_transposed_concat(array_type, axis_name, join_type, merge_strategy): 1159s axis, axis_name = merge._resolve_axis(axis_name) 1159s alt_axis = 1 - axis 1159s > lhs = gen_adata((10, 10), X_type=array_type, **GEN_ADATA_DASK_ARGS) 1159s 1159s tests/test_concatenate.py:1167: 1159s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1159s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:346: in gen_adata 1159s X = X_type(random_state.binomial(100, 0.005, (M, N)).astype(X_dtype)) 1159s /usr/lib/python3.13/functools.py:934: in wrapper 1159s return dispatch(args[0].__class__)(*args, **kw) 1159s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1159s 1159s val = array([[2., 1., 0., 1., 0., 1., 0., 0., 2., 0.], 1159s [0., 0., 0., 0., 1., 2., 1., 1., 1., 0.], 1159s [0., 1., 0., ... 1.], 1159s [1., 1., 1., 0., 1., 1., 0., 2., 3., 0.], 1159s [0., 1., 0., 1., 0., 0., 0., 0., 0., 1.]], dtype=float32) 1159s typ = 1159s 1159s @singledispatch 1159s def as_cupy(val, typ=None): 1159s """ 1159s Rough conversion function 1159s 1159s Will try to infer target type from input type if not specified. 1159s """ 1159s if typ is None: 1159s typ = resolve_cupy_type(val) 1159s 1159s if issubclass(typ, CupyArray): 1159s > import cupy as cp 1159s E ModuleNotFoundError: No module named 'cupy' 1159s 1159s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:1010: ModuleNotFoundError 1159s _____________ test_transposed_concat[cupy_array-var-inner-unique] ______________ 1159s 1159s array_type = functools.partial(, typ=) 1159s axis_name = 'var', join_type = 'inner', merge_strategy = 'unique' 1159s 1159s def test_transposed_concat(array_type, axis_name, join_type, merge_strategy): 1159s axis, axis_name = merge._resolve_axis(axis_name) 1159s alt_axis = 1 - axis 1159s > lhs = gen_adata((10, 10), X_type=array_type, **GEN_ADATA_DASK_ARGS) 1159s 1159s tests/test_concatenate.py:1167: 1159s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1159s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:346: in gen_adata 1159s X = X_type(random_state.binomial(100, 0.005, (M, N)).astype(X_dtype)) 1159s /usr/lib/python3.13/functools.py:934: in wrapper 1159s return dispatch(args[0].__class__)(*args, **kw) 1159s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1159s 1159s val = array([[2., 0., 1., 1., 1., 0., 1., 0., 0., 1.], 1159s [1., 0., 2., 0., 0., 2., 0., 0., 1., 0.], 1159s [1., 0., 1., ... 0.], 1159s [1., 0., 0., 1., 0., 0., 1., 0., 1., 0.], 1159s [0., 0., 0., 0., 0., 0., 0., 0., 1., 0.]], dtype=float32) 1159s typ = 1159s 1159s @singledispatch 1159s def as_cupy(val, typ=None): 1159s """ 1159s Rough conversion function 1159s 1159s Will try to infer target type from input type if not specified. 1159s """ 1159s if typ is None: 1159s typ = resolve_cupy_type(val) 1159s 1159s if issubclass(typ, CupyArray): 1159s > import cupy as cp 1159s E ModuleNotFoundError: No module named 'cupy' 1159s 1159s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:1010: ModuleNotFoundError 1159s ______________ test_transposed_concat[cupy_array-var-inner-first] ______________ 1159s 1159s array_type = functools.partial(, typ=) 1159s axis_name = 'var', join_type = 'inner', merge_strategy = 'first' 1159s 1159s def test_transposed_concat(array_type, axis_name, join_type, merge_strategy): 1159s axis, axis_name = merge._resolve_axis(axis_name) 1159s alt_axis = 1 - axis 1159s > lhs = gen_adata((10, 10), X_type=array_type, **GEN_ADATA_DASK_ARGS) 1159s 1159s tests/test_concatenate.py:1167: 1159s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1159s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:346: in gen_adata 1159s X = X_type(random_state.binomial(100, 0.005, (M, N)).astype(X_dtype)) 1159s /usr/lib/python3.13/functools.py:934: in wrapper 1159s return dispatch(args[0].__class__)(*args, **kw) 1159s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1159s 1159s val = array([[0., 0., 0., 0., 0., 0., 0., 0., 1., 1.], 1159s [0., 1., 0., 0., 1., 0., 1., 0., 0., 0.], 1159s [0., 0., 0., ... 0.], 1159s [1., 1., 1., 0., 1., 0., 2., 3., 0., 0.], 1159s [1., 0., 0., 0., 1., 0., 0., 0., 2., 1.]], dtype=float32) 1159s typ = 1159s 1159s @singledispatch 1159s def as_cupy(val, typ=None): 1159s """ 1159s Rough conversion function 1159s 1159s Will try to infer target type from input type if not specified. 1159s """ 1159s if typ is None: 1159s typ = resolve_cupy_type(val) 1159s 1159s if issubclass(typ, CupyArray): 1159s > import cupy as cp 1159s E ModuleNotFoundError: No module named 'cupy' 1159s 1159s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:1010: ModuleNotFoundError 1159s ______________ test_transposed_concat[cupy_array-var-inner-only] _______________ 1159s 1159s array_type = functools.partial(, typ=) 1159s axis_name = 'var', join_type = 'inner', merge_strategy = 'only' 1159s 1159s def test_transposed_concat(array_type, axis_name, join_type, merge_strategy): 1159s axis, axis_name = merge._resolve_axis(axis_name) 1159s alt_axis = 1 - axis 1159s > lhs = gen_adata((10, 10), X_type=array_type, **GEN_ADATA_DASK_ARGS) 1159s 1159s tests/test_concatenate.py:1167: 1159s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1159s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:346: in gen_adata 1159s X = X_type(random_state.binomial(100, 0.005, (M, N)).astype(X_dtype)) 1159s /usr/lib/python3.13/functools.py:934: in wrapper 1159s return dispatch(args[0].__class__)(*args, **kw) 1159s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1159s 1159s val = array([[0., 0., 2., 0., 2., 0., 1., 1., 0., 1.], 1159s [2., 1., 2., 2., 0., 2., 1., 0., 2., 0.], 1159s [1., 0., 0., ... 1.], 1159s [0., 1., 1., 1., 1., 0., 0., 1., 0., 0.], 1159s [0., 1., 0., 1., 0., 1., 0., 1., 0., 0.]], dtype=float32) 1159s typ = 1159s 1159s @singledispatch 1159s def as_cupy(val, typ=None): 1159s """ 1159s Rough conversion function 1159s 1159s Will try to infer target type from input type if not specified. 1159s """ 1159s if typ is None: 1159s typ = resolve_cupy_type(val) 1159s 1159s if issubclass(typ, CupyArray): 1159s > import cupy as cp 1159s E ModuleNotFoundError: No module named 'cupy' 1159s 1159s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:1010: ModuleNotFoundError 1159s ______________ test_transposed_concat[cupy_array-var-outer-None] _______________ 1159s 1159s array_type = functools.partial(, typ=) 1159s axis_name = 'var', join_type = 'outer', merge_strategy = None 1159s 1159s def test_transposed_concat(array_type, axis_name, join_type, merge_strategy): 1159s axis, axis_name = merge._resolve_axis(axis_name) 1159s alt_axis = 1 - axis 1159s > lhs = gen_adata((10, 10), X_type=array_type, **GEN_ADATA_DASK_ARGS) 1159s 1159s tests/test_concatenate.py:1167: 1159s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1159s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:346: in gen_adata 1159s X = X_type(random_state.binomial(100, 0.005, (M, N)).astype(X_dtype)) 1159s /usr/lib/python3.13/functools.py:934: in wrapper 1159s return dispatch(args[0].__class__)(*args, **kw) 1159s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1159s 1159s val = array([[0., 1., 0., 0., 0., 1., 0., 0., 0., 2.], 1159s [0., 0., 0., 1., 0., 1., 0., 2., 1., 1.], 1159s [0., 0., 0., ... 0.], 1159s [1., 0., 0., 2., 0., 1., 2., 0., 0., 1.], 1159s [1., 0., 0., 0., 0., 2., 2., 0., 1., 0.]], dtype=float32) 1159s typ = 1159s 1159s @singledispatch 1159s def as_cupy(val, typ=None): 1159s """ 1159s Rough conversion function 1159s 1159s Will try to infer target type from input type if not specified. 1159s """ 1159s if typ is None: 1159s typ = resolve_cupy_type(val) 1159s 1159s if issubclass(typ, CupyArray): 1159s > import cupy as cp 1159s E ModuleNotFoundError: No module named 'cupy' 1159s 1159s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:1010: ModuleNotFoundError 1159s ______________ test_transposed_concat[cupy_array-var-outer-same] _______________ 1159s 1159s array_type = functools.partial(, typ=) 1159s axis_name = 'var', join_type = 'outer', merge_strategy = 'same' 1159s 1159s def test_transposed_concat(array_type, axis_name, join_type, merge_strategy): 1159s axis, axis_name = merge._resolve_axis(axis_name) 1159s alt_axis = 1 - axis 1159s > lhs = gen_adata((10, 10), X_type=array_type, **GEN_ADATA_DASK_ARGS) 1159s 1159s tests/test_concatenate.py:1167: 1159s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1159s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:346: in gen_adata 1159s X = X_type(random_state.binomial(100, 0.005, (M, N)).astype(X_dtype)) 1159s /usr/lib/python3.13/functools.py:934: in wrapper 1159s return dispatch(args[0].__class__)(*args, **kw) 1159s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1159s 1159s val = array([[0., 0., 0., 1., 1., 0., 1., 0., 2., 1.], 1159s [0., 0., 1., 1., 1., 1., 0., 0., 1., 0.], 1159s [0., 0., 2., ... 0.], 1159s [0., 0., 0., 1., 0., 0., 0., 0., 0., 0.], 1159s [1., 1., 0., 0., 0., 0., 1., 1., 0., 0.]], dtype=float32) 1159s typ = 1159s 1159s @singledispatch 1159s def as_cupy(val, typ=None): 1159s """ 1159s Rough conversion function 1159s 1159s Will try to infer target type from input type if not specified. 1159s """ 1159s if typ is None: 1159s typ = resolve_cupy_type(val) 1159s 1159s if issubclass(typ, CupyArray): 1159s > import cupy as cp 1159s E ModuleNotFoundError: No module named 'cupy' 1159s 1159s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:1010: ModuleNotFoundError 1159s _____________ test_transposed_concat[cupy_array-var-outer-unique] ______________ 1159s 1159s array_type = functools.partial(, typ=) 1159s axis_name = 'var', join_type = 'outer', merge_strategy = 'unique' 1159s 1159s def test_transposed_concat(array_type, axis_name, join_type, merge_strategy): 1159s axis, axis_name = merge._resolve_axis(axis_name) 1159s alt_axis = 1 - axis 1159s > lhs = gen_adata((10, 10), X_type=array_type, **GEN_ADATA_DASK_ARGS) 1159s 1159s tests/test_concatenate.py:1167: 1159s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1159s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:346: in gen_adata 1159s X = X_type(random_state.binomial(100, 0.005, (M, N)).astype(X_dtype)) 1159s /usr/lib/python3.13/functools.py:934: in wrapper 1159s return dispatch(args[0].__class__)(*args, **kw) 1159s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1159s 1159s val = array([[0., 1., 1., 0., 2., 2., 1., 0., 1., 2.], 1159s [0., 0., 1., 2., 0., 0., 0., 0., 1., 1.], 1159s [0., 0., 2., ... 1.], 1159s [1., 0., 1., 3., 1., 1., 0., 2., 1., 0.], 1159s [3., 2., 1., 0., 0., 1., 1., 0., 0., 1.]], dtype=float32) 1159s typ = 1159s 1159s @singledispatch 1159s def as_cupy(val, typ=None): 1159s """ 1159s Rough conversion function 1159s 1159s Will try to infer target type from input type if not specified. 1159s """ 1159s if typ is None: 1159s typ = resolve_cupy_type(val) 1159s 1159s if issubclass(typ, CupyArray): 1159s > import cupy as cp 1159s E ModuleNotFoundError: No module named 'cupy' 1159s 1159s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:1010: ModuleNotFoundError 1159s ______________ test_transposed_concat[cupy_array-var-outer-first] ______________ 1159s 1159s array_type = functools.partial(, typ=) 1159s axis_name = 'var', join_type = 'outer', merge_strategy = 'first' 1159s 1159s def test_transposed_concat(array_type, axis_name, join_type, merge_strategy): 1159s axis, axis_name = merge._resolve_axis(axis_name) 1159s alt_axis = 1 - axis 1159s > lhs = gen_adata((10, 10), X_type=array_type, **GEN_ADATA_DASK_ARGS) 1159s 1159s tests/test_concatenate.py:1167: 1159s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1159s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:346: in gen_adata 1159s X = X_type(random_state.binomial(100, 0.005, (M, N)).astype(X_dtype)) 1159s /usr/lib/python3.13/functools.py:934: in wrapper 1159s return dispatch(args[0].__class__)(*args, **kw) 1159s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1159s 1159s val = array([[0., 0., 0., 0., 0., 0., 0., 0., 0., 0.], 1159s [1., 2., 0., 1., 3., 1., 1., 2., 0., 0.], 1159s [1., 0., 0., ... 0.], 1159s [3., 1., 1., 0., 1., 0., 0., 0., 0., 0.], 1159s [1., 0., 0., 0., 1., 0., 0., 0., 1., 0.]], dtype=float32) 1159s typ = 1159s 1159s @singledispatch 1159s def as_cupy(val, typ=None): 1159s """ 1159s Rough conversion function 1159s 1159s Will try to infer target type from input type if not specified. 1159s """ 1159s if typ is None: 1159s typ = resolve_cupy_type(val) 1159s 1159s if issubclass(typ, CupyArray): 1159s > import cupy as cp 1159s E ModuleNotFoundError: No module named 'cupy' 1159s 1159s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:1010: ModuleNotFoundError 1159s ______________ test_transposed_concat[cupy_array-var-outer-only] _______________ 1159s 1159s array_type = functools.partial(, typ=) 1159s axis_name = 'var', join_type = 'outer', merge_strategy = 'only' 1159s 1159s def test_transposed_concat(array_type, axis_name, join_type, merge_strategy): 1159s axis, axis_name = merge._resolve_axis(axis_name) 1159s alt_axis = 1 - axis 1159s > lhs = gen_adata((10, 10), X_type=array_type, **GEN_ADATA_DASK_ARGS) 1159s 1159s tests/test_concatenate.py:1167: 1159s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1159s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:346: in gen_adata 1159s X = X_type(random_state.binomial(100, 0.005, (M, N)).astype(X_dtype)) 1159s /usr/lib/python3.13/functools.py:934: in wrapper 1159s return dispatch(args[0].__class__)(*args, **kw) 1159s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1159s 1159s val = array([[0., 1., 0., 0., 0., 0., 0., 0., 0., 0.], 1159s [1., 1., 1., 0., 1., 1., 1., 0., 0., 0.], 1159s [0., 1., 0., ... 0.], 1159s [1., 0., 1., 0., 1., 0., 1., 0., 2., 0.], 1159s [0., 1., 0., 0., 1., 1., 0., 0., 0., 0.]], dtype=float32) 1159s typ = 1159s 1159s @singledispatch 1159s def as_cupy(val, typ=None): 1159s """ 1159s Rough conversion function 1159s 1159s Will try to infer target type from input type if not specified. 1159s """ 1159s if typ is None: 1159s typ = resolve_cupy_type(val) 1159s 1159s if issubclass(typ, CupyArray): 1159s > import cupy as cp 1159s E ModuleNotFoundError: No module named 'cupy' 1159s 1159s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:1010: ModuleNotFoundError 1159s _______________ test_transposed_concat[cupy_csr-obs-inner-None] ________________ 1159s 1159s array_type = functools.partial(, typ=) 1159s axis_name = 'obs', join_type = 'inner', merge_strategy = None 1159s 1159s def test_transposed_concat(array_type, axis_name, join_type, merge_strategy): 1159s axis, axis_name = merge._resolve_axis(axis_name) 1159s alt_axis = 1 - axis 1159s > lhs = gen_adata((10, 10), X_type=array_type, **GEN_ADATA_DASK_ARGS) 1159s 1159s tests/test_concatenate.py:1167: 1159s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1159s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:346: in gen_adata 1159s X = X_type(random_state.binomial(100, 0.005, (M, N)).astype(X_dtype)) 1159s /usr/lib/python3.13/functools.py:934: in wrapper 1159s return dispatch(args[0].__class__)(*args, **kw) 1159s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1159s 1159s val = array([[2., 2., 0., 0., 1., 2., 0., 1., 3., 2.], 1159s [2., 0., 1., 0., 0., 0., 0., 0., 1., 1.], 1159s [0., 0., 0., ... 0.], 1159s [2., 0., 1., 1., 0., 0., 0., 0., 0., 1.], 1159s [0., 1., 0., 0., 0., 0., 2., 0., 0., 1.]], dtype=float32) 1159s typ = 1159s 1159s @singledispatch 1159s def as_cupy(val, typ=None): 1159s """ 1159s Rough conversion function 1159s 1159s Will try to infer target type from input type if not specified. 1159s """ 1159s if typ is None: 1159s typ = resolve_cupy_type(val) 1159s 1159s if issubclass(typ, CupyArray): 1159s import cupy as cp 1159s 1159s if isinstance(val, CSMatrix): 1159s val = val.toarray() 1159s return cp.array(val) 1159s elif issubclass(typ, CupyCSRMatrix): 1159s > import cupy as cp 1159s E ModuleNotFoundError: No module named 'cupy' 1159s 1159s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:1016: ModuleNotFoundError 1159s _______________ test_transposed_concat[cupy_csr-obs-inner-same] ________________ 1159s 1159s array_type = functools.partial(, typ=) 1159s axis_name = 'obs', join_type = 'inner', merge_strategy = 'same' 1159s 1159s def test_transposed_concat(array_type, axis_name, join_type, merge_strategy): 1159s axis, axis_name = merge._resolve_axis(axis_name) 1159s alt_axis = 1 - axis 1159s > lhs = gen_adata((10, 10), X_type=array_type, **GEN_ADATA_DASK_ARGS) 1159s 1159s tests/test_concatenate.py:1167: 1159s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1159s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:346: in gen_adata 1159s X = X_type(random_state.binomial(100, 0.005, (M, N)).astype(X_dtype)) 1159s /usr/lib/python3.13/functools.py:934: in wrapper 1159s return dispatch(args[0].__class__)(*args, **kw) 1159s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1159s 1159s val = array([[0., 0., 0., 1., 2., 1., 0., 0., 1., 0.], 1159s [0., 1., 1., 1., 0., 0., 1., 0., 0., 0.], 1159s [0., 0., 0., ... 0.], 1159s [0., 0., 0., 0., 1., 0., 0., 1., 0., 0.], 1159s [0., 0., 2., 0., 0., 0., 0., 1., 0., 0.]], dtype=float32) 1159s typ = 1159s 1159s @singledispatch 1159s def as_cupy(val, typ=None): 1159s """ 1159s Rough conversion function 1159s 1159s Will try to infer target type from input type if not specified. 1159s """ 1159s if typ is None: 1159s typ = resolve_cupy_type(val) 1159s 1159s if issubclass(typ, CupyArray): 1159s import cupy as cp 1159s 1159s if isinstance(val, CSMatrix): 1159s val = val.toarray() 1159s return cp.array(val) 1159s elif issubclass(typ, CupyCSRMatrix): 1159s > import cupy as cp 1159s E ModuleNotFoundError: No module named 'cupy' 1159s 1159s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:1016: ModuleNotFoundError 1159s ______________ test_transposed_concat[cupy_csr-obs-inner-unique] _______________ 1159s 1159s array_type = functools.partial(, typ=) 1159s axis_name = 'obs', join_type = 'inner', merge_strategy = 'unique' 1159s 1159s def test_transposed_concat(array_type, axis_name, join_type, merge_strategy): 1159s axis, axis_name = merge._resolve_axis(axis_name) 1159s alt_axis = 1 - axis 1159s > lhs = gen_adata((10, 10), X_type=array_type, **GEN_ADATA_DASK_ARGS) 1159s 1159s tests/test_concatenate.py:1167: 1159s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1159s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:346: in gen_adata 1159s X = X_type(random_state.binomial(100, 0.005, (M, N)).astype(X_dtype)) 1159s /usr/lib/python3.13/functools.py:934: in wrapper 1159s return dispatch(args[0].__class__)(*args, **kw) 1159s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1159s 1159s val = array([[0., 0., 1., 1., 0., 0., 0., 0., 0., 0.], 1159s [1., 1., 0., 0., 0., 0., 0., 0., 0., 1.], 1159s [1., 0., 1., ... 0.], 1159s [0., 1., 0., 0., 0., 0., 0., 1., 1., 0.], 1159s [0., 0., 1., 1., 1., 0., 1., 0., 1., 1.]], dtype=float32) 1159s typ = 1159s 1159s @singledispatch 1159s def as_cupy(val, typ=None): 1159s """ 1159s Rough conversion function 1159s 1159s Will try to infer target type from input type if not specified. 1159s """ 1159s if typ is None: 1159s typ = resolve_cupy_type(val) 1159s 1159s if issubclass(typ, CupyArray): 1159s import cupy as cp 1159s 1159s if isinstance(val, CSMatrix): 1159s val = val.toarray() 1159s return cp.array(val) 1159s elif issubclass(typ, CupyCSRMatrix): 1159s > import cupy as cp 1159s E ModuleNotFoundError: No module named 'cupy' 1159s 1159s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:1016: ModuleNotFoundError 1159s _______________ test_transposed_concat[cupy_csr-obs-inner-first] _______________ 1159s 1159s array_type = functools.partial(, typ=) 1159s axis_name = 'obs', join_type = 'inner', merge_strategy = 'first' 1159s 1159s def test_transposed_concat(array_type, axis_name, join_type, merge_strategy): 1159s axis, axis_name = merge._resolve_axis(axis_name) 1159s alt_axis = 1 - axis 1159s > lhs = gen_adata((10, 10), X_type=array_type, **GEN_ADATA_DASK_ARGS) 1159s 1159s tests/test_concatenate.py:1167: 1159s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1159s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:346: in gen_adata 1159s X = X_type(random_state.binomial(100, 0.005, (M, N)).astype(X_dtype)) 1159s /usr/lib/python3.13/functools.py:934: in wrapper 1159s return dispatch(args[0].__class__)(*args, **kw) 1159s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1159s 1159s val = array([[3., 0., 0., 0., 2., 0., 0., 2., 0., 1.], 1159s [2., 1., 0., 2., 0., 0., 1., 1., 0., 0.], 1159s [2., 0., 2., ... 0.], 1159s [0., 0., 0., 0., 1., 0., 0., 0., 1., 0.], 1159s [2., 0., 1., 1., 0., 0., 0., 2., 0., 0.]], dtype=float32) 1159s typ = 1159s 1159s @singledispatch 1159s def as_cupy(val, typ=None): 1159s """ 1159s Rough conversion function 1159s 1159s Will try to infer target type from input type if not specified. 1159s """ 1159s if typ is None: 1159s typ = resolve_cupy_type(val) 1159s 1159s if issubclass(typ, CupyArray): 1159s import cupy as cp 1159s 1159s if isinstance(val, CSMatrix): 1159s val = val.toarray() 1159s return cp.array(val) 1159s elif issubclass(typ, CupyCSRMatrix): 1159s > import cupy as cp 1159s E ModuleNotFoundError: No module named 'cupy' 1159s 1159s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:1016: ModuleNotFoundError 1159s _______________ test_transposed_concat[cupy_csr-obs-inner-only] ________________ 1159s 1159s array_type = functools.partial(, typ=) 1159s axis_name = 'obs', join_type = 'inner', merge_strategy = 'only' 1159s 1159s def test_transposed_concat(array_type, axis_name, join_type, merge_strategy): 1159s axis, axis_name = merge._resolve_axis(axis_name) 1159s alt_axis = 1 - axis 1159s > lhs = gen_adata((10, 10), X_type=array_type, **GEN_ADATA_DASK_ARGS) 1159s 1159s tests/test_concatenate.py:1167: 1159s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1159s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:346: in gen_adata 1159s X = X_type(random_state.binomial(100, 0.005, (M, N)).astype(X_dtype)) 1159s /usr/lib/python3.13/functools.py:934: in wrapper 1159s return dispatch(args[0].__class__)(*args, **kw) 1159s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1159s 1159s val = array([[1., 0., 0., 0., 0., 1., 0., 2., 0., 2.], 1159s [0., 0., 0., 0., 0., 0., 0., 1., 0., 2.], 1159s [0., 1., 0., ... 0.], 1159s [0., 1., 1., 0., 0., 1., 0., 2., 0., 1.], 1159s [0., 0., 0., 0., 0., 0., 2., 2., 1., 2.]], dtype=float32) 1159s typ = 1159s 1159s @singledispatch 1159s def as_cupy(val, typ=None): 1159s """ 1159s Rough conversion function 1159s 1159s Will try to infer target type from input type if not specified. 1159s """ 1159s if typ is None: 1159s typ = resolve_cupy_type(val) 1159s 1159s if issubclass(typ, CupyArray): 1159s import cupy as cp 1159s 1159s if isinstance(val, CSMatrix): 1159s val = val.toarray() 1159s return cp.array(val) 1159s elif issubclass(typ, CupyCSRMatrix): 1159s > import cupy as cp 1159s E ModuleNotFoundError: No module named 'cupy' 1159s 1159s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:1016: ModuleNotFoundError 1159s _______________ test_transposed_concat[cupy_csr-obs-outer-None] ________________ 1159s 1159s array_type = functools.partial(, typ=) 1159s axis_name = 'obs', join_type = 'outer', merge_strategy = None 1159s 1159s def test_transposed_concat(array_type, axis_name, join_type, merge_strategy): 1159s axis, axis_name = merge._resolve_axis(axis_name) 1159s alt_axis = 1 - axis 1159s > lhs = gen_adata((10, 10), X_type=array_type, **GEN_ADATA_DASK_ARGS) 1159s 1159s tests/test_concatenate.py:1167: 1159s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1159s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:346: in gen_adata 1159s X = X_type(random_state.binomial(100, 0.005, (M, N)).astype(X_dtype)) 1159s /usr/lib/python3.13/functools.py:934: in wrapper 1159s return dispatch(args[0].__class__)(*args, **kw) 1159s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1159s 1159s val = array([[2., 0., 0., 0., 0., 1., 2., 0., 2., 0.], 1159s [1., 0., 0., 0., 1., 1., 0., 0., 2., 0.], 1159s [0., 1., 1., ... 2.], 1159s [1., 0., 0., 0., 0., 1., 0., 0., 0., 0.], 1159s [1., 1., 0., 2., 0., 1., 0., 3., 2., 1.]], dtype=float32) 1159s typ = 1159s 1159s @singledispatch 1159s def as_cupy(val, typ=None): 1159s """ 1159s Rough conversion function 1159s 1159s Will try to infer target type from input type if not specified. 1159s """ 1159s if typ is None: 1159s typ = resolve_cupy_type(val) 1159s 1159s if issubclass(typ, CupyArray): 1159s import cupy as cp 1159s 1159s if isinstance(val, CSMatrix): 1159s val = val.toarray() 1159s return cp.array(val) 1159s elif issubclass(typ, CupyCSRMatrix): 1159s > import cupy as cp 1159s E ModuleNotFoundError: No module named 'cupy' 1159s 1159s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:1016: ModuleNotFoundError 1159s _______________ test_transposed_concat[cupy_csr-obs-outer-same] ________________ 1159s 1159s array_type = functools.partial(, typ=) 1159s axis_name = 'obs', join_type = 'outer', merge_strategy = 'same' 1159s 1159s def test_transposed_concat(array_type, axis_name, join_type, merge_strategy): 1159s axis, axis_name = merge._resolve_axis(axis_name) 1159s alt_axis = 1 - axis 1159s > lhs = gen_adata((10, 10), X_type=array_type, **GEN_ADATA_DASK_ARGS) 1159s 1159s tests/test_concatenate.py:1167: 1159s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1159s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:346: in gen_adata 1159s X = X_type(random_state.binomial(100, 0.005, (M, N)).astype(X_dtype)) 1159s /usr/lib/python3.13/functools.py:934: in wrapper 1159s return dispatch(args[0].__class__)(*args, **kw) 1159s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1159s 1159s val = array([[0., 0., 0., 2., 0., 0., 0., 0., 1., 2.], 1159s [0., 1., 0., 0., 0., 0., 0., 0., 0., 0.], 1159s [0., 0., 2., ... 0.], 1159s [3., 0., 0., 1., 1., 0., 1., 0., 1., 0.], 1159s [1., 0., 0., 0., 0., 0., 0., 1., 0., 0.]], dtype=float32) 1159s typ = 1159s 1159s @singledispatch 1159s def as_cupy(val, typ=None): 1159s """ 1159s Rough conversion function 1159s 1159s Will try to infer target type from input type if not specified. 1159s """ 1159s if typ is None: 1159s typ = resolve_cupy_type(val) 1159s 1159s if issubclass(typ, CupyArray): 1159s import cupy as cp 1159s 1159s if isinstance(val, CSMatrix): 1159s val = val.toarray() 1159s return cp.array(val) 1159s elif issubclass(typ, CupyCSRMatrix): 1159s > import cupy as cp 1159s E ModuleNotFoundError: No module named 'cupy' 1159s 1159s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:1016: ModuleNotFoundError 1159s ______________ test_transposed_concat[cupy_csr-obs-outer-unique] _______________ 1159s 1159s array_type = functools.partial(, typ=) 1159s axis_name = 'obs', join_type = 'outer', merge_strategy = 'unique' 1159s 1159s def test_transposed_concat(array_type, axis_name, join_type, merge_strategy): 1159s axis, axis_name = merge._resolve_axis(axis_name) 1159s alt_axis = 1 - axis 1159s > lhs = gen_adata((10, 10), X_type=array_type, **GEN_ADATA_DASK_ARGS) 1159s 1159s tests/test_concatenate.py:1167: 1159s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1159s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:346: in gen_adata 1159s X = X_type(random_state.binomial(100, 0.005, (M, N)).astype(X_dtype)) 1159s /usr/lib/python3.13/functools.py:934: in wrapper 1159s return dispatch(args[0].__class__)(*args, **kw) 1159s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1159s 1159s val = array([[0., 1., 4., 1., 1., 1., 0., 1., 0., 2.], 1159s [3., 0., 1., 1., 1., 1., 1., 0., 0., 0.], 1159s [0., 0., 0., ... 2.], 1159s [0., 0., 0., 0., 1., 0., 1., 1., 1., 0.], 1159s [1., 1., 0., 1., 0., 1., 1., 0., 1., 1.]], dtype=float32) 1159s typ = 1159s 1159s @singledispatch 1159s def as_cupy(val, typ=None): 1159s """ 1159s Rough conversion function 1159s 1159s Will try to infer target type from input type if not specified. 1159s """ 1159s if typ is None: 1159s typ = resolve_cupy_type(val) 1159s 1159s if issubclass(typ, CupyArray): 1159s import cupy as cp 1159s 1159s if isinstance(val, CSMatrix): 1159s val = val.toarray() 1159s return cp.array(val) 1159s elif issubclass(typ, CupyCSRMatrix): 1159s > import cupy as cp 1159s E ModuleNotFoundError: No module named 'cupy' 1159s 1159s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:1016: ModuleNotFoundError 1159s _______________ test_transposed_concat[cupy_csr-obs-outer-first] _______________ 1159s 1159s array_type = functools.partial(, typ=) 1159s axis_name = 'obs', join_type = 'outer', merge_strategy = 'first' 1159s 1159s def test_transposed_concat(array_type, axis_name, join_type, merge_strategy): 1159s axis, axis_name = merge._resolve_axis(axis_name) 1159s alt_axis = 1 - axis 1159s > lhs = gen_adata((10, 10), X_type=array_type, **GEN_ADATA_DASK_ARGS) 1159s 1159s tests/test_concatenate.py:1167: 1159s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1159s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:346: in gen_adata 1159s X = X_type(random_state.binomial(100, 0.005, (M, N)).astype(X_dtype)) 1159s /usr/lib/python3.13/functools.py:934: in wrapper 1159s return dispatch(args[0].__class__)(*args, **kw) 1159s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1159s 1159s val = array([[0., 0., 0., 0., 2., 1., 0., 1., 1., 0.], 1159s [1., 0., 0., 0., 0., 3., 2., 0., 1., 0.], 1159s [0., 0., 0., ... 1.], 1159s [0., 0., 0., 0., 0., 0., 0., 1., 0., 1.], 1159s [0., 1., 1., 1., 0., 0., 1., 0., 0., 1.]], dtype=float32) 1159s typ = 1159s 1159s @singledispatch 1159s def as_cupy(val, typ=None): 1159s """ 1159s Rough conversion function 1159s 1159s Will try to infer target type from input type if not specified. 1159s """ 1159s if typ is None: 1159s typ = resolve_cupy_type(val) 1159s 1159s if issubclass(typ, CupyArray): 1159s import cupy as cp 1159s 1159s if isinstance(val, CSMatrix): 1159s val = val.toarray() 1159s return cp.array(val) 1159s elif issubclass(typ, CupyCSRMatrix): 1159s > import cupy as cp 1159s E ModuleNotFoundError: No module named 'cupy' 1159s 1159s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:1016: ModuleNotFoundError 1159s _______________ test_transposed_concat[cupy_csr-obs-outer-only] ________________ 1159s 1159s array_type = functools.partial(, typ=) 1159s axis_name = 'obs', join_type = 'outer', merge_strategy = 'only' 1159s 1159s def test_transposed_concat(array_type, axis_name, join_type, merge_strategy): 1159s axis, axis_name = merge._resolve_axis(axis_name) 1159s alt_axis = 1 - axis 1159s > lhs = gen_adata((10, 10), X_type=array_type, **GEN_ADATA_DASK_ARGS) 1159s 1159s tests/test_concatenate.py:1167: 1159s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1159s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:346: in gen_adata 1159s X = X_type(random_state.binomial(100, 0.005, (M, N)).astype(X_dtype)) 1159s /usr/lib/python3.13/functools.py:934: in wrapper 1159s return dispatch(args[0].__class__)(*args, **kw) 1159s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1159s 1159s val = array([[1., 1., 0., 0., 2., 0., 0., 0., 1., 0.], 1159s [0., 1., 0., 0., 1., 0., 1., 0., 1., 3.], 1159s [0., 0., 0., ... 1.], 1159s [0., 0., 0., 1., 0., 0., 0., 0., 0., 0.], 1159s [1., 0., 2., 0., 0., 0., 0., 1., 1., 0.]], dtype=float32) 1159s typ = 1159s 1159s @singledispatch 1159s def as_cupy(val, typ=None): 1159s """ 1159s Rough conversion function 1159s 1159s Will try to infer target type from input type if not specified. 1159s """ 1159s if typ is None: 1159s typ = resolve_cupy_type(val) 1159s 1159s if issubclass(typ, CupyArray): 1159s import cupy as cp 1159s 1159s if isinstance(val, CSMatrix): 1159s val = val.toarray() 1159s return cp.array(val) 1159s elif issubclass(typ, CupyCSRMatrix): 1159s > import cupy as cp 1159s E ModuleNotFoundError: No module named 'cupy' 1159s 1159s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:1016: ModuleNotFoundError 1159s _______________ test_transposed_concat[cupy_csr-var-inner-None] ________________ 1159s 1159s array_type = functools.partial(, typ=) 1159s axis_name = 'var', join_type = 'inner', merge_strategy = None 1159s 1159s def test_transposed_concat(array_type, axis_name, join_type, merge_strategy): 1159s axis, axis_name = merge._resolve_axis(axis_name) 1159s alt_axis = 1 - axis 1159s > lhs = gen_adata((10, 10), X_type=array_type, **GEN_ADATA_DASK_ARGS) 1159s 1159s tests/test_concatenate.py:1167: 1159s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1159s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:346: in gen_adata 1159s X = X_type(random_state.binomial(100, 0.005, (M, N)).astype(X_dtype)) 1159s /usr/lib/python3.13/functools.py:934: in wrapper 1159s return dispatch(args[0].__class__)(*args, **kw) 1159s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1159s 1159s val = array([[1., 2., 0., 0., 0., 0., 1., 0., 0., 0.], 1159s [1., 1., 1., 0., 0., 1., 0., 1., 0., 2.], 1159s [0., 1., 0., ... 1.], 1159s [1., 3., 1., 1., 0., 0., 1., 1., 0., 0.], 1159s [1., 2., 1., 1., 0., 0., 0., 1., 0., 0.]], dtype=float32) 1159s typ = 1159s 1159s @singledispatch 1159s def as_cupy(val, typ=None): 1159s """ 1159s Rough conversion function 1159s 1159s Will try to infer target type from input type if not specified. 1159s """ 1159s if typ is None: 1159s typ = resolve_cupy_type(val) 1159s 1159s if issubclass(typ, CupyArray): 1159s import cupy as cp 1159s 1159s if isinstance(val, CSMatrix): 1159s val = val.toarray() 1159s return cp.array(val) 1159s elif issubclass(typ, CupyCSRMatrix): 1159s > import cupy as cp 1159s E ModuleNotFoundError: No module named 'cupy' 1159s 1159s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:1016: ModuleNotFoundError 1159s _______________ test_transposed_concat[cupy_csr-var-inner-same] ________________ 1159s 1159s array_type = functools.partial(, typ=) 1159s axis_name = 'var', join_type = 'inner', merge_strategy = 'same' 1159s 1159s def test_transposed_concat(array_type, axis_name, join_type, merge_strategy): 1159s axis, axis_name = merge._resolve_axis(axis_name) 1159s alt_axis = 1 - axis 1159s > lhs = gen_adata((10, 10), X_type=array_type, **GEN_ADATA_DASK_ARGS) 1159s 1159s tests/test_concatenate.py:1167: 1159s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1159s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:346: in gen_adata 1159s X = X_type(random_state.binomial(100, 0.005, (M, N)).astype(X_dtype)) 1159s /usr/lib/python3.13/functools.py:934: in wrapper 1159s return dispatch(args[0].__class__)(*args, **kw) 1159s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1159s 1159s val = array([[2., 0., 1., 1., 2., 1., 0., 0., 2., 0.], 1159s [0., 0., 0., 0., 0., 0., 0., 1., 2., 0.], 1159s [0., 1., 1., ... 0.], 1159s [1., 1., 1., 1., 2., 0., 1., 1., 1., 1.], 1159s [0., 0., 0., 1., 1., 0., 1., 0., 0., 2.]], dtype=float32) 1159s typ = 1159s 1159s @singledispatch 1159s def as_cupy(val, typ=None): 1159s """ 1159s Rough conversion function 1159s 1159s Will try to infer target type from input type if not specified. 1159s """ 1159s if typ is None: 1159s typ = resolve_cupy_type(val) 1159s 1159s if issubclass(typ, CupyArray): 1159s import cupy as cp 1159s 1159s if isinstance(val, CSMatrix): 1159s val = val.toarray() 1159s return cp.array(val) 1159s elif issubclass(typ, CupyCSRMatrix): 1159s > import cupy as cp 1159s E ModuleNotFoundError: No module named 'cupy' 1159s 1159s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:1016: ModuleNotFoundError 1159s ______________ test_transposed_concat[cupy_csr-var-inner-unique] _______________ 1159s 1159s array_type = functools.partial(, typ=) 1159s axis_name = 'var', join_type = 'inner', merge_strategy = 'unique' 1159s 1159s def test_transposed_concat(array_type, axis_name, join_type, merge_strategy): 1159s axis, axis_name = merge._resolve_axis(axis_name) 1159s alt_axis = 1 - axis 1159s > lhs = gen_adata((10, 10), X_type=array_type, **GEN_ADATA_DASK_ARGS) 1159s 1159s tests/test_concatenate.py:1167: 1159s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1159s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:346: in gen_adata 1159s X = X_type(random_state.binomial(100, 0.005, (M, N)).astype(X_dtype)) 1159s /usr/lib/python3.13/functools.py:934: in wrapper 1159s return dispatch(args[0].__class__)(*args, **kw) 1159s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1159s 1159s val = array([[0., 1., 2., 0., 1., 0., 2., 0., 0., 0.], 1159s [3., 0., 1., 1., 0., 0., 0., 1., 1., 0.], 1159s [3., 1., 1., ... 2.], 1159s [1., 0., 1., 0., 0., 2., 1., 1., 1., 0.], 1159s [1., 1., 1., 1., 0., 0., 0., 1., 1., 0.]], dtype=float32) 1159s typ = 1159s 1159s @singledispatch 1159s def as_cupy(val, typ=None): 1159s """ 1159s Rough conversion function 1159s 1159s Will try to infer target type from input type if not specified. 1159s """ 1159s if typ is None: 1159s typ = resolve_cupy_type(val) 1159s 1159s if issubclass(typ, CupyArray): 1159s import cupy as cp 1159s 1159s if isinstance(val, CSMatrix): 1159s val = val.toarray() 1159s return cp.array(val) 1159s elif issubclass(typ, CupyCSRMatrix): 1159s > import cupy as cp 1159s E ModuleNotFoundError: No module named 'cupy' 1159s 1159s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:1016: ModuleNotFoundError 1159s _______________ test_transposed_concat[cupy_csr-var-inner-first] _______________ 1159s 1159s array_type = functools.partial(, typ=) 1159s axis_name = 'var', join_type = 'inner', merge_strategy = 'first' 1159s 1159s def test_transposed_concat(array_type, axis_name, join_type, merge_strategy): 1159s axis, axis_name = merge._resolve_axis(axis_name) 1159s alt_axis = 1 - axis 1159s > lhs = gen_adata((10, 10), X_type=array_type, **GEN_ADATA_DASK_ARGS) 1159s 1159s tests/test_concatenate.py:1167: 1159s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1159s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:346: in gen_adata 1159s X = X_type(random_state.binomial(100, 0.005, (M, N)).astype(X_dtype)) 1159s /usr/lib/python3.13/functools.py:934: in wrapper 1159s return dispatch(args[0].__class__)(*args, **kw) 1159s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1159s 1159s val = array([[0., 1., 0., 1., 0., 0., 0., 1., 1., 1.], 1159s [0., 0., 1., 0., 0., 1., 0., 0., 0., 0.], 1159s [0., 1., 0., ... 0.], 1159s [0., 1., 0., 2., 1., 1., 1., 1., 0., 1.], 1159s [0., 0., 1., 2., 0., 0., 0., 0., 2., 0.]], dtype=float32) 1159s typ = 1159s 1159s @singledispatch 1159s def as_cupy(val, typ=None): 1159s """ 1159s Rough conversion function 1159s 1159s Will try to infer target type from input type if not specified. 1159s """ 1159s if typ is None: 1159s typ = resolve_cupy_type(val) 1159s 1159s if issubclass(typ, CupyArray): 1159s import cupy as cp 1159s 1159s if isinstance(val, CSMatrix): 1159s val = val.toarray() 1159s return cp.array(val) 1159s elif issubclass(typ, CupyCSRMatrix): 1159s > import cupy as cp 1159s E ModuleNotFoundError: No module named 'cupy' 1159s 1159s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:1016: ModuleNotFoundError 1159s _______________ test_transposed_concat[cupy_csr-var-inner-only] ________________ 1159s 1159s array_type = functools.partial(, typ=) 1159s axis_name = 'var', join_type = 'inner', merge_strategy = 'only' 1159s 1159s def test_transposed_concat(array_type, axis_name, join_type, merge_strategy): 1159s axis, axis_name = merge._resolve_axis(axis_name) 1159s alt_axis = 1 - axis 1159s > lhs = gen_adata((10, 10), X_type=array_type, **GEN_ADATA_DASK_ARGS) 1159s 1159s tests/test_concatenate.py:1167: 1159s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1159s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:346: in gen_adata 1159s X = X_type(random_state.binomial(100, 0.005, (M, N)).astype(X_dtype)) 1159s /usr/lib/python3.13/functools.py:934: in wrapper 1159s return dispatch(args[0].__class__)(*args, **kw) 1159s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1159s 1159s val = array([[0., 0., 0., 1., 0., 0., 1., 0., 0., 0.], 1159s [1., 2., 1., 1., 0., 0., 0., 0., 0., 2.], 1159s [0., 0., 0., ... 0.], 1159s [2., 2., 1., 0., 1., 1., 0., 1., 0., 1.], 1159s [0., 0., 0., 1., 0., 0., 0., 0., 0., 0.]], dtype=float32) 1159s typ = 1159s 1159s @singledispatch 1159s def as_cupy(val, typ=None): 1159s """ 1159s Rough conversion function 1159s 1159s Will try to infer target type from input type if not specified. 1159s """ 1159s if typ is None: 1159s typ = resolve_cupy_type(val) 1159s 1159s if issubclass(typ, CupyArray): 1159s import cupy as cp 1159s 1159s if isinstance(val, CSMatrix): 1159s val = val.toarray() 1159s return cp.array(val) 1159s elif issubclass(typ, CupyCSRMatrix): 1159s > import cupy as cp 1159s E ModuleNotFoundError: No module named 'cupy' 1159s 1159s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:1016: ModuleNotFoundError 1159s _______________ test_transposed_concat[cupy_csr-var-outer-None] ________________ 1159s 1159s array_type = functools.partial(, typ=) 1159s axis_name = 'var', join_type = 'outer', merge_strategy = None 1159s 1159s def test_transposed_concat(array_type, axis_name, join_type, merge_strategy): 1159s axis, axis_name = merge._resolve_axis(axis_name) 1159s alt_axis = 1 - axis 1159s > lhs = gen_adata((10, 10), X_type=array_type, **GEN_ADATA_DASK_ARGS) 1159s 1159s tests/test_concatenate.py:1167: 1159s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1159s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:346: in gen_adata 1159s X = X_type(random_state.binomial(100, 0.005, (M, N)).astype(X_dtype)) 1159s /usr/lib/python3.13/functools.py:934: in wrapper 1159s return dispatch(args[0].__class__)(*args, **kw) 1159s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1159s 1159s val = array([[1., 1., 1., 1., 0., 0., 1., 0., 0., 1.], 1159s [0., 0., 1., 0., 0., 2., 0., 0., 0., 0.], 1159s [1., 1., 1., ... 1.], 1159s [0., 1., 0., 0., 1., 1., 1., 1., 0., 1.], 1159s [0., 1., 0., 0., 0., 0., 1., 0., 0., 0.]], dtype=float32) 1159s typ = 1159s 1159s @singledispatch 1159s def as_cupy(val, typ=None): 1159s """ 1159s Rough conversion function 1159s 1159s Will try to infer target type from input type if not specified. 1159s """ 1159s if typ is None: 1159s typ = resolve_cupy_type(val) 1159s 1159s if issubclass(typ, CupyArray): 1159s import cupy as cp 1159s 1159s if isinstance(val, CSMatrix): 1159s val = val.toarray() 1159s return cp.array(val) 1159s elif issubclass(typ, CupyCSRMatrix): 1159s > import cupy as cp 1159s E ModuleNotFoundError: No module named 'cupy' 1159s 1159s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:1016: ModuleNotFoundError 1159s _______________ test_transposed_concat[cupy_csr-var-outer-same] ________________ 1159s 1159s array_type = functools.partial(, typ=) 1159s axis_name = 'var', join_type = 'outer', merge_strategy = 'same' 1159s 1159s def test_transposed_concat(array_type, axis_name, join_type, merge_strategy): 1159s axis, axis_name = merge._resolve_axis(axis_name) 1159s alt_axis = 1 - axis 1159s > lhs = gen_adata((10, 10), X_type=array_type, **GEN_ADATA_DASK_ARGS) 1159s 1159s tests/test_concatenate.py:1167: 1159s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1159s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:346: in gen_adata 1159s X = X_type(random_state.binomial(100, 0.005, (M, N)).astype(X_dtype)) 1159s /usr/lib/python3.13/functools.py:934: in wrapper 1159s return dispatch(args[0].__class__)(*args, **kw) 1159s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1159s 1159s val = array([[2., 0., 0., 1., 1., 0., 0., 0., 2., 1.], 1159s [0., 0., 0., 2., 1., 1., 0., 0., 0., 0.], 1159s [0., 0., 1., ... 0.], 1159s [0., 1., 1., 0., 1., 1., 1., 0., 1., 0.], 1159s [0., 0., 1., 0., 1., 0., 0., 0., 0., 0.]], dtype=float32) 1159s typ = 1159s 1159s @singledispatch 1159s def as_cupy(val, typ=None): 1159s """ 1159s Rough conversion function 1159s 1159s Will try to infer target type from input type if not specified. 1159s """ 1159s if typ is None: 1159s typ = resolve_cupy_type(val) 1159s 1159s if issubclass(typ, CupyArray): 1159s import cupy as cp 1159s 1159s if isinstance(val, CSMatrix): 1159s val = val.toarray() 1159s return cp.array(val) 1159s elif issubclass(typ, CupyCSRMatrix): 1159s > import cupy as cp 1159s E ModuleNotFoundError: No module named 'cupy' 1159s 1159s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:1016: ModuleNotFoundError 1159s ______________ test_transposed_concat[cupy_csr-var-outer-unique] _______________ 1159s 1159s array_type = functools.partial(, typ=) 1159s axis_name = 'var', join_type = 'outer', merge_strategy = 'unique' 1159s 1159s def test_transposed_concat(array_type, axis_name, join_type, merge_strategy): 1159s axis, axis_name = merge._resolve_axis(axis_name) 1159s alt_axis = 1 - axis 1159s > lhs = gen_adata((10, 10), X_type=array_type, **GEN_ADATA_DASK_ARGS) 1159s 1159s tests/test_concatenate.py:1167: 1159s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1159s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:346: in gen_adata 1159s X = X_type(random_state.binomial(100, 0.005, (M, N)).astype(X_dtype)) 1159s /usr/lib/python3.13/functools.py:934: in wrapper 1159s return dispatch(args[0].__class__)(*args, **kw) 1159s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1159s 1159s val = array([[0., 2., 1., 0., 0., 0., 1., 1., 2., 0.], 1159s [1., 0., 1., 0., 1., 0., 0., 1., 1., 0.], 1159s [0., 0., 1., ... 1.], 1159s [0., 0., 0., 1., 1., 1., 1., 0., 0., 0.], 1159s [0., 0., 0., 1., 0., 1., 1., 0., 0., 2.]], dtype=float32) 1159s typ = 1159s 1159s @singledispatch 1159s def as_cupy(val, typ=None): 1159s """ 1159s Rough conversion function 1159s 1159s Will try to infer target type from input type if not specified. 1159s """ 1159s if typ is None: 1159s typ = resolve_cupy_type(val) 1159s 1159s if issubclass(typ, CupyArray): 1159s import cupy as cp 1159s 1159s if isinstance(val, CSMatrix): 1159s val = val.toarray() 1159s return cp.array(val) 1159s elif issubclass(typ, CupyCSRMatrix): 1159s > import cupy as cp 1159s E ModuleNotFoundError: No module named 'cupy' 1159s 1159s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:1016: ModuleNotFoundError 1159s _______________ test_transposed_concat[cupy_csr-var-outer-first] _______________ 1159s 1159s array_type = functools.partial(, typ=) 1159s axis_name = 'var', join_type = 'outer', merge_strategy = 'first' 1159s 1159s def test_transposed_concat(array_type, axis_name, join_type, merge_strategy): 1159s axis, axis_name = merge._resolve_axis(axis_name) 1159s alt_axis = 1 - axis 1159s > lhs = gen_adata((10, 10), X_type=array_type, **GEN_ADATA_DASK_ARGS) 1159s 1159s tests/test_concatenate.py:1167: 1159s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1159s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:346: in gen_adata 1159s X = X_type(random_state.binomial(100, 0.005, (M, N)).astype(X_dtype)) 1159s /usr/lib/python3.13/functools.py:934: in wrapper 1159s return dispatch(args[0].__class__)(*args, **kw) 1159s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1159s 1159s val = array([[0., 0., 0., 0., 0., 0., 1., 2., 0., 0.], 1159s [0., 0., 1., 0., 0., 1., 0., 1., 1., 1.], 1159s [1., 0., 0., ... 2.], 1159s [2., 2., 0., 2., 0., 1., 0., 0., 0., 1.], 1159s [1., 0., 0., 1., 0., 1., 0., 0., 1., 1.]], dtype=float32) 1159s typ = 1159s 1159s @singledispatch 1159s def as_cupy(val, typ=None): 1159s """ 1159s Rough conversion function 1159s 1159s Will try to infer target type from input type if not specified. 1159s """ 1159s if typ is None: 1159s typ = resolve_cupy_type(val) 1159s 1159s if issubclass(typ, CupyArray): 1159s import cupy as cp 1159s 1159s if isinstance(val, CSMatrix): 1159s val = val.toarray() 1159s return cp.array(val) 1159s elif issubclass(typ, CupyCSRMatrix): 1159s > import cupy as cp 1159s E ModuleNotFoundError: No module named 'cupy' 1159s 1159s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:1016: ModuleNotFoundError 1159s _______________ test_transposed_concat[cupy_csr-var-outer-only] ________________ 1159s 1159s array_type = functools.partial(, typ=) 1159s axis_name = 'var', join_type = 'outer', merge_strategy = 'only' 1159s 1159s def test_transposed_concat(array_type, axis_name, join_type, merge_strategy): 1159s axis, axis_name = merge._resolve_axis(axis_name) 1159s alt_axis = 1 - axis 1159s > lhs = gen_adata((10, 10), X_type=array_type, **GEN_ADATA_DASK_ARGS) 1159s 1159s tests/test_concatenate.py:1167: 1159s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1159s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:346: in gen_adata 1159s X = X_type(random_state.binomial(100, 0.005, (M, N)).astype(X_dtype)) 1159s /usr/lib/python3.13/functools.py:934: in wrapper 1159s return dispatch(args[0].__class__)(*args, **kw) 1159s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1159s 1159s val = array([[1., 1., 1., 0., 0., 1., 0., 0., 2., 0.], 1159s [0., 0., 0., 0., 0., 0., 1., 0., 0., 1.], 1159s [0., 0., 1., ... 1.], 1159s [0., 0., 1., 0., 0., 1., 0., 1., 1., 0.], 1159s [0., 1., 1., 0., 0., 0., 0., 1., 0., 3.]], dtype=float32) 1159s typ = 1159s 1159s @singledispatch 1159s def as_cupy(val, typ=None): 1159s """ 1159s Rough conversion function 1159s 1159s Will try to infer target type from input type if not specified. 1159s """ 1159s if typ is None: 1159s typ = resolve_cupy_type(val) 1159s 1159s if issubclass(typ, CupyArray): 1159s import cupy as cp 1159s 1159s if isinstance(val, CSMatrix): 1159s val = val.toarray() 1159s return cp.array(val) 1159s elif issubclass(typ, CupyCSRMatrix): 1159s > import cupy as cp 1159s E ModuleNotFoundError: No module named 'cupy' 1159s 1159s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:1016: ModuleNotFoundError 1159s _______________ test_transposed_concat[cupy_csc-obs-inner-None] ________________ 1159s 1159s array_type = functools.partial(, typ=) 1159s axis_name = 'obs', join_type = 'inner', merge_strategy = None 1159s 1159s def test_transposed_concat(array_type, axis_name, join_type, merge_strategy): 1159s axis, axis_name = merge._resolve_axis(axis_name) 1159s alt_axis = 1 - axis 1159s > lhs = gen_adata((10, 10), X_type=array_type, **GEN_ADATA_DASK_ARGS) 1159s 1159s tests/test_concatenate.py:1167: 1159s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1159s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:346: in gen_adata 1159s X = X_type(random_state.binomial(100, 0.005, (M, N)).astype(X_dtype)) 1159s /usr/lib/python3.13/functools.py:934: in wrapper 1159s return dispatch(args[0].__class__)(*args, **kw) 1159s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1159s 1159s val = array([[1., 0., 1., 1., 1., 0., 0., 0., 0., 0.], 1159s [1., 0., 1., 2., 0., 2., 0., 2., 1., 0.], 1159s [0., 0., 1., ... 0.], 1159s [1., 2., 1., 2., 2., 0., 0., 0., 0., 0.], 1159s [0., 1., 1., 0., 0., 1., 0., 2., 1., 1.]], dtype=float32) 1159s typ = 1159s 1159s @singledispatch 1159s def as_cupy(val, typ=None): 1159s """ 1159s Rough conversion function 1159s 1159s Will try to infer target type from input type if not specified. 1159s """ 1159s if typ is None: 1159s typ = resolve_cupy_type(val) 1159s 1159s if issubclass(typ, CupyArray): 1159s import cupy as cp 1159s 1159s if isinstance(val, CSMatrix): 1159s val = val.toarray() 1159s return cp.array(val) 1159s elif issubclass(typ, CupyCSRMatrix): 1159s import cupy as cp 1159s import cupyx.scipy.sparse as cpsparse 1159s 1159s if isinstance(val, np.ndarray): 1159s return cpsparse.csr_matrix(cp.array(val)) 1159s else: 1159s return cpsparse.csr_matrix(val) 1159s elif issubclass(typ, CupyCSCMatrix): 1159s > import cupy as cp 1159s E ModuleNotFoundError: No module named 'cupy' 1159s 1159s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:1024: ModuleNotFoundError 1159s _______________ test_transposed_concat[cupy_csc-obs-inner-same] ________________ 1159s 1159s array_type = functools.partial(, typ=) 1159s axis_name = 'obs', join_type = 'inner', merge_strategy = 'same' 1159s 1159s def test_transposed_concat(array_type, axis_name, join_type, merge_strategy): 1159s axis, axis_name = merge._resolve_axis(axis_name) 1159s alt_axis = 1 - axis 1159s > lhs = gen_adata((10, 10), X_type=array_type, **GEN_ADATA_DASK_ARGS) 1159s 1159s tests/test_concatenate.py:1167: 1159s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1159s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:346: in gen_adata 1159s X = X_type(random_state.binomial(100, 0.005, (M, N)).astype(X_dtype)) 1159s /usr/lib/python3.13/functools.py:934: in wrapper 1159s return dispatch(args[0].__class__)(*args, **kw) 1159s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1159s 1159s val = array([[0., 0., 1., 1., 0., 0., 0., 2., 3., 0.], 1159s [0., 0., 1., 1., 0., 1., 0., 0., 0., 1.], 1159s [0., 2., 0., ... 0.], 1159s [3., 1., 0., 0., 1., 0., 0., 1., 0., 2.], 1159s [0., 3., 1., 1., 0., 0., 0., 0., 0., 0.]], dtype=float32) 1159s typ = 1159s 1159s @singledispatch 1159s def as_cupy(val, typ=None): 1159s """ 1159s Rough conversion function 1159s 1159s Will try to infer target type from input type if not specified. 1159s """ 1159s if typ is None: 1159s typ = resolve_cupy_type(val) 1159s 1159s if issubclass(typ, CupyArray): 1159s import cupy as cp 1159s 1159s if isinstance(val, CSMatrix): 1159s val = val.toarray() 1159s return cp.array(val) 1159s elif issubclass(typ, CupyCSRMatrix): 1159s import cupy as cp 1159s import cupyx.scipy.sparse as cpsparse 1159s 1159s if isinstance(val, np.ndarray): 1159s return cpsparse.csr_matrix(cp.array(val)) 1159s else: 1159s return cpsparse.csr_matrix(val) 1159s elif issubclass(typ, CupyCSCMatrix): 1159s > import cupy as cp 1159s E ModuleNotFoundError: No module named 'cupy' 1159s 1159s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:1024: ModuleNotFoundError 1159s ______________ test_transposed_concat[cupy_csc-obs-inner-unique] _______________ 1159s 1159s array_type = functools.partial(, typ=) 1159s axis_name = 'obs', join_type = 'inner', merge_strategy = 'unique' 1159s 1159s def test_transposed_concat(array_type, axis_name, join_type, merge_strategy): 1159s axis, axis_name = merge._resolve_axis(axis_name) 1159s alt_axis = 1 - axis 1159s > lhs = gen_adata((10, 10), X_type=array_type, **GEN_ADATA_DASK_ARGS) 1159s 1159s tests/test_concatenate.py:1167: 1159s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1159s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:346: in gen_adata 1159s X = X_type(random_state.binomial(100, 0.005, (M, N)).astype(X_dtype)) 1159s /usr/lib/python3.13/functools.py:934: in wrapper 1159s return dispatch(args[0].__class__)(*args, **kw) 1159s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1159s 1159s val = array([[2., 0., 0., 0., 3., 0., 1., 0., 1., 1.], 1159s [0., 0., 0., 0., 1., 0., 0., 1., 2., 2.], 1159s [0., 1., 1., ... 0.], 1159s [3., 0., 0., 2., 1., 1., 0., 2., 2., 1.], 1159s [2., 0., 2., 2., 0., 0., 2., 1., 0., 1.]], dtype=float32) 1159s typ = 1159s 1159s @singledispatch 1159s def as_cupy(val, typ=None): 1159s """ 1159s Rough conversion function 1159s 1159s Will try to infer target type from input type if not specified. 1159s """ 1159s if typ is None: 1159s typ = resolve_cupy_type(val) 1159s 1159s if issubclass(typ, CupyArray): 1159s import cupy as cp 1159s 1159s if isinstance(val, CSMatrix): 1159s val = val.toarray() 1159s return cp.array(val) 1159s elif issubclass(typ, CupyCSRMatrix): 1159s import cupy as cp 1159s import cupyx.scipy.sparse as cpsparse 1159s 1159s if isinstance(val, np.ndarray): 1159s return cpsparse.csr_matrix(cp.array(val)) 1159s else: 1159s return cpsparse.csr_matrix(val) 1159s elif issubclass(typ, CupyCSCMatrix): 1159s > import cupy as cp 1159s E ModuleNotFoundError: No module named 'cupy' 1159s 1159s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:1024: ModuleNotFoundError 1159s _______________ test_transposed_concat[cupy_csc-obs-inner-first] _______________ 1159s 1159s array_type = functools.partial(, typ=) 1159s axis_name = 'obs', join_type = 'inner', merge_strategy = 'first' 1159s 1159s def test_transposed_concat(array_type, axis_name, join_type, merge_strategy): 1159s axis, axis_name = merge._resolve_axis(axis_name) 1159s alt_axis = 1 - axis 1159s > lhs = gen_adata((10, 10), X_type=array_type, **GEN_ADATA_DASK_ARGS) 1159s 1159s tests/test_concatenate.py:1167: 1159s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1159s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:346: in gen_adata 1159s X = X_type(random_state.binomial(100, 0.005, (M, N)).astype(X_dtype)) 1159s /usr/lib/python3.13/functools.py:934: in wrapper 1159s return dispatch(args[0].__class__)(*args, **kw) 1159s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1159s 1159s val = array([[0., 1., 2., 0., 0., 1., 1., 1., 0., 1.], 1159s [0., 1., 1., 0., 0., 0., 0., 0., 0., 2.], 1159s [0., 0., 0., ... 0.], 1159s [0., 2., 0., 0., 0., 1., 1., 1., 2., 0.], 1159s [4., 1., 1., 1., 2., 0., 0., 0., 2., 2.]], dtype=float32) 1159s typ = 1159s 1159s @singledispatch 1159s def as_cupy(val, typ=None): 1159s """ 1159s Rough conversion function 1159s 1159s Will try to infer target type from input type if not specified. 1159s """ 1159s if typ is None: 1159s typ = resolve_cupy_type(val) 1159s 1159s if issubclass(typ, CupyArray): 1159s import cupy as cp 1159s 1159s if isinstance(val, CSMatrix): 1159s val = val.toarray() 1159s return cp.array(val) 1159s elif issubclass(typ, CupyCSRMatrix): 1159s import cupy as cp 1159s import cupyx.scipy.sparse as cpsparse 1159s 1159s if isinstance(val, np.ndarray): 1159s return cpsparse.csr_matrix(cp.array(val)) 1159s else: 1159s return cpsparse.csr_matrix(val) 1159s elif issubclass(typ, CupyCSCMatrix): 1159s > import cupy as cp 1159s E ModuleNotFoundError: No module named 'cupy' 1159s 1159s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:1024: ModuleNotFoundError 1159s _______________ test_transposed_concat[cupy_csc-obs-inner-only] ________________ 1159s 1159s array_type = functools.partial(, typ=) 1159s axis_name = 'obs', join_type = 'inner', merge_strategy = 'only' 1159s 1159s def test_transposed_concat(array_type, axis_name, join_type, merge_strategy): 1159s axis, axis_name = merge._resolve_axis(axis_name) 1159s alt_axis = 1 - axis 1159s > lhs = gen_adata((10, 10), X_type=array_type, **GEN_ADATA_DASK_ARGS) 1159s 1159s tests/test_concatenate.py:1167: 1159s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1159s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:346: in gen_adata 1159s X = X_type(random_state.binomial(100, 0.005, (M, N)).astype(X_dtype)) 1159s /usr/lib/python3.13/functools.py:934: in wrapper 1159s return dispatch(args[0].__class__)(*args, **kw) 1159s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1159s 1159s val = array([[1., 1., 0., 1., 0., 0., 1., 1., 0., 0.], 1159s [0., 1., 0., 3., 0., 2., 1., 0., 0., 0.], 1159s [1., 0., 0., ... 1.], 1159s [0., 0., 1., 0., 0., 2., 0., 0., 1., 0.], 1159s [0., 0., 1., 1., 1., 0., 0., 1., 1., 0.]], dtype=float32) 1159s typ = 1159s 1159s @singledispatch 1159s def as_cupy(val, typ=None): 1159s """ 1159s Rough conversion function 1159s 1159s Will try to infer target type from input type if not specified. 1159s """ 1159s if typ is None: 1159s typ = resolve_cupy_type(val) 1159s 1159s if issubclass(typ, CupyArray): 1159s import cupy as cp 1159s 1159s if isinstance(val, CSMatrix): 1159s val = val.toarray() 1159s return cp.array(val) 1159s elif issubclass(typ, CupyCSRMatrix): 1159s import cupy as cp 1159s import cupyx.scipy.sparse as cpsparse 1159s 1159s if isinstance(val, np.ndarray): 1159s return cpsparse.csr_matrix(cp.array(val)) 1159s else: 1159s return cpsparse.csr_matrix(val) 1159s elif issubclass(typ, CupyCSCMatrix): 1159s > import cupy as cp 1159s E ModuleNotFoundError: No module named 'cupy' 1159s 1159s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:1024: ModuleNotFoundError 1159s _______________ test_transposed_concat[cupy_csc-obs-outer-None] ________________ 1159s 1159s array_type = functools.partial(, typ=) 1159s axis_name = 'obs', join_type = 'outer', merge_strategy = None 1159s 1159s def test_transposed_concat(array_type, axis_name, join_type, merge_strategy): 1159s axis, axis_name = merge._resolve_axis(axis_name) 1159s alt_axis = 1 - axis 1159s > lhs = gen_adata((10, 10), X_type=array_type, **GEN_ADATA_DASK_ARGS) 1159s 1159s tests/test_concatenate.py:1167: 1159s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1159s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:346: in gen_adata 1159s X = X_type(random_state.binomial(100, 0.005, (M, N)).astype(X_dtype)) 1159s /usr/lib/python3.13/functools.py:934: in wrapper 1159s return dispatch(args[0].__class__)(*args, **kw) 1159s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1159s 1159s val = array([[0., 0., 0., 0., 0., 1., 0., 0., 2., 1.], 1159s [3., 1., 0., 1., 0., 0., 0., 0., 0., 0.], 1159s [1., 0., 1., ... 0.], 1159s [1., 0., 0., 0., 0., 0., 0., 0., 0., 0.], 1159s [0., 1., 0., 0., 1., 1., 0., 3., 2., 1.]], dtype=float32) 1159s typ = 1159s 1159s @singledispatch 1159s def as_cupy(val, typ=None): 1159s """ 1159s Rough conversion function 1159s 1159s Will try to infer target type from input type if not specified. 1159s """ 1159s if typ is None: 1159s typ = resolve_cupy_type(val) 1159s 1159s if issubclass(typ, CupyArray): 1159s import cupy as cp 1159s 1159s if isinstance(val, CSMatrix): 1159s val = val.toarray() 1159s return cp.array(val) 1159s elif issubclass(typ, CupyCSRMatrix): 1159s import cupy as cp 1159s import cupyx.scipy.sparse as cpsparse 1159s 1159s if isinstance(val, np.ndarray): 1159s return cpsparse.csr_matrix(cp.array(val)) 1159s else: 1159s return cpsparse.csr_matrix(val) 1159s elif issubclass(typ, CupyCSCMatrix): 1159s > import cupy as cp 1159s E ModuleNotFoundError: No module named 'cupy' 1159s 1159s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:1024: ModuleNotFoundError 1159s _______________ test_transposed_concat[cupy_csc-obs-outer-same] ________________ 1159s 1159s array_type = functools.partial(, typ=) 1159s axis_name = 'obs', join_type = 'outer', merge_strategy = 'same' 1159s 1159s def test_transposed_concat(array_type, axis_name, join_type, merge_strategy): 1159s axis, axis_name = merge._resolve_axis(axis_name) 1159s alt_axis = 1 - axis 1159s > lhs = gen_adata((10, 10), X_type=array_type, **GEN_ADATA_DASK_ARGS) 1159s 1159s tests/test_concatenate.py:1167: 1159s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1159s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:346: in gen_adata 1159s X = X_type(random_state.binomial(100, 0.005, (M, N)).astype(X_dtype)) 1159s /usr/lib/python3.13/functools.py:934: in wrapper 1159s return dispatch(args[0].__class__)(*args, **kw) 1159s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1159s 1159s val = array([[1., 1., 0., 1., 0., 0., 0., 1., 1., 1.], 1159s [0., 1., 0., 0., 2., 1., 0., 0., 0., 1.], 1159s [1., 0., 1., ... 0.], 1159s [0., 0., 1., 0., 1., 0., 0., 0., 2., 0.], 1159s [1., 0., 0., 0., 2., 1., 0., 0., 0., 0.]], dtype=float32) 1159s typ = 1159s 1159s @singledispatch 1159s def as_cupy(val, typ=None): 1159s """ 1159s Rough conversion function 1159s 1159s Will try to infer target type from input type if not specified. 1159s """ 1159s if typ is None: 1159s typ = resolve_cupy_type(val) 1159s 1159s if issubclass(typ, CupyArray): 1159s import cupy as cp 1159s 1159s if isinstance(val, CSMatrix): 1159s val = val.toarray() 1159s return cp.array(val) 1159s elif issubclass(typ, CupyCSRMatrix): 1159s import cupy as cp 1159s import cupyx.scipy.sparse as cpsparse 1159s 1159s if isinstance(val, np.ndarray): 1159s return cpsparse.csr_matrix(cp.array(val)) 1159s else: 1159s return cpsparse.csr_matrix(val) 1159s elif issubclass(typ, CupyCSCMatrix): 1159s > import cupy as cp 1159s E ModuleNotFoundError: No module named 'cupy' 1159s 1159s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:1024: ModuleNotFoundError 1159s ______________ test_transposed_concat[cupy_csc-obs-outer-unique] _______________ 1159s 1159s array_type = functools.partial(, typ=) 1159s axis_name = 'obs', join_type = 'outer', merge_strategy = 'unique' 1159s 1159s def test_transposed_concat(array_type, axis_name, join_type, merge_strategy): 1159s axis, axis_name = merge._resolve_axis(axis_name) 1159s alt_axis = 1 - axis 1159s > lhs = gen_adata((10, 10), X_type=array_type, **GEN_ADATA_DASK_ARGS) 1159s 1159s tests/test_concatenate.py:1167: 1159s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1159s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:346: in gen_adata 1159s X = X_type(random_state.binomial(100, 0.005, (M, N)).astype(X_dtype)) 1159s /usr/lib/python3.13/functools.py:934: in wrapper 1159s return dispatch(args[0].__class__)(*args, **kw) 1159s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1159s 1159s val = array([[0., 0., 1., 0., 2., 2., 2., 1., 0., 0.], 1159s [1., 1., 2., 0., 0., 0., 0., 0., 1., 0.], 1159s [1., 1., 0., ... 0.], 1159s [1., 0., 0., 0., 1., 0., 1., 0., 1., 0.], 1159s [0., 0., 0., 1., 1., 1., 3., 0., 1., 0.]], dtype=float32) 1159s typ = 1159s 1159s @singledispatch 1159s def as_cupy(val, typ=None): 1159s """ 1159s Rough conversion function 1159s 1159s Will try to infer target type from input type if not specified. 1159s """ 1159s if typ is None: 1159s typ = resolve_cupy_type(val) 1159s 1159s if issubclass(typ, CupyArray): 1159s import cupy as cp 1159s 1159s if isinstance(val, CSMatrix): 1159s val = val.toarray() 1159s return cp.array(val) 1159s elif issubclass(typ, CupyCSRMatrix): 1159s import cupy as cp 1159s import cupyx.scipy.sparse as cpsparse 1159s 1159s if isinstance(val, np.ndarray): 1159s return cpsparse.csr_matrix(cp.array(val)) 1159s else: 1159s return cpsparse.csr_matrix(val) 1159s elif issubclass(typ, CupyCSCMatrix): 1159s > import cupy as cp 1159s E ModuleNotFoundError: No module named 'cupy' 1159s 1159s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:1024: ModuleNotFoundError 1159s _______________ test_transposed_concat[cupy_csc-obs-outer-first] _______________ 1159s 1159s array_type = functools.partial(, typ=) 1159s axis_name = 'obs', join_type = 'outer', merge_strategy = 'first' 1159s 1159s def test_transposed_concat(array_type, axis_name, join_type, merge_strategy): 1159s axis, axis_name = merge._resolve_axis(axis_name) 1159s alt_axis = 1 - axis 1159s > lhs = gen_adata((10, 10), X_type=array_type, **GEN_ADATA_DASK_ARGS) 1159s 1159s tests/test_concatenate.py:1167: 1159s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1159s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:346: in gen_adata 1159s X = X_type(random_state.binomial(100, 0.005, (M, N)).astype(X_dtype)) 1159s /usr/lib/python3.13/functools.py:934: in wrapper 1159s return dispatch(args[0].__class__)(*args, **kw) 1159s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1159s 1159s val = array([[1., 1., 0., 0., 1., 1., 0., 0., 1., 0.], 1159s [0., 1., 1., 1., 1., 0., 2., 0., 0., 0.], 1159s [1., 0., 1., ... 1.], 1159s [0., 0., 1., 1., 1., 1., 1., 0., 1., 0.], 1159s [1., 0., 1., 1., 0., 1., 0., 0., 1., 0.]], dtype=float32) 1159s typ = 1159s 1159s @singledispatch 1159s def as_cupy(val, typ=None): 1159s """ 1159s Rough conversion function 1159s 1159s Will try to infer target type from input type if not specified. 1159s """ 1159s if typ is None: 1159s typ = resolve_cupy_type(val) 1159s 1159s if issubclass(typ, CupyArray): 1159s import cupy as cp 1159s 1159s if isinstance(val, CSMatrix): 1159s val = val.toarray() 1159s return cp.array(val) 1159s elif issubclass(typ, CupyCSRMatrix): 1159s import cupy as cp 1159s import cupyx.scipy.sparse as cpsparse 1159s 1159s if isinstance(val, np.ndarray): 1159s return cpsparse.csr_matrix(cp.array(val)) 1159s else: 1159s return cpsparse.csr_matrix(val) 1159s elif issubclass(typ, CupyCSCMatrix): 1159s > import cupy as cp 1159s E ModuleNotFoundError: No module named 'cupy' 1159s 1159s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:1024: ModuleNotFoundError 1159s _______________ test_transposed_concat[cupy_csc-obs-outer-only] ________________ 1159s 1159s array_type = functools.partial(, typ=) 1159s axis_name = 'obs', join_type = 'outer', merge_strategy = 'only' 1159s 1159s def test_transposed_concat(array_type, axis_name, join_type, merge_strategy): 1159s axis, axis_name = merge._resolve_axis(axis_name) 1159s alt_axis = 1 - axis 1159s > lhs = gen_adata((10, 10), X_type=array_type, **GEN_ADATA_DASK_ARGS) 1159s 1159s tests/test_concatenate.py:1167: 1159s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1159s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:346: in gen_adata 1159s X = X_type(random_state.binomial(100, 0.005, (M, N)).astype(X_dtype)) 1159s /usr/lib/python3.13/functools.py:934: in wrapper 1159s return dispatch(args[0].__class__)(*args, **kw) 1159s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1159s 1159s val = array([[0., 0., 0., 1., 0., 2., 1., 0., 0., 0.], 1159s [0., 0., 0., 0., 0., 1., 0., 0., 1., 0.], 1159s [0., 0., 0., ... 0.], 1159s [1., 0., 0., 1., 0., 1., 2., 0., 0., 0.], 1159s [0., 0., 2., 1., 3., 0., 0., 0., 0., 2.]], dtype=float32) 1159s typ = 1159s 1159s @singledispatch 1159s def as_cupy(val, typ=None): 1159s """ 1159s Rough conversion function 1159s 1159s Will try to infer target type from input type if not specified. 1159s """ 1159s if typ is None: 1159s typ = resolve_cupy_type(val) 1159s 1159s if issubclass(typ, CupyArray): 1159s import cupy as cp 1159s 1159s if isinstance(val, CSMatrix): 1159s val = val.toarray() 1159s return cp.array(val) 1159s elif issubclass(typ, CupyCSRMatrix): 1159s import cupy as cp 1159s import cupyx.scipy.sparse as cpsparse 1159s 1159s if isinstance(val, np.ndarray): 1159s return cpsparse.csr_matrix(cp.array(val)) 1159s else: 1159s return cpsparse.csr_matrix(val) 1159s elif issubclass(typ, CupyCSCMatrix): 1159s > import cupy as cp 1159s E ModuleNotFoundError: No module named 'cupy' 1159s 1159s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:1024: ModuleNotFoundError 1159s _______________ test_transposed_concat[cupy_csc-var-inner-None] ________________ 1159s 1159s array_type = functools.partial(, typ=) 1159s axis_name = 'var', join_type = 'inner', merge_strategy = None 1159s 1159s def test_transposed_concat(array_type, axis_name, join_type, merge_strategy): 1159s axis, axis_name = merge._resolve_axis(axis_name) 1159s alt_axis = 1 - axis 1159s > lhs = gen_adata((10, 10), X_type=array_type, **GEN_ADATA_DASK_ARGS) 1159s 1159s tests/test_concatenate.py:1167: 1159s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1159s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:346: in gen_adata 1159s X = X_type(random_state.binomial(100, 0.005, (M, N)).astype(X_dtype)) 1159s /usr/lib/python3.13/functools.py:934: in wrapper 1159s return dispatch(args[0].__class__)(*args, **kw) 1159s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1159s 1159s val = array([[2., 0., 1., 2., 0., 2., 1., 0., 0., 0.], 1159s [0., 0., 0., 0., 1., 0., 0., 0., 1., 0.], 1159s [0., 0., 2., ... 1.], 1159s [0., 0., 0., 1., 1., 0., 0., 0., 1., 1.], 1159s [0., 0., 0., 1., 0., 0., 1., 1., 1., 0.]], dtype=float32) 1159s typ = 1159s 1159s @singledispatch 1159s def as_cupy(val, typ=None): 1159s """ 1159s Rough conversion function 1159s 1159s Will try to infer target type from input type if not specified. 1159s """ 1159s if typ is None: 1159s typ = resolve_cupy_type(val) 1159s 1159s if issubclass(typ, CupyArray): 1159s import cupy as cp 1159s 1159s if isinstance(val, CSMatrix): 1159s val = val.toarray() 1159s return cp.array(val) 1159s elif issubclass(typ, CupyCSRMatrix): 1159s import cupy as cp 1159s import cupyx.scipy.sparse as cpsparse 1159s 1159s if isinstance(val, np.ndarray): 1159s return cpsparse.csr_matrix(cp.array(val)) 1159s else: 1159s return cpsparse.csr_matrix(val) 1159s elif issubclass(typ, CupyCSCMatrix): 1159s > import cupy as cp 1159s E ModuleNotFoundError: No module named 'cupy' 1159s 1159s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:1024: ModuleNotFoundError 1159s _______________ test_transposed_concat[cupy_csc-var-inner-same] ________________ 1159s 1159s array_type = functools.partial(, typ=) 1159s axis_name = 'var', join_type = 'inner', merge_strategy = 'same' 1159s 1159s def test_transposed_concat(array_type, axis_name, join_type, merge_strategy): 1159s axis, axis_name = merge._resolve_axis(axis_name) 1159s alt_axis = 1 - axis 1159s > lhs = gen_adata((10, 10), X_type=array_type, **GEN_ADATA_DASK_ARGS) 1159s 1159s tests/test_concatenate.py:1167: 1159s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1159s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:346: in gen_adata 1159s X = X_type(random_state.binomial(100, 0.005, (M, N)).astype(X_dtype)) 1159s /usr/lib/python3.13/functools.py:934: in wrapper 1159s return dispatch(args[0].__class__)(*args, **kw) 1159s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1159s 1159s val = array([[0., 1., 1., 0., 0., 0., 0., 0., 0., 0.], 1159s [0., 0., 2., 0., 0., 1., 0., 0., 0., 0.], 1159s [0., 1., 1., ... 1.], 1159s [1., 2., 1., 2., 0., 1., 0., 0., 0., 0.], 1159s [0., 1., 0., 0., 1., 0., 1., 0., 0., 0.]], dtype=float32) 1159s typ = 1159s 1159s @singledispatch 1159s def as_cupy(val, typ=None): 1159s """ 1159s Rough conversion function 1159s 1159s Will try to infer target type from input type if not specified. 1159s """ 1159s if typ is None: 1159s typ = resolve_cupy_type(val) 1159s 1159s if issubclass(typ, CupyArray): 1159s import cupy as cp 1159s 1159s if isinstance(val, CSMatrix): 1159s val = val.toarray() 1159s return cp.array(val) 1159s elif issubclass(typ, CupyCSRMatrix): 1159s import cupy as cp 1159s import cupyx.scipy.sparse as cpsparse 1159s 1159s if isinstance(val, np.ndarray): 1159s return cpsparse.csr_matrix(cp.array(val)) 1159s else: 1159s return cpsparse.csr_matrix(val) 1159s elif issubclass(typ, CupyCSCMatrix): 1159s > import cupy as cp 1159s E ModuleNotFoundError: No module named 'cupy' 1159s 1159s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:1024: ModuleNotFoundError 1159s ______________ test_transposed_concat[cupy_csc-var-inner-unique] _______________ 1159s 1159s array_type = functools.partial(, typ=) 1159s axis_name = 'var', join_type = 'inner', merge_strategy = 'unique' 1159s 1159s def test_transposed_concat(array_type, axis_name, join_type, merge_strategy): 1159s axis, axis_name = merge._resolve_axis(axis_name) 1159s alt_axis = 1 - axis 1159s > lhs = gen_adata((10, 10), X_type=array_type, **GEN_ADATA_DASK_ARGS) 1159s 1159s tests/test_concatenate.py:1167: 1159s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1159s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:346: in gen_adata 1159s X = X_type(random_state.binomial(100, 0.005, (M, N)).astype(X_dtype)) 1159s /usr/lib/python3.13/functools.py:934: in wrapper 1159s return dispatch(args[0].__class__)(*args, **kw) 1159s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1159s 1159s val = array([[0., 1., 0., 1., 0., 0., 0., 0., 2., 0.], 1159s [0., 0., 1., 0., 2., 1., 1., 1., 2., 0.], 1159s [1., 1., 0., ... 0.], 1159s [0., 0., 3., 0., 0., 0., 1., 2., 1., 1.], 1159s [0., 0., 0., 0., 0., 1., 0., 1., 0., 0.]], dtype=float32) 1159s typ = 1159s 1159s @singledispatch 1159s def as_cupy(val, typ=None): 1159s """ 1159s Rough conversion function 1159s 1159s Will try to infer target type from input type if not specified. 1159s """ 1159s if typ is None: 1159s typ = resolve_cupy_type(val) 1159s 1159s if issubclass(typ, CupyArray): 1159s import cupy as cp 1159s 1159s if isinstance(val, CSMatrix): 1159s val = val.toarray() 1159s return cp.array(val) 1159s elif issubclass(typ, CupyCSRMatrix): 1159s import cupy as cp 1159s import cupyx.scipy.sparse as cpsparse 1159s 1159s if isinstance(val, np.ndarray): 1159s return cpsparse.csr_matrix(cp.array(val)) 1159s else: 1159s return cpsparse.csr_matrix(val) 1159s elif issubclass(typ, CupyCSCMatrix): 1159s > import cupy as cp 1159s E ModuleNotFoundError: No module named 'cupy' 1159s 1159s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:1024: ModuleNotFoundError 1159s _______________ test_transposed_concat[cupy_csc-var-inner-first] _______________ 1159s 1159s array_type = functools.partial(, typ=) 1159s axis_name = 'var', join_type = 'inner', merge_strategy = 'first' 1159s 1159s def test_transposed_concat(array_type, axis_name, join_type, merge_strategy): 1159s axis, axis_name = merge._resolve_axis(axis_name) 1159s alt_axis = 1 - axis 1159s > lhs = gen_adata((10, 10), X_type=array_type, **GEN_ADATA_DASK_ARGS) 1159s 1159s tests/test_concatenate.py:1167: 1159s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1159s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:346: in gen_adata 1159s X = X_type(random_state.binomial(100, 0.005, (M, N)).astype(X_dtype)) 1159s /usr/lib/python3.13/functools.py:934: in wrapper 1159s return dispatch(args[0].__class__)(*args, **kw) 1159s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1159s 1159s val = array([[1., 0., 2., 0., 1., 1., 0., 1., 0., 1.], 1159s [1., 0., 1., 0., 1., 0., 0., 0., 1., 0.], 1159s [0., 0., 1., ... 2.], 1159s [1., 1., 0., 1., 1., 1., 0., 1., 1., 1.], 1159s [2., 0., 0., 0., 1., 0., 0., 1., 0., 0.]], dtype=float32) 1159s typ = 1159s 1159s @singledispatch 1159s def as_cupy(val, typ=None): 1159s """ 1159s Rough conversion function 1159s 1159s Will try to infer target type from input type if not specified. 1159s """ 1159s if typ is None: 1159s typ = resolve_cupy_type(val) 1159s 1159s if issubclass(typ, CupyArray): 1159s import cupy as cp 1159s 1159s if isinstance(val, CSMatrix): 1159s val = val.toarray() 1159s return cp.array(val) 1159s elif issubclass(typ, CupyCSRMatrix): 1159s import cupy as cp 1159s import cupyx.scipy.sparse as cpsparse 1159s 1159s if isinstance(val, np.ndarray): 1159s return cpsparse.csr_matrix(cp.array(val)) 1159s else: 1159s return cpsparse.csr_matrix(val) 1159s elif issubclass(typ, CupyCSCMatrix): 1159s > import cupy as cp 1159s E ModuleNotFoundError: No module named 'cupy' 1159s 1159s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:1024: ModuleNotFoundError 1159s _______________ test_transposed_concat[cupy_csc-var-inner-only] ________________ 1159s 1159s array_type = functools.partial(, typ=) 1159s axis_name = 'var', join_type = 'inner', merge_strategy = 'only' 1159s 1159s def test_transposed_concat(array_type, axis_name, join_type, merge_strategy): 1159s axis, axis_name = merge._resolve_axis(axis_name) 1159s alt_axis = 1 - axis 1159s > lhs = gen_adata((10, 10), X_type=array_type, **GEN_ADATA_DASK_ARGS) 1159s 1159s tests/test_concatenate.py:1167: 1159s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1159s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:346: in gen_adata 1159s X = X_type(random_state.binomial(100, 0.005, (M, N)).astype(X_dtype)) 1159s /usr/lib/python3.13/functools.py:934: in wrapper 1159s return dispatch(args[0].__class__)(*args, **kw) 1159s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1159s 1159s val = array([[0., 1., 0., 1., 0., 0., 0., 1., 0., 1.], 1159s [1., 0., 1., 0., 2., 2., 1., 1., 0., 1.], 1159s [0., 0., 0., ... 2.], 1159s [0., 0., 1., 0., 0., 0., 0., 0., 1., 0.], 1159s [0., 0., 0., 1., 1., 1., 0., 0., 1., 1.]], dtype=float32) 1159s typ = 1159s 1159s @singledispatch 1159s def as_cupy(val, typ=None): 1159s """ 1159s Rough conversion function 1159s 1159s Will try to infer target type from input type if not specified. 1159s """ 1159s if typ is None: 1159s typ = resolve_cupy_type(val) 1159s 1159s if issubclass(typ, CupyArray): 1159s import cupy as cp 1159s 1159s if isinstance(val, CSMatrix): 1159s val = val.toarray() 1159s return cp.array(val) 1159s elif issubclass(typ, CupyCSRMatrix): 1159s import cupy as cp 1159s import cupyx.scipy.sparse as cpsparse 1159s 1159s if isinstance(val, np.ndarray): 1159s return cpsparse.csr_matrix(cp.array(val)) 1159s else: 1159s return cpsparse.csr_matrix(val) 1159s elif issubclass(typ, CupyCSCMatrix): 1159s > import cupy as cp 1159s E ModuleNotFoundError: No module named 'cupy' 1159s 1159s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:1024: ModuleNotFoundError 1159s _______________ test_transposed_concat[cupy_csc-var-outer-None] ________________ 1159s 1159s array_type = functools.partial(, typ=) 1159s axis_name = 'var', join_type = 'outer', merge_strategy = None 1159s 1159s def test_transposed_concat(array_type, axis_name, join_type, merge_strategy): 1159s axis, axis_name = merge._resolve_axis(axis_name) 1159s alt_axis = 1 - axis 1159s > lhs = gen_adata((10, 10), X_type=array_type, **GEN_ADATA_DASK_ARGS) 1159s 1159s tests/test_concatenate.py:1167: 1159s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1159s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:346: in gen_adata 1159s X = X_type(random_state.binomial(100, 0.005, (M, N)).astype(X_dtype)) 1159s /usr/lib/python3.13/functools.py:934: in wrapper 1159s return dispatch(args[0].__class__)(*args, **kw) 1159s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1159s 1159s val = array([[0., 0., 0., 1., 0., 0., 1., 0., 0., 1.], 1159s [0., 1., 0., 0., 0., 1., 0., 0., 0., 1.], 1159s [0., 0., 0., ... 0.], 1159s [0., 3., 0., 1., 2., 0., 1., 1., 0., 2.], 1159s [1., 2., 0., 1., 1., 1., 0., 0., 0., 0.]], dtype=float32) 1159s typ = 1159s 1159s @singledispatch 1159s def as_cupy(val, typ=None): 1159s """ 1159s Rough conversion function 1159s 1159s Will try to infer target type from input type if not specified. 1159s """ 1159s if typ is None: 1159s typ = resolve_cupy_type(val) 1159s 1159s if issubclass(typ, CupyArray): 1159s import cupy as cp 1159s 1159s if isinstance(val, CSMatrix): 1159s val = val.toarray() 1159s return cp.array(val) 1159s elif issubclass(typ, CupyCSRMatrix): 1159s import cupy as cp 1159s import cupyx.scipy.sparse as cpsparse 1159s 1159s if isinstance(val, np.ndarray): 1159s return cpsparse.csr_matrix(cp.array(val)) 1159s else: 1159s return cpsparse.csr_matrix(val) 1159s elif issubclass(typ, CupyCSCMatrix): 1159s > import cupy as cp 1159s E ModuleNotFoundError: No module named 'cupy' 1159s 1159s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:1024: ModuleNotFoundError 1159s _______________ test_transposed_concat[cupy_csc-var-outer-same] ________________ 1159s 1159s array_type = functools.partial(, typ=) 1159s axis_name = 'var', join_type = 'outer', merge_strategy = 'same' 1159s 1159s def test_transposed_concat(array_type, axis_name, join_type, merge_strategy): 1159s axis, axis_name = merge._resolve_axis(axis_name) 1159s alt_axis = 1 - axis 1159s > lhs = gen_adata((10, 10), X_type=array_type, **GEN_ADATA_DASK_ARGS) 1159s 1159s tests/test_concatenate.py:1167: 1159s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1159s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:346: in gen_adata 1159s X = X_type(random_state.binomial(100, 0.005, (M, N)).astype(X_dtype)) 1159s /usr/lib/python3.13/functools.py:934: in wrapper 1159s return dispatch(args[0].__class__)(*args, **kw) 1159s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1159s 1159s val = array([[1., 0., 1., 0., 0., 0., 1., 0., 0., 0.], 1159s [1., 2., 0., 1., 1., 1., 0., 1., 2., 1.], 1159s [0., 0., 0., ... 0.], 1159s [0., 1., 1., 1., 0., 2., 0., 1., 0., 4.], 1159s [1., 2., 1., 0., 1., 1., 1., 0., 0., 1.]], dtype=float32) 1159s typ = 1159s 1159s @singledispatch 1159s def as_cupy(val, typ=None): 1159s """ 1159s Rough conversion function 1159s 1159s Will try to infer target type from input type if not specified. 1159s """ 1159s if typ is None: 1159s typ = resolve_cupy_type(val) 1159s 1159s if issubclass(typ, CupyArray): 1159s import cupy as cp 1159s 1159s if isinstance(val, CSMatrix): 1159s val = val.toarray() 1159s return cp.array(val) 1159s elif issubclass(typ, CupyCSRMatrix): 1159s import cupy as cp 1159s import cupyx.scipy.sparse as cpsparse 1159s 1159s if isinstance(val, np.ndarray): 1159s return cpsparse.csr_matrix(cp.array(val)) 1159s else: 1159s return cpsparse.csr_matrix(val) 1159s elif issubclass(typ, CupyCSCMatrix): 1159s > import cupy as cp 1159s E ModuleNotFoundError: No module named 'cupy' 1159s 1159s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:1024: ModuleNotFoundError 1159s ______________ test_transposed_concat[cupy_csc-var-outer-unique] _______________ 1159s 1159s array_type = functools.partial(, typ=) 1159s axis_name = 'var', join_type = 'outer', merge_strategy = 'unique' 1159s 1159s def test_transposed_concat(array_type, axis_name, join_type, merge_strategy): 1159s axis, axis_name = merge._resolve_axis(axis_name) 1159s alt_axis = 1 - axis 1159s > lhs = gen_adata((10, 10), X_type=array_type, **GEN_ADATA_DASK_ARGS) 1159s 1159s tests/test_concatenate.py:1167: 1159s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1159s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:346: in gen_adata 1159s X = X_type(random_state.binomial(100, 0.005, (M, N)).astype(X_dtype)) 1159s /usr/lib/python3.13/functools.py:934: in wrapper 1159s return dispatch(args[0].__class__)(*args, **kw) 1159s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1159s 1159s val = array([[0., 0., 0., 0., 1., 2., 1., 0., 1., 0.], 1159s [0., 1., 0., 1., 1., 2., 0., 0., 1., 2.], 1159s [0., 0., 0., ... 0.], 1159s [0., 0., 0., 0., 0., 0., 1., 0., 0., 0.], 1159s [0., 0., 0., 1., 3., 1., 0., 0., 0., 0.]], dtype=float32) 1159s typ = 1159s 1159s @singledispatch 1159s def as_cupy(val, typ=None): 1159s """ 1159s Rough conversion function 1159s 1159s Will try to infer target type from input type if not specified. 1159s """ 1159s if typ is None: 1159s typ = resolve_cupy_type(val) 1159s 1159s if issubclass(typ, CupyArray): 1159s import cupy as cp 1159s 1159s if isinstance(val, CSMatrix): 1159s val = val.toarray() 1159s return cp.array(val) 1159s elif issubclass(typ, CupyCSRMatrix): 1159s import cupy as cp 1159s import cupyx.scipy.sparse as cpsparse 1159s 1159s if isinstance(val, np.ndarray): 1159s return cpsparse.csr_matrix(cp.array(val)) 1159s else: 1159s return cpsparse.csr_matrix(val) 1159s elif issubclass(typ, CupyCSCMatrix): 1159s > import cupy as cp 1159s E ModuleNotFoundError: No module named 'cupy' 1159s 1159s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:1024: ModuleNotFoundError 1159s _______________ test_transposed_concat[cupy_csc-var-outer-first] _______________ 1159s 1159s array_type = functools.partial(, typ=) 1159s axis_name = 'var', join_type = 'outer', merge_strategy = 'first' 1159s 1159s def test_transposed_concat(array_type, axis_name, join_type, merge_strategy): 1159s axis, axis_name = merge._resolve_axis(axis_name) 1159s alt_axis = 1 - axis 1159s > lhs = gen_adata((10, 10), X_type=array_type, **GEN_ADATA_DASK_ARGS) 1159s 1159s tests/test_concatenate.py:1167: 1159s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1159s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:346: in gen_adata 1159s X = X_type(random_state.binomial(100, 0.005, (M, N)).astype(X_dtype)) 1159s /usr/lib/python3.13/functools.py:934: in wrapper 1159s return dispatch(args[0].__class__)(*args, **kw) 1159s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1159s 1159s val = array([[0., 0., 0., 0., 1., 1., 0., 0., 0., 1.], 1159s [0., 0., 0., 0., 0., 0., 1., 0., 1., 2.], 1159s [0., 1., 0., ... 1.], 1159s [0., 1., 0., 1., 0., 1., 0., 0., 1., 0.], 1159s [1., 1., 0., 1., 0., 1., 1., 0., 0., 0.]], dtype=float32) 1159s typ = 1159s 1159s @singledispatch 1159s def as_cupy(val, typ=None): 1159s """ 1159s Rough conversion function 1159s 1159s Will try to infer target type from input type if not specified. 1159s """ 1159s if typ is None: 1159s typ = resolve_cupy_type(val) 1159s 1159s if issubclass(typ, CupyArray): 1159s import cupy as cp 1159s 1159s if isinstance(val, CSMatrix): 1159s val = val.toarray() 1159s return cp.array(val) 1159s elif issubclass(typ, CupyCSRMatrix): 1159s import cupy as cp 1159s import cupyx.scipy.sparse as cpsparse 1159s 1159s if isinstance(val, np.ndarray): 1159s return cpsparse.csr_matrix(cp.array(val)) 1159s else: 1159s return cpsparse.csr_matrix(val) 1159s elif issubclass(typ, CupyCSCMatrix): 1159s > import cupy as cp 1159s E ModuleNotFoundError: No module named 'cupy' 1159s 1159s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:1024: ModuleNotFoundError 1159s _______________ test_transposed_concat[cupy_csc-var-outer-only] ________________ 1159s 1159s array_type = functools.partial(, typ=) 1159s axis_name = 'var', join_type = 'outer', merge_strategy = 'only' 1159s 1159s def test_transposed_concat(array_type, axis_name, join_type, merge_strategy): 1159s axis, axis_name = merge._resolve_axis(axis_name) 1159s alt_axis = 1 - axis 1159s > lhs = gen_adata((10, 10), X_type=array_type, **GEN_ADATA_DASK_ARGS) 1159s 1159s tests/test_concatenate.py:1167: 1159s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1159s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:346: in gen_adata 1159s X = X_type(random_state.binomial(100, 0.005, (M, N)).astype(X_dtype)) 1159s /usr/lib/python3.13/functools.py:934: in wrapper 1159s return dispatch(args[0].__class__)(*args, **kw) 1159s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1159s 1159s val = array([[0., 0., 0., 1., 2., 0., 1., 0., 0., 0.], 1159s [0., 1., 0., 0., 1., 1., 0., 0., 0., 1.], 1159s [0., 0., 3., ... 0.], 1159s [2., 0., 1., 1., 0., 1., 0., 1., 1., 0.], 1159s [3., 1., 0., 1., 1., 0., 0., 0., 1., 2.]], dtype=float32) 1159s typ = 1159s 1159s @singledispatch 1159s def as_cupy(val, typ=None): 1159s """ 1159s Rough conversion function 1159s 1159s Will try to infer target type from input type if not specified. 1159s """ 1159s if typ is None: 1159s typ = resolve_cupy_type(val) 1159s 1159s if issubclass(typ, CupyArray): 1159s import cupy as cp 1159s 1159s if isinstance(val, CSMatrix): 1159s val = val.toarray() 1159s return cp.array(val) 1159s elif issubclass(typ, CupyCSRMatrix): 1159s import cupy as cp 1159s import cupyx.scipy.sparse as cpsparse 1159s 1159s if isinstance(val, np.ndarray): 1159s return cpsparse.csr_matrix(cp.array(val)) 1159s else: 1159s return cpsparse.csr_matrix(val) 1159s elif issubclass(typ, CupyCSCMatrix): 1159s > import cupy as cp 1159s E ModuleNotFoundError: No module named 'cupy' 1159s 1159s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:1024: ModuleNotFoundError 1159s ______________ test_concat_different_types_dask[None-cupy_array] _______________ 1159s 1159s merge_strategy = None 1159s array_type = functools.partial(, typ=) 1159s 1159s def test_concat_different_types_dask(merge_strategy, array_type): 1159s import dask.array as da 1159s from scipy import sparse 1159s 1159s import anndata as ad 1159s 1159s varm_array = sparse.random(5, 20, density=0.5, format="csr") 1159s 1159s ad1 = ad.AnnData(X=np.ones((5, 5)), varm={"a": varm_array}) 1159s > ad1_other = ad.AnnData(X=np.ones((5, 5)), varm={"a": array_type(varm_array)}) 1159s 1159s tests/test_concatenate.py:1536: 1159s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1159s /usr/lib/python3.13/functools.py:934: in wrapper 1159s return dispatch(args[0].__class__)(*args, **kw) 1159s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1159s 1159s val = 1159s typ = 1159s 1159s @singledispatch 1159s def as_cupy(val, typ=None): 1159s """ 1159s Rough conversion function 1159s 1159s Will try to infer target type from input type if not specified. 1159s """ 1159s if typ is None: 1159s typ = resolve_cupy_type(val) 1159s 1159s if issubclass(typ, CupyArray): 1159s > import cupy as cp 1159s E ModuleNotFoundError: No module named 'cupy' 1159s 1159s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:1010: ModuleNotFoundError 1159s _______________ test_concat_different_types_dask[None-cupy_csr] ________________ 1159s 1159s merge_strategy = None 1159s array_type = functools.partial(, typ=) 1159s 1159s def test_concat_different_types_dask(merge_strategy, array_type): 1159s import dask.array as da 1159s from scipy import sparse 1159s 1159s import anndata as ad 1159s 1159s varm_array = sparse.random(5, 20, density=0.5, format="csr") 1159s 1159s ad1 = ad.AnnData(X=np.ones((5, 5)), varm={"a": varm_array}) 1159s > ad1_other = ad.AnnData(X=np.ones((5, 5)), varm={"a": array_type(varm_array)}) 1159s 1159s tests/test_concatenate.py:1536: 1159s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1159s /usr/lib/python3.13/functools.py:934: in wrapper 1159s return dispatch(args[0].__class__)(*args, **kw) 1159s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1159s 1159s val = 1159s typ = 1159s 1159s @singledispatch 1159s def as_cupy(val, typ=None): 1159s """ 1159s Rough conversion function 1159s 1159s Will try to infer target type from input type if not specified. 1159s """ 1159s if typ is None: 1159s typ = resolve_cupy_type(val) 1159s 1159s if issubclass(typ, CupyArray): 1159s import cupy as cp 1159s 1159s if isinstance(val, CSMatrix): 1159s val = val.toarray() 1159s return cp.array(val) 1159s elif issubclass(typ, CupyCSRMatrix): 1159s > import cupy as cp 1159s E ModuleNotFoundError: No module named 'cupy' 1159s 1159s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:1016: ModuleNotFoundError 1159s _______________ test_concat_different_types_dask[None-cupy_csc] ________________ 1159s 1159s merge_strategy = None 1159s array_type = functools.partial(, typ=) 1159s 1159s def test_concat_different_types_dask(merge_strategy, array_type): 1159s import dask.array as da 1159s from scipy import sparse 1159s 1159s import anndata as ad 1159s 1159s varm_array = sparse.random(5, 20, density=0.5, format="csr") 1159s 1159s ad1 = ad.AnnData(X=np.ones((5, 5)), varm={"a": varm_array}) 1159s > ad1_other = ad.AnnData(X=np.ones((5, 5)), varm={"a": array_type(varm_array)}) 1159s 1159s tests/test_concatenate.py:1536: 1159s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1159s /usr/lib/python3.13/functools.py:934: in wrapper 1159s return dispatch(args[0].__class__)(*args, **kw) 1159s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1159s 1159s val = 1159s typ = 1159s 1159s @singledispatch 1159s def as_cupy(val, typ=None): 1159s """ 1159s Rough conversion function 1159s 1159s Will try to infer target type from input type if not specified. 1159s """ 1159s if typ is None: 1159s typ = resolve_cupy_type(val) 1159s 1159s if issubclass(typ, CupyArray): 1159s import cupy as cp 1159s 1159s if isinstance(val, CSMatrix): 1159s val = val.toarray() 1159s return cp.array(val) 1159s elif issubclass(typ, CupyCSRMatrix): 1159s import cupy as cp 1159s import cupyx.scipy.sparse as cpsparse 1159s 1159s if isinstance(val, np.ndarray): 1159s return cpsparse.csr_matrix(cp.array(val)) 1159s else: 1159s return cpsparse.csr_matrix(val) 1159s elif issubclass(typ, CupyCSCMatrix): 1159s > import cupy as cp 1159s E ModuleNotFoundError: No module named 'cupy' 1159s 1159s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:1024: ModuleNotFoundError 1159s ______________ test_concat_different_types_dask[same-cupy_array] _______________ 1159s 1159s merge_strategy = 'same' 1159s array_type = functools.partial(, typ=) 1159s 1159s def test_concat_different_types_dask(merge_strategy, array_type): 1159s import dask.array as da 1159s from scipy import sparse 1159s 1159s import anndata as ad 1159s 1159s varm_array = sparse.random(5, 20, density=0.5, format="csr") 1159s 1159s ad1 = ad.AnnData(X=np.ones((5, 5)), varm={"a": varm_array}) 1159s > ad1_other = ad.AnnData(X=np.ones((5, 5)), varm={"a": array_type(varm_array)}) 1159s 1159s tests/test_concatenate.py:1536: 1159s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1159s /usr/lib/python3.13/functools.py:934: in wrapper 1159s return dispatch(args[0].__class__)(*args, **kw) 1159s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1159s 1159s val = 1159s typ = 1159s 1159s @singledispatch 1159s def as_cupy(val, typ=None): 1159s """ 1159s Rough conversion function 1159s 1159s Will try to infer target type from input type if not specified. 1159s """ 1159s if typ is None: 1159s typ = resolve_cupy_type(val) 1159s 1159s if issubclass(typ, CupyArray): 1159s > import cupy as cp 1159s E ModuleNotFoundError: No module named 'cupy' 1159s 1159s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:1010: ModuleNotFoundError 1159s _______________ test_concat_different_types_dask[same-cupy_csr] ________________ 1159s 1159s merge_strategy = 'same' 1159s array_type = functools.partial(, typ=) 1159s 1159s def test_concat_different_types_dask(merge_strategy, array_type): 1159s import dask.array as da 1159s from scipy import sparse 1159s 1159s import anndata as ad 1159s 1159s varm_array = sparse.random(5, 20, density=0.5, format="csr") 1159s 1159s ad1 = ad.AnnData(X=np.ones((5, 5)), varm={"a": varm_array}) 1159s > ad1_other = ad.AnnData(X=np.ones((5, 5)), varm={"a": array_type(varm_array)}) 1159s 1159s tests/test_concatenate.py:1536: 1159s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1159s /usr/lib/python3.13/functools.py:934: in wrapper 1159s return dispatch(args[0].__class__)(*args, **kw) 1159s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1159s 1159s val = 1159s typ = 1159s 1159s @singledispatch 1159s def as_cupy(val, typ=None): 1159s """ 1159s Rough conversion function 1159s 1159s Will try to infer target type from input type if not specified. 1159s """ 1159s if typ is None: 1159s typ = resolve_cupy_type(val) 1159s 1159s if issubclass(typ, CupyArray): 1159s import cupy as cp 1159s 1159s if isinstance(val, CSMatrix): 1159s val = val.toarray() 1159s return cp.array(val) 1159s elif issubclass(typ, CupyCSRMatrix): 1159s > import cupy as cp 1159s E ModuleNotFoundError: No module named 'cupy' 1159s 1159s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:1016: ModuleNotFoundError 1159s _______________ test_concat_different_types_dask[same-cupy_csc] ________________ 1159s 1159s merge_strategy = 'same' 1159s array_type = functools.partial(, typ=) 1159s 1159s def test_concat_different_types_dask(merge_strategy, array_type): 1159s import dask.array as da 1159s from scipy import sparse 1159s 1159s import anndata as ad 1159s 1159s varm_array = sparse.random(5, 20, density=0.5, format="csr") 1159s 1159s ad1 = ad.AnnData(X=np.ones((5, 5)), varm={"a": varm_array}) 1159s > ad1_other = ad.AnnData(X=np.ones((5, 5)), varm={"a": array_type(varm_array)}) 1159s 1159s tests/test_concatenate.py:1536: 1159s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1159s /usr/lib/python3.13/functools.py:934: in wrapper 1159s return dispatch(args[0].__class__)(*args, **kw) 1159s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1159s 1159s val = 1159s typ = 1159s 1159s @singledispatch 1159s def as_cupy(val, typ=None): 1159s """ 1159s Rough conversion function 1159s 1159s Will try to infer target type from input type if not specified. 1159s """ 1159s if typ is None: 1159s typ = resolve_cupy_type(val) 1159s 1159s if issubclass(typ, CupyArray): 1159s import cupy as cp 1159s 1159s if isinstance(val, CSMatrix): 1159s val = val.toarray() 1159s return cp.array(val) 1159s elif issubclass(typ, CupyCSRMatrix): 1159s import cupy as cp 1159s import cupyx.scipy.sparse as cpsparse 1159s 1159s if isinstance(val, np.ndarray): 1159s return cpsparse.csr_matrix(cp.array(val)) 1159s else: 1159s return cpsparse.csr_matrix(val) 1159s elif issubclass(typ, CupyCSCMatrix): 1159s > import cupy as cp 1159s E ModuleNotFoundError: No module named 'cupy' 1159s 1159s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:1024: ModuleNotFoundError 1159s _____________ test_concat_different_types_dask[unique-cupy_array] ______________ 1159s 1159s merge_strategy = 'unique' 1159s array_type = functools.partial(, typ=) 1159s 1159s def test_concat_different_types_dask(merge_strategy, array_type): 1159s import dask.array as da 1159s from scipy import sparse 1159s 1159s import anndata as ad 1159s 1159s varm_array = sparse.random(5, 20, density=0.5, format="csr") 1159s 1159s ad1 = ad.AnnData(X=np.ones((5, 5)), varm={"a": varm_array}) 1159s > ad1_other = ad.AnnData(X=np.ones((5, 5)), varm={"a": array_type(varm_array)}) 1159s 1159s tests/test_concatenate.py:1536: 1159s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1159s /usr/lib/python3.13/functools.py:934: in wrapper 1159s return dispatch(args[0].__class__)(*args, **kw) 1159s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1159s 1159s val = 1159s typ = 1159s 1159s @singledispatch 1159s def as_cupy(val, typ=None): 1159s """ 1159s Rough conversion function 1159s 1159s Will try to infer target type from input type if not specified. 1159s """ 1159s if typ is None: 1159s typ = resolve_cupy_type(val) 1159s 1159s if issubclass(typ, CupyArray): 1159s > import cupy as cp 1159s E ModuleNotFoundError: No module named 'cupy' 1159s 1159s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:1010: ModuleNotFoundError 1159s ______________ test_concat_different_types_dask[unique-cupy_csr] _______________ 1159s 1159s merge_strategy = 'unique' 1159s array_type = functools.partial(, typ=) 1159s 1159s def test_concat_different_types_dask(merge_strategy, array_type): 1159s import dask.array as da 1159s from scipy import sparse 1159s 1159s import anndata as ad 1159s 1159s varm_array = sparse.random(5, 20, density=0.5, format="csr") 1159s 1159s ad1 = ad.AnnData(X=np.ones((5, 5)), varm={"a": varm_array}) 1159s > ad1_other = ad.AnnData(X=np.ones((5, 5)), varm={"a": array_type(varm_array)}) 1159s 1159s tests/test_concatenate.py:1536: 1159s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1159s /usr/lib/python3.13/functools.py:934: in wrapper 1159s return dispatch(args[0].__class__)(*args, **kw) 1159s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1159s 1159s val = 1159s typ = 1159s 1159s @singledispatch 1159s def as_cupy(val, typ=None): 1159s """ 1159s Rough conversion function 1159s 1159s Will try to infer target type from input type if not specified. 1159s """ 1159s if typ is None: 1159s typ = resolve_cupy_type(val) 1159s 1159s if issubclass(typ, CupyArray): 1159s import cupy as cp 1159s 1159s if isinstance(val, CSMatrix): 1159s val = val.toarray() 1159s return cp.array(val) 1159s elif issubclass(typ, CupyCSRMatrix): 1159s > import cupy as cp 1159s E ModuleNotFoundError: No module named 'cupy' 1159s 1159s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:1016: ModuleNotFoundError 1159s ______________ test_concat_different_types_dask[unique-cupy_csc] _______________ 1159s 1159s merge_strategy = 'unique' 1159s array_type = functools.partial(, typ=) 1159s 1159s def test_concat_different_types_dask(merge_strategy, array_type): 1159s import dask.array as da 1159s from scipy import sparse 1159s 1159s import anndata as ad 1159s 1159s varm_array = sparse.random(5, 20, density=0.5, format="csr") 1159s 1159s ad1 = ad.AnnData(X=np.ones((5, 5)), varm={"a": varm_array}) 1159s > ad1_other = ad.AnnData(X=np.ones((5, 5)), varm={"a": array_type(varm_array)}) 1159s 1159s tests/test_concatenate.py:1536: 1159s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1159s /usr/lib/python3.13/functools.py:934: in wrapper 1159s return dispatch(args[0].__class__)(*args, **kw) 1159s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1159s 1159s val = 1159s typ = 1159s 1159s @singledispatch 1159s def as_cupy(val, typ=None): 1159s """ 1159s Rough conversion function 1159s 1159s Will try to infer target type from input type if not specified. 1159s """ 1159s if typ is None: 1159s typ = resolve_cupy_type(val) 1159s 1159s if issubclass(typ, CupyArray): 1159s import cupy as cp 1159s 1159s if isinstance(val, CSMatrix): 1159s val = val.toarray() 1159s return cp.array(val) 1159s elif issubclass(typ, CupyCSRMatrix): 1159s import cupy as cp 1159s import cupyx.scipy.sparse as cpsparse 1159s 1159s if isinstance(val, np.ndarray): 1159s return cpsparse.csr_matrix(cp.array(val)) 1159s else: 1159s return cpsparse.csr_matrix(val) 1159s elif issubclass(typ, CupyCSCMatrix): 1159s > import cupy as cp 1159s E ModuleNotFoundError: No module named 'cupy' 1159s 1159s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:1024: ModuleNotFoundError 1159s ______________ test_concat_different_types_dask[first-cupy_array] ______________ 1159s 1159s merge_strategy = 'first' 1159s array_type = functools.partial(, typ=) 1159s 1159s def test_concat_different_types_dask(merge_strategy, array_type): 1159s import dask.array as da 1159s from scipy import sparse 1159s 1159s import anndata as ad 1159s 1159s varm_array = sparse.random(5, 20, density=0.5, format="csr") 1159s 1159s ad1 = ad.AnnData(X=np.ones((5, 5)), varm={"a": varm_array}) 1159s > ad1_other = ad.AnnData(X=np.ones((5, 5)), varm={"a": array_type(varm_array)}) 1159s 1159s tests/test_concatenate.py:1536: 1159s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1159s /usr/lib/python3.13/functools.py:934: in wrapper 1159s return dispatch(args[0].__class__)(*args, **kw) 1159s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1159s 1159s val = 1159s typ = 1159s 1159s @singledispatch 1159s def as_cupy(val, typ=None): 1159s """ 1159s Rough conversion function 1159s 1159s Will try to infer target type from input type if not specified. 1159s """ 1159s if typ is None: 1159s typ = resolve_cupy_type(val) 1159s 1159s if issubclass(typ, CupyArray): 1159s > import cupy as cp 1159s E ModuleNotFoundError: No module named 'cupy' 1159s 1159s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:1010: ModuleNotFoundError 1159s _______________ test_concat_different_types_dask[first-cupy_csr] _______________ 1159s 1159s merge_strategy = 'first' 1159s array_type = functools.partial(, typ=) 1159s 1159s def test_concat_different_types_dask(merge_strategy, array_type): 1159s import dask.array as da 1159s from scipy import sparse 1159s 1159s import anndata as ad 1159s 1159s varm_array = sparse.random(5, 20, density=0.5, format="csr") 1159s 1159s ad1 = ad.AnnData(X=np.ones((5, 5)), varm={"a": varm_array}) 1159s > ad1_other = ad.AnnData(X=np.ones((5, 5)), varm={"a": array_type(varm_array)}) 1159s 1159s tests/test_concatenate.py:1536: 1159s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1159s /usr/lib/python3.13/functools.py:934: in wrapper 1159s return dispatch(args[0].__class__)(*args, **kw) 1159s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1159s 1159s val = 1159s typ = 1159s 1159s @singledispatch 1159s def as_cupy(val, typ=None): 1159s """ 1159s Rough conversion function 1159s 1159s Will try to infer target type from input type if not specified. 1159s """ 1159s if typ is None: 1159s typ = resolve_cupy_type(val) 1159s 1159s if issubclass(typ, CupyArray): 1159s import cupy as cp 1159s 1159s if isinstance(val, CSMatrix): 1159s val = val.toarray() 1159s return cp.array(val) 1159s elif issubclass(typ, CupyCSRMatrix): 1159s > import cupy as cp 1159s E ModuleNotFoundError: No module named 'cupy' 1159s 1159s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:1016: ModuleNotFoundError 1159s _______________ test_concat_different_types_dask[first-cupy_csc] _______________ 1159s 1159s merge_strategy = 'first' 1159s array_type = functools.partial(, typ=) 1159s 1159s def test_concat_different_types_dask(merge_strategy, array_type): 1159s import dask.array as da 1159s from scipy import sparse 1159s 1159s import anndata as ad 1159s 1159s varm_array = sparse.random(5, 20, density=0.5, format="csr") 1159s 1159s ad1 = ad.AnnData(X=np.ones((5, 5)), varm={"a": varm_array}) 1159s > ad1_other = ad.AnnData(X=np.ones((5, 5)), varm={"a": array_type(varm_array)}) 1159s 1159s tests/test_concatenate.py:1536: 1159s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1159s /usr/lib/python3.13/functools.py:934: in wrapper 1159s return dispatch(args[0].__class__)(*args, **kw) 1159s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1159s 1159s val = 1159s typ = 1159s 1159s @singledispatch 1159s def as_cupy(val, typ=None): 1159s """ 1159s Rough conversion function 1159s 1159s Will try to infer target type from input type if not specified. 1159s """ 1159s if typ is None: 1159s typ = resolve_cupy_type(val) 1159s 1159s if issubclass(typ, CupyArray): 1159s import cupy as cp 1159s 1159s if isinstance(val, CSMatrix): 1159s val = val.toarray() 1159s return cp.array(val) 1159s elif issubclass(typ, CupyCSRMatrix): 1159s import cupy as cp 1159s import cupyx.scipy.sparse as cpsparse 1159s 1159s if isinstance(val, np.ndarray): 1159s return cpsparse.csr_matrix(cp.array(val)) 1159s else: 1159s return cpsparse.csr_matrix(val) 1159s elif issubclass(typ, CupyCSCMatrix): 1159s > import cupy as cp 1159s E ModuleNotFoundError: No module named 'cupy' 1159s 1159s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:1024: ModuleNotFoundError 1159s ______________ test_concat_different_types_dask[only-cupy_array] _______________ 1159s 1159s merge_strategy = 'only' 1159s array_type = functools.partial(, typ=) 1159s 1159s def test_concat_different_types_dask(merge_strategy, array_type): 1159s import dask.array as da 1159s from scipy import sparse 1159s 1159s import anndata as ad 1159s 1159s varm_array = sparse.random(5, 20, density=0.5, format="csr") 1159s 1159s ad1 = ad.AnnData(X=np.ones((5, 5)), varm={"a": varm_array}) 1159s > ad1_other = ad.AnnData(X=np.ones((5, 5)), varm={"a": array_type(varm_array)}) 1159s 1159s tests/test_concatenate.py:1536: 1159s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1159s /usr/lib/python3.13/functools.py:934: in wrapper 1159s return dispatch(args[0].__class__)(*args, **kw) 1159s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1159s 1159s val = 1159s typ = 1159s 1159s @singledispatch 1159s def as_cupy(val, typ=None): 1159s """ 1159s Rough conversion function 1159s 1159s Will try to infer target type from input type if not specified. 1159s """ 1159s if typ is None: 1159s typ = resolve_cupy_type(val) 1159s 1159s if issubclass(typ, CupyArray): 1159s > import cupy as cp 1159s E ModuleNotFoundError: No module named 'cupy' 1159s 1159s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:1010: ModuleNotFoundError 1159s _______________ test_concat_different_types_dask[only-cupy_csr] ________________ 1159s 1159s merge_strategy = 'only' 1159s array_type = functools.partial(, typ=) 1159s 1159s def test_concat_different_types_dask(merge_strategy, array_type): 1159s import dask.array as da 1159s from scipy import sparse 1159s 1159s import anndata as ad 1159s 1159s varm_array = sparse.random(5, 20, density=0.5, format="csr") 1159s 1159s ad1 = ad.AnnData(X=np.ones((5, 5)), varm={"a": varm_array}) 1159s > ad1_other = ad.AnnData(X=np.ones((5, 5)), varm={"a": array_type(varm_array)}) 1159s 1159s tests/test_concatenate.py:1536: 1159s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1159s /usr/lib/python3.13/functools.py:934: in wrapper 1159s return dispatch(args[0].__class__)(*args, **kw) 1159s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1159s 1159s val = 1159s typ = 1159s 1159s @singledispatch 1159s def as_cupy(val, typ=None): 1159s """ 1159s Rough conversion function 1159s 1159s Will try to infer target type from input type if not specified. 1159s """ 1159s if typ is None: 1159s typ = resolve_cupy_type(val) 1159s 1159s if issubclass(typ, CupyArray): 1159s import cupy as cp 1159s 1159s if isinstance(val, CSMatrix): 1159s val = val.toarray() 1159s return cp.array(val) 1159s elif issubclass(typ, CupyCSRMatrix): 1159s > import cupy as cp 1159s E ModuleNotFoundError: No module named 'cupy' 1159s 1159s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:1016: ModuleNotFoundError 1159s _______________ test_concat_different_types_dask[only-cupy_csc] ________________ 1159s 1159s merge_strategy = 'only' 1159s array_type = functools.partial(, typ=) 1159s 1159s def test_concat_different_types_dask(merge_strategy, array_type): 1159s import dask.array as da 1159s from scipy import sparse 1159s 1159s import anndata as ad 1159s 1159s varm_array = sparse.random(5, 20, density=0.5, format="csr") 1159s 1159s ad1 = ad.AnnData(X=np.ones((5, 5)), varm={"a": varm_array}) 1159s > ad1_other = ad.AnnData(X=np.ones((5, 5)), varm={"a": array_type(varm_array)}) 1159s 1159s tests/test_concatenate.py:1536: 1159s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1159s /usr/lib/python3.13/functools.py:934: in wrapper 1159s return dispatch(args[0].__class__)(*args, **kw) 1159s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1159s 1159s val = 1159s typ = 1159s 1159s @singledispatch 1159s def as_cupy(val, typ=None): 1159s """ 1159s Rough conversion function 1159s 1159s Will try to infer target type from input type if not specified. 1159s """ 1159s if typ is None: 1159s typ = resolve_cupy_type(val) 1159s 1159s if issubclass(typ, CupyArray): 1159s import cupy as cp 1159s 1159s if isinstance(val, CSMatrix): 1159s val = val.toarray() 1159s return cp.array(val) 1159s elif issubclass(typ, CupyCSRMatrix): 1159s import cupy as cp 1159s import cupyx.scipy.sparse as cpsparse 1159s 1159s if isinstance(val, np.ndarray): 1159s return cpsparse.csr_matrix(cp.array(val)) 1159s else: 1159s return cpsparse.csr_matrix(val) 1159s elif issubclass(typ, CupyCSCMatrix): 1159s > import cupy as cp 1159s E ModuleNotFoundError: No module named 'cupy' 1159s 1159s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:1024: ModuleNotFoundError 1159s __________________ test_concat_on_var_outer_join[cupy_array] ___________________ 1159s 1159s array_type = functools.partial(, typ=) 1159s 1159s def test_concat_on_var_outer_join(array_type): 1159s # https://github.com/scverse/anndata/issues/1286 1159s a = AnnData( 1159s obs=pd.DataFrame(index=[f"cell_{i:02d}" for i in range(10)]), 1159s var=pd.DataFrame(index=[f"gene_{i:02d}" for i in range(10)]), 1159s layers={ 1159s > "X": array_type(np.ones((10, 10))), 1159s }, 1159s ) 1159s 1159s tests/test_concatenate.py:1671: 1159s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1159s /usr/lib/python3.13/functools.py:934: in wrapper 1159s return dispatch(args[0].__class__)(*args, **kw) 1159s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1159s 1159s val = array([[1., 1., 1., 1., 1., 1., 1., 1., 1., 1.], 1159s [1., 1., 1., 1., 1., 1., 1., 1., 1., 1.], 1159s [1., 1., 1., ...1., 1., 1., 1., 1.], 1159s [1., 1., 1., 1., 1., 1., 1., 1., 1., 1.], 1159s [1., 1., 1., 1., 1., 1., 1., 1., 1., 1.]]) 1159s typ = 1159s 1159s @singledispatch 1159s def as_cupy(val, typ=None): 1159s """ 1159s Rough conversion function 1159s 1159s Will try to infer target type from input type if not specified. 1159s """ 1159s if typ is None: 1159s typ = resolve_cupy_type(val) 1159s 1159s if issubclass(typ, CupyArray): 1159s > import cupy as cp 1159s E ModuleNotFoundError: No module named 'cupy' 1159s 1159s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:1010: ModuleNotFoundError 1159s ___________________ test_concat_on_var_outer_join[cupy_csr] ____________________ 1159s 1159s array_type = functools.partial(, typ=) 1159s 1159s def test_concat_on_var_outer_join(array_type): 1159s # https://github.com/scverse/anndata/issues/1286 1159s a = AnnData( 1159s obs=pd.DataFrame(index=[f"cell_{i:02d}" for i in range(10)]), 1159s var=pd.DataFrame(index=[f"gene_{i:02d}" for i in range(10)]), 1159s layers={ 1159s > "X": array_type(np.ones((10, 10))), 1159s }, 1159s ) 1159s 1159s tests/test_concatenate.py:1671: 1159s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1159s /usr/lib/python3.13/functools.py:934: in wrapper 1159s return dispatch(args[0].__class__)(*args, **kw) 1159s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1159s 1159s val = array([[1., 1., 1., 1., 1., 1., 1., 1., 1., 1.], 1159s [1., 1., 1., 1., 1., 1., 1., 1., 1., 1.], 1159s [1., 1., 1., ...1., 1., 1., 1., 1.], 1159s [1., 1., 1., 1., 1., 1., 1., 1., 1., 1.], 1159s [1., 1., 1., 1., 1., 1., 1., 1., 1., 1.]]) 1159s typ = 1159s 1159s @singledispatch 1159s def as_cupy(val, typ=None): 1159s """ 1159s Rough conversion function 1159s 1159s Will try to infer target type from input type if not specified. 1159s """ 1159s if typ is None: 1159s typ = resolve_cupy_type(val) 1159s 1159s if issubclass(typ, CupyArray): 1159s import cupy as cp 1159s 1159s if isinstance(val, CSMatrix): 1159s val = val.toarray() 1159s return cp.array(val) 1159s elif issubclass(typ, CupyCSRMatrix): 1159s > import cupy as cp 1159s E ModuleNotFoundError: No module named 'cupy' 1159s 1159s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:1016: ModuleNotFoundError 1159s ___________________ test_concat_on_var_outer_join[cupy_csc] ____________________ 1159s 1159s array_type = functools.partial(, typ=) 1159s 1159s def test_concat_on_var_outer_join(array_type): 1159s # https://github.com/scverse/anndata/issues/1286 1159s a = AnnData( 1159s obs=pd.DataFrame(index=[f"cell_{i:02d}" for i in range(10)]), 1159s var=pd.DataFrame(index=[f"gene_{i:02d}" for i in range(10)]), 1159s layers={ 1159s > "X": array_type(np.ones((10, 10))), 1159s }, 1159s ) 1159s 1159s tests/test_concatenate.py:1671: 1159s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1159s /usr/lib/python3.13/functools.py:934: in wrapper 1159s return dispatch(args[0].__class__)(*args, **kw) 1159s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1159s 1159s val = array([[1., 1., 1., 1., 1., 1., 1., 1., 1., 1.], 1159s [1., 1., 1., 1., 1., 1., 1., 1., 1., 1.], 1159s [1., 1., 1., ...1., 1., 1., 1., 1.], 1159s [1., 1., 1., 1., 1., 1., 1., 1., 1., 1.], 1159s [1., 1., 1., 1., 1., 1., 1., 1., 1., 1.]]) 1159s typ = 1159s 1159s @singledispatch 1159s def as_cupy(val, typ=None): 1159s """ 1159s Rough conversion function 1159s 1159s Will try to infer target type from input type if not specified. 1159s """ 1159s if typ is None: 1159s typ = resolve_cupy_type(val) 1159s 1159s if issubclass(typ, CupyArray): 1159s import cupy as cp 1159s 1159s if isinstance(val, CSMatrix): 1159s val = val.toarray() 1159s return cp.array(val) 1159s elif issubclass(typ, CupyCSRMatrix): 1159s import cupy as cp 1159s import cupyx.scipy.sparse as cpsparse 1159s 1159s if isinstance(val, np.ndarray): 1159s return cpsparse.csr_matrix(cp.array(val)) 1159s else: 1159s return cpsparse.csr_matrix(val) 1159s elif issubclass(typ, CupyCSCMatrix): 1159s > import cupy as cp 1159s E ModuleNotFoundError: No module named 'cupy' 1159s 1159s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:1024: ModuleNotFoundError 1159s _____________ test_dask_to_memory_unbacked[cupy_dense_dask_array] ______________ 1159s 1159s array_func = 1159s mem_type = 1159s 1159s @pytest.mark.parametrize( 1159s ("array_func", "mem_type"), 1159s [ 1159s pytest.param(as_dense_dask_array, np.ndarray, id="dense_dask_array"), 1159s pytest.param(as_sparse_dask_array, sparse.csr_matrix, id="sparse_dask_array"), 1159s pytest.param( 1159s as_dense_cupy_dask_array, 1159s CupyArray, 1159s id="cupy_dense_dask_array", 1159s marks=pytest.mark.gpu, 1159s ), 1159s ], 1159s ) 1159s def test_dask_to_memory_unbacked(array_func, mem_type): 1159s > orig = gen_adata((15, 10), X_type=array_func, **GEN_ADATA_DASK_ARGS) 1159s 1159s tests/test_dask.py:289: 1159s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1159s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:346: in gen_adata 1159s X = X_type(random_state.binomial(100, 0.005, (M, N)).astype(X_dtype)) 1159s /usr/lib/python3.13/functools.py:934: in wrapper 1159s return dispatch(args[0].__class__)(*args, **kw) 1159s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1159s 1159s a = array([[0., 0., 0., 0., 0., 0., 1., 0., 0., 0.], 1159s [0., 1., 0., 1., 0., 0., 2., 0., 0., 0.], 1159s [2., 0., 0., ... 0.], 1159s [0., 0., 0., 1., 0., 1., 0., 0., 0., 1.], 1159s [0., 0., 0., 1., 0., 1., 0., 0., 0., 0.]], dtype=float32) 1159s 1159s @singledispatch 1159s def as_dense_cupy_dask_array(a): 1159s > import cupy as cp 1159s E ModuleNotFoundError: No module named 'cupy' 1159s 1159s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:882: ModuleNotFoundError 1159s _________________ test_as_dask_functions[cupy_dense-np_array] __________________ 1159s 1159s input_type = 1159s as_dask_type = 1159s mem_type = 1159s 1159s @pytest.mark.parametrize( 1159s "input_type", BASE_MATRIX_PARAMS + DASK_MATRIX_PARAMS + CUPY_MATRIX_PARAMS 1159s ) 1159s @pytest.mark.parametrize( 1159s ( 1159s "as_dask_type", 1159s "mem_type", 1159s ), 1159s [ 1159s pytest.param( 1159s as_dense_cupy_dask_array, CupyArray, id="cupy_dense", marks=pytest.mark.gpu 1159s ), 1159s pytest.param(as_dense_dask_array, np.ndarray, id="numpy_dense"), 1159s pytest.param( 1159s as_cupy_sparse_dask_array, 1159s CupyCSRMatrix, 1159s id="cupy_csr", 1159s marks=pytest.mark.gpu, 1159s ), 1159s ], 1159s ) 1159s def test_as_dask_functions(input_type, as_dask_type, mem_type): 1159s SHAPE = (1000, 100) 1159s 1159s rng = np.random.default_rng(42) 1159s X_source = rng.poisson(size=SHAPE).astype(np.float32) 1159s X_input = input_type(X_source) 1159s > X_output = as_dask_type(X_input) 1159s 1159s tests/test_helpers.py:304: 1159s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1159s /usr/lib/python3.13/functools.py:934: in wrapper 1159s return dispatch(args[0].__class__)(*args, **kw) 1159s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1159s 1159s a = array([[1., 2., 3., ..., 2., 0., 3.], 1159s [0., 0., 0., ..., 1., 0., 2.], 1159s [2., 1., 3., ..., 0., 3., 1.], 1159s ...1., 0.], 1159s [0., 1., 1., ..., 0., 1., 1.], 1159s [2., 1., 3., ..., 2., 0., 1.]], shape=(1000, 100), dtype=float32) 1159s 1159s @singledispatch 1159s def as_dense_cupy_dask_array(a): 1159s > import cupy as cp 1159s E ModuleNotFoundError: No module named 'cupy' 1159s 1159s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:882: ModuleNotFoundError 1159s _____________ test_as_dask_functions[cupy_dense-scipy_csr_matrix] ______________ 1159s 1159s input_type = 1159s as_dask_type = 1159s mem_type = 1159s 1159s @pytest.mark.parametrize( 1159s "input_type", BASE_MATRIX_PARAMS + DASK_MATRIX_PARAMS + CUPY_MATRIX_PARAMS 1159s ) 1159s @pytest.mark.parametrize( 1159s ( 1159s "as_dask_type", 1159s "mem_type", 1159s ), 1159s [ 1159s pytest.param( 1159s as_dense_cupy_dask_array, CupyArray, id="cupy_dense", marks=pytest.mark.gpu 1159s ), 1159s pytest.param(as_dense_dask_array, np.ndarray, id="numpy_dense"), 1159s pytest.param( 1159s as_cupy_sparse_dask_array, 1159s CupyCSRMatrix, 1159s id="cupy_csr", 1159s marks=pytest.mark.gpu, 1159s ), 1159s ], 1159s ) 1159s def test_as_dask_functions(input_type, as_dask_type, mem_type): 1159s SHAPE = (1000, 100) 1159s 1159s rng = np.random.default_rng(42) 1159s X_source = rng.poisson(size=SHAPE).astype(np.float32) 1159s X_input = input_type(X_source) 1159s > X_output = as_dask_type(X_input) 1159s 1159s tests/test_helpers.py:304: 1159s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1159s /usr/lib/python3.13/functools.py:934: in wrapper 1159s return dispatch(args[0].__class__)(*args, **kw) 1159s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1159s 1159s a = 1159s 1159s @singledispatch 1159s def as_dense_cupy_dask_array(a): 1159s > import cupy as cp 1159s E ModuleNotFoundError: No module named 'cupy' 1159s 1159s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:882: ModuleNotFoundError 1159s _____________ test_as_dask_functions[cupy_dense-scipy_csc_matrix] ______________ 1159s 1159s input_type = 1159s as_dask_type = 1159s mem_type = 1159s 1159s @pytest.mark.parametrize( 1159s "input_type", BASE_MATRIX_PARAMS + DASK_MATRIX_PARAMS + CUPY_MATRIX_PARAMS 1159s ) 1159s @pytest.mark.parametrize( 1159s ( 1159s "as_dask_type", 1159s "mem_type", 1159s ), 1159s [ 1159s pytest.param( 1159s as_dense_cupy_dask_array, CupyArray, id="cupy_dense", marks=pytest.mark.gpu 1159s ), 1159s pytest.param(as_dense_dask_array, np.ndarray, id="numpy_dense"), 1159s pytest.param( 1159s as_cupy_sparse_dask_array, 1159s CupyCSRMatrix, 1159s id="cupy_csr", 1159s marks=pytest.mark.gpu, 1159s ), 1159s ], 1159s ) 1159s def test_as_dask_functions(input_type, as_dask_type, mem_type): 1159s SHAPE = (1000, 100) 1159s 1159s rng = np.random.default_rng(42) 1159s X_source = rng.poisson(size=SHAPE).astype(np.float32) 1159s X_input = input_type(X_source) 1159s > X_output = as_dask_type(X_input) 1159s 1159s tests/test_helpers.py:304: 1159s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1159s /usr/lib/python3.13/functools.py:934: in wrapper 1159s return dispatch(args[0].__class__)(*args, **kw) 1159s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1159s 1159s a = 1159s 1159s @singledispatch 1159s def as_dense_cupy_dask_array(a): 1159s > import cupy as cp 1159s E ModuleNotFoundError: No module named 'cupy' 1159s 1159s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:882: ModuleNotFoundError 1159s ______________ test_as_dask_functions[cupy_dense-scipy_csr_array] ______________ 1159s 1159s input_type = 1159s as_dask_type = 1159s mem_type = 1159s 1159s @pytest.mark.parametrize( 1159s "input_type", BASE_MATRIX_PARAMS + DASK_MATRIX_PARAMS + CUPY_MATRIX_PARAMS 1159s ) 1159s @pytest.mark.parametrize( 1159s ( 1159s "as_dask_type", 1159s "mem_type", 1159s ), 1159s [ 1159s pytest.param( 1159s as_dense_cupy_dask_array, CupyArray, id="cupy_dense", marks=pytest.mark.gpu 1159s ), 1159s pytest.param(as_dense_dask_array, np.ndarray, id="numpy_dense"), 1159s pytest.param( 1159s as_cupy_sparse_dask_array, 1159s CupyCSRMatrix, 1159s id="cupy_csr", 1159s marks=pytest.mark.gpu, 1159s ), 1159s ], 1159s ) 1159s def test_as_dask_functions(input_type, as_dask_type, mem_type): 1159s SHAPE = (1000, 100) 1159s 1159s rng = np.random.default_rng(42) 1159s X_source = rng.poisson(size=SHAPE).astype(np.float32) 1159s X_input = input_type(X_source) 1159s > X_output = as_dask_type(X_input) 1159s 1159s tests/test_helpers.py:304: 1159s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1159s /usr/lib/python3.13/functools.py:934: in wrapper 1159s return dispatch(args[0].__class__)(*args, **kw) 1159s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1159s 1159s a = 1159s 1159s @singledispatch 1159s def as_dense_cupy_dask_array(a): 1159s > import cupy as cp 1159s E ModuleNotFoundError: No module named 'cupy' 1159s 1159s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:882: ModuleNotFoundError 1159s ______________ test_as_dask_functions[cupy_dense-scipy_csc_array] ______________ 1159s 1159s input_type = 1159s as_dask_type = 1159s mem_type = 1159s 1159s @pytest.mark.parametrize( 1159s "input_type", BASE_MATRIX_PARAMS + DASK_MATRIX_PARAMS + CUPY_MATRIX_PARAMS 1159s ) 1159s @pytest.mark.parametrize( 1159s ( 1159s "as_dask_type", 1159s "mem_type", 1159s ), 1159s [ 1159s pytest.param( 1159s as_dense_cupy_dask_array, CupyArray, id="cupy_dense", marks=pytest.mark.gpu 1159s ), 1159s pytest.param(as_dense_dask_array, np.ndarray, id="numpy_dense"), 1159s pytest.param( 1159s as_cupy_sparse_dask_array, 1159s CupyCSRMatrix, 1159s id="cupy_csr", 1159s marks=pytest.mark.gpu, 1159s ), 1159s ], 1159s ) 1159s def test_as_dask_functions(input_type, as_dask_type, mem_type): 1159s SHAPE = (1000, 100) 1159s 1159s rng = np.random.default_rng(42) 1159s X_source = rng.poisson(size=SHAPE).astype(np.float32) 1159s X_input = input_type(X_source) 1159s > X_output = as_dask_type(X_input) 1159s 1159s tests/test_helpers.py:304: 1159s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1159s /usr/lib/python3.13/functools.py:934: in wrapper 1159s return dispatch(args[0].__class__)(*args, **kw) 1159s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1159s 1159s a = 1159s 1159s @singledispatch 1159s def as_dense_cupy_dask_array(a): 1159s > import cupy as cp 1159s E ModuleNotFoundError: No module named 'cupy' 1159s 1159s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:882: ModuleNotFoundError 1159s _____________ test_as_dask_functions[cupy_dense-dense_dask_array] ______________ 1159s 1159s input_type = 1159s as_dask_type = 1159s mem_type = 1159s 1159s @pytest.mark.parametrize( 1159s "input_type", BASE_MATRIX_PARAMS + DASK_MATRIX_PARAMS + CUPY_MATRIX_PARAMS 1159s ) 1159s @pytest.mark.parametrize( 1159s ( 1159s "as_dask_type", 1159s "mem_type", 1159s ), 1159s [ 1159s pytest.param( 1159s as_dense_cupy_dask_array, CupyArray, id="cupy_dense", marks=pytest.mark.gpu 1159s ), 1159s pytest.param(as_dense_dask_array, np.ndarray, id="numpy_dense"), 1159s pytest.param( 1159s as_cupy_sparse_dask_array, 1159s CupyCSRMatrix, 1159s id="cupy_csr", 1159s marks=pytest.mark.gpu, 1159s ), 1159s ], 1159s ) 1159s def test_as_dask_functions(input_type, as_dask_type, mem_type): 1159s SHAPE = (1000, 100) 1159s 1159s rng = np.random.default_rng(42) 1159s X_source = rng.poisson(size=SHAPE).astype(np.float32) 1159s X_input = input_type(X_source) 1159s > X_output = as_dask_type(X_input) 1159s 1159s tests/test_helpers.py:304: 1159s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1159s /usr/lib/python3.13/functools.py:934: in wrapper 1159s return dispatch(args[0].__class__)(*args, **kw) 1159s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1159s 1159s a = dask.array 1159s 1159s @as_dense_cupy_dask_array.register(DaskArray) 1159s def _(a): 1159s > import cupy as cp 1159s E ModuleNotFoundError: No module named 'cupy' 1159s 1159s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:903: ModuleNotFoundError 1159s _____________ test_as_dask_functions[cupy_dense-sparse_dask_array] _____________ 1159s 1159s input_type = 1159s as_dask_type = 1159s mem_type = 1159s 1159s @pytest.mark.parametrize( 1159s "input_type", BASE_MATRIX_PARAMS + DASK_MATRIX_PARAMS + CUPY_MATRIX_PARAMS 1159s ) 1159s @pytest.mark.parametrize( 1159s ( 1159s "as_dask_type", 1159s "mem_type", 1159s ), 1159s [ 1159s pytest.param( 1159s as_dense_cupy_dask_array, CupyArray, id="cupy_dense", marks=pytest.mark.gpu 1159s ), 1159s pytest.param(as_dense_dask_array, np.ndarray, id="numpy_dense"), 1159s pytest.param( 1159s as_cupy_sparse_dask_array, 1159s CupyCSRMatrix, 1159s id="cupy_csr", 1159s marks=pytest.mark.gpu, 1159s ), 1159s ], 1159s ) 1159s def test_as_dask_functions(input_type, as_dask_type, mem_type): 1159s SHAPE = (1000, 100) 1159s 1159s rng = np.random.default_rng(42) 1159s X_source = rng.poisson(size=SHAPE).astype(np.float32) 1159s X_input = input_type(X_source) 1159s > X_output = as_dask_type(X_input) 1159s 1159s tests/test_helpers.py:304: 1159s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1159s /usr/lib/python3.13/functools.py:934: in wrapper 1159s return dispatch(args[0].__class__)(*args, **kw) 1159s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1159s 1159s a = dask.array 1159s 1159s @as_dense_cupy_dask_array.register(DaskArray) 1159s def _(a): 1159s > import cupy as cp 1159s E ModuleNotFoundError: No module named 'cupy' 1159s 1159s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:903: ModuleNotFoundError 1159s ________________ test_as_dask_functions[cupy_dense-cupy_array] _________________ 1159s 1159s input_type = functools.partial(, typ=) 1159s as_dask_type = 1159s mem_type = 1159s 1159s @pytest.mark.parametrize( 1159s "input_type", BASE_MATRIX_PARAMS + DASK_MATRIX_PARAMS + CUPY_MATRIX_PARAMS 1159s ) 1159s @pytest.mark.parametrize( 1159s ( 1159s "as_dask_type", 1159s "mem_type", 1159s ), 1159s [ 1159s pytest.param( 1159s as_dense_cupy_dask_array, CupyArray, id="cupy_dense", marks=pytest.mark.gpu 1159s ), 1159s pytest.param(as_dense_dask_array, np.ndarray, id="numpy_dense"), 1159s pytest.param( 1159s as_cupy_sparse_dask_array, 1159s CupyCSRMatrix, 1159s id="cupy_csr", 1159s marks=pytest.mark.gpu, 1159s ), 1159s ], 1159s ) 1159s def test_as_dask_functions(input_type, as_dask_type, mem_type): 1159s SHAPE = (1000, 100) 1159s 1159s rng = np.random.default_rng(42) 1159s X_source = rng.poisson(size=SHAPE).astype(np.float32) 1159s > X_input = input_type(X_source) 1159s 1159s tests/test_helpers.py:303: 1159s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1159s /usr/lib/python3.13/functools.py:934: in wrapper 1159s return dispatch(args[0].__class__)(*args, **kw) 1159s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1159s 1159s val = array([[1., 2., 3., ..., 2., 0., 3.], 1159s [0., 0., 0., ..., 1., 0., 2.], 1159s [2., 1., 3., ..., 0., 3., 1.], 1159s ...1., 0.], 1159s [0., 1., 1., ..., 0., 1., 1.], 1159s [2., 1., 3., ..., 2., 0., 1.]], shape=(1000, 100), dtype=float32) 1159s typ = 1159s 1159s @singledispatch 1159s def as_cupy(val, typ=None): 1159s """ 1159s Rough conversion function 1159s 1159s Will try to infer target type from input type if not specified. 1159s """ 1159s if typ is None: 1159s typ = resolve_cupy_type(val) 1159s 1159s if issubclass(typ, CupyArray): 1159s > import cupy as cp 1159s E ModuleNotFoundError: No module named 'cupy' 1159s 1159s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:1010: ModuleNotFoundError 1159s _________________ test_as_dask_functions[cupy_dense-cupy_csr] __________________ 1159s 1159s input_type = functools.partial(, typ=) 1159s as_dask_type = 1159s mem_type = 1159s 1159s @pytest.mark.parametrize( 1159s "input_type", BASE_MATRIX_PARAMS + DASK_MATRIX_PARAMS + CUPY_MATRIX_PARAMS 1159s ) 1159s @pytest.mark.parametrize( 1159s ( 1159s "as_dask_type", 1159s "mem_type", 1159s ), 1159s [ 1159s pytest.param( 1159s as_dense_cupy_dask_array, CupyArray, id="cupy_dense", marks=pytest.mark.gpu 1159s ), 1159s pytest.param(as_dense_dask_array, np.ndarray, id="numpy_dense"), 1159s pytest.param( 1159s as_cupy_sparse_dask_array, 1159s CupyCSRMatrix, 1159s id="cupy_csr", 1159s marks=pytest.mark.gpu, 1159s ), 1159s ], 1159s ) 1159s def test_as_dask_functions(input_type, as_dask_type, mem_type): 1159s SHAPE = (1000, 100) 1159s 1159s rng = np.random.default_rng(42) 1159s X_source = rng.poisson(size=SHAPE).astype(np.float32) 1159s > X_input = input_type(X_source) 1159s 1159s tests/test_helpers.py:303: 1159s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1159s /usr/lib/python3.13/functools.py:934: in wrapper 1159s return dispatch(args[0].__class__)(*args, **kw) 1159s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1159s 1159s val = array([[1., 2., 3., ..., 2., 0., 3.], 1159s [0., 0., 0., ..., 1., 0., 2.], 1159s [2., 1., 3., ..., 0., 3., 1.], 1159s ...1., 0.], 1159s [0., 1., 1., ..., 0., 1., 1.], 1159s [2., 1., 3., ..., 2., 0., 1.]], shape=(1000, 100), dtype=float32) 1159s typ = 1159s 1159s @singledispatch 1159s def as_cupy(val, typ=None): 1159s """ 1159s Rough conversion function 1159s 1159s Will try to infer target type from input type if not specified. 1159s """ 1159s if typ is None: 1159s typ = resolve_cupy_type(val) 1159s 1159s if issubclass(typ, CupyArray): 1159s import cupy as cp 1159s 1159s if isinstance(val, CSMatrix): 1159s val = val.toarray() 1159s return cp.array(val) 1159s elif issubclass(typ, CupyCSRMatrix): 1159s > import cupy as cp 1159s E ModuleNotFoundError: No module named 'cupy' 1159s 1159s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:1016: ModuleNotFoundError 1159s _________________ test_as_dask_functions[cupy_dense-cupy_csc] __________________ 1159s 1159s input_type = functools.partial(, typ=) 1159s as_dask_type = 1159s mem_type = 1159s 1159s @pytest.mark.parametrize( 1159s "input_type", BASE_MATRIX_PARAMS + DASK_MATRIX_PARAMS + CUPY_MATRIX_PARAMS 1159s ) 1159s @pytest.mark.parametrize( 1159s ( 1159s "as_dask_type", 1159s "mem_type", 1159s ), 1159s [ 1159s pytest.param( 1159s as_dense_cupy_dask_array, CupyArray, id="cupy_dense", marks=pytest.mark.gpu 1159s ), 1159s pytest.param(as_dense_dask_array, np.ndarray, id="numpy_dense"), 1159s pytest.param( 1159s as_cupy_sparse_dask_array, 1159s CupyCSRMatrix, 1159s id="cupy_csr", 1159s marks=pytest.mark.gpu, 1159s ), 1159s ], 1159s ) 1159s def test_as_dask_functions(input_type, as_dask_type, mem_type): 1159s SHAPE = (1000, 100) 1159s 1159s rng = np.random.default_rng(42) 1159s X_source = rng.poisson(size=SHAPE).astype(np.float32) 1159s > X_input = input_type(X_source) 1159s 1159s tests/test_helpers.py:303: 1159s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1159s /usr/lib/python3.13/functools.py:934: in wrapper 1159s return dispatch(args[0].__class__)(*args, **kw) 1159s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1159s 1159s val = array([[1., 2., 3., ..., 2., 0., 3.], 1159s [0., 0., 0., ..., 1., 0., 2.], 1159s [2., 1., 3., ..., 0., 3., 1.], 1159s ...1., 0.], 1159s [0., 1., 1., ..., 0., 1., 1.], 1159s [2., 1., 3., ..., 2., 0., 1.]], shape=(1000, 100), dtype=float32) 1159s typ = 1159s 1159s @singledispatch 1159s def as_cupy(val, typ=None): 1159s """ 1159s Rough conversion function 1159s 1159s Will try to infer target type from input type if not specified. 1159s """ 1159s if typ is None: 1159s typ = resolve_cupy_type(val) 1159s 1159s if issubclass(typ, CupyArray): 1159s import cupy as cp 1159s 1159s if isinstance(val, CSMatrix): 1159s val = val.toarray() 1159s return cp.array(val) 1159s elif issubclass(typ, CupyCSRMatrix): 1159s import cupy as cp 1159s import cupyx.scipy.sparse as cpsparse 1159s 1159s if isinstance(val, np.ndarray): 1159s return cpsparse.csr_matrix(cp.array(val)) 1159s else: 1159s return cpsparse.csr_matrix(val) 1159s elif issubclass(typ, CupyCSCMatrix): 1159s > import cupy as cp 1159s E ModuleNotFoundError: No module named 'cupy' 1159s 1159s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:1024: ModuleNotFoundError 1159s ________________ test_as_dask_functions[numpy_dense-cupy_array] ________________ 1159s 1159s input_type = functools.partial(, typ=) 1159s as_dask_type = 1159s mem_type = 1159s 1159s @pytest.mark.parametrize( 1159s "input_type", BASE_MATRIX_PARAMS + DASK_MATRIX_PARAMS + CUPY_MATRIX_PARAMS 1159s ) 1159s @pytest.mark.parametrize( 1159s ( 1159s "as_dask_type", 1159s "mem_type", 1159s ), 1159s [ 1159s pytest.param( 1159s as_dense_cupy_dask_array, CupyArray, id="cupy_dense", marks=pytest.mark.gpu 1159s ), 1159s pytest.param(as_dense_dask_array, np.ndarray, id="numpy_dense"), 1159s pytest.param( 1159s as_cupy_sparse_dask_array, 1159s CupyCSRMatrix, 1159s id="cupy_csr", 1159s marks=pytest.mark.gpu, 1159s ), 1159s ], 1159s ) 1159s def test_as_dask_functions(input_type, as_dask_type, mem_type): 1159s SHAPE = (1000, 100) 1159s 1159s rng = np.random.default_rng(42) 1159s X_source = rng.poisson(size=SHAPE).astype(np.float32) 1159s > X_input = input_type(X_source) 1159s 1159s tests/test_helpers.py:303: 1159s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1159s /usr/lib/python3.13/functools.py:934: in wrapper 1159s return dispatch(args[0].__class__)(*args, **kw) 1159s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1159s 1159s val = array([[1., 2., 3., ..., 2., 0., 3.], 1159s [0., 0., 0., ..., 1., 0., 2.], 1159s [2., 1., 3., ..., 0., 3., 1.], 1159s ...1., 0.], 1159s [0., 1., 1., ..., 0., 1., 1.], 1159s [2., 1., 3., ..., 2., 0., 1.]], shape=(1000, 100), dtype=float32) 1159s typ = 1159s 1159s @singledispatch 1159s def as_cupy(val, typ=None): 1159s """ 1159s Rough conversion function 1159s 1159s Will try to infer target type from input type if not specified. 1159s """ 1159s if typ is None: 1159s typ = resolve_cupy_type(val) 1159s 1159s if issubclass(typ, CupyArray): 1159s > import cupy as cp 1159s E ModuleNotFoundError: No module named 'cupy' 1159s 1159s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:1010: ModuleNotFoundError 1159s _________________ test_as_dask_functions[numpy_dense-cupy_csr] _________________ 1159s 1159s input_type = functools.partial(, typ=) 1159s as_dask_type = 1159s mem_type = 1159s 1159s @pytest.mark.parametrize( 1159s "input_type", BASE_MATRIX_PARAMS + DASK_MATRIX_PARAMS + CUPY_MATRIX_PARAMS 1159s ) 1159s @pytest.mark.parametrize( 1159s ( 1159s "as_dask_type", 1159s "mem_type", 1159s ), 1159s [ 1159s pytest.param( 1159s as_dense_cupy_dask_array, CupyArray, id="cupy_dense", marks=pytest.mark.gpu 1159s ), 1159s pytest.param(as_dense_dask_array, np.ndarray, id="numpy_dense"), 1159s pytest.param( 1159s as_cupy_sparse_dask_array, 1159s CupyCSRMatrix, 1159s id="cupy_csr", 1159s marks=pytest.mark.gpu, 1159s ), 1159s ], 1159s ) 1159s def test_as_dask_functions(input_type, as_dask_type, mem_type): 1159s SHAPE = (1000, 100) 1159s 1159s rng = np.random.default_rng(42) 1159s X_source = rng.poisson(size=SHAPE).astype(np.float32) 1159s > X_input = input_type(X_source) 1159s 1159s tests/test_helpers.py:303: 1159s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1159s /usr/lib/python3.13/functools.py:934: in wrapper 1159s return dispatch(args[0].__class__)(*args, **kw) 1159s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1159s 1159s val = array([[1., 2., 3., ..., 2., 0., 3.], 1159s [0., 0., 0., ..., 1., 0., 2.], 1159s [2., 1., 3., ..., 0., 3., 1.], 1159s ...1., 0.], 1159s [0., 1., 1., ..., 0., 1., 1.], 1159s [2., 1., 3., ..., 2., 0., 1.]], shape=(1000, 100), dtype=float32) 1159s typ = 1159s 1159s @singledispatch 1159s def as_cupy(val, typ=None): 1159s """ 1159s Rough conversion function 1159s 1159s Will try to infer target type from input type if not specified. 1159s """ 1159s if typ is None: 1159s typ = resolve_cupy_type(val) 1159s 1159s if issubclass(typ, CupyArray): 1159s import cupy as cp 1159s 1159s if isinstance(val, CSMatrix): 1159s val = val.toarray() 1159s return cp.array(val) 1159s elif issubclass(typ, CupyCSRMatrix): 1159s > import cupy as cp 1159s E ModuleNotFoundError: No module named 'cupy' 1159s 1159s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:1016: ModuleNotFoundError 1159s _________________ test_as_dask_functions[numpy_dense-cupy_csc] _________________ 1159s 1159s input_type = functools.partial(, typ=) 1159s as_dask_type = 1159s mem_type = 1159s 1159s @pytest.mark.parametrize( 1159s "input_type", BASE_MATRIX_PARAMS + DASK_MATRIX_PARAMS + CUPY_MATRIX_PARAMS 1159s ) 1159s @pytest.mark.parametrize( 1159s ( 1159s "as_dask_type", 1159s "mem_type", 1159s ), 1159s [ 1159s pytest.param( 1159s as_dense_cupy_dask_array, CupyArray, id="cupy_dense", marks=pytest.mark.gpu 1159s ), 1159s pytest.param(as_dense_dask_array, np.ndarray, id="numpy_dense"), 1159s pytest.param( 1159s as_cupy_sparse_dask_array, 1159s CupyCSRMatrix, 1159s id="cupy_csr", 1159s marks=pytest.mark.gpu, 1159s ), 1159s ], 1159s ) 1159s def test_as_dask_functions(input_type, as_dask_type, mem_type): 1159s SHAPE = (1000, 100) 1159s 1159s rng = np.random.default_rng(42) 1159s X_source = rng.poisson(size=SHAPE).astype(np.float32) 1159s > X_input = input_type(X_source) 1159s 1159s tests/test_helpers.py:303: 1159s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1159s /usr/lib/python3.13/functools.py:934: in wrapper 1159s return dispatch(args[0].__class__)(*args, **kw) 1159s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1159s 1159s val = array([[1., 2., 3., ..., 2., 0., 3.], 1159s [0., 0., 0., ..., 1., 0., 2.], 1159s [2., 1., 3., ..., 0., 3., 1.], 1159s ...1., 0.], 1159s [0., 1., 1., ..., 0., 1., 1.], 1159s [2., 1., 3., ..., 2., 0., 1.]], shape=(1000, 100), dtype=float32) 1159s typ = 1159s 1159s @singledispatch 1159s def as_cupy(val, typ=None): 1159s """ 1159s Rough conversion function 1159s 1159s Will try to infer target type from input type if not specified. 1159s """ 1159s if typ is None: 1159s typ = resolve_cupy_type(val) 1159s 1159s if issubclass(typ, CupyArray): 1159s import cupy as cp 1159s 1159s if isinstance(val, CSMatrix): 1159s val = val.toarray() 1159s return cp.array(val) 1159s elif issubclass(typ, CupyCSRMatrix): 1159s import cupy as cp 1159s import cupyx.scipy.sparse as cpsparse 1159s 1159s if isinstance(val, np.ndarray): 1159s return cpsparse.csr_matrix(cp.array(val)) 1159s else: 1159s return cpsparse.csr_matrix(val) 1159s elif issubclass(typ, CupyCSCMatrix): 1159s > import cupy as cp 1159s E ModuleNotFoundError: No module named 'cupy' 1159s 1159s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:1024: ModuleNotFoundError 1159s __________________ test_as_dask_functions[cupy_csr-np_array] ___________________ 1159s 1159s input_type = 1159s as_dask_type = 1159s mem_type = 1159s 1159s @pytest.mark.parametrize( 1159s "input_type", BASE_MATRIX_PARAMS + DASK_MATRIX_PARAMS + CUPY_MATRIX_PARAMS 1159s ) 1159s @pytest.mark.parametrize( 1159s ( 1159s "as_dask_type", 1159s "mem_type", 1159s ), 1159s [ 1159s pytest.param( 1159s as_dense_cupy_dask_array, CupyArray, id="cupy_dense", marks=pytest.mark.gpu 1159s ), 1159s pytest.param(as_dense_dask_array, np.ndarray, id="numpy_dense"), 1159s pytest.param( 1159s as_cupy_sparse_dask_array, 1159s CupyCSRMatrix, 1159s id="cupy_csr", 1159s marks=pytest.mark.gpu, 1159s ), 1159s ], 1159s ) 1159s def test_as_dask_functions(input_type, as_dask_type, mem_type): 1159s SHAPE = (1000, 100) 1159s 1159s rng = np.random.default_rng(42) 1159s X_source = rng.poisson(size=SHAPE).astype(np.float32) 1159s X_input = input_type(X_source) 1159s > X_output = as_dask_type(X_input) 1159s 1159s tests/test_helpers.py:304: 1159s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1159s /usr/lib/python3.13/functools.py:934: in wrapper 1159s return dispatch(args[0].__class__)(*args, **kw) 1159s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1159s 1159s a = array([[1., 2., 3., ..., 2., 0., 3.], 1159s [0., 0., 0., ..., 1., 0., 2.], 1159s [2., 1., 3., ..., 0., 3., 1.], 1159s ...1., 0.], 1159s [0., 1., 1., ..., 0., 1., 1.], 1159s [2., 1., 3., ..., 2., 0., 1.]], shape=(1000, 100), dtype=float32) 1159s format = 'csr' 1159s 1159s @singledispatch 1159s def as_cupy_sparse_dask_array(a, format="csr"): 1159s > memory_class = format_to_memory_class[format] 1159s E KeyError: 'csr' 1159s 1159s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:926: KeyError 1159s ______________ test_as_dask_functions[cupy_csr-scipy_csr_matrix] _______________ 1159s 1159s input_type = 1159s as_dask_type = 1159s mem_type = 1159s 1159s @pytest.mark.parametrize( 1159s "input_type", BASE_MATRIX_PARAMS + DASK_MATRIX_PARAMS + CUPY_MATRIX_PARAMS 1159s ) 1159s @pytest.mark.parametrize( 1159s ( 1159s "as_dask_type", 1159s "mem_type", 1159s ), 1159s [ 1159s pytest.param( 1159s as_dense_cupy_dask_array, CupyArray, id="cupy_dense", marks=pytest.mark.gpu 1159s ), 1159s pytest.param(as_dense_dask_array, np.ndarray, id="numpy_dense"), 1159s pytest.param( 1159s as_cupy_sparse_dask_array, 1159s CupyCSRMatrix, 1159s id="cupy_csr", 1159s marks=pytest.mark.gpu, 1159s ), 1159s ], 1159s ) 1159s def test_as_dask_functions(input_type, as_dask_type, mem_type): 1159s SHAPE = (1000, 100) 1159s 1159s rng = np.random.default_rng(42) 1159s X_source = rng.poisson(size=SHAPE).astype(np.float32) 1159s X_input = input_type(X_source) 1159s > X_output = as_dask_type(X_input) 1159s 1159s tests/test_helpers.py:304: 1159s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1159s /usr/lib/python3.13/functools.py:934: in wrapper 1159s return dispatch(args[0].__class__)(*args, **kw) 1159s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1159s 1159s a = 1159s format = 'csr' 1159s 1159s @singledispatch 1159s def as_cupy_sparse_dask_array(a, format="csr"): 1159s > memory_class = format_to_memory_class[format] 1159s E KeyError: 'csr' 1159s 1159s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:926: KeyError 1159s ______________ test_as_dask_functions[cupy_csr-scipy_csc_matrix] _______________ 1159s 1159s input_type = 1159s as_dask_type = 1159s mem_type = 1159s 1159s @pytest.mark.parametrize( 1159s "input_type", BASE_MATRIX_PARAMS + DASK_MATRIX_PARAMS + CUPY_MATRIX_PARAMS 1159s ) 1159s @pytest.mark.parametrize( 1159s ( 1159s "as_dask_type", 1159s "mem_type", 1159s ), 1159s [ 1159s pytest.param( 1159s as_dense_cupy_dask_array, CupyArray, id="cupy_dense", marks=pytest.mark.gpu 1159s ), 1159s pytest.param(as_dense_dask_array, np.ndarray, id="numpy_dense"), 1159s pytest.param( 1159s as_cupy_sparse_dask_array, 1159s CupyCSRMatrix, 1159s id="cupy_csr", 1159s marks=pytest.mark.gpu, 1159s ), 1159s ], 1159s ) 1159s def test_as_dask_functions(input_type, as_dask_type, mem_type): 1159s SHAPE = (1000, 100) 1159s 1159s rng = np.random.default_rng(42) 1159s X_source = rng.poisson(size=SHAPE).astype(np.float32) 1159s X_input = input_type(X_source) 1159s > X_output = as_dask_type(X_input) 1159s 1159s tests/test_helpers.py:304: 1159s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1159s /usr/lib/python3.13/functools.py:934: in wrapper 1159s return dispatch(args[0].__class__)(*args, **kw) 1159s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1159s 1159s a = 1159s format = 'csr' 1159s 1159s @singledispatch 1159s def as_cupy_sparse_dask_array(a, format="csr"): 1159s > memory_class = format_to_memory_class[format] 1159s E KeyError: 'csr' 1159s 1159s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:926: KeyError 1159s _______________ test_as_dask_functions[cupy_csr-scipy_csr_array] _______________ 1159s 1159s input_type = 1159s as_dask_type = 1159s mem_type = 1159s 1159s @pytest.mark.parametrize( 1159s "input_type", BASE_MATRIX_PARAMS + DASK_MATRIX_PARAMS + CUPY_MATRIX_PARAMS 1159s ) 1159s @pytest.mark.parametrize( 1159s ( 1159s "as_dask_type", 1159s "mem_type", 1159s ), 1159s [ 1159s pytest.param( 1159s as_dense_cupy_dask_array, CupyArray, id="cupy_dense", marks=pytest.mark.gpu 1159s ), 1159s pytest.param(as_dense_dask_array, np.ndarray, id="numpy_dense"), 1159s pytest.param( 1159s as_cupy_sparse_dask_array, 1159s CupyCSRMatrix, 1159s id="cupy_csr", 1159s marks=pytest.mark.gpu, 1159s ), 1159s ], 1159s ) 1159s def test_as_dask_functions(input_type, as_dask_type, mem_type): 1159s SHAPE = (1000, 100) 1159s 1159s rng = np.random.default_rng(42) 1159s X_source = rng.poisson(size=SHAPE).astype(np.float32) 1159s X_input = input_type(X_source) 1159s > X_output = as_dask_type(X_input) 1159s 1159s tests/test_helpers.py:304: 1159s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1159s /usr/lib/python3.13/functools.py:934: in wrapper 1159s return dispatch(args[0].__class__)(*args, **kw) 1159s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1159s 1159s a = 1159s format = 'csr' 1159s 1159s @singledispatch 1159s def as_cupy_sparse_dask_array(a, format="csr"): 1159s > memory_class = format_to_memory_class[format] 1159s E KeyError: 'csr' 1159s 1159s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:926: KeyError 1159s _______________ test_as_dask_functions[cupy_csr-scipy_csc_array] _______________ 1159s 1159s input_type = 1159s as_dask_type = 1159s mem_type = 1159s 1159s @pytest.mark.parametrize( 1159s "input_type", BASE_MATRIX_PARAMS + DASK_MATRIX_PARAMS + CUPY_MATRIX_PARAMS 1159s ) 1159s @pytest.mark.parametrize( 1159s ( 1159s "as_dask_type", 1159s "mem_type", 1159s ), 1159s [ 1159s pytest.param( 1159s as_dense_cupy_dask_array, CupyArray, id="cupy_dense", marks=pytest.mark.gpu 1159s ), 1159s pytest.param(as_dense_dask_array, np.ndarray, id="numpy_dense"), 1159s pytest.param( 1159s as_cupy_sparse_dask_array, 1159s CupyCSRMatrix, 1159s id="cupy_csr", 1159s marks=pytest.mark.gpu, 1159s ), 1159s ], 1159s ) 1159s def test_as_dask_functions(input_type, as_dask_type, mem_type): 1159s SHAPE = (1000, 100) 1159s 1159s rng = np.random.default_rng(42) 1159s X_source = rng.poisson(size=SHAPE).astype(np.float32) 1159s X_input = input_type(X_source) 1159s > X_output = as_dask_type(X_input) 1159s 1159s tests/test_helpers.py:304: 1159s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1159s /usr/lib/python3.13/functools.py:934: in wrapper 1159s return dispatch(args[0].__class__)(*args, **kw) 1159s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1159s 1159s a = 1159s format = 'csr' 1159s 1159s @singledispatch 1159s def as_cupy_sparse_dask_array(a, format="csr"): 1159s > memory_class = format_to_memory_class[format] 1159s E KeyError: 'csr' 1159s 1159s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:926: KeyError 1159s ______________ test_as_dask_functions[cupy_csr-dense_dask_array] _______________ 1159s 1159s input_type = 1159s as_dask_type = 1159s mem_type = 1159s 1159s @pytest.mark.parametrize( 1159s "input_type", BASE_MATRIX_PARAMS + DASK_MATRIX_PARAMS + CUPY_MATRIX_PARAMS 1159s ) 1159s @pytest.mark.parametrize( 1159s ( 1159s "as_dask_type", 1159s "mem_type", 1159s ), 1159s [ 1159s pytest.param( 1159s as_dense_cupy_dask_array, CupyArray, id="cupy_dense", marks=pytest.mark.gpu 1159s ), 1159s pytest.param(as_dense_dask_array, np.ndarray, id="numpy_dense"), 1159s pytest.param( 1159s as_cupy_sparse_dask_array, 1159s CupyCSRMatrix, 1159s id="cupy_csr", 1159s marks=pytest.mark.gpu, 1159s ), 1159s ], 1159s ) 1159s def test_as_dask_functions(input_type, as_dask_type, mem_type): 1159s SHAPE = (1000, 100) 1159s 1159s rng = np.random.default_rng(42) 1159s X_source = rng.poisson(size=SHAPE).astype(np.float32) 1159s X_input = input_type(X_source) 1159s > X_output = as_dask_type(X_input) 1159s 1159s tests/test_helpers.py:304: 1159s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1159s /usr/lib/python3.13/functools.py:934: in wrapper 1159s return dispatch(args[0].__class__)(*args, **kw) 1159s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1159s 1159s a = dask.array 1159s format = 'csr' 1159s 1159s @as_cupy_sparse_dask_array.register(DaskArray) 1159s def _(a, format="csr"): 1159s > memory_class = format_to_memory_class[format] 1159s E KeyError: 'csr' 1159s 1159s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:944: KeyError 1159s ______________ test_as_dask_functions[cupy_csr-sparse_dask_array] ______________ 1159s 1159s input_type = 1159s as_dask_type = 1159s mem_type = 1159s 1159s @pytest.mark.parametrize( 1159s "input_type", BASE_MATRIX_PARAMS + DASK_MATRIX_PARAMS + CUPY_MATRIX_PARAMS 1159s ) 1159s @pytest.mark.parametrize( 1159s ( 1159s "as_dask_type", 1159s "mem_type", 1159s ), 1159s [ 1159s pytest.param( 1159s as_dense_cupy_dask_array, CupyArray, id="cupy_dense", marks=pytest.mark.gpu 1159s ), 1159s pytest.param(as_dense_dask_array, np.ndarray, id="numpy_dense"), 1159s pytest.param( 1159s as_cupy_sparse_dask_array, 1159s CupyCSRMatrix, 1159s id="cupy_csr", 1159s marks=pytest.mark.gpu, 1159s ), 1159s ], 1159s ) 1159s def test_as_dask_functions(input_type, as_dask_type, mem_type): 1159s SHAPE = (1000, 100) 1159s 1159s rng = np.random.default_rng(42) 1159s X_source = rng.poisson(size=SHAPE).astype(np.float32) 1159s X_input = input_type(X_source) 1159s > X_output = as_dask_type(X_input) 1159s 1159s tests/test_helpers.py:304: 1159s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1159s /usr/lib/python3.13/functools.py:934: in wrapper 1159s return dispatch(args[0].__class__)(*args, **kw) 1159s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1159s 1159s a = dask.array 1159s format = 'csr' 1159s 1159s @as_cupy_sparse_dask_array.register(DaskArray) 1159s def _(a, format="csr"): 1159s > memory_class = format_to_memory_class[format] 1159s E KeyError: 'csr' 1159s 1159s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:944: KeyError 1159s _________________ test_as_dask_functions[cupy_csr-cupy_array] __________________ 1159s 1159s input_type = functools.partial(, typ=) 1159s as_dask_type = 1159s mem_type = 1159s 1159s @pytest.mark.parametrize( 1159s "input_type", BASE_MATRIX_PARAMS + DASK_MATRIX_PARAMS + CUPY_MATRIX_PARAMS 1159s ) 1159s @pytest.mark.parametrize( 1159s ( 1159s "as_dask_type", 1159s "mem_type", 1159s ), 1159s [ 1159s pytest.param( 1159s as_dense_cupy_dask_array, CupyArray, id="cupy_dense", marks=pytest.mark.gpu 1159s ), 1159s pytest.param(as_dense_dask_array, np.ndarray, id="numpy_dense"), 1159s pytest.param( 1159s as_cupy_sparse_dask_array, 1159s CupyCSRMatrix, 1159s id="cupy_csr", 1159s marks=pytest.mark.gpu, 1159s ), 1159s ], 1159s ) 1159s def test_as_dask_functions(input_type, as_dask_type, mem_type): 1159s SHAPE = (1000, 100) 1159s 1159s rng = np.random.default_rng(42) 1159s X_source = rng.poisson(size=SHAPE).astype(np.float32) 1159s > X_input = input_type(X_source) 1159s 1159s tests/test_helpers.py:303: 1159s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1159s /usr/lib/python3.13/functools.py:934: in wrapper 1159s return dispatch(args[0].__class__)(*args, **kw) 1159s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1159s 1159s val = array([[1., 2., 3., ..., 2., 0., 3.], 1159s [0., 0., 0., ..., 1., 0., 2.], 1159s [2., 1., 3., ..., 0., 3., 1.], 1159s ...1., 0.], 1159s [0., 1., 1., ..., 0., 1., 1.], 1159s [2., 1., 3., ..., 2., 0., 1.]], shape=(1000, 100), dtype=float32) 1159s typ = 1159s 1159s @singledispatch 1159s def as_cupy(val, typ=None): 1159s """ 1159s Rough conversion function 1159s 1159s Will try to infer target type from input type if not specified. 1159s """ 1159s if typ is None: 1159s typ = resolve_cupy_type(val) 1159s 1159s if issubclass(typ, CupyArray): 1159s > import cupy as cp 1159s E ModuleNotFoundError: No module named 'cupy' 1159s 1159s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:1010: ModuleNotFoundError 1159s __________________ test_as_dask_functions[cupy_csr-cupy_csr] ___________________ 1159s 1159s input_type = functools.partial(, typ=) 1159s as_dask_type = 1159s mem_type = 1159s 1159s @pytest.mark.parametrize( 1159s "input_type", BASE_MATRIX_PARAMS + DASK_MATRIX_PARAMS + CUPY_MATRIX_PARAMS 1159s ) 1159s @pytest.mark.parametrize( 1159s ( 1159s "as_dask_type", 1159s "mem_type", 1159s ), 1159s [ 1159s pytest.param( 1159s as_dense_cupy_dask_array, CupyArray, id="cupy_dense", marks=pytest.mark.gpu 1159s ), 1159s pytest.param(as_dense_dask_array, np.ndarray, id="numpy_dense"), 1159s pytest.param( 1159s as_cupy_sparse_dask_array, 1159s CupyCSRMatrix, 1159s id="cupy_csr", 1159s marks=pytest.mark.gpu, 1159s ), 1159s ], 1159s ) 1159s def test_as_dask_functions(input_type, as_dask_type, mem_type): 1159s SHAPE = (1000, 100) 1159s 1159s rng = np.random.default_rng(42) 1159s X_source = rng.poisson(size=SHAPE).astype(np.float32) 1159s > X_input = input_type(X_source) 1159s 1159s tests/test_helpers.py:303: 1159s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1159s /usr/lib/python3.13/functools.py:934: in wrapper 1159s return dispatch(args[0].__class__)(*args, **kw) 1159s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1159s 1159s val = array([[1., 2., 3., ..., 2., 0., 3.], 1159s [0., 0., 0., ..., 1., 0., 2.], 1159s [2., 1., 3., ..., 0., 3., 1.], 1159s ...1., 0.], 1159s [0., 1., 1., ..., 0., 1., 1.], 1159s [2., 1., 3., ..., 2., 0., 1.]], shape=(1000, 100), dtype=float32) 1159s typ = 1159s 1159s @singledispatch 1159s def as_cupy(val, typ=None): 1159s """ 1159s Rough conversion function 1159s 1159s Will try to infer target type from input type if not specified. 1159s """ 1159s if typ is None: 1159s typ = resolve_cupy_type(val) 1159s 1159s if issubclass(typ, CupyArray): 1159s import cupy as cp 1159s 1159s if isinstance(val, CSMatrix): 1159s val = val.toarray() 1159s return cp.array(val) 1159s elif issubclass(typ, CupyCSRMatrix): 1159s > import cupy as cp 1159s E ModuleNotFoundError: No module named 'cupy' 1159s 1159s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:1016: ModuleNotFoundError 1159s __________________ test_as_dask_functions[cupy_csr-cupy_csc] ___________________ 1159s 1159s input_type = functools.partial(, typ=) 1159s as_dask_type = 1159s mem_type = 1159s 1159s @pytest.mark.parametrize( 1159s "input_type", BASE_MATRIX_PARAMS + DASK_MATRIX_PARAMS + CUPY_MATRIX_PARAMS 1159s ) 1159s @pytest.mark.parametrize( 1159s ( 1159s "as_dask_type", 1159s "mem_type", 1159s ), 1159s [ 1159s pytest.param( 1159s as_dense_cupy_dask_array, CupyArray, id="cupy_dense", marks=pytest.mark.gpu 1159s ), 1159s pytest.param(as_dense_dask_array, np.ndarray, id="numpy_dense"), 1159s pytest.param( 1159s as_cupy_sparse_dask_array, 1159s CupyCSRMatrix, 1159s id="cupy_csr", 1159s marks=pytest.mark.gpu, 1159s ), 1159s ], 1159s ) 1159s def test_as_dask_functions(input_type, as_dask_type, mem_type): 1159s SHAPE = (1000, 100) 1159s 1159s rng = np.random.default_rng(42) 1159s X_source = rng.poisson(size=SHAPE).astype(np.float32) 1159s > X_input = input_type(X_source) 1159s 1159s tests/test_helpers.py:303: 1159s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1159s /usr/lib/python3.13/functools.py:934: in wrapper 1159s return dispatch(args[0].__class__)(*args, **kw) 1159s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1159s 1159s val = array([[1., 2., 3., ..., 2., 0., 3.], 1159s [0., 0., 0., ..., 1., 0., 2.], 1159s [2., 1., 3., ..., 0., 3., 1.], 1159s ...1., 0.], 1159s [0., 1., 1., ..., 0., 1., 1.], 1159s [2., 1., 3., ..., 2., 0., 1.]], shape=(1000, 100), dtype=float32) 1159s typ = 1159s 1159s @singledispatch 1159s def as_cupy(val, typ=None): 1159s """ 1159s Rough conversion function 1159s 1159s Will try to infer target type from input type if not specified. 1159s """ 1159s if typ is None: 1159s typ = resolve_cupy_type(val) 1159s 1159s if issubclass(typ, CupyArray): 1159s import cupy as cp 1159s 1159s if isinstance(val, CSMatrix): 1159s val = val.toarray() 1159s return cp.array(val) 1159s elif issubclass(typ, CupyCSRMatrix): 1159s import cupy as cp 1159s import cupyx.scipy.sparse as cpsparse 1159s 1159s if isinstance(val, np.ndarray): 1159s return cpsparse.csr_matrix(cp.array(val)) 1159s else: 1159s return cpsparse.csr_matrix(val) 1159s elif issubclass(typ, CupyCSCMatrix): 1159s > import cupy as cp 1159s E ModuleNotFoundError: No module named 'cupy' 1159s 1159s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:1024: ModuleNotFoundError 1159s _____________________ test_as_cupy_dask[dense_dask_array] ______________________ 1159s 1159s dask_matrix_type = 1159s 1159s @pytest.mark.parametrize( 1159s "dask_matrix_type", 1159s DASK_MATRIX_PARAMS, 1159s ) 1159s @pytest.mark.gpu 1159s def test_as_cupy_dask(dask_matrix_type): 1159s SHAPE = (100, 10) 1159s rng = np.random.default_rng(42) 1159s X_cpu = dask_matrix_type(rng.normal(size=SHAPE)) 1159s X_gpu_roundtripped = as_cupy(X_cpu).map_blocks(lambda x: x.get(), meta=X_cpu._meta) 1159s assert isinstance(X_gpu_roundtripped._meta, type(X_cpu._meta)) 1159s > assert isinstance(X_gpu_roundtripped.compute(), type(X_cpu.compute())) 1159s 1159s tests/test_helpers.py:327: 1159s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1159s /usr/lib/python3/dist-packages/dask/base.py:372: in compute 1159s (result,) = compute(self, traverse=False, **kwargs) 1159s /usr/lib/python3/dist-packages/dask/base.py:660: in compute 1159s results = schedule(dsk, keys, **kwargs) 1159s /usr/lib/python3.13/functools.py:934: in wrapper 1159s return dispatch(args[0].__class__)(*args, **kw) 1159s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1159s 1159s val = array([[ 1.36386223, 0.89518498, -0.71948023, -1.50250346, -2.96452884], 1159s [-1.56095835, -0.29732336, 0.0994774...526, 0.22948172, 0.73558309, 0.37438645], 1159s [ 0.87055561, 1.47927451, 1.79437005, 1.31480787, -0.10973418]]) 1159s typ = 1159s 1159s @singledispatch 1159s def as_cupy(val, typ=None): 1159s """ 1159s Rough conversion function 1159s 1159s Will try to infer target type from input type if not specified. 1159s """ 1159s if typ is None: 1159s typ = resolve_cupy_type(val) 1159s 1159s if issubclass(typ, CupyArray): 1159s > import cupy as cp 1159s E ModuleNotFoundError: No module named 'cupy' 1159s 1159s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:1010: ModuleNotFoundError 1159s _____________________ test_as_cupy_dask[sparse_dask_array] _____________________ 1159s 1159s dask_matrix_type = 1159s 1159s @pytest.mark.parametrize( 1159s "dask_matrix_type", 1159s DASK_MATRIX_PARAMS, 1159s ) 1159s @pytest.mark.gpu 1159s def test_as_cupy_dask(dask_matrix_type): 1159s SHAPE = (100, 10) 1159s rng = np.random.default_rng(42) 1159s X_cpu = dask_matrix_type(rng.normal(size=SHAPE)) 1159s X_gpu_roundtripped = as_cupy(X_cpu).map_blocks(lambda x: x.get(), meta=X_cpu._meta) 1159s assert isinstance(X_gpu_roundtripped._meta, type(X_cpu._meta)) 1159s > assert isinstance(X_gpu_roundtripped.compute(), type(X_cpu.compute())) 1159s 1159s tests/test_helpers.py:327: 1159s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1159s /usr/lib/python3/dist-packages/dask/base.py:372: in compute 1159s (result,) = compute(self, traverse=False, **kwargs) 1159s /usr/lib/python3/dist-packages/dask/base.py:660: in compute 1159s results = schedule(dsk, keys, **kwargs) 1159s /usr/lib/python3.13/functools.py:934: in wrapper 1159s return dispatch(args[0].__class__)(*args, **kw) 1159s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1159s 1159s val = 1159s typ = 1159s 1159s @singledispatch 1159s def as_cupy(val, typ=None): 1159s """ 1159s Rough conversion function 1159s 1159s Will try to infer target type from input type if not specified. 1159s """ 1159s if typ is None: 1159s typ = resolve_cupy_type(val) 1159s 1159s if issubclass(typ, CupyArray): 1159s import cupy as cp 1159s 1159s if isinstance(val, CSMatrix): 1159s val = val.toarray() 1159s return cp.array(val) 1159s elif issubclass(typ, CupyCSRMatrix): 1159s > import cupy as cp 1159s E ModuleNotFoundError: No module named 'cupy' 1159s 1159s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:1016: ModuleNotFoundError 1159s __________________ test_io_spec_cupy[h5ad-False-value0-array] __________________ 1159s 1159s store = , value = array([1, 2, 3]) 1159s encoding_type = 'array', as_dask = False 1159s 1159s @pytest.mark.gpu 1159s @pytest.mark.parametrize( 1159s ("value", "encoding_type"), 1159s [ 1159s (np.array([1, 2, 3]), "array"), 1159s (np.arange(12).reshape(4, 3), "array"), 1159s (sparse.random(5, 3, format="csr", density=0.5), "csr_matrix"), 1159s (sparse.random(5, 3, format="csc", density=0.5), "csc_matrix"), 1159s ], 1159s ) 1159s @pytest.mark.parametrize("as_dask", [False, True]) 1159s def test_io_spec_cupy(store, value, encoding_type, as_dask): 1159s if as_dask: 1159s if isinstance(value, CSMatrix): 1159s value = as_cupy_sparse_dask_array(value, format=encoding_type[:3]) 1159s else: 1159s value = as_dense_cupy_dask_array(value) 1159s else: 1159s > value = as_cupy(value) 1159s 1159s tests/test_io_elementwise.py:265: 1159s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1159s /usr/lib/python3.13/functools.py:934: in wrapper 1159s return dispatch(args[0].__class__)(*args, **kw) 1159s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1159s 1159s val = array([1, 2, 3]), typ = 1159s 1159s @singledispatch 1159s def as_cupy(val, typ=None): 1159s """ 1159s Rough conversion function 1159s 1159s Will try to infer target type from input type if not specified. 1159s """ 1159s if typ is None: 1159s typ = resolve_cupy_type(val) 1159s 1159s if issubclass(typ, CupyArray): 1159s > import cupy as cp 1159s E ModuleNotFoundError: No module named 'cupy' 1159s 1159s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:1010: ModuleNotFoundError 1159s __________________ test_io_spec_cupy[h5ad-False-value1-array] __________________ 1159s 1159s store = 1159s value = array([[ 0, 1, 2], 1159s [ 3, 4, 5], 1159s [ 6, 7, 8], 1159s [ 9, 10, 11]]) 1159s encoding_type = 'array', as_dask = False 1159s 1159s @pytest.mark.gpu 1159s @pytest.mark.parametrize( 1159s ("value", "encoding_type"), 1159s [ 1159s (np.array([1, 2, 3]), "array"), 1159s (np.arange(12).reshape(4, 3), "array"), 1159s (sparse.random(5, 3, format="csr", density=0.5), "csr_matrix"), 1159s (sparse.random(5, 3, format="csc", density=0.5), "csc_matrix"), 1159s ], 1159s ) 1159s @pytest.mark.parametrize("as_dask", [False, True]) 1159s def test_io_spec_cupy(store, value, encoding_type, as_dask): 1159s if as_dask: 1159s if isinstance(value, CSMatrix): 1159s value = as_cupy_sparse_dask_array(value, format=encoding_type[:3]) 1159s else: 1159s value = as_dense_cupy_dask_array(value) 1159s else: 1159s > value = as_cupy(value) 1159s 1159s tests/test_io_elementwise.py:265: 1159s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1159s /usr/lib/python3.13/functools.py:934: in wrapper 1159s return dispatch(args[0].__class__)(*args, **kw) 1159s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1159s 1159s val = array([[ 0, 1, 2], 1159s [ 3, 4, 5], 1159s [ 6, 7, 8], 1159s [ 9, 10, 11]]) 1159s typ = 1159s 1159s @singledispatch 1159s def as_cupy(val, typ=None): 1159s """ 1159s Rough conversion function 1159s 1159s Will try to infer target type from input type if not specified. 1159s """ 1159s if typ is None: 1159s typ = resolve_cupy_type(val) 1159s 1159s if issubclass(typ, CupyArray): 1159s > import cupy as cp 1159s E ModuleNotFoundError: No module named 'cupy' 1159s 1159s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:1010: ModuleNotFoundError 1159s _______________ test_io_spec_cupy[h5ad-False-value2-csr_matrix] ________________ 1159s 1159s store = 1159s value = 1159s encoding_type = 'csr_matrix', as_dask = False 1159s 1159s @pytest.mark.gpu 1159s @pytest.mark.parametrize( 1159s ("value", "encoding_type"), 1159s [ 1159s (np.array([1, 2, 3]), "array"), 1159s (np.arange(12).reshape(4, 3), "array"), 1159s (sparse.random(5, 3, format="csr", density=0.5), "csr_matrix"), 1159s (sparse.random(5, 3, format="csc", density=0.5), "csc_matrix"), 1159s ], 1159s ) 1159s @pytest.mark.parametrize("as_dask", [False, True]) 1159s def test_io_spec_cupy(store, value, encoding_type, as_dask): 1159s if as_dask: 1159s if isinstance(value, CSMatrix): 1159s value = as_cupy_sparse_dask_array(value, format=encoding_type[:3]) 1159s else: 1159s value = as_dense_cupy_dask_array(value) 1159s else: 1159s > value = as_cupy(value) 1159s 1159s tests/test_io_elementwise.py:265: 1159s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1159s /usr/lib/python3.13/functools.py:934: in wrapper 1159s return dispatch(args[0].__class__)(*args, **kw) 1159s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1159s 1159s val = 1159s typ = 1159s 1159s @singledispatch 1159s def as_cupy(val, typ=None): 1159s """ 1159s Rough conversion function 1159s 1159s Will try to infer target type from input type if not specified. 1159s """ 1159s if typ is None: 1159s typ = resolve_cupy_type(val) 1159s 1159s if issubclass(typ, CupyArray): 1159s import cupy as cp 1159s 1159s if isinstance(val, CSMatrix): 1159s val = val.toarray() 1159s return cp.array(val) 1159s elif issubclass(typ, CupyCSRMatrix): 1159s > import cupy as cp 1159s E ModuleNotFoundError: No module named 'cupy' 1159s 1159s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:1016: ModuleNotFoundError 1159s _______________ test_io_spec_cupy[h5ad-False-value3-csc_matrix] ________________ 1159s 1159s store = 1159s value = 1159s encoding_type = 'csc_matrix', as_dask = False 1159s 1159s @pytest.mark.gpu 1159s @pytest.mark.parametrize( 1159s ("value", "encoding_type"), 1159s [ 1159s (np.array([1, 2, 3]), "array"), 1159s (np.arange(12).reshape(4, 3), "array"), 1159s (sparse.random(5, 3, format="csr", density=0.5), "csr_matrix"), 1159s (sparse.random(5, 3, format="csc", density=0.5), "csc_matrix"), 1159s ], 1159s ) 1159s @pytest.mark.parametrize("as_dask", [False, True]) 1159s def test_io_spec_cupy(store, value, encoding_type, as_dask): 1159s if as_dask: 1159s if isinstance(value, CSMatrix): 1159s value = as_cupy_sparse_dask_array(value, format=encoding_type[:3]) 1159s else: 1159s value = as_dense_cupy_dask_array(value) 1159s else: 1159s > value = as_cupy(value) 1159s 1159s tests/test_io_elementwise.py:265: 1159s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1159s /usr/lib/python3.13/functools.py:934: in wrapper 1159s return dispatch(args[0].__class__)(*args, **kw) 1159s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1159s 1159s val = 1159s typ = 1159s 1159s @singledispatch 1159s def as_cupy(val, typ=None): 1159s """ 1159s Rough conversion function 1159s 1159s Will try to infer target type from input type if not specified. 1159s """ 1159s if typ is None: 1159s typ = resolve_cupy_type(val) 1159s 1159s if issubclass(typ, CupyArray): 1159s import cupy as cp 1159s 1159s if isinstance(val, CSMatrix): 1159s val = val.toarray() 1159s return cp.array(val) 1159s elif issubclass(typ, CupyCSRMatrix): 1159s import cupy as cp 1159s import cupyx.scipy.sparse as cpsparse 1159s 1159s if isinstance(val, np.ndarray): 1159s return cpsparse.csr_matrix(cp.array(val)) 1159s else: 1159s return cpsparse.csr_matrix(val) 1159s elif issubclass(typ, CupyCSCMatrix): 1159s > import cupy as cp 1159s E ModuleNotFoundError: No module named 'cupy' 1159s 1159s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:1024: ModuleNotFoundError 1159s __________________ test_io_spec_cupy[h5ad-True-value0-array] ___________________ 1159s 1159s store = , value = array([1, 2, 3]) 1159s encoding_type = 'array', as_dask = True 1159s 1159s @pytest.mark.gpu 1159s @pytest.mark.parametrize( 1159s ("value", "encoding_type"), 1159s [ 1159s (np.array([1, 2, 3]), "array"), 1159s (np.arange(12).reshape(4, 3), "array"), 1159s (sparse.random(5, 3, format="csr", density=0.5), "csr_matrix"), 1159s (sparse.random(5, 3, format="csc", density=0.5), "csc_matrix"), 1159s ], 1159s ) 1159s @pytest.mark.parametrize("as_dask", [False, True]) 1159s def test_io_spec_cupy(store, value, encoding_type, as_dask): 1159s if as_dask: 1159s if isinstance(value, CSMatrix): 1159s value = as_cupy_sparse_dask_array(value, format=encoding_type[:3]) 1159s else: 1159s > value = as_dense_cupy_dask_array(value) 1159s 1159s tests/test_io_elementwise.py:263: 1159s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1159s /usr/lib/python3.13/functools.py:934: in wrapper 1159s return dispatch(args[0].__class__)(*args, **kw) 1159s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1159s 1159s a = array([1, 2, 3]) 1159s 1159s @singledispatch 1159s def as_dense_cupy_dask_array(a): 1159s > import cupy as cp 1159s E ModuleNotFoundError: No module named 'cupy' 1159s 1159s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:882: ModuleNotFoundError 1159s __________________ test_io_spec_cupy[h5ad-True-value1-array] ___________________ 1159s 1159s store = 1159s value = array([[ 0, 1, 2], 1159s [ 3, 4, 5], 1159s [ 6, 7, 8], 1159s [ 9, 10, 11]]) 1159s encoding_type = 'array', as_dask = True 1159s 1159s @pytest.mark.gpu 1159s @pytest.mark.parametrize( 1159s ("value", "encoding_type"), 1159s [ 1159s (np.array([1, 2, 3]), "array"), 1159s (np.arange(12).reshape(4, 3), "array"), 1159s (sparse.random(5, 3, format="csr", density=0.5), "csr_matrix"), 1159s (sparse.random(5, 3, format="csc", density=0.5), "csc_matrix"), 1159s ], 1159s ) 1159s @pytest.mark.parametrize("as_dask", [False, True]) 1159s def test_io_spec_cupy(store, value, encoding_type, as_dask): 1159s if as_dask: 1159s if isinstance(value, CSMatrix): 1159s value = as_cupy_sparse_dask_array(value, format=encoding_type[:3]) 1159s else: 1159s > value = as_dense_cupy_dask_array(value) 1159s 1159s tests/test_io_elementwise.py:263: 1159s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1159s /usr/lib/python3.13/functools.py:934: in wrapper 1159s return dispatch(args[0].__class__)(*args, **kw) 1159s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1159s 1159s a = array([[ 0, 1, 2], 1159s [ 3, 4, 5], 1159s [ 6, 7, 8], 1159s [ 9, 10, 11]]) 1159s 1159s @singledispatch 1159s def as_dense_cupy_dask_array(a): 1159s > import cupy as cp 1159s E ModuleNotFoundError: No module named 'cupy' 1159s 1159s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:882: ModuleNotFoundError 1159s ________________ test_io_spec_cupy[h5ad-True-value2-csr_matrix] ________________ 1159s 1159s store = 1159s value = 1159s encoding_type = 'csr_matrix', as_dask = True 1159s 1159s @pytest.mark.gpu 1159s @pytest.mark.parametrize( 1159s ("value", "encoding_type"), 1159s [ 1159s (np.array([1, 2, 3]), "array"), 1159s (np.arange(12).reshape(4, 3), "array"), 1159s (sparse.random(5, 3, format="csr", density=0.5), "csr_matrix"), 1159s (sparse.random(5, 3, format="csc", density=0.5), "csc_matrix"), 1159s ], 1159s ) 1159s @pytest.mark.parametrize("as_dask", [False, True]) 1159s def test_io_spec_cupy(store, value, encoding_type, as_dask): 1159s if as_dask: 1159s if isinstance(value, CSMatrix): 1159s > value = as_cupy_sparse_dask_array(value, format=encoding_type[:3]) 1159s 1159s tests/test_io_elementwise.py:261: 1159s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1159s /usr/lib/python3.13/functools.py:934: in wrapper 1159s return dispatch(args[0].__class__)(*args, **kw) 1159s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1159s 1159s a = 1159s format = 'csr' 1159s 1159s @singledispatch 1159s def as_cupy_sparse_dask_array(a, format="csr"): 1159s > memory_class = format_to_memory_class[format] 1159s E KeyError: 'csr' 1159s 1159s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:926: KeyError 1159s ________________ test_io_spec_cupy[h5ad-True-value3-csc_matrix] ________________ 1159s 1159s store = 1159s value = 1159s encoding_type = 'csc_matrix', as_dask = True 1159s 1159s @pytest.mark.gpu 1159s @pytest.mark.parametrize( 1159s ("value", "encoding_type"), 1159s [ 1159s (np.array([1, 2, 3]), "array"), 1159s (np.arange(12).reshape(4, 3), "array"), 1159s (sparse.random(5, 3, format="csr", density=0.5), "csr_matrix"), 1159s (sparse.random(5, 3, format="csc", density=0.5), "csc_matrix"), 1159s ], 1159s ) 1159s @pytest.mark.parametrize("as_dask", [False, True]) 1159s def test_io_spec_cupy(store, value, encoding_type, as_dask): 1159s if as_dask: 1159s if isinstance(value, CSMatrix): 1159s > value = as_cupy_sparse_dask_array(value, format=encoding_type[:3]) 1159s 1159s tests/test_io_elementwise.py:261: 1159s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1159s /usr/lib/python3.13/functools.py:934: in wrapper 1159s return dispatch(args[0].__class__)(*args, **kw) 1159s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1159s 1159s a = 1159s format = 'csc' 1159s 1159s @singledispatch 1159s def as_cupy_sparse_dask_array(a, format="csr"): 1159s > memory_class = format_to_memory_class[format] 1159s E KeyError: 'csc' 1159s 1159s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:926: KeyError 1159s _________________ test_io_spec_cupy[zarr2-False-value0-array] __________________ 1159s 1159s store = 1159s value = array([1, 2, 3]), encoding_type = 'array', as_dask = False 1159s 1159s @pytest.mark.gpu 1159s @pytest.mark.parametrize( 1159s ("value", "encoding_type"), 1159s [ 1159s (np.array([1, 2, 3]), "array"), 1159s (np.arange(12).reshape(4, 3), "array"), 1159s (sparse.random(5, 3, format="csr", density=0.5), "csr_matrix"), 1159s (sparse.random(5, 3, format="csc", density=0.5), "csc_matrix"), 1159s ], 1159s ) 1159s @pytest.mark.parametrize("as_dask", [False, True]) 1159s def test_io_spec_cupy(store, value, encoding_type, as_dask): 1159s if as_dask: 1159s if isinstance(value, CSMatrix): 1159s value = as_cupy_sparse_dask_array(value, format=encoding_type[:3]) 1159s else: 1159s value = as_dense_cupy_dask_array(value) 1159s else: 1159s > value = as_cupy(value) 1159s 1159s tests/test_io_elementwise.py:265: 1159s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1159s /usr/lib/python3.13/functools.py:934: in wrapper 1159s return dispatch(args[0].__class__)(*args, **kw) 1159s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1159s 1159s val = array([1, 2, 3]), typ = 1159s 1159s @singledispatch 1159s def as_cupy(val, typ=None): 1159s """ 1159s Rough conversion function 1159s 1159s Will try to infer target type from input type if not specified. 1159s """ 1159s if typ is None: 1159s typ = resolve_cupy_type(val) 1159s 1159s if issubclass(typ, CupyArray): 1159s > import cupy as cp 1159s E ModuleNotFoundError: No module named 'cupy' 1159s 1159s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:1010: ModuleNotFoundError 1159s _________________ test_io_spec_cupy[zarr2-False-value1-array] __________________ 1159s 1159s store = 1159s value = array([[ 0, 1, 2], 1159s [ 3, 4, 5], 1159s [ 6, 7, 8], 1159s [ 9, 10, 11]]) 1159s encoding_type = 'array', as_dask = False 1159s 1159s @pytest.mark.gpu 1159s @pytest.mark.parametrize( 1159s ("value", "encoding_type"), 1159s [ 1159s (np.array([1, 2, 3]), "array"), 1159s (np.arange(12).reshape(4, 3), "array"), 1159s (sparse.random(5, 3, format="csr", density=0.5), "csr_matrix"), 1159s (sparse.random(5, 3, format="csc", density=0.5), "csc_matrix"), 1159s ], 1159s ) 1159s @pytest.mark.parametrize("as_dask", [False, True]) 1159s def test_io_spec_cupy(store, value, encoding_type, as_dask): 1159s if as_dask: 1159s if isinstance(value, CSMatrix): 1159s value = as_cupy_sparse_dask_array(value, format=encoding_type[:3]) 1159s else: 1159s value = as_dense_cupy_dask_array(value) 1159s else: 1159s > value = as_cupy(value) 1159s 1159s tests/test_io_elementwise.py:265: 1159s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1159s /usr/lib/python3.13/functools.py:934: in wrapper 1159s return dispatch(args[0].__class__)(*args, **kw) 1159s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1159s 1159s val = array([[ 0, 1, 2], 1159s [ 3, 4, 5], 1159s [ 6, 7, 8], 1159s [ 9, 10, 11]]) 1159s typ = 1159s 1159s @singledispatch 1159s def as_cupy(val, typ=None): 1159s """ 1159s Rough conversion function 1159s 1159s Will try to infer target type from input type if not specified. 1159s """ 1159s if typ is None: 1159s typ = resolve_cupy_type(val) 1159s 1159s if issubclass(typ, CupyArray): 1159s > import cupy as cp 1159s E ModuleNotFoundError: No module named 'cupy' 1159s 1159s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:1010: ModuleNotFoundError 1159s _______________ test_io_spec_cupy[zarr2-False-value2-csr_matrix] _______________ 1159s 1159s store = 1159s value = 1159s encoding_type = 'csr_matrix', as_dask = False 1159s 1159s @pytest.mark.gpu 1159s @pytest.mark.parametrize( 1159s ("value", "encoding_type"), 1159s [ 1159s (np.array([1, 2, 3]), "array"), 1159s (np.arange(12).reshape(4, 3), "array"), 1159s (sparse.random(5, 3, format="csr", density=0.5), "csr_matrix"), 1159s (sparse.random(5, 3, format="csc", density=0.5), "csc_matrix"), 1159s ], 1159s ) 1159s @pytest.mark.parametrize("as_dask", [False, True]) 1159s def test_io_spec_cupy(store, value, encoding_type, as_dask): 1159s if as_dask: 1159s if isinstance(value, CSMatrix): 1159s value = as_cupy_sparse_dask_array(value, format=encoding_type[:3]) 1159s else: 1159s value = as_dense_cupy_dask_array(value) 1159s else: 1159s > value = as_cupy(value) 1159s 1159s tests/test_io_elementwise.py:265: 1159s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1159s /usr/lib/python3.13/functools.py:934: in wrapper 1159s return dispatch(args[0].__class__)(*args, **kw) 1159s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1159s 1159s val = 1159s typ = 1159s 1159s @singledispatch 1159s def as_cupy(val, typ=None): 1159s """ 1159s Rough conversion function 1159s 1159s Will try to infer target type from input type if not specified. 1159s """ 1159s if typ is None: 1159s typ = resolve_cupy_type(val) 1159s 1159s if issubclass(typ, CupyArray): 1159s import cupy as cp 1159s 1159s if isinstance(val, CSMatrix): 1159s val = val.toarray() 1159s return cp.array(val) 1159s elif issubclass(typ, CupyCSRMatrix): 1159s > import cupy as cp 1159s E ModuleNotFoundError: No module named 'cupy' 1159s 1159s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:1016: ModuleNotFoundError 1159s _______________ test_io_spec_cupy[zarr2-False-value3-csc_matrix] _______________ 1159s 1159s store = 1159s value = 1159s encoding_type = 'csc_matrix', as_dask = False 1159s 1159s @pytest.mark.gpu 1159s @pytest.mark.parametrize( 1159s ("value", "encoding_type"), 1159s [ 1159s (np.array([1, 2, 3]), "array"), 1159s (np.arange(12).reshape(4, 3), "array"), 1159s (sparse.random(5, 3, format="csr", density=0.5), "csr_matrix"), 1159s (sparse.random(5, 3, format="csc", density=0.5), "csc_matrix"), 1159s ], 1159s ) 1159s @pytest.mark.parametrize("as_dask", [False, True]) 1159s def test_io_spec_cupy(store, value, encoding_type, as_dask): 1159s if as_dask: 1159s if isinstance(value, CSMatrix): 1159s value = as_cupy_sparse_dask_array(value, format=encoding_type[:3]) 1159s else: 1159s value = as_dense_cupy_dask_array(value) 1159s else: 1159s > value = as_cupy(value) 1159s 1159s tests/test_io_elementwise.py:265: 1159s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1159s /usr/lib/python3.13/functools.py:934: in wrapper 1159s return dispatch(args[0].__class__)(*args, **kw) 1159s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1159s 1159s val = 1159s typ = 1159s 1159s @singledispatch 1159s def as_cupy(val, typ=None): 1159s """ 1159s Rough conversion function 1159s 1159s Will try to infer target type from input type if not specified. 1159s """ 1159s if typ is None: 1159s typ = resolve_cupy_type(val) 1159s 1159s if issubclass(typ, CupyArray): 1159s import cupy as cp 1159s 1159s if isinstance(val, CSMatrix): 1159s val = val.toarray() 1159s return cp.array(val) 1159s elif issubclass(typ, CupyCSRMatrix): 1159s import cupy as cp 1159s import cupyx.scipy.sparse as cpsparse 1159s 1159s if isinstance(val, np.ndarray): 1159s return cpsparse.csr_matrix(cp.array(val)) 1159s else: 1159s return cpsparse.csr_matrix(val) 1159s elif issubclass(typ, CupyCSCMatrix): 1159s > import cupy as cp 1159s E ModuleNotFoundError: No module named 'cupy' 1159s 1159s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:1024: ModuleNotFoundError 1159s __________________ test_io_spec_cupy[zarr2-True-value0-array] __________________ 1159s 1159s store = 1159s value = array([1, 2, 3]), encoding_type = 'array', as_dask = True 1159s 1159s @pytest.mark.gpu 1159s @pytest.mark.parametrize( 1159s ("value", "encoding_type"), 1159s [ 1159s (np.array([1, 2, 3]), "array"), 1159s (np.arange(12).reshape(4, 3), "array"), 1159s (sparse.random(5, 3, format="csr", density=0.5), "csr_matrix"), 1159s (sparse.random(5, 3, format="csc", density=0.5), "csc_matrix"), 1159s ], 1159s ) 1159s @pytest.mark.parametrize("as_dask", [False, True]) 1159s def test_io_spec_cupy(store, value, encoding_type, as_dask): 1159s if as_dask: 1159s if isinstance(value, CSMatrix): 1159s value = as_cupy_sparse_dask_array(value, format=encoding_type[:3]) 1159s else: 1159s > value = as_dense_cupy_dask_array(value) 1159s 1159s tests/test_io_elementwise.py:263: 1159s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1159s /usr/lib/python3.13/functools.py:934: in wrapper 1159s return dispatch(args[0].__class__)(*args, **kw) 1159s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1159s 1159s a = array([1, 2, 3]) 1159s 1159s @singledispatch 1159s def as_dense_cupy_dask_array(a): 1159s > import cupy as cp 1159s E ModuleNotFoundError: No module named 'cupy' 1159s 1159s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:882: ModuleNotFoundError 1159s __________________ test_io_spec_cupy[zarr2-True-value1-array] __________________ 1159s 1159s store = 1159s value = array([[ 0, 1, 2], 1159s [ 3, 4, 5], 1159s [ 6, 7, 8], 1159s [ 9, 10, 11]]) 1159s encoding_type = 'array', as_dask = True 1159s 1159s @pytest.mark.gpu 1159s @pytest.mark.parametrize( 1159s ("value", "encoding_type"), 1159s [ 1159s (np.array([1, 2, 3]), "array"), 1159s (np.arange(12).reshape(4, 3), "array"), 1159s (sparse.random(5, 3, format="csr", density=0.5), "csr_matrix"), 1159s (sparse.random(5, 3, format="csc", density=0.5), "csc_matrix"), 1159s ], 1159s ) 1159s @pytest.mark.parametrize("as_dask", [False, True]) 1159s def test_io_spec_cupy(store, value, encoding_type, as_dask): 1159s if as_dask: 1159s if isinstance(value, CSMatrix): 1159s value = as_cupy_sparse_dask_array(value, format=encoding_type[:3]) 1159s else: 1159s > value = as_dense_cupy_dask_array(value) 1159s 1159s tests/test_io_elementwise.py:263: 1159s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1159s /usr/lib/python3.13/functools.py:934: in wrapper 1159s return dispatch(args[0].__class__)(*args, **kw) 1159s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1159s 1159s a = array([[ 0, 1, 2], 1159s [ 3, 4, 5], 1159s [ 6, 7, 8], 1159s [ 9, 10, 11]]) 1159s 1159s @singledispatch 1159s def as_dense_cupy_dask_array(a): 1159s > import cupy as cp 1159s E ModuleNotFoundError: No module named 'cupy' 1159s 1159s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:882: ModuleNotFoundError 1159s _______________ test_io_spec_cupy[zarr2-True-value2-csr_matrix] ________________ 1159s 1159s store = 1159s value = 1159s encoding_type = 'csr_matrix', as_dask = True 1159s 1159s @pytest.mark.gpu 1159s @pytest.mark.parametrize( 1159s ("value", "encoding_type"), 1159s [ 1159s (np.array([1, 2, 3]), "array"), 1159s (np.arange(12).reshape(4, 3), "array"), 1159s (sparse.random(5, 3, format="csr", density=0.5), "csr_matrix"), 1159s (sparse.random(5, 3, format="csc", density=0.5), "csc_matrix"), 1159s ], 1159s ) 1159s @pytest.mark.parametrize("as_dask", [False, True]) 1159s def test_io_spec_cupy(store, value, encoding_type, as_dask): 1159s if as_dask: 1159s if isinstance(value, CSMatrix): 1159s > value = as_cupy_sparse_dask_array(value, format=encoding_type[:3]) 1159s 1159s tests/test_io_elementwise.py:261: 1159s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1159s /usr/lib/python3.13/functools.py:934: in wrapper 1159s return dispatch(args[0].__class__)(*args, **kw) 1159s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1159s 1159s a = 1159s format = 'csr' 1159s 1159s @singledispatch 1159s def as_cupy_sparse_dask_array(a, format="csr"): 1159s > memory_class = format_to_memory_class[format] 1159s E KeyError: 'csr' 1159s 1159s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:926: KeyError 1159s _______________ test_io_spec_cupy[zarr2-True-value3-csc_matrix] ________________ 1159s 1159s store = 1159s value = 1159s encoding_type = 'csc_matrix', as_dask = True 1159s 1159s @pytest.mark.gpu 1159s @pytest.mark.parametrize( 1159s ("value", "encoding_type"), 1159s [ 1159s (np.array([1, 2, 3]), "array"), 1159s (np.arange(12).reshape(4, 3), "array"), 1159s (sparse.random(5, 3, format="csr", density=0.5), "csr_matrix"), 1159s (sparse.random(5, 3, format="csc", density=0.5), "csc_matrix"), 1159s ], 1159s ) 1159s @pytest.mark.parametrize("as_dask", [False, True]) 1159s def test_io_spec_cupy(store, value, encoding_type, as_dask): 1159s if as_dask: 1159s if isinstance(value, CSMatrix): 1159s > value = as_cupy_sparse_dask_array(value, format=encoding_type[:3]) 1159s 1159s tests/test_io_elementwise.py:261: 1159s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1159s /usr/lib/python3.13/functools.py:934: in wrapper 1159s return dispatch(args[0].__class__)(*args, **kw) 1159s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1159s 1159s a = 1159s format = 'csc' 1159s 1159s @singledispatch 1159s def as_cupy_sparse_dask_array(a, format="csr"): 1159s > memory_class = format_to_memory_class[format] 1159s E KeyError: 'csc' 1159s 1159s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:926: KeyError 1159s _________________ test_io_spec_cupy[zarr3-False-value0-array] __________________ 1159s 1159s store = 1159s value = array([1, 2, 3]), encoding_type = 'array', as_dask = False 1159s 1159s @pytest.mark.gpu 1159s @pytest.mark.parametrize( 1159s ("value", "encoding_type"), 1159s [ 1159s (np.array([1, 2, 3]), "array"), 1159s (np.arange(12).reshape(4, 3), "array"), 1159s (sparse.random(5, 3, format="csr", density=0.5), "csr_matrix"), 1159s (sparse.random(5, 3, format="csc", density=0.5), "csc_matrix"), 1159s ], 1159s ) 1159s @pytest.mark.parametrize("as_dask", [False, True]) 1159s def test_io_spec_cupy(store, value, encoding_type, as_dask): 1159s if as_dask: 1159s if isinstance(value, CSMatrix): 1159s value = as_cupy_sparse_dask_array(value, format=encoding_type[:3]) 1159s else: 1159s value = as_dense_cupy_dask_array(value) 1159s else: 1159s > value = as_cupy(value) 1159s 1159s tests/test_io_elementwise.py:265: 1159s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1159s /usr/lib/python3.13/functools.py:934: in wrapper 1159s return dispatch(args[0].__class__)(*args, **kw) 1159s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1159s 1159s val = array([1, 2, 3]), typ = 1159s 1159s @singledispatch 1159s def as_cupy(val, typ=None): 1159s """ 1159s Rough conversion function 1159s 1159s Will try to infer target type from input type if not specified. 1159s """ 1159s if typ is None: 1159s typ = resolve_cupy_type(val) 1159s 1159s if issubclass(typ, CupyArray): 1159s > import cupy as cp 1159s E ModuleNotFoundError: No module named 'cupy' 1159s 1159s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:1010: ModuleNotFoundError 1159s _________________ test_io_spec_cupy[zarr3-False-value1-array] __________________ 1159s 1159s store = 1159s value = array([[ 0, 1, 2], 1159s [ 3, 4, 5], 1159s [ 6, 7, 8], 1159s [ 9, 10, 11]]) 1159s encoding_type = 'array', as_dask = False 1159s 1159s @pytest.mark.gpu 1159s @pytest.mark.parametrize( 1159s ("value", "encoding_type"), 1159s [ 1159s (np.array([1, 2, 3]), "array"), 1159s (np.arange(12).reshape(4, 3), "array"), 1159s (sparse.random(5, 3, format="csr", density=0.5), "csr_matrix"), 1159s (sparse.random(5, 3, format="csc", density=0.5), "csc_matrix"), 1159s ], 1159s ) 1159s @pytest.mark.parametrize("as_dask", [False, True]) 1159s def test_io_spec_cupy(store, value, encoding_type, as_dask): 1159s if as_dask: 1159s if isinstance(value, CSMatrix): 1159s value = as_cupy_sparse_dask_array(value, format=encoding_type[:3]) 1159s else: 1159s value = as_dense_cupy_dask_array(value) 1159s else: 1159s > value = as_cupy(value) 1159s 1159s tests/test_io_elementwise.py:265: 1159s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1159s /usr/lib/python3.13/functools.py:934: in wrapper 1159s return dispatch(args[0].__class__)(*args, **kw) 1159s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1159s 1159s val = array([[ 0, 1, 2], 1159s [ 3, 4, 5], 1159s [ 6, 7, 8], 1159s [ 9, 10, 11]]) 1159s typ = 1159s 1159s @singledispatch 1159s def as_cupy(val, typ=None): 1159s """ 1159s Rough conversion function 1159s 1159s Will try to infer target type from input type if not specified. 1159s """ 1159s if typ is None: 1159s typ = resolve_cupy_type(val) 1159s 1159s if issubclass(typ, CupyArray): 1159s > import cupy as cp 1159s E ModuleNotFoundError: No module named 'cupy' 1159s 1159s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:1010: ModuleNotFoundError 1159s _______________ test_io_spec_cupy[zarr3-False-value2-csr_matrix] _______________ 1159s 1159s store = 1159s value = 1159s encoding_type = 'csr_matrix', as_dask = False 1159s 1159s @pytest.mark.gpu 1159s @pytest.mark.parametrize( 1159s ("value", "encoding_type"), 1159s [ 1159s (np.array([1, 2, 3]), "array"), 1159s (np.arange(12).reshape(4, 3), "array"), 1159s (sparse.random(5, 3, format="csr", density=0.5), "csr_matrix"), 1159s (sparse.random(5, 3, format="csc", density=0.5), "csc_matrix"), 1159s ], 1159s ) 1159s @pytest.mark.parametrize("as_dask", [False, True]) 1159s def test_io_spec_cupy(store, value, encoding_type, as_dask): 1159s if as_dask: 1159s if isinstance(value, CSMatrix): 1159s value = as_cupy_sparse_dask_array(value, format=encoding_type[:3]) 1159s else: 1159s value = as_dense_cupy_dask_array(value) 1159s else: 1159s > value = as_cupy(value) 1159s 1159s tests/test_io_elementwise.py:265: 1159s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1159s /usr/lib/python3.13/functools.py:934: in wrapper 1159s return dispatch(args[0].__class__)(*args, **kw) 1159s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1159s 1159s val = 1159s typ = 1159s 1159s @singledispatch 1159s def as_cupy(val, typ=None): 1159s """ 1159s Rough conversion function 1159s 1159s Will try to infer target type from input type if not specified. 1159s """ 1159s if typ is None: 1159s typ = resolve_cupy_type(val) 1159s 1159s if issubclass(typ, CupyArray): 1159s import cupy as cp 1159s 1159s if isinstance(val, CSMatrix): 1159s val = val.toarray() 1159s return cp.array(val) 1159s elif issubclass(typ, CupyCSRMatrix): 1159s > import cupy as cp 1159s E ModuleNotFoundError: No module named 'cupy' 1159s 1159s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:1016: ModuleNotFoundError 1159s _______________ test_io_spec_cupy[zarr3-False-value3-csc_matrix] _______________ 1159s 1159s store = 1159s value = 1159s encoding_type = 'csc_matrix', as_dask = False 1159s 1159s @pytest.mark.gpu 1159s @pytest.mark.parametrize( 1159s ("value", "encoding_type"), 1159s [ 1159s (np.array([1, 2, 3]), "array"), 1159s (np.arange(12).reshape(4, 3), "array"), 1159s (sparse.random(5, 3, format="csr", density=0.5), "csr_matrix"), 1159s (sparse.random(5, 3, format="csc", density=0.5), "csc_matrix"), 1159s ], 1159s ) 1159s @pytest.mark.parametrize("as_dask", [False, True]) 1159s def test_io_spec_cupy(store, value, encoding_type, as_dask): 1159s if as_dask: 1159s if isinstance(value, CSMatrix): 1159s value = as_cupy_sparse_dask_array(value, format=encoding_type[:3]) 1159s else: 1159s value = as_dense_cupy_dask_array(value) 1159s else: 1159s > value = as_cupy(value) 1159s 1159s tests/test_io_elementwise.py:265: 1159s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1159s /usr/lib/python3.13/functools.py:934: in wrapper 1159s return dispatch(args[0].__class__)(*args, **kw) 1159s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1159s 1159s val = 1159s typ = 1159s 1159s @singledispatch 1159s def as_cupy(val, typ=None): 1159s """ 1159s Rough conversion function 1159s 1159s Will try to infer target type from input type if not specified. 1159s """ 1159s if typ is None: 1159s typ = resolve_cupy_type(val) 1159s 1159s if issubclass(typ, CupyArray): 1159s import cupy as cp 1159s 1159s if isinstance(val, CSMatrix): 1159s val = val.toarray() 1159s return cp.array(val) 1159s elif issubclass(typ, CupyCSRMatrix): 1159s import cupy as cp 1159s import cupyx.scipy.sparse as cpsparse 1159s 1159s if isinstance(val, np.ndarray): 1159s return cpsparse.csr_matrix(cp.array(val)) 1159s else: 1159s return cpsparse.csr_matrix(val) 1159s elif issubclass(typ, CupyCSCMatrix): 1159s > import cupy as cp 1159s E ModuleNotFoundError: No module named 'cupy' 1159s 1159s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:1024: ModuleNotFoundError 1159s __________________ test_io_spec_cupy[zarr3-True-value0-array] __________________ 1159s 1159s store = 1159s value = array([1, 2, 3]), encoding_type = 'array', as_dask = True 1159s 1159s @pytest.mark.gpu 1159s @pytest.mark.parametrize( 1159s ("value", "encoding_type"), 1159s [ 1159s (np.array([1, 2, 3]), "array"), 1159s (np.arange(12).reshape(4, 3), "array"), 1159s (sparse.random(5, 3, format="csr", density=0.5), "csr_matrix"), 1159s (sparse.random(5, 3, format="csc", density=0.5), "csc_matrix"), 1159s ], 1159s ) 1159s @pytest.mark.parametrize("as_dask", [False, True]) 1159s def test_io_spec_cupy(store, value, encoding_type, as_dask): 1159s if as_dask: 1159s if isinstance(value, CSMatrix): 1159s value = as_cupy_sparse_dask_array(value, format=encoding_type[:3]) 1159s else: 1159s > value = as_dense_cupy_dask_array(value) 1159s 1159s tests/test_io_elementwise.py:263: 1159s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1159s /usr/lib/python3.13/functools.py:934: in wrapper 1159s return dispatch(args[0].__class__)(*args, **kw) 1159s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1159s 1159s a = array([1, 2, 3]) 1159s 1159s @singledispatch 1159s def as_dense_cupy_dask_array(a): 1159s > import cupy as cp 1159s E ModuleNotFoundError: No module named 'cupy' 1159s 1159s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:882: ModuleNotFoundError 1159s __________________ test_io_spec_cupy[zarr3-True-value1-array] __________________ 1159s 1159s store = 1159s value = array([[ 0, 1, 2], 1159s [ 3, 4, 5], 1159s [ 6, 7, 8], 1159s [ 9, 10, 11]]) 1159s encoding_type = 'array', as_dask = True 1159s 1159s @pytest.mark.gpu 1159s @pytest.mark.parametrize( 1159s ("value", "encoding_type"), 1159s [ 1159s (np.array([1, 2, 3]), "array"), 1159s (np.arange(12).reshape(4, 3), "array"), 1159s (sparse.random(5, 3, format="csr", density=0.5), "csr_matrix"), 1159s (sparse.random(5, 3, format="csc", density=0.5), "csc_matrix"), 1159s ], 1159s ) 1159s @pytest.mark.parametrize("as_dask", [False, True]) 1159s def test_io_spec_cupy(store, value, encoding_type, as_dask): 1159s if as_dask: 1159s if isinstance(value, CSMatrix): 1159s value = as_cupy_sparse_dask_array(value, format=encoding_type[:3]) 1159s else: 1159s > value = as_dense_cupy_dask_array(value) 1159s 1159s tests/test_io_elementwise.py:263: 1159s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1159s /usr/lib/python3.13/functools.py:934: in wrapper 1159s return dispatch(args[0].__class__)(*args, **kw) 1159s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1159s 1159s a = array([[ 0, 1, 2], 1159s [ 3, 4, 5], 1159s [ 6, 7, 8], 1159s [ 9, 10, 11]]) 1159s 1159s @singledispatch 1159s def as_dense_cupy_dask_array(a): 1159s > import cupy as cp 1159s E ModuleNotFoundError: No module named 'cupy' 1159s 1159s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:882: ModuleNotFoundError 1159s _______________ test_io_spec_cupy[zarr3-True-value2-csr_matrix] ________________ 1159s 1159s store = 1159s value = 1159s encoding_type = 'csr_matrix', as_dask = True 1159s 1159s @pytest.mark.gpu 1159s @pytest.mark.parametrize( 1159s ("value", "encoding_type"), 1159s [ 1159s (np.array([1, 2, 3]), "array"), 1159s (np.arange(12).reshape(4, 3), "array"), 1159s (sparse.random(5, 3, format="csr", density=0.5), "csr_matrix"), 1159s (sparse.random(5, 3, format="csc", density=0.5), "csc_matrix"), 1159s ], 1159s ) 1159s @pytest.mark.parametrize("as_dask", [False, True]) 1159s def test_io_spec_cupy(store, value, encoding_type, as_dask): 1159s if as_dask: 1159s if isinstance(value, CSMatrix): 1159s > value = as_cupy_sparse_dask_array(value, format=encoding_type[:3]) 1159s 1159s tests/test_io_elementwise.py:261: 1159s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1159s /usr/lib/python3.13/functools.py:934: in wrapper 1159s return dispatch(args[0].__class__)(*args, **kw) 1159s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1159s 1159s a = 1159s format = 'csr' 1159s 1159s @singledispatch 1159s def as_cupy_sparse_dask_array(a, format="csr"): 1159s > memory_class = format_to_memory_class[format] 1159s E KeyError: 'csr' 1159s 1159s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:926: KeyError 1159s _______________ test_io_spec_cupy[zarr3-True-value3-csc_matrix] ________________ 1159s 1159s store = 1159s value = 1159s encoding_type = 'csc_matrix', as_dask = True 1159s 1159s @pytest.mark.gpu 1159s @pytest.mark.parametrize( 1159s ("value", "encoding_type"), 1159s [ 1159s (np.array([1, 2, 3]), "array"), 1159s (np.arange(12).reshape(4, 3), "array"), 1159s (sparse.random(5, 3, format="csr", density=0.5), "csr_matrix"), 1159s (sparse.random(5, 3, format="csc", density=0.5), "csc_matrix"), 1159s ], 1159s ) 1159s @pytest.mark.parametrize("as_dask", [False, True]) 1159s def test_io_spec_cupy(store, value, encoding_type, as_dask): 1159s if as_dask: 1159s if isinstance(value, CSMatrix): 1159s > value = as_cupy_sparse_dask_array(value, format=encoding_type[:3]) 1159s 1159s tests/test_io_elementwise.py:261: 1159s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1159s /usr/lib/python3.13/functools.py:934: in wrapper 1159s return dispatch(args[0].__class__)(*args, **kw) 1159s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1159s 1159s a = 1159s format = 'csc' 1159s 1159s @singledispatch 1159s def as_cupy_sparse_dask_array(a, format="csr"): 1159s > memory_class = format_to_memory_class[format] 1159s E KeyError: 'csc' 1159s 1159s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:926: KeyError 1159s _________ test_readwrite_kitchensink[dataset_kwargs0-csr_matrix-h5ad] __________ 1159s 1159s tmp_path = PosixPath('/tmp/pytest-of-ubuntu/pytest-0/test_readwrite_kitchensink_dat2') 1159s storage = 'h5ad', typ = 1159s backing_h5ad = PosixPath('/tmp/pytest-of-ubuntu/pytest-0/test_readwrite_kitchensink_dat2/test.h5ad') 1159s dataset_kwargs = {} 1159s 1159s @pytest.mark.parametrize("storage", ["h5ad", "zarr"]) 1159s @pytest.mark.parametrize("typ", [np.array, csr_matrix, csr_array, as_dense_dask_array]) 1159s def test_readwrite_kitchensink(tmp_path, storage, typ, backing_h5ad, dataset_kwargs): 1159s X = typ(X_list) 1159s adata_src = ad.AnnData(X, obs=obs_dict, var=var_dict, uns=uns_dict) 1159s assert not isinstance(adata_src.obs["oanno1"].dtype, pd.CategoricalDtype) 1159s adata_src.raw = adata_src.copy() 1159s 1159s if storage == "h5ad": 1159s adata_src.write(backing_h5ad, **dataset_kwargs) 1159s adata_mid = ad.read_h5ad(backing_h5ad) 1159s adata_mid.write(tmp_path / "mid.h5ad", **dataset_kwargs) 1159s adata = ad.read_h5ad(tmp_path / "mid.h5ad") 1159s else: 1159s adata_src.write_zarr(tmp_path / "test_zarr_dir") 1159s adata = ad.read_zarr(tmp_path / "test_zarr_dir") 1159s assert isinstance(adata.obs["oanno1"].dtype, pd.CategoricalDtype) 1159s assert not isinstance(adata.obs["oanno2"].dtype, pd.CategoricalDtype) 1159s assert adata.obs.index.tolist() == ["name1", "name2", "name3"] 1159s assert adata.obs["oanno1"].cat.categories.tolist() == ["cat1", "cat2"] 1159s assert adata.obs["oanno1c"].cat.categories.tolist() == ["cat1"] 1159s assert isinstance(adata.raw.var["vanno2"].dtype, pd.CategoricalDtype) 1159s pd.testing.assert_frame_equal(adata.obs, adata_src.obs) 1159s pd.testing.assert_frame_equal(adata.var, adata_src.var) 1159s assert_equal(adata.var.index, adata_src.var.index) 1159s assert adata.var.index.dtype == adata_src.var.index.dtype 1159s 1159s # Dev. Note: 1159s # either load as same type or load the convert DaskArray to array 1159s # since we tested if assigned types and loaded types are DaskArray 1159s # this would also work if they work 1159s if isinstance(adata_src.raw.X, CSArray): 1159s assert isinstance(adata.raw.X, CSMatrix) 1159s else: 1159s > assert isinstance(adata_src.raw.X, type(adata.raw.X) | DaskArray) 1159s E AssertionError: assert False 1159s E + where False = isinstance(, ( | DaskArray)) 1159s E + where = .X 1159s E + where = AnnData object with n_obs × n_vars = 3 × 2\n obs: 'oanno1', 'oanno1b', 'oanno1c', 'oanno2', 'oanno3', 'oanno4'\n var: 'vanno1', 'vanno2', 'vanno3', 'vanno4'\n uns: 'oanno1_colors', 'uns2', 'uns3', 'uns4'.raw 1159s E + and = type() 1159s E + where = .X 1159s E + where = AnnData object with n_obs × n_vars = 3 × 2\n obs: 'oanno1', 'oanno1b', 'oanno1c', 'oanno2', 'oanno3', 'oanno4'\n var: 'vanno1', 'vanno2', 'vanno3', 'vanno4'\n uns: 'oanno1_colors', 'uns2', 'uns3', 'uns4'.raw 1159s 1159s tests/test_readwrite.py:178: AssertionError 1159s _________ test_readwrite_kitchensink[dataset_kwargs0-csr_matrix-zarr] __________ 1159s 1159s tmp_path = PosixPath('/tmp/pytest-of-ubuntu/pytest-0/test_readwrite_kitchensink_dat3') 1159s storage = 'zarr', typ = 1159s backing_h5ad = PosixPath('/tmp/pytest-of-ubuntu/pytest-0/test_readwrite_kitchensink_dat3/test.h5ad') 1159s dataset_kwargs = {} 1159s 1159s @pytest.mark.parametrize("storage", ["h5ad", "zarr"]) 1159s @pytest.mark.parametrize("typ", [np.array, csr_matrix, csr_array, as_dense_dask_array]) 1159s def test_readwrite_kitchensink(tmp_path, storage, typ, backing_h5ad, dataset_kwargs): 1159s X = typ(X_list) 1159s adata_src = ad.AnnData(X, obs=obs_dict, var=var_dict, uns=uns_dict) 1159s assert not isinstance(adata_src.obs["oanno1"].dtype, pd.CategoricalDtype) 1159s adata_src.raw = adata_src.copy() 1159s 1159s if storage == "h5ad": 1159s adata_src.write(backing_h5ad, **dataset_kwargs) 1159s adata_mid = ad.read_h5ad(backing_h5ad) 1159s adata_mid.write(tmp_path / "mid.h5ad", **dataset_kwargs) 1159s adata = ad.read_h5ad(tmp_path / "mid.h5ad") 1159s else: 1159s adata_src.write_zarr(tmp_path / "test_zarr_dir") 1159s adata = ad.read_zarr(tmp_path / "test_zarr_dir") 1159s assert isinstance(adata.obs["oanno1"].dtype, pd.CategoricalDtype) 1159s assert not isinstance(adata.obs["oanno2"].dtype, pd.CategoricalDtype) 1159s assert adata.obs.index.tolist() == ["name1", "name2", "name3"] 1159s assert adata.obs["oanno1"].cat.categories.tolist() == ["cat1", "cat2"] 1159s assert adata.obs["oanno1c"].cat.categories.tolist() == ["cat1"] 1159s assert isinstance(adata.raw.var["vanno2"].dtype, pd.CategoricalDtype) 1159s pd.testing.assert_frame_equal(adata.obs, adata_src.obs) 1159s pd.testing.assert_frame_equal(adata.var, adata_src.var) 1159s assert_equal(adata.var.index, adata_src.var.index) 1159s assert adata.var.index.dtype == adata_src.var.index.dtype 1159s 1159s # Dev. Note: 1159s # either load as same type or load the convert DaskArray to array 1159s # since we tested if assigned types and loaded types are DaskArray 1159s # this would also work if they work 1159s if isinstance(adata_src.raw.X, CSArray): 1159s assert isinstance(adata.raw.X, CSMatrix) 1159s else: 1159s > assert isinstance(adata_src.raw.X, type(adata.raw.X) | DaskArray) 1159s E AssertionError: assert False 1159s E + where False = isinstance(, ( | DaskArray)) 1159s E + where = .X 1159s E + where = AnnData object with n_obs × n_vars = 3 × 2\n obs: 'oanno1', 'oanno1b', 'oanno1c', 'oanno2', 'oanno3', 'oanno4'\n var: 'vanno1', 'vanno2', 'vanno3', 'vanno4'\n uns: 'oanno1_colors', 'uns2', 'uns3', 'uns4'.raw 1159s E + and = type() 1159s E + where = .X 1159s E + where = AnnData object with n_obs × n_vars = 3 × 2\n obs: 'oanno1', 'oanno1b', 'oanno1c', 'oanno2', 'oanno3', 'oanno4'\n var: 'vanno1', 'vanno2', 'vanno3', 'vanno4'\n uns: 'uns3', 'uns4', 'uns2', 'oanno1_colors'.raw 1159s 1159s tests/test_readwrite.py:178: AssertionError 1159s __________ test_readwrite_kitchensink[dataset_kwargs0-csr_array-h5ad] __________ 1159s 1159s tmp_path = PosixPath('/tmp/pytest-of-ubuntu/pytest-0/test_readwrite_kitchensink_dat4') 1159s storage = 'h5ad', typ = 1159s backing_h5ad = PosixPath('/tmp/pytest-of-ubuntu/pytest-0/test_readwrite_kitchensink_dat4/test.h5ad') 1159s dataset_kwargs = {} 1159s 1159s @pytest.mark.parametrize("storage", ["h5ad", "zarr"]) 1159s @pytest.mark.parametrize("typ", [np.array, csr_matrix, csr_array, as_dense_dask_array]) 1159s def test_readwrite_kitchensink(tmp_path, storage, typ, backing_h5ad, dataset_kwargs): 1159s X = typ(X_list) 1159s adata_src = ad.AnnData(X, obs=obs_dict, var=var_dict, uns=uns_dict) 1159s assert not isinstance(adata_src.obs["oanno1"].dtype, pd.CategoricalDtype) 1159s adata_src.raw = adata_src.copy() 1159s 1159s if storage == "h5ad": 1159s adata_src.write(backing_h5ad, **dataset_kwargs) 1159s adata_mid = ad.read_h5ad(backing_h5ad) 1159s adata_mid.write(tmp_path / "mid.h5ad", **dataset_kwargs) 1159s adata = ad.read_h5ad(tmp_path / "mid.h5ad") 1159s else: 1159s adata_src.write_zarr(tmp_path / "test_zarr_dir") 1159s adata = ad.read_zarr(tmp_path / "test_zarr_dir") 1159s assert isinstance(adata.obs["oanno1"].dtype, pd.CategoricalDtype) 1159s assert not isinstance(adata.obs["oanno2"].dtype, pd.CategoricalDtype) 1159s assert adata.obs.index.tolist() == ["name1", "name2", "name3"] 1159s assert adata.obs["oanno1"].cat.categories.tolist() == ["cat1", "cat2"] 1159s assert adata.obs["oanno1c"].cat.categories.tolist() == ["cat1"] 1159s assert isinstance(adata.raw.var["vanno2"].dtype, pd.CategoricalDtype) 1159s pd.testing.assert_frame_equal(adata.obs, adata_src.obs) 1159s pd.testing.assert_frame_equal(adata.var, adata_src.var) 1159s assert_equal(adata.var.index, adata_src.var.index) 1159s assert adata.var.index.dtype == adata_src.var.index.dtype 1159s 1159s # Dev. Note: 1159s # either load as same type or load the convert DaskArray to array 1159s # since we tested if assigned types and loaded types are DaskArray 1159s # this would also work if they work 1159s if isinstance(adata_src.raw.X, CSArray): 1159s > assert isinstance(adata.raw.X, CSMatrix) 1159s E AssertionError: assert False 1159s E + where False = isinstance(, scipy.sparse._csr.csr_matrix | scipy.sparse._csc.csc_matrix) 1159s E + where = .X 1159s E + where = AnnData object with n_obs × n_vars = 3 × 2\n obs: 'oanno1', 'oanno1b', 'oanno1c', 'oanno2', 'oanno3', 'oanno4'\n var: 'vanno1', 'vanno2', 'vanno3', 'vanno4'\n uns: 'oanno1_colors', 'uns2', 'uns3', 'uns4'.raw 1159s 1159s tests/test_readwrite.py:176: AssertionError 1159s __________ test_readwrite_kitchensink[dataset_kwargs0-csr_array-zarr] __________ 1159s 1159s tmp_path = PosixPath('/tmp/pytest-of-ubuntu/pytest-0/test_readwrite_kitchensink_dat5') 1159s storage = 'zarr', typ = 1159s backing_h5ad = PosixPath('/tmp/pytest-of-ubuntu/pytest-0/test_readwrite_kitchensink_dat5/test.h5ad') 1159s dataset_kwargs = {} 1159s 1159s @pytest.mark.parametrize("storage", ["h5ad", "zarr"]) 1159s @pytest.mark.parametrize("typ", [np.array, csr_matrix, csr_array, as_dense_dask_array]) 1159s def test_readwrite_kitchensink(tmp_path, storage, typ, backing_h5ad, dataset_kwargs): 1159s X = typ(X_list) 1159s adata_src = ad.AnnData(X, obs=obs_dict, var=var_dict, uns=uns_dict) 1159s assert not isinstance(adata_src.obs["oanno1"].dtype, pd.CategoricalDtype) 1159s adata_src.raw = adata_src.copy() 1159s 1159s if storage == "h5ad": 1159s adata_src.write(backing_h5ad, **dataset_kwargs) 1159s adata_mid = ad.read_h5ad(backing_h5ad) 1159s adata_mid.write(tmp_path / "mid.h5ad", **dataset_kwargs) 1159s adata = ad.read_h5ad(tmp_path / "mid.h5ad") 1159s else: 1159s adata_src.write_zarr(tmp_path / "test_zarr_dir") 1159s adata = ad.read_zarr(tmp_path / "test_zarr_dir") 1159s assert isinstance(adata.obs["oanno1"].dtype, pd.CategoricalDtype) 1159s assert not isinstance(adata.obs["oanno2"].dtype, pd.CategoricalDtype) 1159s assert adata.obs.index.tolist() == ["name1", "name2", "name3"] 1159s assert adata.obs["oanno1"].cat.categories.tolist() == ["cat1", "cat2"] 1159s assert adata.obs["oanno1c"].cat.categories.tolist() == ["cat1"] 1159s assert isinstance(adata.raw.var["vanno2"].dtype, pd.CategoricalDtype) 1159s pd.testing.assert_frame_equal(adata.obs, adata_src.obs) 1159s pd.testing.assert_frame_equal(adata.var, adata_src.var) 1159s assert_equal(adata.var.index, adata_src.var.index) 1159s assert adata.var.index.dtype == adata_src.var.index.dtype 1159s 1159s # Dev. Note: 1159s # either load as same type or load the convert DaskArray to array 1159s # since we tested if assigned types and loaded types are DaskArray 1159s # this would also work if they work 1159s if isinstance(adata_src.raw.X, CSArray): 1159s > assert isinstance(adata.raw.X, CSMatrix) 1159s E AssertionError: assert False 1159s E + where False = isinstance(, scipy.sparse._csr.csr_matrix | scipy.sparse._csc.csc_matrix) 1159s E + where = .X 1159s E + where = AnnData object with n_obs × n_vars = 3 × 2\n obs: 'oanno1', 'oanno1b', 'oanno1c', 'oanno2', 'oanno3', 'oanno4'\n var: 'vanno1', 'vanno2', 'vanno3', 'vanno4'\n uns: 'uns3', 'oanno1_colors', 'uns4', 'uns2'.raw 1159s 1159s tests/test_readwrite.py:176: AssertionError 1159s _________ test_readwrite_kitchensink[dataset_kwargs1-csr_matrix-h5ad] __________ 1159s 1159s tmp_path = PosixPath('/tmp/pytest-of-ubuntu/pytest-0/test_readwrite_kitchensink_dat10') 1159s storage = 'h5ad', typ = 1159s backing_h5ad = PosixPath('/tmp/pytest-of-ubuntu/pytest-0/test_readwrite_kitchensink_dat10/test.h5ad') 1159s dataset_kwargs = {'compression': 'gzip'} 1159s 1159s @pytest.mark.parametrize("storage", ["h5ad", "zarr"]) 1159s @pytest.mark.parametrize("typ", [np.array, csr_matrix, csr_array, as_dense_dask_array]) 1159s def test_readwrite_kitchensink(tmp_path, storage, typ, backing_h5ad, dataset_kwargs): 1159s X = typ(X_list) 1159s adata_src = ad.AnnData(X, obs=obs_dict, var=var_dict, uns=uns_dict) 1159s assert not isinstance(adata_src.obs["oanno1"].dtype, pd.CategoricalDtype) 1159s adata_src.raw = adata_src.copy() 1159s 1159s if storage == "h5ad": 1159s adata_src.write(backing_h5ad, **dataset_kwargs) 1159s adata_mid = ad.read_h5ad(backing_h5ad) 1159s adata_mid.write(tmp_path / "mid.h5ad", **dataset_kwargs) 1159s adata = ad.read_h5ad(tmp_path / "mid.h5ad") 1159s else: 1159s adata_src.write_zarr(tmp_path / "test_zarr_dir") 1159s adata = ad.read_zarr(tmp_path / "test_zarr_dir") 1159s assert isinstance(adata.obs["oanno1"].dtype, pd.CategoricalDtype) 1159s assert not isinstance(adata.obs["oanno2"].dtype, pd.CategoricalDtype) 1159s assert adata.obs.index.tolist() == ["name1", "name2", "name3"] 1159s assert adata.obs["oanno1"].cat.categories.tolist() == ["cat1", "cat2"] 1159s assert adata.obs["oanno1c"].cat.categories.tolist() == ["cat1"] 1159s assert isinstance(adata.raw.var["vanno2"].dtype, pd.CategoricalDtype) 1159s pd.testing.assert_frame_equal(adata.obs, adata_src.obs) 1159s pd.testing.assert_frame_equal(adata.var, adata_src.var) 1159s assert_equal(adata.var.index, adata_src.var.index) 1159s assert adata.var.index.dtype == adata_src.var.index.dtype 1159s 1159s # Dev. Note: 1159s # either load as same type or load the convert DaskArray to array 1159s # since we tested if assigned types and loaded types are DaskArray 1159s # this would also work if they work 1159s if isinstance(adata_src.raw.X, CSArray): 1159s assert isinstance(adata.raw.X, CSMatrix) 1159s else: 1159s > assert isinstance(adata_src.raw.X, type(adata.raw.X) | DaskArray) 1159s E AssertionError: assert False 1159s E + where False = isinstance(, ( | DaskArray)) 1159s E + where = .X 1159s E + where = AnnData object with n_obs × n_vars = 3 × 2\n obs: 'oanno1', 'oanno1b', 'oanno1c', 'oanno2', 'oanno3', 'oanno4'\n var: 'vanno1', 'vanno2', 'vanno3', 'vanno4'\n uns: 'oanno1_colors', 'uns2', 'uns3', 'uns4'.raw 1159s E + and = type() 1159s E + where = .X 1159s E + where = AnnData object with n_obs × n_vars = 3 × 2\n obs: 'oanno1', 'oanno1b', 'oanno1c', 'oanno2', 'oanno3', 'oanno4'\n var: 'vanno1', 'vanno2', 'vanno3', 'vanno4'\n uns: 'oanno1_colors', 'uns2', 'uns3', 'uns4'.raw 1159s 1159s tests/test_readwrite.py:178: AssertionError 1159s _________ test_readwrite_kitchensink[dataset_kwargs1-csr_matrix-zarr] __________ 1159s 1159s tmp_path = PosixPath('/tmp/pytest-of-ubuntu/pytest-0/test_readwrite_kitchensink_dat11') 1159s storage = 'zarr', typ = 1159s backing_h5ad = PosixPath('/tmp/pytest-of-ubuntu/pytest-0/test_readwrite_kitchensink_dat11/test.h5ad') 1159s dataset_kwargs = {'compression': 'gzip'} 1159s 1159s @pytest.mark.parametrize("storage", ["h5ad", "zarr"]) 1159s @pytest.mark.parametrize("typ", [np.array, csr_matrix, csr_array, as_dense_dask_array]) 1159s def test_readwrite_kitchensink(tmp_path, storage, typ, backing_h5ad, dataset_kwargs): 1159s X = typ(X_list) 1159s adata_src = ad.AnnData(X, obs=obs_dict, var=var_dict, uns=uns_dict) 1159s assert not isinstance(adata_src.obs["oanno1"].dtype, pd.CategoricalDtype) 1159s adata_src.raw = adata_src.copy() 1159s 1159s if storage == "h5ad": 1159s adata_src.write(backing_h5ad, **dataset_kwargs) 1159s adata_mid = ad.read_h5ad(backing_h5ad) 1159s adata_mid.write(tmp_path / "mid.h5ad", **dataset_kwargs) 1159s adata = ad.read_h5ad(tmp_path / "mid.h5ad") 1159s else: 1159s adata_src.write_zarr(tmp_path / "test_zarr_dir") 1159s adata = ad.read_zarr(tmp_path / "test_zarr_dir") 1159s assert isinstance(adata.obs["oanno1"].dtype, pd.CategoricalDtype) 1159s assert not isinstance(adata.obs["oanno2"].dtype, pd.CategoricalDtype) 1159s assert adata.obs.index.tolist() == ["name1", "name2", "name3"] 1159s assert adata.obs["oanno1"].cat.categories.tolist() == ["cat1", "cat2"] 1159s assert adata.obs["oanno1c"].cat.categories.tolist() == ["cat1"] 1159s assert isinstance(adata.raw.var["vanno2"].dtype, pd.CategoricalDtype) 1159s pd.testing.assert_frame_equal(adata.obs, adata_src.obs) 1159s pd.testing.assert_frame_equal(adata.var, adata_src.var) 1159s assert_equal(adata.var.index, adata_src.var.index) 1159s assert adata.var.index.dtype == adata_src.var.index.dtype 1159s 1159s # Dev. Note: 1159s # either load as same type or load the convert DaskArray to array 1159s # since we tested if assigned types and loaded types are DaskArray 1159s # this would also work if they work 1159s if isinstance(adata_src.raw.X, CSArray): 1159s assert isinstance(adata.raw.X, CSMatrix) 1159s else: 1159s > assert isinstance(adata_src.raw.X, type(adata.raw.X) | DaskArray) 1159s E AssertionError: assert False 1159s E + where False = isinstance(, ( | DaskArray)) 1159s E + where = .X 1159s E + where = AnnData object with n_obs × n_vars = 3 × 2\n obs: 'oanno1', 'oanno1b', 'oanno1c', 'oanno2', 'oanno3', 'oanno4'\n var: 'vanno1', 'vanno2', 'vanno3', 'vanno4'\n uns: 'oanno1_colors', 'uns2', 'uns3', 'uns4'.raw 1159s E + and = type() 1159s E + where = .X 1159s E + where = AnnData object with n_obs × n_vars = 3 × 2\n obs: 'oanno1', 'oanno1b', 'oanno1c', 'oanno2', 'oanno3', 'oanno4'\n var: 'vanno1', 'vanno2', 'vanno3', 'vanno4'\n uns: 'oanno1_colors', 'uns3', 'uns4', 'uns2'.raw 1159s 1159s tests/test_readwrite.py:178: AssertionError 1159s __________ test_readwrite_kitchensink[dataset_kwargs1-csr_array-h5ad] __________ 1159s 1159s tmp_path = PosixPath('/tmp/pytest-of-ubuntu/pytest-0/test_readwrite_kitchensink_dat12') 1159s storage = 'h5ad', typ = 1159s backing_h5ad = PosixPath('/tmp/pytest-of-ubuntu/pytest-0/test_readwrite_kitchensink_dat12/test.h5ad') 1159s dataset_kwargs = {'compression': 'gzip'} 1159s 1159s @pytest.mark.parametrize("storage", ["h5ad", "zarr"]) 1159s @pytest.mark.parametrize("typ", [np.array, csr_matrix, csr_array, as_dense_dask_array]) 1159s def test_readwrite_kitchensink(tmp_path, storage, typ, backing_h5ad, dataset_kwargs): 1159s X = typ(X_list) 1159s adata_src = ad.AnnData(X, obs=obs_dict, var=var_dict, uns=uns_dict) 1159s assert not isinstance(adata_src.obs["oanno1"].dtype, pd.CategoricalDtype) 1159s adata_src.raw = adata_src.copy() 1159s 1159s if storage == "h5ad": 1159s adata_src.write(backing_h5ad, **dataset_kwargs) 1159s adata_mid = ad.read_h5ad(backing_h5ad) 1159s adata_mid.write(tmp_path / "mid.h5ad", **dataset_kwargs) 1159s adata = ad.read_h5ad(tmp_path / "mid.h5ad") 1159s else: 1159s adata_src.write_zarr(tmp_path / "test_zarr_dir") 1159s adata = ad.read_zarr(tmp_path / "test_zarr_dir") 1159s assert isinstance(adata.obs["oanno1"].dtype, pd.CategoricalDtype) 1159s assert not isinstance(adata.obs["oanno2"].dtype, pd.CategoricalDtype) 1159s assert adata.obs.index.tolist() == ["name1", "name2", "name3"] 1159s assert adata.obs["oanno1"].cat.categories.tolist() == ["cat1", "cat2"] 1159s assert adata.obs["oanno1c"].cat.categories.tolist() == ["cat1"] 1159s assert isinstance(adata.raw.var["vanno2"].dtype, pd.CategoricalDtype) 1159s pd.testing.assert_frame_equal(adata.obs, adata_src.obs) 1159s pd.testing.assert_frame_equal(adata.var, adata_src.var) 1159s assert_equal(adata.var.index, adata_src.var.index) 1159s assert adata.var.index.dtype == adata_src.var.index.dtype 1159s 1159s # Dev. Note: 1159s # either load as same type or load the convert DaskArray to array 1159s # since we tested if assigned types and loaded types are DaskArray 1159s # this would also work if they work 1159s if isinstance(adata_src.raw.X, CSArray): 1159s > assert isinstance(adata.raw.X, CSMatrix) 1159s E AssertionError: assert False 1159s E + where False = isinstance(, scipy.sparse._csr.csr_matrix | scipy.sparse._csc.csc_matrix) 1159s E + where = .X 1159s E + where = AnnData object with n_obs × n_vars = 3 × 2\n obs: 'oanno1', 'oanno1b', 'oanno1c', 'oanno2', 'oanno3', 'oanno4'\n var: 'vanno1', 'vanno2', 'vanno3', 'vanno4'\n uns: 'oanno1_colors', 'uns2', 'uns3', 'uns4'.raw 1159s 1159s tests/test_readwrite.py:176: AssertionError 1159s __________ test_readwrite_kitchensink[dataset_kwargs1-csr_array-zarr] __________ 1159s 1159s tmp_path = PosixPath('/tmp/pytest-of-ubuntu/pytest-0/test_readwrite_kitchensink_dat13') 1159s storage = 'zarr', typ = 1159s backing_h5ad = PosixPath('/tmp/pytest-of-ubuntu/pytest-0/test_readwrite_kitchensink_dat13/test.h5ad') 1159s dataset_kwargs = {'compression': 'gzip'} 1159s 1159s @pytest.mark.parametrize("storage", ["h5ad", "zarr"]) 1159s @pytest.mark.parametrize("typ", [np.array, csr_matrix, csr_array, as_dense_dask_array]) 1159s def test_readwrite_kitchensink(tmp_path, storage, typ, backing_h5ad, dataset_kwargs): 1159s X = typ(X_list) 1159s adata_src = ad.AnnData(X, obs=obs_dict, var=var_dict, uns=uns_dict) 1159s assert not isinstance(adata_src.obs["oanno1"].dtype, pd.CategoricalDtype) 1159s adata_src.raw = adata_src.copy() 1159s 1159s if storage == "h5ad": 1159s adata_src.write(backing_h5ad, **dataset_kwargs) 1159s adata_mid = ad.read_h5ad(backing_h5ad) 1159s adata_mid.write(tmp_path / "mid.h5ad", **dataset_kwargs) 1159s adata = ad.read_h5ad(tmp_path / "mid.h5ad") 1159s else: 1159s adata_src.write_zarr(tmp_path / "test_zarr_dir") 1159s adata = ad.read_zarr(tmp_path / "test_zarr_dir") 1159s assert isinstance(adata.obs["oanno1"].dtype, pd.CategoricalDtype) 1159s assert not isinstance(adata.obs["oanno2"].dtype, pd.CategoricalDtype) 1159s assert adata.obs.index.tolist() == ["name1", "name2", "name3"] 1159s assert adata.obs["oanno1"].cat.categories.tolist() == ["cat1", "cat2"] 1159s assert adata.obs["oanno1c"].cat.categories.tolist() == ["cat1"] 1159s assert isinstance(adata.raw.var["vanno2"].dtype, pd.CategoricalDtype) 1159s pd.testing.assert_frame_equal(adata.obs, adata_src.obs) 1159s pd.testing.assert_frame_equal(adata.var, adata_src.var) 1159s assert_equal(adata.var.index, adata_src.var.index) 1159s assert adata.var.index.dtype == adata_src.var.index.dtype 1159s 1159s # Dev. Note: 1159s # either load as same type or load the convert DaskArray to array 1159s # since we tested if assigned types and loaded types are DaskArray 1159s # this would also work if they work 1159s if isinstance(adata_src.raw.X, CSArray): 1159s > assert isinstance(adata.raw.X, CSMatrix) 1159s E AssertionError: assert False 1159s E + where False = isinstance(, scipy.sparse._csr.csr_matrix | scipy.sparse._csc.csc_matrix) 1159s E + where = .X 1159s E + where = AnnData object with n_obs × n_vars = 3 × 2\n obs: 'oanno1', 'oanno1b', 'oanno1c', 'oanno2', 'oanno3', 'oanno4'\n var: 'vanno1', 'vanno2', 'vanno3', 'vanno4'\n uns: 'uns2', 'uns3', 'oanno1_colors', 'uns4'.raw 1159s 1159s tests/test_readwrite.py:176: AssertionError 1159s ___________________ test_read_write_maintain_obsmvarm_dtypes ___________________ 1159s 1159s rw = (AnnData object with n_obs × n_vars = 100 × 101 1159s obs: 'cat_unordered', 'obs_cat', 'int64', 'float64', 'uint8', 'boo...ray', 'sparse', 'sparse_array' 1159s obsp: 'array', 'sparse', 'sparse_array' 1159s varp: 'array', 'sparse', 'sparse_array') 1159s 1159s def test_read_write_maintain_obsmvarm_dtypes(rw): 1159s curr, orig = rw 1159s 1159s assert type(orig.obsm["array"]) is type(curr.obsm["array"]) 1159s assert np.all(orig.obsm["array"] == curr.obsm["array"]) 1159s assert np.all(orig.varm["array"] == curr.varm["array"]) 1159s > assert type(orig.obsm["sparse"]) is type(curr.obsm["sparse"]) 1159s E AssertionError: assert is 1159s E + where = type() 1159s E + and = type() 1159s 1159s tests/test_readwrite.py:207: AssertionError 1159s _____________________________ test_maintain_layers _____________________________ 1159s 1159s rw = (AnnData object with n_obs × n_vars = 100 × 101 1159s obs: 'cat_unordered', 'obs_cat', 'int64', 'float64', 'uint8', 'boo...ray', 'sparse', 'sparse_array' 1159s obsp: 'array', 'sparse', 'sparse_array' 1159s varp: 'array', 'sparse', 'sparse_array') 1159s 1159s def test_maintain_layers(rw): 1159s curr, orig = rw 1159s 1159s assert type(orig.layers["array"]) is type(curr.layers["array"]) 1159s assert np.all(orig.layers["array"] == curr.layers["array"]) 1159s > assert type(orig.layers["sparse"]) is type(curr.layers["sparse"]) 1159s E AssertionError: assert is 1159s E + where = type() 1159s E + and = type() 1159s 1159s tests/test_readwrite.py:220: AssertionError 1159s ________________ test_modify_view_component[cupy_array-layers] _________________ 1159s 1159s matrix_type = functools.partial(, typ=) 1159s mapping_name = 'layers' 1159s request = > 1159s 1159s def test_modify_view_component(matrix_type, mapping_name, request): 1159s adata = ad.AnnData( 1159s np.zeros((10, 10)), 1159s > **{mapping_name: dict(m=matrix_type(asarray(sparse.random(10, 10))))}, 1159s ) 1159s 1159s tests/test_views.py:161: 1159s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1159s /usr/lib/python3.13/functools.py:934: in wrapper 1159s return dispatch(args[0].__class__)(*args, **kw) 1159s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1159s 1159s val = array([[0. , 0. , 0. , 0. , 0. , 0. , 1159s 0. , 0. , 0. , 0. ...0. , 0. , 0. , 0. , 0. , 0. , 1159s 0. , 0. , 0. , 0.1422782]]) 1159s typ = 1159s 1159s @singledispatch 1159s def as_cupy(val, typ=None): 1159s """ 1159s Rough conversion function 1159s 1159s Will try to infer target type from input type if not specified. 1159s """ 1159s if typ is None: 1159s typ = resolve_cupy_type(val) 1159s 1159s if issubclass(typ, CupyArray): 1159s > import cupy as cp 1159s E ModuleNotFoundError: No module named 'cupy' 1159s 1159s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:1010: ModuleNotFoundError 1159s _________________ test_modify_view_component[cupy_array-obsm] __________________ 1159s 1159s matrix_type = functools.partial(, typ=) 1159s mapping_name = 'obsm' 1159s request = > 1159s 1159s def test_modify_view_component(matrix_type, mapping_name, request): 1159s adata = ad.AnnData( 1159s np.zeros((10, 10)), 1159s > **{mapping_name: dict(m=matrix_type(asarray(sparse.random(10, 10))))}, 1159s ) 1159s 1159s tests/test_views.py:161: 1159s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1159s /usr/lib/python3.13/functools.py:934: in wrapper 1159s return dispatch(args[0].__class__)(*args, **kw) 1159s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1159s 1159s val = array([[0. , 0. , 0. , 0. , 0. , 1159s 0. , 0. , 0. , 0. ..., 0. , 0. , 0. , 0. , 1159s 0. , 0. , 0. , 0. , 0. ]]) 1159s typ = 1159s 1159s @singledispatch 1159s def as_cupy(val, typ=None): 1159s """ 1159s Rough conversion function 1159s 1159s Will try to infer target type from input type if not specified. 1159s """ 1159s if typ is None: 1159s typ = resolve_cupy_type(val) 1159s 1159s if issubclass(typ, CupyArray): 1159s > import cupy as cp 1159s E ModuleNotFoundError: No module named 'cupy' 1159s 1159s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:1010: ModuleNotFoundError 1159s _________________ test_modify_view_component[cupy_array-varm] __________________ 1159s 1159s matrix_type = functools.partial(, typ=) 1159s mapping_name = 'varm' 1159s request = > 1159s 1159s def test_modify_view_component(matrix_type, mapping_name, request): 1159s adata = ad.AnnData( 1159s np.zeros((10, 10)), 1159s > **{mapping_name: dict(m=matrix_type(asarray(sparse.random(10, 10))))}, 1159s ) 1159s 1159s tests/test_views.py:161: 1159s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1159s /usr/lib/python3.13/functools.py:934: in wrapper 1159s return dispatch(args[0].__class__)(*args, **kw) 1159s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1159s 1159s val = array([[0. , 0. , 0. , 0. , 0. , 1159s 0. , 0. , 0. , 0. ..., 0. , 0. , 0. , 0. , 1159s 0. , 0. , 0. , 0. , 0. ]]) 1159s typ = 1159s 1159s @singledispatch 1159s def as_cupy(val, typ=None): 1159s """ 1159s Rough conversion function 1159s 1159s Will try to infer target type from input type if not specified. 1159s """ 1159s if typ is None: 1159s typ = resolve_cupy_type(val) 1159s 1159s if issubclass(typ, CupyArray): 1159s > import cupy as cp 1159s E ModuleNotFoundError: No module named 'cupy' 1159s 1159s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:1010: ModuleNotFoundError 1159s _________________ test_modify_view_component[cupy_csr-layers] __________________ 1159s 1159s matrix_type = functools.partial(, typ=) 1159s mapping_name = 'layers' 1159s request = > 1159s 1159s def test_modify_view_component(matrix_type, mapping_name, request): 1159s adata = ad.AnnData( 1159s np.zeros((10, 10)), 1159s > **{mapping_name: dict(m=matrix_type(asarray(sparse.random(10, 10))))}, 1159s ) 1159s 1159s tests/test_views.py:161: 1159s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1159s /usr/lib/python3.13/functools.py:934: in wrapper 1159s return dispatch(args[0].__class__)(*args, **kw) 1159s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1159s 1159s val = array([[0. , 0. , 0. , 0. , 0. , 1159s 0. , 0. , 0. , 0. ..., 0. , 0. , 0. , 0. , 1159s 0. , 0. , 0. , 0. , 0. ]]) 1159s typ = 1159s 1159s @singledispatch 1159s def as_cupy(val, typ=None): 1159s """ 1159s Rough conversion function 1159s 1159s Will try to infer target type from input type if not specified. 1159s """ 1159s if typ is None: 1159s typ = resolve_cupy_type(val) 1159s 1159s if issubclass(typ, CupyArray): 1159s import cupy as cp 1159s 1159s if isinstance(val, CSMatrix): 1159s val = val.toarray() 1159s return cp.array(val) 1159s elif issubclass(typ, CupyCSRMatrix): 1159s > import cupy as cp 1159s E ModuleNotFoundError: No module named 'cupy' 1159s 1159s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:1016: ModuleNotFoundError 1159s __________________ test_modify_view_component[cupy_csr-obsm] ___________________ 1159s 1159s matrix_type = functools.partial(, typ=) 1159s mapping_name = 'obsm' 1159s request = > 1159s 1159s def test_modify_view_component(matrix_type, mapping_name, request): 1159s adata = ad.AnnData( 1159s np.zeros((10, 10)), 1159s > **{mapping_name: dict(m=matrix_type(asarray(sparse.random(10, 10))))}, 1159s ) 1159s 1159s tests/test_views.py:161: 1159s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1159s /usr/lib/python3.13/functools.py:934: in wrapper 1159s return dispatch(args[0].__class__)(*args, **kw) 1159s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1159s 1159s val = array([[0. , 0. , 0. , 0. , 0. , 1159s 0. , 0. , 0. , 0. ..., 0. , 0. , 0. , 0. , 1159s 0. , 0.89540588, 0. , 0. , 0. ]]) 1159s typ = 1159s 1159s @singledispatch 1159s def as_cupy(val, typ=None): 1159s """ 1159s Rough conversion function 1159s 1159s Will try to infer target type from input type if not specified. 1159s """ 1159s if typ is None: 1159s typ = resolve_cupy_type(val) 1159s 1159s if issubclass(typ, CupyArray): 1159s import cupy as cp 1159s 1159s if isinstance(val, CSMatrix): 1159s val = val.toarray() 1159s return cp.array(val) 1159s elif issubclass(typ, CupyCSRMatrix): 1159s > import cupy as cp 1159s E ModuleNotFoundError: No module named 'cupy' 1159s 1159s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:1016: ModuleNotFoundError 1159s __________________ test_modify_view_component[cupy_csr-varm] ___________________ 1159s 1159s matrix_type = functools.partial(, typ=) 1159s mapping_name = 'varm' 1159s request = > 1159s 1159s def test_modify_view_component(matrix_type, mapping_name, request): 1159s adata = ad.AnnData( 1159s np.zeros((10, 10)), 1159s > **{mapping_name: dict(m=matrix_type(asarray(sparse.random(10, 10))))}, 1159s ) 1159s 1159s tests/test_views.py:161: 1159s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1159s /usr/lib/python3.13/functools.py:934: in wrapper 1159s return dispatch(args[0].__class__)(*args, **kw) 1159s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1159s 1159s val = array([[0. , 0. , 0. , 0. , 0. , 0. , 1159s 0. , 0. , 0. , 0. ...0. , 0. , 0. , 0. , 0. , 0. , 1159s 0. , 0. , 0. , 0. ]]) 1159s typ = 1159s 1159s @singledispatch 1159s def as_cupy(val, typ=None): 1159s """ 1159s Rough conversion function 1159s 1159s Will try to infer target type from input type if not specified. 1159s """ 1159s if typ is None: 1159s typ = resolve_cupy_type(val) 1159s 1159s if issubclass(typ, CupyArray): 1159s import cupy as cp 1159s 1159s if isinstance(val, CSMatrix): 1159s val = val.toarray() 1159s return cp.array(val) 1159s elif issubclass(typ, CupyCSRMatrix): 1159s > import cupy as cp 1159s E ModuleNotFoundError: No module named 'cupy' 1159s 1159s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:1016: ModuleNotFoundError 1159s _________________ test_modify_view_component[cupy_csc-layers] __________________ 1159s 1159s matrix_type = functools.partial(, typ=) 1159s mapping_name = 'layers' 1159s request = > 1159s 1159s def test_modify_view_component(matrix_type, mapping_name, request): 1159s adata = ad.AnnData( 1159s np.zeros((10, 10)), 1159s > **{mapping_name: dict(m=matrix_type(asarray(sparse.random(10, 10))))}, 1159s ) 1159s 1159s tests/test_views.py:161: 1159s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1159s /usr/lib/python3.13/functools.py:934: in wrapper 1159s return dispatch(args[0].__class__)(*args, **kw) 1159s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1159s 1159s val = array([[0. , 0. , 0. , 0. , 0. , 1159s 0. , 0. , 0. , 0. ..., 0. , 0. , 0. , 0. , 1159s 0. , 0. , 0. , 0. , 0. ]]) 1159s typ = 1159s 1159s @singledispatch 1159s def as_cupy(val, typ=None): 1159s """ 1159s Rough conversion function 1159s 1159s Will try to infer target type from input type if not specified. 1159s """ 1159s if typ is None: 1159s typ = resolve_cupy_type(val) 1159s 1159s if issubclass(typ, CupyArray): 1159s import cupy as cp 1159s 1159s if isinstance(val, CSMatrix): 1159s val = val.toarray() 1159s return cp.array(val) 1159s elif issubclass(typ, CupyCSRMatrix): 1159s import cupy as cp 1159s import cupyx.scipy.sparse as cpsparse 1159s 1159s if isinstance(val, np.ndarray): 1159s return cpsparse.csr_matrix(cp.array(val)) 1159s else: 1159s return cpsparse.csr_matrix(val) 1159s elif issubclass(typ, CupyCSCMatrix): 1159s > import cupy as cp 1159s E ModuleNotFoundError: No module named 'cupy' 1159s 1159s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:1024: ModuleNotFoundError 1159s __________________ test_modify_view_component[cupy_csc-obsm] ___________________ 1159s 1159s matrix_type = functools.partial(, typ=) 1159s mapping_name = 'obsm' 1159s request = > 1159s 1159s def test_modify_view_component(matrix_type, mapping_name, request): 1159s adata = ad.AnnData( 1159s np.zeros((10, 10)), 1159s > **{mapping_name: dict(m=matrix_type(asarray(sparse.random(10, 10))))}, 1159s ) 1159s 1159s tests/test_views.py:161: 1159s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1159s /usr/lib/python3.13/functools.py:934: in wrapper 1159s return dispatch(args[0].__class__)(*args, **kw) 1159s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1159s 1159s val = array([[0. , 0. , 0. , 0. , 0. , 1159s 0. , 0. , 0. , 0. ..., 0. , 0. , 0. , 0. , 1159s 0. , 0. , 0. , 0. , 0. ]]) 1159s typ = 1159s 1159s @singledispatch 1159s def as_cupy(val, typ=None): 1159s """ 1159s Rough conversion function 1159s 1159s Will try to infer target type from input type if not specified. 1159s """ 1159s if typ is None: 1159s typ = resolve_cupy_type(val) 1159s 1159s if issubclass(typ, CupyArray): 1159s import cupy as cp 1159s 1159s if isinstance(val, CSMatrix): 1159s val = val.toarray() 1159s return cp.array(val) 1159s elif issubclass(typ, CupyCSRMatrix): 1159s import cupy as cp 1159s import cupyx.scipy.sparse as cpsparse 1159s 1159s if isinstance(val, np.ndarray): 1159s return cpsparse.csr_matrix(cp.array(val)) 1159s else: 1159s return cpsparse.csr_matrix(val) 1159s elif issubclass(typ, CupyCSCMatrix): 1159s > import cupy as cp 1159s E ModuleNotFoundError: No module named 'cupy' 1159s 1159s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:1024: ModuleNotFoundError 1159s __________________ test_modify_view_component[cupy_csc-varm] ___________________ 1159s 1159s matrix_type = functools.partial(, typ=) 1159s mapping_name = 'varm' 1159s request = > 1159s 1159s def test_modify_view_component(matrix_type, mapping_name, request): 1159s adata = ad.AnnData( 1159s np.zeros((10, 10)), 1159s > **{mapping_name: dict(m=matrix_type(asarray(sparse.random(10, 10))))}, 1159s ) 1159s 1159s tests/test_views.py:161: 1159s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1159s /usr/lib/python3.13/functools.py:934: in wrapper 1159s return dispatch(args[0].__class__)(*args, **kw) 1159s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1159s 1159s val = array([[0. , 0. , 0. , 0. , 0. , 1159s 0. , 0. , 0. , 0. ..., 0. , 0. , 0. , 0. , 1159s 0. , 0. , 0. , 0. , 0. ]]) 1159s typ = 1159s 1159s @singledispatch 1159s def as_cupy(val, typ=None): 1159s """ 1159s Rough conversion function 1159s 1159s Will try to infer target type from input type if not specified. 1159s """ 1159s if typ is None: 1159s typ = resolve_cupy_type(val) 1159s 1159s if issubclass(typ, CupyArray): 1159s import cupy as cp 1159s 1159s if isinstance(val, CSMatrix): 1159s val = val.toarray() 1159s return cp.array(val) 1159s elif issubclass(typ, CupyCSRMatrix): 1159s import cupy as cp 1159s import cupyx.scipy.sparse as cpsparse 1159s 1159s if isinstance(val, np.ndarray): 1159s return cpsparse.csr_matrix(cp.array(val)) 1159s else: 1159s return cpsparse.csr_matrix(val) 1159s elif issubclass(typ, CupyCSCMatrix): 1159s > import cupy as cp 1159s E ModuleNotFoundError: No module named 'cupy' 1159s 1159s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:1024: ModuleNotFoundError 1159s ______________ test_set_scalar_subset_X[cupy_array-array_subset] _______________ 1159s 1159s matrix_type = functools.partial(, typ=) 1159s subset_func = 1159s 1159s @IGNORE_SPARSE_EFFICIENCY_WARNING 1159s def test_set_scalar_subset_X(matrix_type, subset_func): 1159s > adata = ad.AnnData(matrix_type(np.zeros((10, 10)))) 1159s 1159s tests/test_views.py:369: 1159s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1159s /usr/lib/python3.13/functools.py:934: in wrapper 1159s return dispatch(args[0].__class__)(*args, **kw) 1159s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1159s 1159s val = array([[0., 0., 0., 0., 0., 0., 0., 0., 0., 0.], 1159s [0., 0., 0., 0., 0., 0., 0., 0., 0., 0.], 1159s [0., 0., 0., ...0., 0., 0., 0., 0.], 1159s [0., 0., 0., 0., 0., 0., 0., 0., 0., 0.], 1159s [0., 0., 0., 0., 0., 0., 0., 0., 0., 0.]]) 1159s typ = 1159s 1159s @singledispatch 1159s def as_cupy(val, typ=None): 1159s """ 1159s Rough conversion function 1159s 1159s Will try to infer target type from input type if not specified. 1159s """ 1159s if typ is None: 1159s typ = resolve_cupy_type(val) 1159s 1159s if issubclass(typ, CupyArray): 1159s > import cupy as cp 1159s E ModuleNotFoundError: No module named 'cupy' 1159s 1159s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:1010: ModuleNotFoundError 1159s ______________ test_set_scalar_subset_X[cupy_array-slice_subset] _______________ 1159s 1159s matrix_type = functools.partial(, typ=) 1159s subset_func = 1159s 1159s @IGNORE_SPARSE_EFFICIENCY_WARNING 1159s def test_set_scalar_subset_X(matrix_type, subset_func): 1159s > adata = ad.AnnData(matrix_type(np.zeros((10, 10)))) 1159s 1159s tests/test_views.py:369: 1159s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1159s /usr/lib/python3.13/functools.py:934: in wrapper 1159s return dispatch(args[0].__class__)(*args, **kw) 1159s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1159s 1159s val = array([[0., 0., 0., 0., 0., 0., 0., 0., 0., 0.], 1159s [0., 0., 0., 0., 0., 0., 0., 0., 0., 0.], 1159s [0., 0., 0., ...0., 0., 0., 0., 0.], 1159s [0., 0., 0., 0., 0., 0., 0., 0., 0., 0.], 1159s [0., 0., 0., 0., 0., 0., 0., 0., 0., 0.]]) 1159s typ = 1159s 1159s @singledispatch 1159s def as_cupy(val, typ=None): 1159s """ 1159s Rough conversion function 1159s 1159s Will try to infer target type from input type if not specified. 1159s """ 1159s if typ is None: 1159s typ = resolve_cupy_type(val) 1159s 1159s if issubclass(typ, CupyArray): 1159s > import cupy as cp 1159s E ModuleNotFoundError: No module named 'cupy' 1159s 1159s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:1010: ModuleNotFoundError 1159s ______________ test_set_scalar_subset_X[cupy_array-single_subset] ______________ 1159s 1159s matrix_type = functools.partial(, typ=) 1159s subset_func = 1159s 1159s @IGNORE_SPARSE_EFFICIENCY_WARNING 1159s def test_set_scalar_subset_X(matrix_type, subset_func): 1159s > adata = ad.AnnData(matrix_type(np.zeros((10, 10)))) 1159s 1159s tests/test_views.py:369: 1159s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1159s /usr/lib/python3.13/functools.py:934: in wrapper 1159s return dispatch(args[0].__class__)(*args, **kw) 1159s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1159s 1159s val = array([[0., 0., 0., 0., 0., 0., 0., 0., 0., 0.], 1159s [0., 0., 0., 0., 0., 0., 0., 0., 0., 0.], 1159s [0., 0., 0., ...0., 0., 0., 0., 0.], 1159s [0., 0., 0., 0., 0., 0., 0., 0., 0., 0.], 1159s [0., 0., 0., 0., 0., 0., 0., 0., 0., 0.]]) 1159s typ = 1159s 1159s @singledispatch 1159s def as_cupy(val, typ=None): 1159s """ 1159s Rough conversion function 1159s 1159s Will try to infer target type from input type if not specified. 1159s """ 1159s if typ is None: 1159s typ = resolve_cupy_type(val) 1159s 1159s if issubclass(typ, CupyArray): 1159s > import cupy as cp 1159s E ModuleNotFoundError: No module named 'cupy' 1159s 1159s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:1010: ModuleNotFoundError 1159s ____________ test_set_scalar_subset_X[cupy_array-array_int_subset] _____________ 1159s 1159s matrix_type = functools.partial(, typ=) 1159s subset_func = 1159s 1159s @IGNORE_SPARSE_EFFICIENCY_WARNING 1159s def test_set_scalar_subset_X(matrix_type, subset_func): 1159s > adata = ad.AnnData(matrix_type(np.zeros((10, 10)))) 1159s 1159s tests/test_views.py:369: 1159s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1159s /usr/lib/python3.13/functools.py:934: in wrapper 1159s return dispatch(args[0].__class__)(*args, **kw) 1159s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1159s 1159s val = array([[0., 0., 0., 0., 0., 0., 0., 0., 0., 0.], 1159s [0., 0., 0., 0., 0., 0., 0., 0., 0., 0.], 1159s [0., 0., 0., ...0., 0., 0., 0., 0.], 1159s [0., 0., 0., 0., 0., 0., 0., 0., 0., 0.], 1159s [0., 0., 0., 0., 0., 0., 0., 0., 0., 0.]]) 1159s typ = 1159s 1159s @singledispatch 1159s def as_cupy(val, typ=None): 1159s """ 1159s Rough conversion function 1159s 1159s Will try to infer target type from input type if not specified. 1159s """ 1159s if typ is None: 1159s typ = resolve_cupy_type(val) 1159s 1159s if issubclass(typ, CupyArray): 1159s > import cupy as cp 1159s E ModuleNotFoundError: No module named 'cupy' 1159s 1159s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:1010: ModuleNotFoundError 1159s _____________ test_set_scalar_subset_X[cupy_array-list_int_subset] _____________ 1159s 1159s matrix_type = functools.partial(, typ=) 1159s subset_func = 1159s 1159s @IGNORE_SPARSE_EFFICIENCY_WARNING 1159s def test_set_scalar_subset_X(matrix_type, subset_func): 1159s > adata = ad.AnnData(matrix_type(np.zeros((10, 10)))) 1159s 1159s tests/test_views.py:369: 1159s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1159s /usr/lib/python3.13/functools.py:934: in wrapper 1159s return dispatch(args[0].__class__)(*args, **kw) 1159s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1159s 1159s val = array([[0., 0., 0., 0., 0., 0., 0., 0., 0., 0.], 1159s [0., 0., 0., 0., 0., 0., 0., 0., 0., 0.], 1159s [0., 0., 0., ...0., 0., 0., 0., 0.], 1159s [0., 0., 0., 0., 0., 0., 0., 0., 0., 0.], 1159s [0., 0., 0., 0., 0., 0., 0., 0., 0., 0.]]) 1159s typ = 1159s 1159s @singledispatch 1159s def as_cupy(val, typ=None): 1159s """ 1159s Rough conversion function 1159s 1159s Will try to infer target type from input type if not specified. 1159s """ 1159s if typ is None: 1159s typ = resolve_cupy_type(val) 1159s 1159s if issubclass(typ, CupyArray): 1159s > import cupy as cp 1159s E ModuleNotFoundError: No module named 'cupy' 1159s 1159s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:1010: ModuleNotFoundError 1159s ____________ test_set_scalar_subset_X[cupy_array-array_bool_subset] ____________ 1159s 1159s matrix_type = functools.partial(, typ=) 1159s subset_func = 1159s 1159s @IGNORE_SPARSE_EFFICIENCY_WARNING 1159s def test_set_scalar_subset_X(matrix_type, subset_func): 1159s > adata = ad.AnnData(matrix_type(np.zeros((10, 10)))) 1159s 1159s tests/test_views.py:369: 1159s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1159s /usr/lib/python3.13/functools.py:934: in wrapper 1159s return dispatch(args[0].__class__)(*args, **kw) 1159s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1159s 1159s val = array([[0., 0., 0., 0., 0., 0., 0., 0., 0., 0.], 1159s [0., 0., 0., 0., 0., 0., 0., 0., 0., 0.], 1159s [0., 0., 0., ...0., 0., 0., 0., 0.], 1159s [0., 0., 0., 0., 0., 0., 0., 0., 0., 0.], 1159s [0., 0., 0., 0., 0., 0., 0., 0., 0., 0.]]) 1159s typ = 1159s 1159s @singledispatch 1159s def as_cupy(val, typ=None): 1159s """ 1159s Rough conversion function 1159s 1159s Will try to infer target type from input type if not specified. 1159s """ 1159s if typ is None: 1159s typ = resolve_cupy_type(val) 1159s 1159s if issubclass(typ, CupyArray): 1159s > import cupy as cp 1159s E ModuleNotFoundError: No module named 'cupy' 1159s 1159s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:1010: ModuleNotFoundError 1159s ____________ test_set_scalar_subset_X[cupy_array-list_bool_subset] _____________ 1159s 1159s matrix_type = functools.partial(, typ=) 1159s subset_func = 1159s 1159s @IGNORE_SPARSE_EFFICIENCY_WARNING 1159s def test_set_scalar_subset_X(matrix_type, subset_func): 1159s > adata = ad.AnnData(matrix_type(np.zeros((10, 10)))) 1159s 1159s tests/test_views.py:369: 1159s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1159s /usr/lib/python3.13/functools.py:934: in wrapper 1159s return dispatch(args[0].__class__)(*args, **kw) 1159s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1159s 1159s val = array([[0., 0., 0., 0., 0., 0., 0., 0., 0., 0.], 1159s [0., 0., 0., 0., 0., 0., 0., 0., 0., 0.], 1159s [0., 0., 0., ...0., 0., 0., 0., 0.], 1159s [0., 0., 0., 0., 0., 0., 0., 0., 0., 0.], 1159s [0., 0., 0., 0., 0., 0., 0., 0., 0., 0.]]) 1159s typ = 1159s 1159s @singledispatch 1159s def as_cupy(val, typ=None): 1159s """ 1159s Rough conversion function 1159s 1159s Will try to infer target type from input type if not specified. 1159s """ 1159s if typ is None: 1159s typ = resolve_cupy_type(val) 1159s 1159s if issubclass(typ, CupyArray): 1159s > import cupy as cp 1159s E ModuleNotFoundError: No module named 'cupy' 1159s 1159s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:1010: ModuleNotFoundError 1159s ___________ test_set_scalar_subset_X[cupy_array-matrix_bool_subset] ____________ 1159s 1159s matrix_type = functools.partial(, typ=) 1159s subset_func = 1159s 1159s @IGNORE_SPARSE_EFFICIENCY_WARNING 1159s def test_set_scalar_subset_X(matrix_type, subset_func): 1159s > adata = ad.AnnData(matrix_type(np.zeros((10, 10)))) 1159s 1159s tests/test_views.py:369: 1159s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1159s /usr/lib/python3.13/functools.py:934: in wrapper 1159s return dispatch(args[0].__class__)(*args, **kw) 1159s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1159s 1159s val = array([[0., 0., 0., 0., 0., 0., 0., 0., 0., 0.], 1159s [0., 0., 0., 0., 0., 0., 0., 0., 0., 0.], 1159s [0., 0., 0., ...0., 0., 0., 0., 0.], 1159s [0., 0., 0., 0., 0., 0., 0., 0., 0., 0.], 1159s [0., 0., 0., 0., 0., 0., 0., 0., 0., 0.]]) 1159s typ = 1159s 1159s @singledispatch 1159s def as_cupy(val, typ=None): 1159s """ 1159s Rough conversion function 1159s 1159s Will try to infer target type from input type if not specified. 1159s """ 1159s if typ is None: 1159s typ = resolve_cupy_type(val) 1159s 1159s if issubclass(typ, CupyArray): 1159s > import cupy as cp 1159s E ModuleNotFoundError: No module named 'cupy' 1159s 1159s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:1010: ModuleNotFoundError 1159s __________ test_set_scalar_subset_X[cupy_array-spmatrix_bool_subset] ___________ 1159s 1159s matrix_type = functools.partial(, typ=) 1159s subset_func = 1159s 1159s @IGNORE_SPARSE_EFFICIENCY_WARNING 1159s def test_set_scalar_subset_X(matrix_type, subset_func): 1159s > adata = ad.AnnData(matrix_type(np.zeros((10, 10)))) 1159s 1159s tests/test_views.py:369: 1159s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1159s /usr/lib/python3.13/functools.py:934: in wrapper 1159s return dispatch(args[0].__class__)(*args, **kw) 1159s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1159s 1159s val = array([[0., 0., 0., 0., 0., 0., 0., 0., 0., 0.], 1159s [0., 0., 0., 0., 0., 0., 0., 0., 0., 0.], 1159s [0., 0., 0., ...0., 0., 0., 0., 0.], 1159s [0., 0., 0., 0., 0., 0., 0., 0., 0., 0.], 1159s [0., 0., 0., 0., 0., 0., 0., 0., 0., 0.]]) 1159s typ = 1159s 1159s @singledispatch 1159s def as_cupy(val, typ=None): 1159s """ 1159s Rough conversion function 1159s 1159s Will try to infer target type from input type if not specified. 1159s """ 1159s if typ is None: 1159s typ = resolve_cupy_type(val) 1159s 1159s if issubclass(typ, CupyArray): 1159s > import cupy as cp 1159s E ModuleNotFoundError: No module named 'cupy' 1159s 1159s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:1010: ModuleNotFoundError 1159s ___________ test_set_scalar_subset_X[cupy_array-sparray_bool_subset] ___________ 1159s 1159s matrix_type = functools.partial(, typ=) 1159s subset_func = 1159s 1159s @IGNORE_SPARSE_EFFICIENCY_WARNING 1159s def test_set_scalar_subset_X(matrix_type, subset_func): 1159s > adata = ad.AnnData(matrix_type(np.zeros((10, 10)))) 1159s 1159s tests/test_views.py:369: 1159s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1159s /usr/lib/python3.13/functools.py:934: in wrapper 1159s return dispatch(args[0].__class__)(*args, **kw) 1159s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1159s 1159s val = array([[0., 0., 0., 0., 0., 0., 0., 0., 0., 0.], 1159s [0., 0., 0., 0., 0., 0., 0., 0., 0., 0.], 1159s [0., 0., 0., ...0., 0., 0., 0., 0.], 1159s [0., 0., 0., 0., 0., 0., 0., 0., 0., 0.], 1159s [0., 0., 0., 0., 0., 0., 0., 0., 0., 0.]]) 1159s typ = 1159s 1159s @singledispatch 1159s def as_cupy(val, typ=None): 1159s """ 1159s Rough conversion function 1159s 1159s Will try to infer target type from input type if not specified. 1159s """ 1159s if typ is None: 1159s typ = resolve_cupy_type(val) 1159s 1159s if issubclass(typ, CupyArray): 1159s > import cupy as cp 1159s E ModuleNotFoundError: No module named 'cupy' 1159s 1159s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:1010: ModuleNotFoundError 1159s _______________ test_set_scalar_subset_X[cupy_csr-array_subset] ________________ 1159s 1159s matrix_type = functools.partial(, typ=) 1159s subset_func = 1159s 1159s @IGNORE_SPARSE_EFFICIENCY_WARNING 1159s def test_set_scalar_subset_X(matrix_type, subset_func): 1159s > adata = ad.AnnData(matrix_type(np.zeros((10, 10)))) 1159s 1159s tests/test_views.py:369: 1159s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1159s /usr/lib/python3.13/functools.py:934: in wrapper 1159s return dispatch(args[0].__class__)(*args, **kw) 1159s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1159s 1159s val = array([[0., 0., 0., 0., 0., 0., 0., 0., 0., 0.], 1159s [0., 0., 0., 0., 0., 0., 0., 0., 0., 0.], 1159s [0., 0., 0., ...0., 0., 0., 0., 0.], 1159s [0., 0., 0., 0., 0., 0., 0., 0., 0., 0.], 1159s [0., 0., 0., 0., 0., 0., 0., 0., 0., 0.]]) 1159s typ = 1159s 1159s @singledispatch 1159s def as_cupy(val, typ=None): 1159s """ 1159s Rough conversion function 1159s 1159s Will try to infer target type from input type if not specified. 1159s """ 1159s if typ is None: 1159s typ = resolve_cupy_type(val) 1159s 1159s if issubclass(typ, CupyArray): 1159s import cupy as cp 1159s 1159s if isinstance(val, CSMatrix): 1159s val = val.toarray() 1159s return cp.array(val) 1159s elif issubclass(typ, CupyCSRMatrix): 1159s > import cupy as cp 1159s E ModuleNotFoundError: No module named 'cupy' 1159s 1159s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:1016: ModuleNotFoundError 1159s _______________ test_set_scalar_subset_X[cupy_csr-slice_subset] ________________ 1159s 1159s matrix_type = functools.partial(, typ=) 1159s subset_func = 1159s 1159s @IGNORE_SPARSE_EFFICIENCY_WARNING 1159s def test_set_scalar_subset_X(matrix_type, subset_func): 1159s > adata = ad.AnnData(matrix_type(np.zeros((10, 10)))) 1159s 1159s tests/test_views.py:369: 1159s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1159s /usr/lib/python3.13/functools.py:934: in wrapper 1159s return dispatch(args[0].__class__)(*args, **kw) 1159s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1159s 1159s val = array([[0., 0., 0., 0., 0., 0., 0., 0., 0., 0.], 1159s [0., 0., 0., 0., 0., 0., 0., 0., 0., 0.], 1159s [0., 0., 0., ...0., 0., 0., 0., 0.], 1159s [0., 0., 0., 0., 0., 0., 0., 0., 0., 0.], 1159s [0., 0., 0., 0., 0., 0., 0., 0., 0., 0.]]) 1159s typ = 1159s 1159s @singledispatch 1159s def as_cupy(val, typ=None): 1159s """ 1159s Rough conversion function 1159s 1159s Will try to infer target type from input type if not specified. 1159s """ 1159s if typ is None: 1159s typ = resolve_cupy_type(val) 1159s 1159s if issubclass(typ, CupyArray): 1159s import cupy as cp 1159s 1159s if isinstance(val, CSMatrix): 1159s val = val.toarray() 1159s return cp.array(val) 1159s elif issubclass(typ, CupyCSRMatrix): 1159s > import cupy as cp 1159s E ModuleNotFoundError: No module named 'cupy' 1159s 1159s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:1016: ModuleNotFoundError 1159s _______________ test_set_scalar_subset_X[cupy_csr-single_subset] _______________ 1159s 1159s matrix_type = functools.partial(, typ=) 1159s subset_func = 1159s 1159s @IGNORE_SPARSE_EFFICIENCY_WARNING 1159s def test_set_scalar_subset_X(matrix_type, subset_func): 1159s > adata = ad.AnnData(matrix_type(np.zeros((10, 10)))) 1159s 1159s tests/test_views.py:369: 1159s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1159s /usr/lib/python3.13/functools.py:934: in wrapper 1159s return dispatch(args[0].__class__)(*args, **kw) 1159s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1159s 1159s val = array([[0., 0., 0., 0., 0., 0., 0., 0., 0., 0.], 1159s [0., 0., 0., 0., 0., 0., 0., 0., 0., 0.], 1159s [0., 0., 0., ...0., 0., 0., 0., 0.], 1159s [0., 0., 0., 0., 0., 0., 0., 0., 0., 0.], 1159s [0., 0., 0., 0., 0., 0., 0., 0., 0., 0.]]) 1159s typ = 1159s 1159s @singledispatch 1159s def as_cupy(val, typ=None): 1159s """ 1159s Rough conversion function 1159s 1159s Will try to infer target type from input type if not specified. 1159s """ 1159s if typ is None: 1159s typ = resolve_cupy_type(val) 1159s 1159s if issubclass(typ, CupyArray): 1159s import cupy as cp 1159s 1159s if isinstance(val, CSMatrix): 1159s val = val.toarray() 1159s return cp.array(val) 1159s elif issubclass(typ, CupyCSRMatrix): 1159s > import cupy as cp 1159s E ModuleNotFoundError: No module named 'cupy' 1159s 1159s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:1016: ModuleNotFoundError 1159s _____________ test_set_scalar_subset_X[cupy_csr-array_int_subset] ______________ 1159s 1159s matrix_type = functools.partial(, typ=) 1159s subset_func = 1159s 1159s @IGNORE_SPARSE_EFFICIENCY_WARNING 1159s def test_set_scalar_subset_X(matrix_type, subset_func): 1159s > adata = ad.AnnData(matrix_type(np.zeros((10, 10)))) 1159s 1159s tests/test_views.py:369: 1159s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1159s /usr/lib/python3.13/functools.py:934: in wrapper 1159s return dispatch(args[0].__class__)(*args, **kw) 1159s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1159s 1159s val = array([[0., 0., 0., 0., 0., 0., 0., 0., 0., 0.], 1159s [0., 0., 0., 0., 0., 0., 0., 0., 0., 0.], 1159s [0., 0., 0., ...0., 0., 0., 0., 0.], 1159s [0., 0., 0., 0., 0., 0., 0., 0., 0., 0.], 1159s [0., 0., 0., 0., 0., 0., 0., 0., 0., 0.]]) 1159s typ = 1159s 1159s @singledispatch 1159s def as_cupy(val, typ=None): 1159s """ 1159s Rough conversion function 1159s 1159s Will try to infer target type from input type if not specified. 1159s """ 1159s if typ is None: 1159s typ = resolve_cupy_type(val) 1159s 1159s if issubclass(typ, CupyArray): 1159s import cupy as cp 1159s 1159s if isinstance(val, CSMatrix): 1159s val = val.toarray() 1159s return cp.array(val) 1159s elif issubclass(typ, CupyCSRMatrix): 1159s > import cupy as cp 1159s E ModuleNotFoundError: No module named 'cupy' 1159s 1159s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:1016: ModuleNotFoundError 1159s ______________ test_set_scalar_subset_X[cupy_csr-list_int_subset] ______________ 1159s 1159s matrix_type = functools.partial(, typ=) 1159s subset_func = 1159s 1159s @IGNORE_SPARSE_EFFICIENCY_WARNING 1159s def test_set_scalar_subset_X(matrix_type, subset_func): 1159s > adata = ad.AnnData(matrix_type(np.zeros((10, 10)))) 1159s 1159s tests/test_views.py:369: 1159s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1159s /usr/lib/python3.13/functools.py:934: in wrapper 1159s return dispatch(args[0].__class__)(*args, **kw) 1159s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1159s 1159s val = array([[0., 0., 0., 0., 0., 0., 0., 0., 0., 0.], 1159s [0., 0., 0., 0., 0., 0., 0., 0., 0., 0.], 1159s [0., 0., 0., ...0., 0., 0., 0., 0.], 1159s [0., 0., 0., 0., 0., 0., 0., 0., 0., 0.], 1159s [0., 0., 0., 0., 0., 0., 0., 0., 0., 0.]]) 1159s typ = 1159s 1159s @singledispatch 1159s def as_cupy(val, typ=None): 1159s """ 1159s Rough conversion function 1159s 1159s Will try to infer target type from input type if not specified. 1159s """ 1159s if typ is None: 1159s typ = resolve_cupy_type(val) 1159s 1159s if issubclass(typ, CupyArray): 1159s import cupy as cp 1159s 1159s if isinstance(val, CSMatrix): 1159s val = val.toarray() 1159s return cp.array(val) 1159s elif issubclass(typ, CupyCSRMatrix): 1159s > import cupy as cp 1159s E ModuleNotFoundError: No module named 'cupy' 1159s 1159s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:1016: ModuleNotFoundError 1159s _____________ test_set_scalar_subset_X[cupy_csr-array_bool_subset] _____________ 1159s 1159s matrix_type = functools.partial(, typ=) 1159s subset_func = 1159s 1159s @IGNORE_SPARSE_EFFICIENCY_WARNING 1159s def test_set_scalar_subset_X(matrix_type, subset_func): 1159s > adata = ad.AnnData(matrix_type(np.zeros((10, 10)))) 1159s 1159s tests/test_views.py:369: 1159s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1159s /usr/lib/python3.13/functools.py:934: in wrapper 1159s return dispatch(args[0].__class__)(*args, **kw) 1159s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1159s 1159s val = array([[0., 0., 0., 0., 0., 0., 0., 0., 0., 0.], 1159s [0., 0., 0., 0., 0., 0., 0., 0., 0., 0.], 1159s [0., 0., 0., ...0., 0., 0., 0., 0.], 1159s [0., 0., 0., 0., 0., 0., 0., 0., 0., 0.], 1159s [0., 0., 0., 0., 0., 0., 0., 0., 0., 0.]]) 1159s typ = 1159s 1159s @singledispatch 1159s def as_cupy(val, typ=None): 1159s """ 1159s Rough conversion function 1159s 1159s Will try to infer target type from input type if not specified. 1159s """ 1159s if typ is None: 1159s typ = resolve_cupy_type(val) 1159s 1159s if issubclass(typ, CupyArray): 1159s import cupy as cp 1159s 1159s if isinstance(val, CSMatrix): 1159s val = val.toarray() 1159s return cp.array(val) 1159s elif issubclass(typ, CupyCSRMatrix): 1159s > import cupy as cp 1159s E ModuleNotFoundError: No module named 'cupy' 1159s 1159s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:1016: ModuleNotFoundError 1159s _____________ test_set_scalar_subset_X[cupy_csr-list_bool_subset] ______________ 1159s 1159s matrix_type = functools.partial(, typ=) 1159s subset_func = 1159s 1159s @IGNORE_SPARSE_EFFICIENCY_WARNING 1159s def test_set_scalar_subset_X(matrix_type, subset_func): 1159s > adata = ad.AnnData(matrix_type(np.zeros((10, 10)))) 1159s 1159s tests/test_views.py:369: 1159s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1159s /usr/lib/python3.13/functools.py:934: in wrapper 1159s return dispatch(args[0].__class__)(*args, **kw) 1159s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1159s 1159s val = array([[0., 0., 0., 0., 0., 0., 0., 0., 0., 0.], 1159s [0., 0., 0., 0., 0., 0., 0., 0., 0., 0.], 1159s [0., 0., 0., ...0., 0., 0., 0., 0.], 1159s [0., 0., 0., 0., 0., 0., 0., 0., 0., 0.], 1159s [0., 0., 0., 0., 0., 0., 0., 0., 0., 0.]]) 1159s typ = 1159s 1159s @singledispatch 1159s def as_cupy(val, typ=None): 1159s """ 1159s Rough conversion function 1159s 1159s Will try to infer target type from input type if not specified. 1159s """ 1159s if typ is None: 1159s typ = resolve_cupy_type(val) 1159s 1159s if issubclass(typ, CupyArray): 1159s import cupy as cp 1159s 1159s if isinstance(val, CSMatrix): 1159s val = val.toarray() 1159s return cp.array(val) 1159s elif issubclass(typ, CupyCSRMatrix): 1159s > import cupy as cp 1159s E ModuleNotFoundError: No module named 'cupy' 1159s 1159s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:1016: ModuleNotFoundError 1159s ____________ test_set_scalar_subset_X[cupy_csr-matrix_bool_subset] _____________ 1159s 1159s matrix_type = functools.partial(, typ=) 1159s subset_func = 1159s 1159s @IGNORE_SPARSE_EFFICIENCY_WARNING 1159s def test_set_scalar_subset_X(matrix_type, subset_func): 1159s > adata = ad.AnnData(matrix_type(np.zeros((10, 10)))) 1159s 1159s tests/test_views.py:369: 1159s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1159s /usr/lib/python3.13/functools.py:934: in wrapper 1159s return dispatch(args[0].__class__)(*args, **kw) 1159s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1159s 1159s val = array([[0., 0., 0., 0., 0., 0., 0., 0., 0., 0.], 1159s [0., 0., 0., 0., 0., 0., 0., 0., 0., 0.], 1159s [0., 0., 0., ...0., 0., 0., 0., 0.], 1159s [0., 0., 0., 0., 0., 0., 0., 0., 0., 0.], 1159s [0., 0., 0., 0., 0., 0., 0., 0., 0., 0.]]) 1159s typ = 1159s 1159s @singledispatch 1159s def as_cupy(val, typ=None): 1159s """ 1159s Rough conversion function 1159s 1159s Will try to infer target type from input type if not specified. 1159s """ 1159s if typ is None: 1159s typ = resolve_cupy_type(val) 1159s 1159s if issubclass(typ, CupyArray): 1159s import cupy as cp 1159s 1159s if isinstance(val, CSMatrix): 1159s val = val.toarray() 1159s return cp.array(val) 1159s elif issubclass(typ, CupyCSRMatrix): 1159s > import cupy as cp 1159s E ModuleNotFoundError: No module named 'cupy' 1159s 1159s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:1016: ModuleNotFoundError 1159s ___________ test_set_scalar_subset_X[cupy_csr-spmatrix_bool_subset] ____________ 1159s 1159s matrix_type = functools.partial(, typ=) 1159s subset_func = 1159s 1159s @IGNORE_SPARSE_EFFICIENCY_WARNING 1159s def test_set_scalar_subset_X(matrix_type, subset_func): 1159s > adata = ad.AnnData(matrix_type(np.zeros((10, 10)))) 1159s 1159s tests/test_views.py:369: 1159s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1159s /usr/lib/python3.13/functools.py:934: in wrapper 1159s return dispatch(args[0].__class__)(*args, **kw) 1159s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1159s 1159s val = array([[0., 0., 0., 0., 0., 0., 0., 0., 0., 0.], 1159s [0., 0., 0., 0., 0., 0., 0., 0., 0., 0.], 1159s [0., 0., 0., ...0., 0., 0., 0., 0.], 1159s [0., 0., 0., 0., 0., 0., 0., 0., 0., 0.], 1159s [0., 0., 0., 0., 0., 0., 0., 0., 0., 0.]]) 1159s typ = 1159s 1159s @singledispatch 1159s def as_cupy(val, typ=None): 1159s """ 1159s Rough conversion function 1159s 1159s Will try to infer target type from input type if not specified. 1159s """ 1159s if typ is None: 1159s typ = resolve_cupy_type(val) 1159s 1159s if issubclass(typ, CupyArray): 1159s import cupy as cp 1159s 1159s if isinstance(val, CSMatrix): 1159s val = val.toarray() 1159s return cp.array(val) 1159s elif issubclass(typ, CupyCSRMatrix): 1159s > import cupy as cp 1159s E ModuleNotFoundError: No module named 'cupy' 1159s 1159s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:1016: ModuleNotFoundError 1159s ____________ test_set_scalar_subset_X[cupy_csr-sparray_bool_subset] ____________ 1159s 1159s matrix_type = functools.partial(, typ=) 1159s subset_func = 1159s 1159s @IGNORE_SPARSE_EFFICIENCY_WARNING 1159s def test_set_scalar_subset_X(matrix_type, subset_func): 1159s > adata = ad.AnnData(matrix_type(np.zeros((10, 10)))) 1159s 1159s tests/test_views.py:369: 1159s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1159s /usr/lib/python3.13/functools.py:934: in wrapper 1159s return dispatch(args[0].__class__)(*args, **kw) 1159s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1159s 1159s val = array([[0., 0., 0., 0., 0., 0., 0., 0., 0., 0.], 1159s [0., 0., 0., 0., 0., 0., 0., 0., 0., 0.], 1159s [0., 0., 0., ...0., 0., 0., 0., 0.], 1159s [0., 0., 0., 0., 0., 0., 0., 0., 0., 0.], 1159s [0., 0., 0., 0., 0., 0., 0., 0., 0., 0.]]) 1159s typ = 1159s 1159s @singledispatch 1159s def as_cupy(val, typ=None): 1159s """ 1159s Rough conversion function 1159s 1159s Will try to infer target type from input type if not specified. 1159s """ 1159s if typ is None: 1159s typ = resolve_cupy_type(val) 1159s 1159s if issubclass(typ, CupyArray): 1159s import cupy as cp 1159s 1159s if isinstance(val, CSMatrix): 1159s val = val.toarray() 1159s return cp.array(val) 1159s elif issubclass(typ, CupyCSRMatrix): 1159s > import cupy as cp 1159s E ModuleNotFoundError: No module named 'cupy' 1159s 1159s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:1016: ModuleNotFoundError 1159s _______________ test_set_scalar_subset_X[cupy_csc-array_subset] ________________ 1159s 1159s matrix_type = functools.partial(, typ=) 1159s subset_func = 1159s 1159s @IGNORE_SPARSE_EFFICIENCY_WARNING 1159s def test_set_scalar_subset_X(matrix_type, subset_func): 1159s > adata = ad.AnnData(matrix_type(np.zeros((10, 10)))) 1159s 1159s tests/test_views.py:369: 1159s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1159s /usr/lib/python3.13/functools.py:934: in wrapper 1159s return dispatch(args[0].__class__)(*args, **kw) 1159s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1159s 1159s val = array([[0., 0., 0., 0., 0., 0., 0., 0., 0., 0.], 1159s [0., 0., 0., 0., 0., 0., 0., 0., 0., 0.], 1159s [0., 0., 0., ...0., 0., 0., 0., 0.], 1159s [0., 0., 0., 0., 0., 0., 0., 0., 0., 0.], 1159s [0., 0., 0., 0., 0., 0., 0., 0., 0., 0.]]) 1159s typ = 1159s 1159s @singledispatch 1159s def as_cupy(val, typ=None): 1159s """ 1159s Rough conversion function 1159s 1159s Will try to infer target type from input type if not specified. 1159s """ 1159s if typ is None: 1159s typ = resolve_cupy_type(val) 1159s 1159s if issubclass(typ, CupyArray): 1159s import cupy as cp 1159s 1159s if isinstance(val, CSMatrix): 1159s val = val.toarray() 1159s return cp.array(val) 1159s elif issubclass(typ, CupyCSRMatrix): 1159s import cupy as cp 1159s import cupyx.scipy.sparse as cpsparse 1159s 1159s if isinstance(val, np.ndarray): 1159s return cpsparse.csr_matrix(cp.array(val)) 1159s else: 1159s return cpsparse.csr_matrix(val) 1159s elif issubclass(typ, CupyCSCMatrix): 1159s > import cupy as cp 1159s E ModuleNotFoundError: No module named 'cupy' 1159s 1159s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:1024: ModuleNotFoundError 1159s _______________ test_set_scalar_subset_X[cupy_csc-slice_subset] ________________ 1159s 1159s matrix_type = functools.partial(, typ=) 1159s subset_func = 1159s 1159s @IGNORE_SPARSE_EFFICIENCY_WARNING 1159s def test_set_scalar_subset_X(matrix_type, subset_func): 1159s > adata = ad.AnnData(matrix_type(np.zeros((10, 10)))) 1159s 1159s tests/test_views.py:369: 1159s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1159s /usr/lib/python3.13/functools.py:934: in wrapper 1159s return dispatch(args[0].__class__)(*args, **kw) 1159s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1159s 1159s val = array([[0., 0., 0., 0., 0., 0., 0., 0., 0., 0.], 1159s [0., 0., 0., 0., 0., 0., 0., 0., 0., 0.], 1159s [0., 0., 0., ...0., 0., 0., 0., 0.], 1159s [0., 0., 0., 0., 0., 0., 0., 0., 0., 0.], 1159s [0., 0., 0., 0., 0., 0., 0., 0., 0., 0.]]) 1159s typ = 1159s 1159s @singledispatch 1159s def as_cupy(val, typ=None): 1159s """ 1159s Rough conversion function 1159s 1159s Will try to infer target type from input type if not specified. 1159s """ 1159s if typ is None: 1159s typ = resolve_cupy_type(val) 1159s 1159s if issubclass(typ, CupyArray): 1159s import cupy as cp 1159s 1159s if isinstance(val, CSMatrix): 1159s val = val.toarray() 1159s return cp.array(val) 1159s elif issubclass(typ, CupyCSRMatrix): 1159s import cupy as cp 1159s import cupyx.scipy.sparse as cpsparse 1159s 1159s if isinstance(val, np.ndarray): 1159s return cpsparse.csr_matrix(cp.array(val)) 1159s else: 1159s return cpsparse.csr_matrix(val) 1159s elif issubclass(typ, CupyCSCMatrix): 1159s > import cupy as cp 1159s E ModuleNotFoundError: No module named 'cupy' 1159s 1159s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:1024: ModuleNotFoundError 1159s _______________ test_set_scalar_subset_X[cupy_csc-single_subset] _______________ 1159s 1159s matrix_type = functools.partial(, typ=) 1159s subset_func = 1159s 1159s @IGNORE_SPARSE_EFFICIENCY_WARNING 1159s def test_set_scalar_subset_X(matrix_type, subset_func): 1159s > adata = ad.AnnData(matrix_type(np.zeros((10, 10)))) 1159s 1159s tests/test_views.py:369: 1159s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1159s /usr/lib/python3.13/functools.py:934: in wrapper 1159s return dispatch(args[0].__class__)(*args, **kw) 1159s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1159s 1159s val = array([[0., 0., 0., 0., 0., 0., 0., 0., 0., 0.], 1159s [0., 0., 0., 0., 0., 0., 0., 0., 0., 0.], 1159s [0., 0., 0., ...0., 0., 0., 0., 0.], 1159s [0., 0., 0., 0., 0., 0., 0., 0., 0., 0.], 1159s [0., 0., 0., 0., 0., 0., 0., 0., 0., 0.]]) 1159s typ = 1159s 1159s @singledispatch 1159s def as_cupy(val, typ=None): 1159s """ 1159s Rough conversion function 1159s 1159s Will try to infer target type from input type if not specified. 1159s """ 1159s if typ is None: 1159s typ = resolve_cupy_type(val) 1159s 1159s if issubclass(typ, CupyArray): 1159s import cupy as cp 1159s 1159s if isinstance(val, CSMatrix): 1159s val = val.toarray() 1159s return cp.array(val) 1159s elif issubclass(typ, CupyCSRMatrix): 1159s import cupy as cp 1159s import cupyx.scipy.sparse as cpsparse 1159s 1159s if isinstance(val, np.ndarray): 1159s return cpsparse.csr_matrix(cp.array(val)) 1159s else: 1159s return cpsparse.csr_matrix(val) 1159s elif issubclass(typ, CupyCSCMatrix): 1159s > import cupy as cp 1159s E ModuleNotFoundError: No module named 'cupy' 1159s 1159s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:1024: ModuleNotFoundError 1159s _____________ test_set_scalar_subset_X[cupy_csc-array_int_subset] ______________ 1159s 1159s matrix_type = functools.partial(, typ=) 1159s subset_func = 1159s 1159s @IGNORE_SPARSE_EFFICIENCY_WARNING 1159s def test_set_scalar_subset_X(matrix_type, subset_func): 1159s > adata = ad.AnnData(matrix_type(np.zeros((10, 10)))) 1159s 1159s tests/test_views.py:369: 1159s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1159s /usr/lib/python3.13/functools.py:934: in wrapper 1159s return dispatch(args[0].__class__)(*args, **kw) 1159s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1159s 1159s val = array([[0., 0., 0., 0., 0., 0., 0., 0., 0., 0.], 1159s [0., 0., 0., 0., 0., 0., 0., 0., 0., 0.], 1159s [0., 0., 0., ...0., 0., 0., 0., 0.], 1159s [0., 0., 0., 0., 0., 0., 0., 0., 0., 0.], 1159s [0., 0., 0., 0., 0., 0., 0., 0., 0., 0.]]) 1159s typ = 1159s 1159s @singledispatch 1159s def as_cupy(val, typ=None): 1159s """ 1159s Rough conversion function 1159s 1159s Will try to infer target type from input type if not specified. 1159s """ 1159s if typ is None: 1159s typ = resolve_cupy_type(val) 1159s 1159s if issubclass(typ, CupyArray): 1159s import cupy as cp 1159s 1159s if isinstance(val, CSMatrix): 1159s val = val.toarray() 1159s return cp.array(val) 1159s elif issubclass(typ, CupyCSRMatrix): 1159s import cupy as cp 1159s import cupyx.scipy.sparse as cpsparse 1159s 1159s if isinstance(val, np.ndarray): 1159s return cpsparse.csr_matrix(cp.array(val)) 1159s else: 1159s return cpsparse.csr_matrix(val) 1159s elif issubclass(typ, CupyCSCMatrix): 1159s > import cupy as cp 1159s E ModuleNotFoundError: No module named 'cupy' 1159s 1159s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:1024: ModuleNotFoundError 1159s ______________ test_set_scalar_subset_X[cupy_csc-list_int_subset] ______________ 1159s 1159s matrix_type = functools.partial(, typ=) 1159s subset_func = 1159s 1159s @IGNORE_SPARSE_EFFICIENCY_WARNING 1159s def test_set_scalar_subset_X(matrix_type, subset_func): 1159s > adata = ad.AnnData(matrix_type(np.zeros((10, 10)))) 1159s 1159s tests/test_views.py:369: 1159s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1159s /usr/lib/python3.13/functools.py:934: in wrapper 1159s return dispatch(args[0].__class__)(*args, **kw) 1159s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1159s 1159s val = array([[0., 0., 0., 0., 0., 0., 0., 0., 0., 0.], 1159s [0., 0., 0., 0., 0., 0., 0., 0., 0., 0.], 1159s [0., 0., 0., ...0., 0., 0., 0., 0.], 1159s [0., 0., 0., 0., 0., 0., 0., 0., 0., 0.], 1159s [0., 0., 0., 0., 0., 0., 0., 0., 0., 0.]]) 1159s typ = 1159s 1159s @singledispatch 1159s def as_cupy(val, typ=None): 1159s """ 1159s Rough conversion function 1159s 1159s Will try to infer target type from input type if not specified. 1159s """ 1159s if typ is None: 1159s typ = resolve_cupy_type(val) 1159s 1159s if issubclass(typ, CupyArray): 1159s import cupy as cp 1159s 1159s if isinstance(val, CSMatrix): 1159s val = val.toarray() 1159s return cp.array(val) 1159s elif issubclass(typ, CupyCSRMatrix): 1159s import cupy as cp 1159s import cupyx.scipy.sparse as cpsparse 1159s 1159s if isinstance(val, np.ndarray): 1159s return cpsparse.csr_matrix(cp.array(val)) 1159s else: 1159s return cpsparse.csr_matrix(val) 1159s elif issubclass(typ, CupyCSCMatrix): 1159s > import cupy as cp 1159s E ModuleNotFoundError: No module named 'cupy' 1159s 1159s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:1024: ModuleNotFoundError 1159s _____________ test_set_scalar_subset_X[cupy_csc-array_bool_subset] _____________ 1159s 1159s matrix_type = functools.partial(, typ=) 1159s subset_func = 1159s 1159s @IGNORE_SPARSE_EFFICIENCY_WARNING 1159s def test_set_scalar_subset_X(matrix_type, subset_func): 1159s > adata = ad.AnnData(matrix_type(np.zeros((10, 10)))) 1159s 1159s tests/test_views.py:369: 1159s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1159s /usr/lib/python3.13/functools.py:934: in wrapper 1159s return dispatch(args[0].__class__)(*args, **kw) 1159s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1159s 1159s val = array([[0., 0., 0., 0., 0., 0., 0., 0., 0., 0.], 1159s [0., 0., 0., 0., 0., 0., 0., 0., 0., 0.], 1159s [0., 0., 0., ...0., 0., 0., 0., 0.], 1159s [0., 0., 0., 0., 0., 0., 0., 0., 0., 0.], 1159s [0., 0., 0., 0., 0., 0., 0., 0., 0., 0.]]) 1159s typ = 1159s 1159s @singledispatch 1159s def as_cupy(val, typ=None): 1159s """ 1159s Rough conversion function 1159s 1159s Will try to infer target type from input type if not specified. 1159s """ 1159s if typ is None: 1159s typ = resolve_cupy_type(val) 1159s 1159s if issubclass(typ, CupyArray): 1159s import cupy as cp 1159s 1159s if isinstance(val, CSMatrix): 1159s val = val.toarray() 1159s return cp.array(val) 1159s elif issubclass(typ, CupyCSRMatrix): 1159s import cupy as cp 1159s import cupyx.scipy.sparse as cpsparse 1159s 1159s if isinstance(val, np.ndarray): 1159s return cpsparse.csr_matrix(cp.array(val)) 1159s else: 1159s return cpsparse.csr_matrix(val) 1159s elif issubclass(typ, CupyCSCMatrix): 1159s > import cupy as cp 1159s E ModuleNotFoundError: No module named 'cupy' 1159s 1159s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:1024: ModuleNotFoundError 1159s _____________ test_set_scalar_subset_X[cupy_csc-list_bool_subset] ______________ 1159s 1159s matrix_type = functools.partial(, typ=) 1159s subset_func = 1159s 1159s @IGNORE_SPARSE_EFFICIENCY_WARNING 1159s def test_set_scalar_subset_X(matrix_type, subset_func): 1159s > adata = ad.AnnData(matrix_type(np.zeros((10, 10)))) 1159s 1159s tests/test_views.py:369: 1159s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1159s /usr/lib/python3.13/functools.py:934: in wrapper 1159s return dispatch(args[0].__class__)(*args, **kw) 1159s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1159s 1159s val = array([[0., 0., 0., 0., 0., 0., 0., 0., 0., 0.], 1159s [0., 0., 0., 0., 0., 0., 0., 0., 0., 0.], 1159s [0., 0., 0., ...0., 0., 0., 0., 0.], 1159s [0., 0., 0., 0., 0., 0., 0., 0., 0., 0.], 1159s [0., 0., 0., 0., 0., 0., 0., 0., 0., 0.]]) 1159s typ = 1159s 1159s @singledispatch 1159s def as_cupy(val, typ=None): 1159s """ 1159s Rough conversion function 1159s 1159s Will try to infer target type from input type if not specified. 1159s """ 1159s if typ is None: 1159s typ = resolve_cupy_type(val) 1159s 1159s if issubclass(typ, CupyArray): 1159s import cupy as cp 1159s 1159s if isinstance(val, CSMatrix): 1159s val = val.toarray() 1159s return cp.array(val) 1159s elif issubclass(typ, CupyCSRMatrix): 1159s import cupy as cp 1159s import cupyx.scipy.sparse as cpsparse 1159s 1159s if isinstance(val, np.ndarray): 1159s return cpsparse.csr_matrix(cp.array(val)) 1159s else: 1159s return cpsparse.csr_matrix(val) 1159s elif issubclass(typ, CupyCSCMatrix): 1159s > import cupy as cp 1159s E ModuleNotFoundError: No module named 'cupy' 1159s 1159s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:1024: ModuleNotFoundError 1159s ____________ test_set_scalar_subset_X[cupy_csc-matrix_bool_subset] _____________ 1159s 1159s matrix_type = functools.partial(, typ=) 1159s subset_func = 1159s 1159s @IGNORE_SPARSE_EFFICIENCY_WARNING 1159s def test_set_scalar_subset_X(matrix_type, subset_func): 1159s > adata = ad.AnnData(matrix_type(np.zeros((10, 10)))) 1159s 1159s tests/test_views.py:369: 1159s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1159s /usr/lib/python3.13/functools.py:934: in wrapper 1159s return dispatch(args[0].__class__)(*args, **kw) 1159s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1159s 1159s val = array([[0., 0., 0., 0., 0., 0., 0., 0., 0., 0.], 1159s [0., 0., 0., 0., 0., 0., 0., 0., 0., 0.], 1159s [0., 0., 0., ...0., 0., 0., 0., 0.], 1159s [0., 0., 0., 0., 0., 0., 0., 0., 0., 0.], 1159s [0., 0., 0., 0., 0., 0., 0., 0., 0., 0.]]) 1159s typ = 1159s 1159s @singledispatch 1159s def as_cupy(val, typ=None): 1159s """ 1159s Rough conversion function 1159s 1159s Will try to infer target type from input type if not specified. 1159s """ 1159s if typ is None: 1159s typ = resolve_cupy_type(val) 1159s 1159s if issubclass(typ, CupyArray): 1159s import cupy as cp 1159s 1159s if isinstance(val, CSMatrix): 1159s val = val.toarray() 1159s return cp.array(val) 1159s elif issubclass(typ, CupyCSRMatrix): 1159s import cupy as cp 1159s import cupyx.scipy.sparse as cpsparse 1159s 1159s if isinstance(val, np.ndarray): 1159s return cpsparse.csr_matrix(cp.array(val)) 1159s else: 1159s return cpsparse.csr_matrix(val) 1159s elif issubclass(typ, CupyCSCMatrix): 1159s > import cupy as cp 1159s E ModuleNotFoundError: No module named 'cupy' 1159s 1159s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:1024: ModuleNotFoundError 1159s ___________ test_set_scalar_subset_X[cupy_csc-spmatrix_bool_subset] ____________ 1159s 1159s matrix_type = functools.partial(, typ=) 1159s subset_func = 1159s 1159s @IGNORE_SPARSE_EFFICIENCY_WARNING 1159s def test_set_scalar_subset_X(matrix_type, subset_func): 1159s > adata = ad.AnnData(matrix_type(np.zeros((10, 10)))) 1159s 1159s tests/test_views.py:369: 1159s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1159s /usr/lib/python3.13/functools.py:934: in wrapper 1159s return dispatch(args[0].__class__)(*args, **kw) 1159s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1159s 1159s val = array([[0., 0., 0., 0., 0., 0., 0., 0., 0., 0.], 1159s [0., 0., 0., 0., 0., 0., 0., 0., 0., 0.], 1159s [0., 0., 0., ...0., 0., 0., 0., 0.], 1159s [0., 0., 0., 0., 0., 0., 0., 0., 0., 0.], 1159s [0., 0., 0., 0., 0., 0., 0., 0., 0., 0.]]) 1159s typ = 1159s 1159s @singledispatch 1159s def as_cupy(val, typ=None): 1159s """ 1159s Rough conversion function 1159s 1159s Will try to infer target type from input type if not specified. 1159s """ 1159s if typ is None: 1159s typ = resolve_cupy_type(val) 1159s 1159s if issubclass(typ, CupyArray): 1159s import cupy as cp 1159s 1159s if isinstance(val, CSMatrix): 1159s val = val.toarray() 1159s return cp.array(val) 1159s elif issubclass(typ, CupyCSRMatrix): 1159s import cupy as cp 1159s import cupyx.scipy.sparse as cpsparse 1159s 1159s if isinstance(val, np.ndarray): 1159s return cpsparse.csr_matrix(cp.array(val)) 1159s else: 1159s return cpsparse.csr_matrix(val) 1159s elif issubclass(typ, CupyCSCMatrix): 1159s > import cupy as cp 1159s E ModuleNotFoundError: No module named 'cupy' 1159s 1159s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:1024: ModuleNotFoundError 1159s ____________ test_set_scalar_subset_X[cupy_csc-sparray_bool_subset] ____________ 1159s 1159s matrix_type = functools.partial(, typ=) 1159s subset_func = 1159s 1159s @IGNORE_SPARSE_EFFICIENCY_WARNING 1159s def test_set_scalar_subset_X(matrix_type, subset_func): 1159s > adata = ad.AnnData(matrix_type(np.zeros((10, 10)))) 1159s 1159s tests/test_views.py:369: 1159s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1159s /usr/lib/python3.13/functools.py:934: in wrapper 1159s return dispatch(args[0].__class__)(*args, **kw) 1159s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1159s 1159s val = array([[0., 0., 0., 0., 0., 0., 0., 0., 0., 0.], 1159s [0., 0., 0., 0., 0., 0., 0., 0., 0., 0.], 1159s [0., 0., 0., ...0., 0., 0., 0., 0.], 1159s [0., 0., 0., 0., 0., 0., 0., 0., 0., 0.], 1159s [0., 0., 0., 0., 0., 0., 0., 0., 0., 0.]]) 1159s typ = 1159s 1159s @singledispatch 1159s def as_cupy(val, typ=None): 1159s """ 1159s Rough conversion function 1159s 1159s Will try to infer target type from input type if not specified. 1159s """ 1159s if typ is None: 1159s typ = resolve_cupy_type(val) 1159s 1159s if issubclass(typ, CupyArray): 1159s import cupy as cp 1159s 1159s if isinstance(val, CSMatrix): 1159s val = val.toarray() 1159s return cp.array(val) 1159s elif issubclass(typ, CupyCSRMatrix): 1159s import cupy as cp 1159s import cupyx.scipy.sparse as cpsparse 1159s 1159s if isinstance(val, np.ndarray): 1159s return cpsparse.csr_matrix(cp.array(val)) 1159s else: 1159s return cpsparse.csr_matrix(val) 1159s elif issubclass(typ, CupyCSCMatrix): 1159s > import cupy as cp 1159s E ModuleNotFoundError: No module named 'cupy' 1159s 1159s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:1024: ModuleNotFoundError 1159s ___________ test_view_of_view[cupy_array-array_subset-array_subset] ____________ 1159s 1159s matrix_type = functools.partial(, typ=) 1159s subset_func = 1159s subset_func2 = 1159s 1159s def test_view_of_view(matrix_type, subset_func, subset_func2): 1159s > adata = gen_adata((30, 15), X_type=matrix_type) 1159s 1159s tests/test_views.py:531: 1159s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1159s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:346: in gen_adata 1159s X = X_type(random_state.binomial(100, 0.005, (M, N)).astype(X_dtype)) 1159s /usr/lib/python3.13/functools.py:934: in wrapper 1159s return dispatch(args[0].__class__)(*args, **kw) 1159s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1159s 1159s val = array([[2., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 1., 0.], 1159s [0., 1., 3., 0., 1., 0., 2., 0., 0., 0., 0...0., 0., 1., 1., 2., 2., 0.], 1159s [0., 0., 1., 2., 0., 1., 0., 1., 0., 0., 0., 1., 1., 1., 0.]], 1159s dtype=float32) 1159s typ = 1159s 1159s @singledispatch 1159s def as_cupy(val, typ=None): 1159s """ 1159s Rough conversion function 1159s 1159s Will try to infer target type from input type if not specified. 1159s """ 1159s if typ is None: 1159s typ = resolve_cupy_type(val) 1159s 1159s if issubclass(typ, CupyArray): 1159s > import cupy as cp 1159s E ModuleNotFoundError: No module named 'cupy' 1159s 1159s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:1010: ModuleNotFoundError 1159s ___________ test_view_of_view[cupy_array-array_subset-slice_subset] ____________ 1159s 1159s matrix_type = functools.partial(, typ=) 1159s subset_func = 1159s subset_func2 = 1159s 1159s def test_view_of_view(matrix_type, subset_func, subset_func2): 1159s > adata = gen_adata((30, 15), X_type=matrix_type) 1159s 1159s tests/test_views.py:531: 1159s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1159s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:346: in gen_adata 1159s X = X_type(random_state.binomial(100, 0.005, (M, N)).astype(X_dtype)) 1159s /usr/lib/python3.13/functools.py:934: in wrapper 1159s return dispatch(args[0].__class__)(*args, **kw) 1159s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1159s 1159s val = array([[0., 0., 0., 0., 0., 1., 1., 0., 1., 0., 0., 0., 1., 0., 0.], 1159s [1., 0., 0., 4., 0., 1., 1., 0., 0., 1., 0...2., 1., 1., 0., 1., 0., 0.], 1159s [0., 0., 1., 0., 1., 1., 0., 0., 4., 0., 0., 0., 0., 0., 2.]], 1159s dtype=float32) 1159s typ = 1159s 1159s @singledispatch 1159s def as_cupy(val, typ=None): 1159s """ 1159s Rough conversion function 1159s 1159s Will try to infer target type from input type if not specified. 1159s """ 1159s if typ is None: 1159s typ = resolve_cupy_type(val) 1159s 1159s if issubclass(typ, CupyArray): 1159s > import cupy as cp 1159s E ModuleNotFoundError: No module named 'cupy' 1159s 1159s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:1010: ModuleNotFoundError 1159s ___________ test_view_of_view[cupy_array-array_subset-single_subset] ___________ 1159s 1159s matrix_type = functools.partial(, typ=) 1159s subset_func = 1159s subset_func2 = 1159s 1159s def test_view_of_view(matrix_type, subset_func, subset_func2): 1159s > adata = gen_adata((30, 15), X_type=matrix_type) 1159s 1159s tests/test_views.py:531: 1159s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1159s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:346: in gen_adata 1159s X = X_type(random_state.binomial(100, 0.005, (M, N)).astype(X_dtype)) 1159s /usr/lib/python3.13/functools.py:934: in wrapper 1159s return dispatch(args[0].__class__)(*args, **kw) 1159s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1159s 1159s val = array([[0., 3., 0., 1., 0., 0., 1., 0., 1., 0., 3., 0., 2., 1., 1.], 1159s [1., 0., 0., 1., 0., 1., 2., 0., 0., 0., 0...0., 0., 0., 0., 1., 1., 0.], 1159s [2., 2., 0., 0., 0., 1., 1., 0., 1., 0., 0., 1., 0., 1., 1.]], 1159s dtype=float32) 1159s typ = 1159s 1159s @singledispatch 1159s def as_cupy(val, typ=None): 1159s """ 1159s Rough conversion function 1159s 1159s Will try to infer target type from input type if not specified. 1159s """ 1159s if typ is None: 1159s typ = resolve_cupy_type(val) 1159s 1159s if issubclass(typ, CupyArray): 1159s > import cupy as cp 1159s E ModuleNotFoundError: No module named 'cupy' 1159s 1159s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:1010: ModuleNotFoundError 1159s _________ test_view_of_view[cupy_array-array_subset-array_int_subset] __________ 1159s 1159s matrix_type = functools.partial(, typ=) 1159s subset_func = 1159s subset_func2 = 1159s 1159s def test_view_of_view(matrix_type, subset_func, subset_func2): 1159s > adata = gen_adata((30, 15), X_type=matrix_type) 1159s 1159s tests/test_views.py:531: 1159s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1159s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:346: in gen_adata 1159s X = X_type(random_state.binomial(100, 0.005, (M, N)).astype(X_dtype)) 1159s /usr/lib/python3.13/functools.py:934: in wrapper 1159s return dispatch(args[0].__class__)(*args, **kw) 1159s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1159s 1159s val = array([[1., 2., 2., 1., 1., 2., 1., 0., 0., 0., 1., 0., 0., 0., 0.], 1159s [2., 0., 1., 0., 2., 0., 0., 1., 0., 0., 0...0., 1., 1., 1., 1., 2., 0.], 1159s [1., 0., 0., 1., 1., 1., 0., 0., 1., 0., 0., 0., 1., 0., 0.]], 1159s dtype=float32) 1159s typ = 1159s 1159s @singledispatch 1159s def as_cupy(val, typ=None): 1159s """ 1159s Rough conversion function 1159s 1159s Will try to infer target type from input type if not specified. 1159s """ 1159s if typ is None: 1159s typ = resolve_cupy_type(val) 1159s 1159s if issubclass(typ, CupyArray): 1159s > import cupy as cp 1159s E ModuleNotFoundError: No module named 'cupy' 1159s 1159s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:1010: ModuleNotFoundError 1159s __________ test_view_of_view[cupy_array-array_subset-list_int_subset] __________ 1159s 1159s matrix_type = functools.partial(, typ=) 1159s subset_func = 1159s subset_func2 = 1159s 1159s def test_view_of_view(matrix_type, subset_func, subset_func2): 1159s > adata = gen_adata((30, 15), X_type=matrix_type) 1159s 1159s tests/test_views.py:531: 1159s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1159s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:346: in gen_adata 1159s X = X_type(random_state.binomial(100, 0.005, (M, N)).astype(X_dtype)) 1159s /usr/lib/python3.13/functools.py:934: in wrapper 1159s return dispatch(args[0].__class__)(*args, **kw) 1159s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1159s 1159s val = array([[0., 0., 0., 0., 0., 3., 0., 0., 1., 0., 0., 2., 0., 0., 0.], 1159s [1., 0., 1., 0., 2., 0., 3., 0., 0., 0., 0...1., 0., 0., 1., 0., 0., 0.], 1159s [0., 1., 0., 1., 1., 0., 1., 2., 0., 1., 2., 0., 1., 1., 0.]], 1159s dtype=float32) 1159s typ = 1159s 1159s @singledispatch 1159s def as_cupy(val, typ=None): 1159s """ 1159s Rough conversion function 1159s 1159s Will try to infer target type from input type if not specified. 1159s """ 1159s if typ is None: 1159s typ = resolve_cupy_type(val) 1159s 1159s if issubclass(typ, CupyArray): 1159s > import cupy as cp 1159s E ModuleNotFoundError: No module named 'cupy' 1159s 1159s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:1010: ModuleNotFoundError 1159s _________ test_view_of_view[cupy_array-array_subset-array_bool_subset] _________ 1159s 1159s matrix_type = functools.partial(, typ=) 1159s subset_func = 1159s subset_func2 = 1159s 1159s def test_view_of_view(matrix_type, subset_func, subset_func2): 1159s > adata = gen_adata((30, 15), X_type=matrix_type) 1159s 1159s tests/test_views.py:531: 1159s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1159s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:346: in gen_adata 1159s X = X_type(random_state.binomial(100, 0.005, (M, N)).astype(X_dtype)) 1159s /usr/lib/python3.13/functools.py:934: in wrapper 1159s return dispatch(args[0].__class__)(*args, **kw) 1159s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1159s 1159s val = array([[1., 3., 0., 1., 0., 0., 2., 0., 2., 1., 0., 0., 2., 0., 0.], 1159s [1., 1., 0., 0., 0., 0., 0., 0., 1., 1., 1...0., 0., 0., 0., 0., 0., 1.], 1159s [0., 0., 1., 0., 3., 1., 1., 0., 0., 0., 0., 0., 0., 0., 1.]], 1159s dtype=float32) 1159s typ = 1159s 1159s @singledispatch 1159s def as_cupy(val, typ=None): 1159s """ 1159s Rough conversion function 1159s 1159s Will try to infer target type from input type if not specified. 1159s """ 1159s if typ is None: 1159s typ = resolve_cupy_type(val) 1159s 1159s if issubclass(typ, CupyArray): 1159s > import cupy as cp 1159s E ModuleNotFoundError: No module named 'cupy' 1159s 1159s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:1010: ModuleNotFoundError 1159s _________ test_view_of_view[cupy_array-array_subset-list_bool_subset] __________ 1159s 1159s matrix_type = functools.partial(, typ=) 1159s subset_func = 1159s subset_func2 = 1159s 1159s def test_view_of_view(matrix_type, subset_func, subset_func2): 1159s > adata = gen_adata((30, 15), X_type=matrix_type) 1159s 1159s tests/test_views.py:531: 1159s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1159s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:346: in gen_adata 1159s X = X_type(random_state.binomial(100, 0.005, (M, N)).astype(X_dtype)) 1159s /usr/lib/python3.13/functools.py:934: in wrapper 1159s return dispatch(args[0].__class__)(*args, **kw) 1159s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1159s 1159s val = array([[0., 0., 0., 0., 1., 0., 0., 0., 0., 0., 1., 0., 2., 0., 0.], 1159s [0., 0., 0., 1., 1., 0., 1., 0., 2., 1., 0...1., 2., 1., 0., 1., 0., 0.], 1159s [0., 2., 1., 0., 1., 0., 0., 1., 0., 0., 1., 1., 0., 1., 0.]], 1159s dtype=float32) 1159s typ = 1159s 1159s @singledispatch 1159s def as_cupy(val, typ=None): 1159s """ 1159s Rough conversion function 1159s 1159s Will try to infer target type from input type if not specified. 1159s """ 1159s if typ is None: 1159s typ = resolve_cupy_type(val) 1159s 1159s if issubclass(typ, CupyArray): 1159s > import cupy as cp 1159s E ModuleNotFoundError: No module named 'cupy' 1159s 1159s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:1010: ModuleNotFoundError 1159s ________ test_view_of_view[cupy_array-array_subset-matrix_bool_subset] _________ 1159s 1159s matrix_type = functools.partial(, typ=) 1159s subset_func = 1159s subset_func2 = 1159s 1159s def test_view_of_view(matrix_type, subset_func, subset_func2): 1159s > adata = gen_adata((30, 15), X_type=matrix_type) 1159s 1159s tests/test_views.py:531: 1159s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1159s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:346: in gen_adata 1159s X = X_type(random_state.binomial(100, 0.005, (M, N)).astype(X_dtype)) 1159s /usr/lib/python3.13/functools.py:934: in wrapper 1159s return dispatch(args[0].__class__)(*args, **kw) 1159s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1159s 1159s val = array([[0., 0., 1., 0., 0., 0., 1., 0., 0., 0., 0., 1., 1., 0., 3.], 1159s [1., 2., 1., 2., 1., 1., 2., 1., 0., 0., 2...1., 0., 1., 0., 0., 1., 0.], 1159s [0., 1., 1., 0., 0., 0., 0., 0., 2., 0., 1., 1., 2., 0., 0.]], 1159s dtype=float32) 1159s typ = 1159s 1159s @singledispatch 1159s def as_cupy(val, typ=None): 1159s """ 1159s Rough conversion function 1159s 1159s Will try to infer target type from input type if not specified. 1159s """ 1159s if typ is None: 1159s typ = resolve_cupy_type(val) 1159s 1159s if issubclass(typ, CupyArray): 1159s > import cupy as cp 1159s E ModuleNotFoundError: No module named 'cupy' 1159s 1159s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:1010: ModuleNotFoundError 1159s _______ test_view_of_view[cupy_array-array_subset-spmatrix_bool_subset] ________ 1159s 1159s matrix_type = functools.partial(, typ=) 1159s subset_func = 1159s subset_func2 = 1159s 1159s def test_view_of_view(matrix_type, subset_func, subset_func2): 1159s > adata = gen_adata((30, 15), X_type=matrix_type) 1159s 1159s tests/test_views.py:531: 1159s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1159s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:346: in gen_adata 1159s X = X_type(random_state.binomial(100, 0.005, (M, N)).astype(X_dtype)) 1159s /usr/lib/python3.13/functools.py:934: in wrapper 1159s return dispatch(args[0].__class__)(*args, **kw) 1159s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1159s 1159s val = array([[2., 0., 0., 0., 0., 0., 0., 0., 2., 0., 0., 0., 0., 0., 0.], 1159s [1., 0., 0., 0., 1., 1., 1., 0., 0., 0., 2...2., 0., 1., 2., 0., 1., 0.], 1159s [0., 1., 0., 0., 0., 0., 0., 1., 1., 0., 1., 0., 0., 0., 0.]], 1159s dtype=float32) 1159s typ = 1159s 1159s @singledispatch 1159s def as_cupy(val, typ=None): 1159s """ 1159s Rough conversion function 1159s 1159s Will try to infer target type from input type if not specified. 1159s """ 1159s if typ is None: 1159s typ = resolve_cupy_type(val) 1159s 1159s if issubclass(typ, CupyArray): 1159s > import cupy as cp 1159s E ModuleNotFoundError: No module named 'cupy' 1159s 1159s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:1010: ModuleNotFoundError 1159s ________ test_view_of_view[cupy_array-array_subset-sparray_bool_subset] ________ 1159s 1159s matrix_type = functools.partial(, typ=) 1159s subset_func = 1159s subset_func2 = 1159s 1159s def test_view_of_view(matrix_type, subset_func, subset_func2): 1159s > adata = gen_adata((30, 15), X_type=matrix_type) 1159s 1159s tests/test_views.py:531: 1159s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1159s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:346: in gen_adata 1159s X = X_type(random_state.binomial(100, 0.005, (M, N)).astype(X_dtype)) 1159s /usr/lib/python3.13/functools.py:934: in wrapper 1159s return dispatch(args[0].__class__)(*args, **kw) 1159s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1159s 1159s val = array([[2., 0., 1., 0., 0., 0., 0., 1., 1., 1., 0., 1., 1., 0., 0.], 1159s [1., 1., 1., 0., 0., 0., 0., 2., 1., 0., 0...0., 3., 0., 1., 1., 0., 0.], 1159s [0., 0., 0., 0., 1., 0., 1., 0., 0., 0., 0., 0., 1., 0., 0.]], 1159s dtype=float32) 1159s typ = 1159s 1159s @singledispatch 1159s def as_cupy(val, typ=None): 1159s """ 1159s Rough conversion function 1159s 1159s Will try to infer target type from input type if not specified. 1159s """ 1159s if typ is None: 1159s typ = resolve_cupy_type(val) 1159s 1159s if issubclass(typ, CupyArray): 1159s > import cupy as cp 1159s E ModuleNotFoundError: No module named 'cupy' 1159s 1159s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:1010: ModuleNotFoundError 1159s ___________ test_view_of_view[cupy_array-slice_subset-array_subset] ____________ 1159s 1159s matrix_type = functools.partial(, typ=) 1159s subset_func = 1159s subset_func2 = 1159s 1159s def test_view_of_view(matrix_type, subset_func, subset_func2): 1159s > adata = gen_adata((30, 15), X_type=matrix_type) 1159s 1159s tests/test_views.py:531: 1159s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1159s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:346: in gen_adata 1159s X = X_type(random_state.binomial(100, 0.005, (M, N)).astype(X_dtype)) 1159s /usr/lib/python3.13/functools.py:934: in wrapper 1159s return dispatch(args[0].__class__)(*args, **kw) 1159s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1159s 1159s val = array([[0., 0., 0., 2., 1., 0., 2., 1., 0., 0., 1., 1., 0., 0., 1.], 1159s [0., 1., 0., 1., 2., 0., 0., 0., 1., 2., 0...0., 1., 1., 0., 1., 0., 1.], 1159s [1., 0., 2., 0., 2., 1., 0., 0., 0., 0., 1., 0., 0., 0., 1.]], 1159s dtype=float32) 1159s typ = 1159s 1159s @singledispatch 1159s def as_cupy(val, typ=None): 1159s """ 1159s Rough conversion function 1159s 1159s Will try to infer target type from input type if not specified. 1159s """ 1159s if typ is None: 1159s typ = resolve_cupy_type(val) 1159s 1159s if issubclass(typ, CupyArray): 1159s > import cupy as cp 1159s E ModuleNotFoundError: No module named 'cupy' 1159s 1159s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:1010: ModuleNotFoundError 1159s ___________ test_view_of_view[cupy_array-slice_subset-slice_subset] ____________ 1159s 1159s matrix_type = functools.partial(, typ=) 1159s subset_func = 1159s subset_func2 = 1159s 1159s def test_view_of_view(matrix_type, subset_func, subset_func2): 1159s > adata = gen_adata((30, 15), X_type=matrix_type) 1159s 1159s tests/test_views.py:531: 1159s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1159s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:346: in gen_adata 1159s X = X_type(random_state.binomial(100, 0.005, (M, N)).astype(X_dtype)) 1159s /usr/lib/python3.13/functools.py:934: in wrapper 1159s return dispatch(args[0].__class__)(*args, **kw) 1159s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1159s 1159s val = array([[0., 1., 3., 0., 1., 0., 0., 0., 0., 0., 0., 1., 0., 1., 1.], 1159s [1., 0., 1., 0., 3., 0., 0., 0., 0., 0., 3...0., 0., 0., 0., 1., 1., 0.], 1159s [2., 0., 0., 0., 2., 1., 2., 0., 0., 0., 0., 0., 1., 0., 1.]], 1159s dtype=float32) 1159s typ = 1159s 1159s @singledispatch 1159s def as_cupy(val, typ=None): 1159s """ 1159s Rough conversion function 1159s 1159s Will try to infer target type from input type if not specified. 1159s """ 1159s if typ is None: 1159s typ = resolve_cupy_type(val) 1159s 1159s if issubclass(typ, CupyArray): 1159s > import cupy as cp 1159s E ModuleNotFoundError: No module named 'cupy' 1159s 1159s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:1010: ModuleNotFoundError 1159s ___________ test_view_of_view[cupy_array-slice_subset-single_subset] ___________ 1159s 1159s matrix_type = functools.partial(, typ=) 1159s subset_func = 1159s subset_func2 = 1159s 1159s def test_view_of_view(matrix_type, subset_func, subset_func2): 1159s > adata = gen_adata((30, 15), X_type=matrix_type) 1159s 1159s tests/test_views.py:531: 1159s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1159s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:346: in gen_adata 1159s X = X_type(random_state.binomial(100, 0.005, (M, N)).astype(X_dtype)) 1159s /usr/lib/python3.13/functools.py:934: in wrapper 1159s return dispatch(args[0].__class__)(*args, **kw) 1159s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1159s 1159s val = array([[0., 0., 0., 0., 1., 0., 1., 0., 0., 1., 0., 1., 0., 1., 0.], 1159s [1., 1., 0., 0., 1., 0., 2., 0., 0., 2., 1...1., 2., 3., 1., 0., 0., 0.], 1159s [1., 2., 0., 0., 0., 2., 0., 1., 1., 1., 0., 0., 0., 0., 0.]], 1159s dtype=float32) 1159s typ = 1159s 1159s @singledispatch 1159s def as_cupy(val, typ=None): 1159s """ 1159s Rough conversion function 1159s 1159s Will try to infer target type from input type if not specified. 1159s """ 1159s if typ is None: 1159s typ = resolve_cupy_type(val) 1159s 1159s if issubclass(typ, CupyArray): 1159s > import cupy as cp 1159s E ModuleNotFoundError: No module named 'cupy' 1159s 1159s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:1010: ModuleNotFoundError 1159s _________ test_view_of_view[cupy_array-slice_subset-array_int_subset] __________ 1159s 1159s matrix_type = functools.partial(, typ=) 1159s subset_func = 1159s subset_func2 = 1159s 1159s def test_view_of_view(matrix_type, subset_func, subset_func2): 1159s > adata = gen_adata((30, 15), X_type=matrix_type) 1159s 1159s tests/test_views.py:531: 1159s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1159s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:346: in gen_adata 1159s X = X_type(random_state.binomial(100, 0.005, (M, N)).astype(X_dtype)) 1159s /usr/lib/python3.13/functools.py:934: in wrapper 1159s return dispatch(args[0].__class__)(*args, **kw) 1159s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1159s 1159s val = array([[1., 0., 0., 0., 1., 1., 1., 0., 0., 1., 0., 1., 1., 0., 0.], 1159s [1., 0., 1., 1., 1., 2., 1., 1., 2., 1., 0...0., 0., 1., 0., 1., 1., 1.], 1159s [1., 1., 0., 1., 0., 0., 1., 1., 0., 0., 1., 2., 0., 0., 0.]], 1159s dtype=float32) 1159s typ = 1159s 1159s @singledispatch 1159s def as_cupy(val, typ=None): 1159s """ 1159s Rough conversion function 1159s 1159s Will try to infer target type from input type if not specified. 1159s """ 1159s if typ is None: 1159s typ = resolve_cupy_type(val) 1159s 1159s if issubclass(typ, CupyArray): 1159s > import cupy as cp 1159s E ModuleNotFoundError: No module named 'cupy' 1159s 1159s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:1010: ModuleNotFoundError 1159s __________ test_view_of_view[cupy_array-slice_subset-list_int_subset] __________ 1159s 1159s matrix_type = functools.partial(, typ=) 1159s subset_func = 1159s subset_func2 = 1159s 1159s def test_view_of_view(matrix_type, subset_func, subset_func2): 1159s > adata = gen_adata((30, 15), X_type=matrix_type) 1159s 1159s tests/test_views.py:531: 1159s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1159s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:346: in gen_adata 1159s X = X_type(random_state.binomial(100, 0.005, (M, N)).astype(X_dtype)) 1159s /usr/lib/python3.13/functools.py:934: in wrapper 1159s return dispatch(args[0].__class__)(*args, **kw) 1159s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1159s 1159s val = array([[1., 2., 0., 0., 1., 0., 3., 0., 1., 0., 0., 1., 0., 1., 0.], 1159s [1., 0., 0., 1., 0., 1., 0., 0., 0., 0., 0...3., 0., 1., 0., 0., 1., 1.], 1159s [0., 0., 0., 1., 0., 0., 1., 0., 0., 0., 0., 2., 0., 0., 0.]], 1159s dtype=float32) 1159s typ = 1159s 1159s @singledispatch 1159s def as_cupy(val, typ=None): 1159s """ 1159s Rough conversion function 1159s 1159s Will try to infer target type from input type if not specified. 1159s """ 1159s if typ is None: 1159s typ = resolve_cupy_type(val) 1159s 1159s if issubclass(typ, CupyArray): 1159s > import cupy as cp 1159s E ModuleNotFoundError: No module named 'cupy' 1159s 1159s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:1010: ModuleNotFoundError 1159s _________ test_view_of_view[cupy_array-slice_subset-array_bool_subset] _________ 1159s 1159s matrix_type = functools.partial(, typ=) 1159s subset_func = 1159s subset_func2 = 1159s 1159s def test_view_of_view(matrix_type, subset_func, subset_func2): 1159s > adata = gen_adata((30, 15), X_type=matrix_type) 1159s 1159s tests/test_views.py:531: 1159s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1159s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:346: in gen_adata 1159s X = X_type(random_state.binomial(100, 0.005, (M, N)).astype(X_dtype)) 1159s /usr/lib/python3.13/functools.py:934: in wrapper 1159s return dispatch(args[0].__class__)(*args, **kw) 1159s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1159s 1159s val = array([[1., 0., 1., 0., 0., 2., 0., 0., 0., 3., 2., 1., 1., 0., 0.], 1159s [0., 0., 0., 0., 0., 0., 1., 1., 0., 0., 0...0., 0., 0., 0., 2., 1., 1.], 1159s [0., 1., 0., 0., 0., 1., 0., 0., 1., 0., 1., 0., 2., 1., 0.]], 1159s dtype=float32) 1159s typ = 1159s 1159s @singledispatch 1159s def as_cupy(val, typ=None): 1159s """ 1159s Rough conversion function 1159s 1159s Will try to infer target type from input type if not specified. 1159s """ 1159s if typ is None: 1159s typ = resolve_cupy_type(val) 1159s 1159s if issubclass(typ, CupyArray): 1159s > import cupy as cp 1159s E ModuleNotFoundError: No module named 'cupy' 1159s 1159s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:1010: ModuleNotFoundError 1159s _________ test_view_of_view[cupy_array-slice_subset-list_bool_subset] __________ 1159s 1159s matrix_type = functools.partial(, typ=) 1159s subset_func = 1159s subset_func2 = 1159s 1159s def test_view_of_view(matrix_type, subset_func, subset_func2): 1159s > adata = gen_adata((30, 15), X_type=matrix_type) 1159s 1159s tests/test_views.py:531: 1159s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1159s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:346: in gen_adata 1159s X = X_type(random_state.binomial(100, 0.005, (M, N)).astype(X_dtype)) 1159s /usr/lib/python3.13/functools.py:934: in wrapper 1159s return dispatch(args[0].__class__)(*args, **kw) 1159s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1159s 1159s val = array([[0., 1., 0., 0., 0., 0., 1., 0., 0., 0., 0., 0., 2., 2., 0.], 1159s [1., 1., 0., 0., 0., 1., 4., 0., 0., 0., 0...1., 0., 1., 1., 0., 1., 0.], 1159s [2., 1., 1., 0., 0., 0., 1., 0., 2., 0., 2., 0., 0., 0., 0.]], 1159s dtype=float32) 1159s typ = 1159s 1159s @singledispatch 1159s def as_cupy(val, typ=None): 1159s """ 1159s Rough conversion function 1159s 1159s Will try to infer target type from input type if not specified. 1159s """ 1159s if typ is None: 1159s typ = resolve_cupy_type(val) 1159s 1159s if issubclass(typ, CupyArray): 1159s > import cupy as cp 1159s E ModuleNotFoundError: No module named 'cupy' 1159s 1159s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:1010: ModuleNotFoundError 1159s ________ test_view_of_view[cupy_array-slice_subset-matrix_bool_subset] _________ 1159s 1159s matrix_type = functools.partial(, typ=) 1159s subset_func = 1159s subset_func2 = 1159s 1159s def test_view_of_view(matrix_type, subset_func, subset_func2): 1159s > adata = gen_adata((30, 15), X_type=matrix_type) 1159s 1159s tests/test_views.py:531: 1159s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1159s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:346: in gen_adata 1159s X = X_type(random_state.binomial(100, 0.005, (M, N)).astype(X_dtype)) 1159s /usr/lib/python3.13/functools.py:934: in wrapper 1159s return dispatch(args[0].__class__)(*args, **kw) 1159s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1159s 1159s val = array([[0., 1., 1., 0., 1., 0., 0., 0., 0., 1., 0., 0., 1., 0., 0.], 1159s [1., 0., 1., 0., 0., 1., 0., 1., 0., 0., 1...2., 0., 0., 0., 0., 0., 0.], 1159s [0., 0., 0., 0., 0., 0., 0., 0., 1., 1., 1., 1., 0., 0., 1.]], 1159s dtype=float32) 1159s typ = 1159s 1159s @singledispatch 1159s def as_cupy(val, typ=None): 1159s """ 1159s Rough conversion function 1159s 1159s Will try to infer target type from input type if not specified. 1159s """ 1159s if typ is None: 1159s typ = resolve_cupy_type(val) 1159s 1159s if issubclass(typ, CupyArray): 1159s > import cupy as cp 1159s E ModuleNotFoundError: No module named 'cupy' 1159s 1159s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:1010: ModuleNotFoundError 1159s _______ test_view_of_view[cupy_array-slice_subset-spmatrix_bool_subset] ________ 1159s 1159s matrix_type = functools.partial(, typ=) 1159s subset_func = 1159s subset_func2 = 1159s 1159s def test_view_of_view(matrix_type, subset_func, subset_func2): 1159s > adata = gen_adata((30, 15), X_type=matrix_type) 1159s 1159s tests/test_views.py:531: 1159s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1159s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:346: in gen_adata 1159s X = X_type(random_state.binomial(100, 0.005, (M, N)).astype(X_dtype)) 1159s /usr/lib/python3.13/functools.py:934: in wrapper 1159s return dispatch(args[0].__class__)(*args, **kw) 1159s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1159s 1159s val = array([[1., 0., 0., 1., 1., 2., 0., 1., 0., 1., 1., 0., 0., 0., 1.], 1159s [0., 0., 0., 0., 1., 0., 1., 0., 0., 3., 0...0., 0., 1., 2., 2., 1., 0.], 1159s [0., 0., 2., 0., 1., 0., 0., 2., 0., 0., 1., 2., 0., 1., 0.]], 1159s dtype=float32) 1159s typ = 1159s 1159s @singledispatch 1159s def as_cupy(val, typ=None): 1159s """ 1159s Rough conversion function 1159s 1159s Will try to infer target type from input type if not specified. 1159s """ 1159s if typ is None: 1159s typ = resolve_cupy_type(val) 1159s 1159s if issubclass(typ, CupyArray): 1159s > import cupy as cp 1159s E ModuleNotFoundError: No module named 'cupy' 1159s 1159s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:1010: ModuleNotFoundError 1159s ________ test_view_of_view[cupy_array-slice_subset-sparray_bool_subset] ________ 1159s 1159s matrix_type = functools.partial(, typ=) 1159s subset_func = 1159s subset_func2 = 1159s 1159s def test_view_of_view(matrix_type, subset_func, subset_func2): 1159s > adata = gen_adata((30, 15), X_type=matrix_type) 1159s 1159s tests/test_views.py:531: 1159s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1159s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:346: in gen_adata 1159s X = X_type(random_state.binomial(100, 0.005, (M, N)).astype(X_dtype)) 1159s /usr/lib/python3.13/functools.py:934: in wrapper 1159s return dispatch(args[0].__class__)(*args, **kw) 1159s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1159s 1159s val = array([[0., 0., 0., 1., 0., 1., 0., 0., 0., 0., 0., 0., 0., 1., 0.], 1159s [0., 0., 1., 0., 0., 0., 0., 0., 1., 1., 2...1., 1., 0., 1., 0., 1., 0.], 1159s [0., 1., 0., 1., 1., 0., 0., 0., 0., 3., 0., 1., 0., 0., 0.]], 1159s dtype=float32) 1159s typ = 1159s 1159s @singledispatch 1159s def as_cupy(val, typ=None): 1159s """ 1159s Rough conversion function 1159s 1159s Will try to infer target type from input type if not specified. 1159s """ 1159s if typ is None: 1159s typ = resolve_cupy_type(val) 1159s 1159s if issubclass(typ, CupyArray): 1159s > import cupy as cp 1159s E ModuleNotFoundError: No module named 'cupy' 1159s 1159s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:1010: ModuleNotFoundError 1159s ___________ test_view_of_view[cupy_array-single_subset-array_subset] ___________ 1159s 1159s matrix_type = functools.partial(, typ=) 1159s subset_func = 1159s subset_func2 = 1159s 1159s def test_view_of_view(matrix_type, subset_func, subset_func2): 1159s > adata = gen_adata((30, 15), X_type=matrix_type) 1159s 1159s tests/test_views.py:531: 1159s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1159s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:346: in gen_adata 1159s X = X_type(random_state.binomial(100, 0.005, (M, N)).astype(X_dtype)) 1159s /usr/lib/python3.13/functools.py:934: in wrapper 1159s return dispatch(args[0].__class__)(*args, **kw) 1159s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1159s 1159s val = array([[0., 2., 1., 1., 1., 0., 0., 0., 1., 0., 0., 0., 2., 0., 1.], 1159s [1., 1., 1., 0., 0., 0., 1., 2., 1., 0., 0...3., 0., 0., 1., 1., 0., 0.], 1159s [0., 0., 1., 1., 0., 1., 0., 0., 0., 0., 1., 2., 0., 1., 2.]], 1159s dtype=float32) 1159s typ = 1159s 1159s @singledispatch 1159s def as_cupy(val, typ=None): 1159s """ 1159s Rough conversion function 1159s 1159s Will try to infer target type from input type if not specified. 1159s """ 1159s if typ is None: 1159s typ = resolve_cupy_type(val) 1159s 1159s if issubclass(typ, CupyArray): 1159s > import cupy as cp 1159s E ModuleNotFoundError: No module named 'cupy' 1159s 1159s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:1010: ModuleNotFoundError 1159s ___________ test_view_of_view[cupy_array-single_subset-slice_subset] ___________ 1159s 1159s matrix_type = functools.partial(, typ=) 1159s subset_func = 1159s subset_func2 = 1159s 1159s def test_view_of_view(matrix_type, subset_func, subset_func2): 1159s > adata = gen_adata((30, 15), X_type=matrix_type) 1159s 1159s tests/test_views.py:531: 1159s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1159s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:346: in gen_adata 1159s X = X_type(random_state.binomial(100, 0.005, (M, N)).astype(X_dtype)) 1159s /usr/lib/python3.13/functools.py:934: in wrapper 1159s return dispatch(args[0].__class__)(*args, **kw) 1159s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1159s 1159s val = array([[0., 0., 0., 0., 4., 0., 0., 0., 1., 1., 2., 0., 1., 1., 0.], 1159s [0., 0., 0., 0., 1., 0., 1., 0., 1., 0., 1...0., 0., 0., 1., 0., 0., 0.], 1159s [1., 1., 3., 0., 0., 0., 1., 0., 0., 0., 1., 0., 0., 0., 0.]], 1159s dtype=float32) 1159s typ = 1159s 1159s @singledispatch 1159s def as_cupy(val, typ=None): 1159s """ 1159s Rough conversion function 1159s 1159s Will try to infer target type from input type if not specified. 1159s """ 1159s if typ is None: 1159s typ = resolve_cupy_type(val) 1159s 1159s if issubclass(typ, CupyArray): 1159s > import cupy as cp 1159s E ModuleNotFoundError: No module named 'cupy' 1159s 1159s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:1010: ModuleNotFoundError 1159s __________ test_view_of_view[cupy_array-single_subset-single_subset] ___________ 1159s 1159s matrix_type = functools.partial(, typ=) 1159s subset_func = 1159s subset_func2 = 1159s 1159s def test_view_of_view(matrix_type, subset_func, subset_func2): 1159s > adata = gen_adata((30, 15), X_type=matrix_type) 1159s 1159s tests/test_views.py:531: 1159s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1159s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:346: in gen_adata 1159s X = X_type(random_state.binomial(100, 0.005, (M, N)).astype(X_dtype)) 1159s /usr/lib/python3.13/functools.py:934: in wrapper 1159s return dispatch(args[0].__class__)(*args, **kw) 1159s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1159s 1159s val = array([[1., 0., 1., 3., 2., 0., 0., 0., 0., 0., 3., 0., 0., 0., 1.], 1159s [0., 0., 1., 1., 1., 1., 1., 1., 0., 1., 2...0., 0., 0., 2., 0., 1., 0.], 1159s [1., 0., 0., 0., 0., 0., 1., 1., 1., 0., 1., 1., 1., 0., 2.]], 1159s dtype=float32) 1159s typ = 1159s 1159s @singledispatch 1159s def as_cupy(val, typ=None): 1159s """ 1159s Rough conversion function 1159s 1159s Will try to infer target type from input type if not specified. 1159s """ 1159s if typ is None: 1159s typ = resolve_cupy_type(val) 1159s 1159s if issubclass(typ, CupyArray): 1159s > import cupy as cp 1159s E ModuleNotFoundError: No module named 'cupy' 1159s 1159s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:1010: ModuleNotFoundError 1159s _________ test_view_of_view[cupy_array-single_subset-array_int_subset] _________ 1159s 1159s matrix_type = functools.partial(, typ=) 1159s subset_func = 1159s subset_func2 = 1159s 1159s def test_view_of_view(matrix_type, subset_func, subset_func2): 1159s > adata = gen_adata((30, 15), X_type=matrix_type) 1159s 1159s tests/test_views.py:531: 1159s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1159s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:346: in gen_adata 1159s X = X_type(random_state.binomial(100, 0.005, (M, N)).astype(X_dtype)) 1159s /usr/lib/python3.13/functools.py:934: in wrapper 1159s return dispatch(args[0].__class__)(*args, **kw) 1159s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1159s 1159s val = array([[1., 1., 1., 0., 0., 1., 1., 0., 1., 0., 0., 1., 1., 2., 0.], 1159s [2., 0., 0., 1., 1., 0., 0., 2., 0., 0., 0...2., 1., 2., 0., 0., 3., 0.], 1159s [1., 0., 0., 1., 0., 0., 0., 0., 1., 0., 0., 0., 1., 1., 0.]], 1159s dtype=float32) 1159s typ = 1159s 1159s @singledispatch 1159s def as_cupy(val, typ=None): 1159s """ 1159s Rough conversion function 1159s 1159s Will try to infer target type from input type if not specified. 1159s """ 1159s if typ is None: 1159s typ = resolve_cupy_type(val) 1159s 1159s if issubclass(typ, CupyArray): 1159s > import cupy as cp 1159s E ModuleNotFoundError: No module named 'cupy' 1159s 1159s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:1010: ModuleNotFoundError 1159s _________ test_view_of_view[cupy_array-single_subset-list_int_subset] __________ 1159s 1159s matrix_type = functools.partial(, typ=) 1159s subset_func = 1159s subset_func2 = 1159s 1159s def test_view_of_view(matrix_type, subset_func, subset_func2): 1159s > adata = gen_adata((30, 15), X_type=matrix_type) 1159s 1159s tests/test_views.py:531: 1159s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1159s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:346: in gen_adata 1159s X = X_type(random_state.binomial(100, 0.005, (M, N)).astype(X_dtype)) 1159s /usr/lib/python3.13/functools.py:934: in wrapper 1159s return dispatch(args[0].__class__)(*args, **kw) 1159s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1159s 1159s val = array([[1., 2., 1., 1., 0., 0., 2., 0., 0., 0., 1., 1., 0., 0., 0.], 1159s [1., 1., 0., 1., 1., 0., 0., 1., 0., 1., 0...0., 1., 0., 0., 0., 1., 1.], 1159s [0., 0., 0., 0., 1., 0., 1., 0., 0., 0., 2., 1., 1., 1., 0.]], 1159s dtype=float32) 1159s typ = 1159s 1159s @singledispatch 1159s def as_cupy(val, typ=None): 1159s """ 1159s Rough conversion function 1159s 1159s Will try to infer target type from input type if not specified. 1159s """ 1159s if typ is None: 1159s typ = resolve_cupy_type(val) 1159s 1159s if issubclass(typ, CupyArray): 1159s > import cupy as cp 1159s E ModuleNotFoundError: No module named 'cupy' 1159s 1159s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:1010: ModuleNotFoundError 1159s ________ test_view_of_view[cupy_array-single_subset-array_bool_subset] _________ 1159s 1159s matrix_type = functools.partial(, typ=) 1159s subset_func = 1159s subset_func2 = 1159s 1159s def test_view_of_view(matrix_type, subset_func, subset_func2): 1159s > adata = gen_adata((30, 15), X_type=matrix_type) 1159s 1159s tests/test_views.py:531: 1159s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1159s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:346: in gen_adata 1159s X = X_type(random_state.binomial(100, 0.005, (M, N)).astype(X_dtype)) 1159s /usr/lib/python3.13/functools.py:934: in wrapper 1159s return dispatch(args[0].__class__)(*args, **kw) 1159s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1159s 1159s val = array([[0., 0., 0., 0., 1., 0., 0., 1., 0., 0., 0., 0., 0., 0., 1.], 1159s [1., 0., 0., 1., 0., 0., 0., 0., 0., 0., 1...2., 2., 0., 1., 1., 1., 1.], 1159s [0., 0., 1., 0., 2., 0., 0., 0., 1., 0., 0., 1., 2., 0., 1.]], 1159s dtype=float32) 1159s typ = 1159s 1159s @singledispatch 1159s def as_cupy(val, typ=None): 1159s """ 1159s Rough conversion function 1159s 1159s Will try to infer target type from input type if not specified. 1159s """ 1159s if typ is None: 1159s typ = resolve_cupy_type(val) 1159s 1159s if issubclass(typ, CupyArray): 1159s > import cupy as cp 1159s E ModuleNotFoundError: No module named 'cupy' 1159s 1159s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:1010: ModuleNotFoundError 1159s _________ test_view_of_view[cupy_array-single_subset-list_bool_subset] _________ 1159s 1159s matrix_type = functools.partial(, typ=) 1159s subset_func = 1159s subset_func2 = 1159s 1159s def test_view_of_view(matrix_type, subset_func, subset_func2): 1159s > adata = gen_adata((30, 15), X_type=matrix_type) 1159s 1159s tests/test_views.py:531: 1159s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1159s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:346: in gen_adata 1159s X = X_type(random_state.binomial(100, 0.005, (M, N)).astype(X_dtype)) 1159s /usr/lib/python3.13/functools.py:934: in wrapper 1159s return dispatch(args[0].__class__)(*args, **kw) 1159s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1159s 1159s val = array([[1., 1., 1., 0., 1., 0., 1., 1., 1., 1., 2., 1., 1., 1., 0.], 1159s [1., 1., 0., 0., 1., 2., 0., 2., 0., 1., 0...1., 1., 2., 0., 0., 1., 0.], 1159s [0., 0., 0., 0., 0., 0., 1., 0., 0., 1., 0., 0., 0., 1., 1.]], 1159s dtype=float32) 1159s typ = 1159s 1159s @singledispatch 1159s def as_cupy(val, typ=None): 1159s """ 1159s Rough conversion function 1159s 1159s Will try to infer target type from input type if not specified. 1159s """ 1159s if typ is None: 1159s typ = resolve_cupy_type(val) 1159s 1159s if issubclass(typ, CupyArray): 1159s > import cupy as cp 1159s E ModuleNotFoundError: No module named 'cupy' 1159s 1159s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:1010: ModuleNotFoundError 1159s ________ test_view_of_view[cupy_array-single_subset-matrix_bool_subset] ________ 1159s 1159s matrix_type = functools.partial(, typ=) 1159s subset_func = 1159s subset_func2 = 1159s 1159s def test_view_of_view(matrix_type, subset_func, subset_func2): 1159s > adata = gen_adata((30, 15), X_type=matrix_type) 1159s 1159s tests/test_views.py:531: 1159s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1159s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:346: in gen_adata 1159s X = X_type(random_state.binomial(100, 0.005, (M, N)).astype(X_dtype)) 1159s /usr/lib/python3.13/functools.py:934: in wrapper 1159s return dispatch(args[0].__class__)(*args, **kw) 1159s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1159s 1159s val = array([[0., 0., 0., 0., 0., 0., 1., 1., 0., 0., 0., 2., 0., 0., 0.], 1159s [0., 0., 0., 1., 0., 0., 0., 0., 1., 1., 0...1., 0., 1., 1., 0., 0., 1.], 1159s [0., 0., 0., 1., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0.]], 1159s dtype=float32) 1159s typ = 1159s 1159s @singledispatch 1159s def as_cupy(val, typ=None): 1159s """ 1159s Rough conversion function 1159s 1159s Will try to infer target type from input type if not specified. 1159s """ 1159s if typ is None: 1159s typ = resolve_cupy_type(val) 1159s 1159s if issubclass(typ, CupyArray): 1159s > import cupy as cp 1159s E ModuleNotFoundError: No module named 'cupy' 1159s 1159s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:1010: ModuleNotFoundError 1159s _______ test_view_of_view[cupy_array-single_subset-spmatrix_bool_subset] _______ 1159s 1159s matrix_type = functools.partial(, typ=) 1159s subset_func = 1159s subset_func2 = 1159s 1159s def test_view_of_view(matrix_type, subset_func, subset_func2): 1159s > adata = gen_adata((30, 15), X_type=matrix_type) 1159s 1159s tests/test_views.py:531: 1159s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1159s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:346: in gen_adata 1159s X = X_type(random_state.binomial(100, 0.005, (M, N)).astype(X_dtype)) 1159s /usr/lib/python3.13/functools.py:934: in wrapper 1159s return dispatch(args[0].__class__)(*args, **kw) 1159s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1159s 1159s val = array([[0., 1., 0., 0., 1., 0., 0., 1., 0., 0., 0., 1., 0., 0., 0.], 1159s [1., 0., 3., 1., 1., 0., 1., 0., 1., 1., 0...0., 0., 0., 0., 1., 0., 0.], 1159s [0., 1., 1., 1., 0., 0., 0., 1., 1., 1., 0., 0., 1., 1., 2.]], 1159s dtype=float32) 1159s typ = 1159s 1159s @singledispatch 1159s def as_cupy(val, typ=None): 1159s """ 1159s Rough conversion function 1159s 1159s Will try to infer target type from input type if not specified. 1159s """ 1159s if typ is None: 1159s typ = resolve_cupy_type(val) 1159s 1159s if issubclass(typ, CupyArray): 1159s > import cupy as cp 1159s E ModuleNotFoundError: No module named 'cupy' 1159s 1159s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:1010: ModuleNotFoundError 1159s _______ test_view_of_view[cupy_array-single_subset-sparray_bool_subset] ________ 1159s 1159s matrix_type = functools.partial(, typ=) 1159s subset_func = 1159s subset_func2 = 1159s 1159s def test_view_of_view(matrix_type, subset_func, subset_func2): 1159s > adata = gen_adata((30, 15), X_type=matrix_type) 1159s 1159s tests/test_views.py:531: 1159s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1159s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:346: in gen_adata 1159s X = X_type(random_state.binomial(100, 0.005, (M, N)).astype(X_dtype)) 1159s /usr/lib/python3.13/functools.py:934: in wrapper 1159s return dispatch(args[0].__class__)(*args, **kw) 1159s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1159s 1159s val = array([[1., 1., 0., 0., 0., 0., 2., 0., 0., 0., 0., 0., 0., 0., 0.], 1159s [1., 1., 2., 0., 0., 0., 0., 3., 2., 1., 0...0., 0., 0., 0., 2., 1., 0.], 1159s [1., 0., 1., 1., 0., 1., 1., 1., 2., 1., 0., 0., 0., 0., 1.]], 1159s dtype=float32) 1159s typ = 1159s 1159s @singledispatch 1159s def as_cupy(val, typ=None): 1159s """ 1159s Rough conversion function 1159s 1159s Will try to infer target type from input type if not specified. 1159s """ 1159s if typ is None: 1159s typ = resolve_cupy_type(val) 1159s 1159s if issubclass(typ, CupyArray): 1159s > import cupy as cp 1159s E ModuleNotFoundError: No module named 'cupy' 1159s 1159s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:1010: ModuleNotFoundError 1159s _________ test_view_of_view[cupy_array-array_int_subset-array_subset] __________ 1159s 1159s matrix_type = functools.partial(, typ=) 1159s subset_func = 1159s subset_func2 = 1159s 1159s def test_view_of_view(matrix_type, subset_func, subset_func2): 1159s > adata = gen_adata((30, 15), X_type=matrix_type) 1159s 1159s tests/test_views.py:531: 1159s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1159s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:346: in gen_adata 1159s X = X_type(random_state.binomial(100, 0.005, (M, N)).astype(X_dtype)) 1159s /usr/lib/python3.13/functools.py:934: in wrapper 1159s return dispatch(args[0].__class__)(*args, **kw) 1159s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1159s 1159s val = array([[2., 0., 0., 0., 0., 1., 0., 1., 0., 0., 1., 1., 0., 0., 0.], 1159s [1., 1., 2., 0., 1., 0., 0., 0., 0., 0., 0...0., 0., 3., 1., 0., 1., 0.], 1159s [0., 0., 1., 1., 1., 0., 0., 2., 2., 0., 2., 2., 2., 0., 0.]], 1159s dtype=float32) 1159s typ = 1159s 1159s @singledispatch 1159s def as_cupy(val, typ=None): 1159s """ 1159s Rough conversion function 1159s 1159s Will try to infer target type from input type if not specified. 1159s """ 1159s if typ is None: 1159s typ = resolve_cupy_type(val) 1159s 1159s if issubclass(typ, CupyArray): 1159s > import cupy as cp 1159s E ModuleNotFoundError: No module named 'cupy' 1159s 1159s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:1010: ModuleNotFoundError 1159s _________ test_view_of_view[cupy_array-array_int_subset-slice_subset] __________ 1159s 1159s matrix_type = functools.partial(, typ=) 1159s subset_func = 1159s subset_func2 = 1159s 1159s def test_view_of_view(matrix_type, subset_func, subset_func2): 1159s > adata = gen_adata((30, 15), X_type=matrix_type) 1159s 1159s tests/test_views.py:531: 1159s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1159s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:346: in gen_adata 1159s X = X_type(random_state.binomial(100, 0.005, (M, N)).astype(X_dtype)) 1159s /usr/lib/python3.13/functools.py:934: in wrapper 1159s return dispatch(args[0].__class__)(*args, **kw) 1159s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1159s 1159s val = array([[0., 0., 1., 1., 0., 1., 1., 0., 0., 1., 1., 1., 1., 1., 0.], 1159s [0., 0., 2., 0., 3., 1., 0., 0., 1., 0., 1...0., 0., 1., 2., 0., 1., 1.], 1159s [3., 0., 2., 2., 3., 1., 0., 0., 1., 1., 1., 2., 0., 1., 0.]], 1159s dtype=float32) 1159s typ = 1159s 1159s @singledispatch 1159s def as_cupy(val, typ=None): 1159s """ 1159s Rough conversion function 1159s 1159s Will try to infer target type from input type if not specified. 1159s """ 1159s if typ is None: 1159s typ = resolve_cupy_type(val) 1159s 1159s if issubclass(typ, CupyArray): 1159s > import cupy as cp 1159s E ModuleNotFoundError: No module named 'cupy' 1159s 1159s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:1010: ModuleNotFoundError 1159s _________ test_view_of_view[cupy_array-array_int_subset-single_subset] _________ 1159s 1159s matrix_type = functools.partial(, typ=) 1159s subset_func = 1159s subset_func2 = 1159s 1159s def test_view_of_view(matrix_type, subset_func, subset_func2): 1159s > adata = gen_adata((30, 15), X_type=matrix_type) 1159s 1159s tests/test_views.py:531: 1159s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1159s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:346: in gen_adata 1159s X = X_type(random_state.binomial(100, 0.005, (M, N)).astype(X_dtype)) 1159s /usr/lib/python3.13/functools.py:934: in wrapper 1159s return dispatch(args[0].__class__)(*args, **kw) 1159s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1159s 1159s val = array([[0., 0., 0., 0., 2., 0., 0., 0., 0., 0., 2., 0., 0., 0., 1.], 1159s [1., 0., 0., 0., 1., 0., 1., 2., 2., 1., 1...1., 0., 1., 0., 0., 1., 0.], 1159s [1., 0., 0., 0., 1., 0., 0., 0., 1., 0., 0., 1., 0., 0., 1.]], 1159s dtype=float32) 1159s typ = 1159s 1159s @singledispatch 1159s def as_cupy(val, typ=None): 1159s """ 1159s Rough conversion function 1159s 1159s Will try to infer target type from input type if not specified. 1159s """ 1159s if typ is None: 1159s typ = resolve_cupy_type(val) 1159s 1159s if issubclass(typ, CupyArray): 1159s > import cupy as cp 1159s E ModuleNotFoundError: No module named 'cupy' 1159s 1159s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:1010: ModuleNotFoundError 1159s _______ test_view_of_view[cupy_array-array_int_subset-array_int_subset] ________ 1159s 1159s matrix_type = functools.partial(, typ=) 1159s subset_func = 1159s subset_func2 = 1159s 1159s def test_view_of_view(matrix_type, subset_func, subset_func2): 1159s > adata = gen_adata((30, 15), X_type=matrix_type) 1159s 1159s tests/test_views.py:531: 1159s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1159s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:346: in gen_adata 1159s X = X_type(random_state.binomial(100, 0.005, (M, N)).astype(X_dtype)) 1159s /usr/lib/python3.13/functools.py:934: in wrapper 1159s return dispatch(args[0].__class__)(*args, **kw) 1159s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1159s 1159s val = array([[0., 1., 0., 0., 0., 2., 0., 0., 1., 1., 0., 2., 0., 0., 0.], 1159s [2., 0., 1., 0., 3., 0., 0., 0., 0., 0., 2...0., 0., 1., 1., 0., 0., 0.], 1159s [0., 0., 1., 0., 0., 0., 1., 1., 1., 0., 0., 2., 2., 0., 0.]], 1159s dtype=float32) 1159s typ = 1159s 1159s @singledispatch 1159s def as_cupy(val, typ=None): 1159s """ 1159s Rough conversion function 1159s 1159s Will try to infer target type from input type if not specified. 1159s """ 1159s if typ is None: 1159s typ = resolve_cupy_type(val) 1159s 1159s if issubclass(typ, CupyArray): 1159s > import cupy as cp 1159s E ModuleNotFoundError: No module named 'cupy' 1159s 1159s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:1010: ModuleNotFoundError 1159s ________ test_view_of_view[cupy_array-array_int_subset-list_int_subset] ________ 1159s 1159s matrix_type = functools.partial(, typ=) 1159s subset_func = 1159s subset_func2 = 1159s 1159s def test_view_of_view(matrix_type, subset_func, subset_func2): 1159s > adata = gen_adata((30, 15), X_type=matrix_type) 1159s 1159s tests/test_views.py:531: 1159s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1159s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:346: in gen_adata 1159s X = X_type(random_state.binomial(100, 0.005, (M, N)).astype(X_dtype)) 1159s /usr/lib/python3.13/functools.py:934: in wrapper 1159s return dispatch(args[0].__class__)(*args, **kw) 1159s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1159s 1159s val = array([[1., 0., 0., 0., 1., 0., 0., 0., 1., 1., 0., 0., 0., 0., 0.], 1159s [0., 0., 0., 0., 0., 0., 0., 1., 0., 0., 1...1., 1., 0., 1., 0., 0., 0.], 1159s [0., 0., 0., 0., 1., 1., 1., 1., 1., 1., 0., 0., 0., 0., 2.]], 1159s dtype=float32) 1159s typ = 1159s 1159s @singledispatch 1159s def as_cupy(val, typ=None): 1159s """ 1159s Rough conversion function 1159s 1159s Will try to infer target type from input type if not specified. 1159s """ 1159s if typ is None: 1159s typ = resolve_cupy_type(val) 1159s 1159s if issubclass(typ, CupyArray): 1159s > import cupy as cp 1159s E ModuleNotFoundError: No module named 'cupy' 1159s 1159s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:1010: ModuleNotFoundError 1159s _______ test_view_of_view[cupy_array-array_int_subset-array_bool_subset] _______ 1159s 1159s matrix_type = functools.partial(, typ=) 1159s subset_func = 1159s subset_func2 = 1159s 1159s def test_view_of_view(matrix_type, subset_func, subset_func2): 1159s > adata = gen_adata((30, 15), X_type=matrix_type) 1159s 1159s tests/test_views.py:531: 1159s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1159s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:346: in gen_adata 1159s X = X_type(random_state.binomial(100, 0.005, (M, N)).astype(X_dtype)) 1159s /usr/lib/python3.13/functools.py:934: in wrapper 1159s return dispatch(args[0].__class__)(*args, **kw) 1159s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1159s 1159s val = array([[2., 0., 1., 0., 0., 1., 1., 0., 0., 1., 0., 0., 0., 1., 0.], 1159s [0., 0., 1., 1., 0., 1., 0., 1., 0., 0., 0...1., 0., 1., 0., 0., 0., 1.], 1159s [4., 0., 1., 0., 0., 1., 1., 2., 1., 0., 0., 0., 0., 0., 0.]], 1159s dtype=float32) 1159s typ = 1159s 1159s @singledispatch 1159s def as_cupy(val, typ=None): 1159s """ 1159s Rough conversion function 1159s 1159s Will try to infer target type from input type if not specified. 1159s """ 1159s if typ is None: 1159s typ = resolve_cupy_type(val) 1159s 1159s if issubclass(typ, CupyArray): 1159s > import cupy as cp 1159s E ModuleNotFoundError: No module named 'cupy' 1159s 1159s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:1010: ModuleNotFoundError 1159s _______ test_view_of_view[cupy_array-array_int_subset-list_bool_subset] ________ 1159s 1159s matrix_type = functools.partial(, typ=) 1159s subset_func = 1159s subset_func2 = 1159s 1159s def test_view_of_view(matrix_type, subset_func, subset_func2): 1159s > adata = gen_adata((30, 15), X_type=matrix_type) 1159s 1159s tests/test_views.py:531: 1159s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1159s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:346: in gen_adata 1159s X = X_type(random_state.binomial(100, 0.005, (M, N)).astype(X_dtype)) 1159s /usr/lib/python3.13/functools.py:934: in wrapper 1159s return dispatch(args[0].__class__)(*args, **kw) 1159s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1159s 1159s val = array([[0., 1., 0., 0., 2., 0., 0., 1., 1., 0., 0., 1., 0., 0., 0.], 1159s [1., 0., 0., 1., 0., 1., 1., 1., 0., 0., 1...1., 0., 1., 1., 2., 0., 0.], 1159s [0., 0., 1., 1., 0., 0., 1., 1., 1., 2., 0., 0., 1., 0., 1.]], 1159s dtype=float32) 1159s typ = 1159s 1159s @singledispatch 1159s def as_cupy(val, typ=None): 1159s """ 1159s Rough conversion function 1159s 1159s Will try to infer target type from input type if not specified. 1159s """ 1159s if typ is None: 1159s typ = resolve_cupy_type(val) 1159s 1159s if issubclass(typ, CupyArray): 1159s > import cupy as cp 1159s E ModuleNotFoundError: No module named 'cupy' 1159s 1159s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:1010: ModuleNotFoundError 1159s ______ test_view_of_view[cupy_array-array_int_subset-matrix_bool_subset] _______ 1159s 1159s matrix_type = functools.partial(, typ=) 1159s subset_func = 1159s subset_func2 = 1159s 1159s def test_view_of_view(matrix_type, subset_func, subset_func2): 1159s > adata = gen_adata((30, 15), X_type=matrix_type) 1159s 1159s tests/test_views.py:531: 1159s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1159s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:346: in gen_adata 1159s X = X_type(random_state.binomial(100, 0.005, (M, N)).astype(X_dtype)) 1159s /usr/lib/python3.13/functools.py:934: in wrapper 1159s return dispatch(args[0].__class__)(*args, **kw) 1159s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1159s 1159s val = array([[0., 1., 0., 1., 0., 1., 0., 0., 1., 1., 2., 0., 0., 0., 1.], 1159s [0., 1., 0., 1., 1., 0., 1., 0., 1., 0., 0...1., 0., 0., 1., 0., 0., 0.], 1159s [0., 3., 0., 2., 0., 0., 1., 0., 0., 0., 1., 1., 2., 1., 1.]], 1159s dtype=float32) 1159s typ = 1159s 1159s @singledispatch 1159s def as_cupy(val, typ=None): 1159s """ 1159s Rough conversion function 1159s 1159s Will try to infer target type from input type if not specified. 1159s """ 1159s if typ is None: 1159s typ = resolve_cupy_type(val) 1159s 1159s if issubclass(typ, CupyArray): 1159s > import cupy as cp 1159s E ModuleNotFoundError: No module named 'cupy' 1159s 1159s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:1010: ModuleNotFoundError 1159s _____ test_view_of_view[cupy_array-array_int_subset-spmatrix_bool_subset] ______ 1159s 1159s matrix_type = functools.partial(, typ=) 1159s subset_func = 1159s subset_func2 = 1159s 1159s def test_view_of_view(matrix_type, subset_func, subset_func2): 1159s > adata = gen_adata((30, 15), X_type=matrix_type) 1159s 1159s tests/test_views.py:531: 1159s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1159s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:346: in gen_adata 1159s X = X_type(random_state.binomial(100, 0.005, (M, N)).astype(X_dtype)) 1159s /usr/lib/python3.13/functools.py:934: in wrapper 1159s return dispatch(args[0].__class__)(*args, **kw) 1159s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1159s 1159s val = array([[0., 0., 0., 1., 0., 0., 1., 1., 1., 0., 0., 0., 0., 1., 0.], 1159s [0., 1., 2., 1., 0., 1., 2., 1., 2., 2., 0...0., 1., 0., 1., 2., 0., 1.], 1159s [0., 0., 0., 0., 0., 0., 1., 2., 1., 2., 0., 0., 0., 3., 0.]], 1159s dtype=float32) 1159s typ = 1159s 1159s @singledispatch 1159s def as_cupy(val, typ=None): 1159s """ 1159s Rough conversion function 1159s 1159s Will try to infer target type from input type if not specified. 1159s """ 1159s if typ is None: 1159s typ = resolve_cupy_type(val) 1159s 1159s if issubclass(typ, CupyArray): 1159s > import cupy as cp 1159s E ModuleNotFoundError: No module named 'cupy' 1159s 1159s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:1010: ModuleNotFoundError 1159s ______ test_view_of_view[cupy_array-array_int_subset-sparray_bool_subset] ______ 1159s 1159s matrix_type = functools.partial(, typ=) 1159s subset_func = 1159s subset_func2 = 1159s 1159s def test_view_of_view(matrix_type, subset_func, subset_func2): 1159s > adata = gen_adata((30, 15), X_type=matrix_type) 1159s 1159s tests/test_views.py:531: 1159s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1159s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:346: in gen_adata 1159s X = X_type(random_state.binomial(100, 0.005, (M, N)).astype(X_dtype)) 1159s /usr/lib/python3.13/functools.py:934: in wrapper 1159s return dispatch(args[0].__class__)(*args, **kw) 1159s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1159s 1159s val = array([[1., 0., 1., 1., 1., 1., 0., 1., 0., 0., 0., 0., 0., 0., 0.], 1159s [1., 0., 0., 1., 0., 0., 0., 0., 0., 0., 0...3., 2., 0., 0., 2., 1., 0.], 1159s [1., 2., 0., 1., 2., 0., 0., 0., 0., 0., 1., 1., 0., 1., 0.]], 1159s dtype=float32) 1159s typ = 1159s 1159s @singledispatch 1159s def as_cupy(val, typ=None): 1159s """ 1159s Rough conversion function 1159s 1159s Will try to infer target type from input type if not specified. 1159s """ 1159s if typ is None: 1159s typ = resolve_cupy_type(val) 1159s 1159s if issubclass(typ, CupyArray): 1159s > import cupy as cp 1159s E ModuleNotFoundError: No module named 'cupy' 1159s 1159s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:1010: ModuleNotFoundError 1159s __________ test_view_of_view[cupy_array-list_int_subset-array_subset] __________ 1159s 1159s matrix_type = functools.partial(, typ=) 1159s subset_func = 1159s subset_func2 = 1159s 1159s def test_view_of_view(matrix_type, subset_func, subset_func2): 1159s > adata = gen_adata((30, 15), X_type=matrix_type) 1159s 1159s tests/test_views.py:531: 1159s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1159s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:346: in gen_adata 1159s X = X_type(random_state.binomial(100, 0.005, (M, N)).astype(X_dtype)) 1159s /usr/lib/python3.13/functools.py:934: in wrapper 1159s return dispatch(args[0].__class__)(*args, **kw) 1159s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1159s 1159s val = array([[1., 0., 3., 1., 0., 1., 0., 0., 0., 0., 1., 0., 0., 0., 1.], 1159s [0., 0., 1., 0., 1., 0., 0., 1., 0., 0., 0...2., 1., 0., 0., 0., 2., 0.], 1159s [1., 1., 2., 0., 1., 0., 0., 1., 0., 0., 1., 1., 1., 1., 2.]], 1159s dtype=float32) 1159s typ = 1159s 1159s @singledispatch 1159s def as_cupy(val, typ=None): 1159s """ 1159s Rough conversion function 1159s 1159s Will try to infer target type from input type if not specified. 1159s """ 1159s if typ is None: 1159s typ = resolve_cupy_type(val) 1159s 1159s if issubclass(typ, CupyArray): 1159s > import cupy as cp 1159s E ModuleNotFoundError: No module named 'cupy' 1159s 1159s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:1010: ModuleNotFoundError 1159s __________ test_view_of_view[cupy_array-list_int_subset-slice_subset] __________ 1159s 1159s matrix_type = functools.partial(, typ=) 1159s subset_func = 1159s subset_func2 = 1159s 1159s def test_view_of_view(matrix_type, subset_func, subset_func2): 1159s > adata = gen_adata((30, 15), X_type=matrix_type) 1159s 1159s tests/test_views.py:531: 1159s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1159s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:346: in gen_adata 1159s X = X_type(random_state.binomial(100, 0.005, (M, N)).astype(X_dtype)) 1159s /usr/lib/python3.13/functools.py:934: in wrapper 1159s return dispatch(args[0].__class__)(*args, **kw) 1159s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1159s 1159s val = array([[0., 1., 0., 1., 2., 1., 1., 1., 0., 0., 0., 1., 1., 0., 1.], 1159s [0., 1., 1., 0., 1., 2., 2., 1., 1., 2., 1...0., 0., 1., 2., 1., 1., 0.], 1159s [0., 1., 1., 0., 0., 2., 1., 0., 0., 0., 0., 0., 0., 1., 0.]], 1159s dtype=float32) 1159s typ = 1159s 1159s @singledispatch 1159s def as_cupy(val, typ=None): 1159s """ 1159s Rough conversion function 1159s 1159s Will try to infer target type from input type if not specified. 1159s """ 1159s if typ is None: 1159s typ = resolve_cupy_type(val) 1159s 1159s if issubclass(typ, CupyArray): 1159s > import cupy as cp 1159s E ModuleNotFoundError: No module named 'cupy' 1159s 1159s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:1010: ModuleNotFoundError 1159s _________ test_view_of_view[cupy_array-list_int_subset-single_subset] __________ 1159s 1159s matrix_type = functools.partial(, typ=) 1159s subset_func = 1159s subset_func2 = 1159s 1159s def test_view_of_view(matrix_type, subset_func, subset_func2): 1159s > adata = gen_adata((30, 15), X_type=matrix_type) 1159s 1159s tests/test_views.py:531: 1159s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1159s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:346: in gen_adata 1159s X = X_type(random_state.binomial(100, 0.005, (M, N)).astype(X_dtype)) 1159s /usr/lib/python3.13/functools.py:934: in wrapper 1159s return dispatch(args[0].__class__)(*args, **kw) 1159s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1159s 1159s val = array([[1., 2., 0., 0., 2., 1., 0., 1., 0., 0., 0., 1., 0., 0., 1.], 1159s [2., 1., 2., 1., 0., 1., 0., 0., 1., 0., 1...0., 1., 0., 0., 0., 1., 1.], 1159s [0., 1., 0., 1., 2., 0., 0., 0., 0., 0., 0., 0., 0., 0., 1.]], 1159s dtype=float32) 1159s typ = 1159s 1159s @singledispatch 1159s def as_cupy(val, typ=None): 1159s """ 1159s Rough conversion function 1159s 1159s Will try to infer target type from input type if not specified. 1159s """ 1159s if typ is None: 1159s typ = resolve_cupy_type(val) 1159s 1159s if issubclass(typ, CupyArray): 1159s > import cupy as cp 1159s E ModuleNotFoundError: No module named 'cupy' 1159s 1159s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:1010: ModuleNotFoundError 1159s ________ test_view_of_view[cupy_array-list_int_subset-array_int_subset] ________ 1159s 1159s matrix_type = functools.partial(, typ=) 1159s subset_func = 1159s subset_func2 = 1159s 1159s def test_view_of_view(matrix_type, subset_func, subset_func2): 1159s > adata = gen_adata((30, 15), X_type=matrix_type) 1159s 1159s tests/test_views.py:531: 1159s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1159s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:346: in gen_adata 1159s X = X_type(random_state.binomial(100, 0.005, (M, N)).astype(X_dtype)) 1159s /usr/lib/python3.13/functools.py:934: in wrapper 1159s return dispatch(args[0].__class__)(*args, **kw) 1159s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1159s 1159s val = array([[0., 0., 0., 0., 1., 0., 0., 1., 0., 0., 0., 2., 0., 0., 1.], 1159s [0., 0., 0., 0., 3., 0., 1., 0., 1., 0., 0...0., 0., 0., 1., 1., 2., 1.], 1159s [0., 0., 0., 0., 1., 1., 2., 1., 3., 2., 1., 1., 0., 0., 0.]], 1159s dtype=float32) 1159s typ = 1159s 1159s @singledispatch 1159s def as_cupy(val, typ=None): 1159s """ 1159s Rough conversion function 1159s 1159s Will try to infer target type from input type if not specified. 1159s """ 1159s if typ is None: 1159s typ = resolve_cupy_type(val) 1159s 1159s if issubclass(typ, CupyArray): 1159s > import cupy as cp 1159s E ModuleNotFoundError: No module named 'cupy' 1159s 1159s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:1010: ModuleNotFoundError 1159s ________ test_view_of_view[cupy_array-list_int_subset-list_int_subset] _________ 1159s 1159s matrix_type = functools.partial(, typ=) 1159s subset_func = 1159s subset_func2 = 1159s 1159s def test_view_of_view(matrix_type, subset_func, subset_func2): 1159s > adata = gen_adata((30, 15), X_type=matrix_type) 1159s 1159s tests/test_views.py:531: 1159s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1159s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:346: in gen_adata 1159s X = X_type(random_state.binomial(100, 0.005, (M, N)).astype(X_dtype)) 1159s /usr/lib/python3.13/functools.py:934: in wrapper 1159s return dispatch(args[0].__class__)(*args, **kw) 1159s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1159s 1159s val = array([[2., 1., 1., 0., 1., 0., 1., 1., 0., 0., 0., 1., 1., 1., 1.], 1159s [0., 0., 1., 0., 0., 0., 0., 0., 1., 0., 0...1., 0., 2., 0., 0., 0., 0.], 1159s [1., 2., 0., 0., 0., 1., 0., 0., 0., 0., 1., 0., 0., 0., 0.]], 1159s dtype=float32) 1159s typ = 1159s 1159s @singledispatch 1159s def as_cupy(val, typ=None): 1159s """ 1159s Rough conversion function 1159s 1159s Will try to infer target type from input type if not specified. 1159s """ 1159s if typ is None: 1159s typ = resolve_cupy_type(val) 1159s 1159s if issubclass(typ, CupyArray): 1159s > import cupy as cp 1159s E ModuleNotFoundError: No module named 'cupy' 1159s 1159s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:1010: ModuleNotFoundError 1159s _______ test_view_of_view[cupy_array-list_int_subset-array_bool_subset] ________ 1159s 1159s matrix_type = functools.partial(, typ=) 1159s subset_func = 1159s subset_func2 = 1159s 1159s def test_view_of_view(matrix_type, subset_func, subset_func2): 1159s > adata = gen_adata((30, 15), X_type=matrix_type) 1159s 1159s tests/test_views.py:531: 1159s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1159s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:346: in gen_adata 1159s X = X_type(random_state.binomial(100, 0.005, (M, N)).astype(X_dtype)) 1159s /usr/lib/python3.13/functools.py:934: in wrapper 1159s return dispatch(args[0].__class__)(*args, **kw) 1159s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1159s 1159s val = array([[0., 1., 0., 1., 0., 1., 0., 1., 0., 1., 0., 0., 0., 2., 0.], 1159s [1., 1., 4., 1., 1., 0., 0., 1., 0., 0., 0...2., 0., 0., 1., 0., 1., 0.], 1159s [0., 0., 1., 1., 0., 2., 0., 1., 0., 0., 1., 1., 0., 0., 1.]], 1159s dtype=float32) 1159s typ = 1159s 1159s @singledispatch 1159s def as_cupy(val, typ=None): 1159s """ 1159s Rough conversion function 1159s 1159s Will try to infer target type from input type if not specified. 1159s """ 1159s if typ is None: 1159s typ = resolve_cupy_type(val) 1159s 1159s if issubclass(typ, CupyArray): 1159s > import cupy as cp 1159s E ModuleNotFoundError: No module named 'cupy' 1159s 1159s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:1010: ModuleNotFoundError 1159s ________ test_view_of_view[cupy_array-list_int_subset-list_bool_subset] ________ 1159s 1159s matrix_type = functools.partial(, typ=) 1159s subset_func = 1159s subset_func2 = 1159s 1159s def test_view_of_view(matrix_type, subset_func, subset_func2): 1159s > adata = gen_adata((30, 15), X_type=matrix_type) 1159s 1159s tests/test_views.py:531: 1159s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1159s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:346: in gen_adata 1159s X = X_type(random_state.binomial(100, 0.005, (M, N)).astype(X_dtype)) 1159s /usr/lib/python3.13/functools.py:934: in wrapper 1159s return dispatch(args[0].__class__)(*args, **kw) 1159s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1159s 1159s val = array([[0., 0., 0., 0., 0., 0., 1., 0., 0., 0., 1., 0., 0., 0., 2.], 1159s [0., 0., 1., 0., 1., 0., 1., 0., 1., 1., 1...0., 1., 1., 1., 2., 0., 0.], 1159s [0., 0., 0., 0., 1., 0., 3., 0., 1., 0., 0., 0., 1., 1., 1.]], 1159s dtype=float32) 1159s typ = 1159s 1159s @singledispatch 1159s def as_cupy(val, typ=None): 1159s """ 1159s Rough conversion function 1159s 1159s Will try to infer target type from input type if not specified. 1159s """ 1159s if typ is None: 1159s typ = resolve_cupy_type(val) 1159s 1159s if issubclass(typ, CupyArray): 1159s > import cupy as cp 1159s E ModuleNotFoundError: No module named 'cupy' 1159s 1159s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:1010: ModuleNotFoundError 1159s _______ test_view_of_view[cupy_array-list_int_subset-matrix_bool_subset] _______ 1159s 1159s matrix_type = functools.partial(, typ=) 1159s subset_func = 1159s subset_func2 = 1159s 1159s def test_view_of_view(matrix_type, subset_func, subset_func2): 1159s > adata = gen_adata((30, 15), X_type=matrix_type) 1159s 1159s tests/test_views.py:531: 1159s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1159s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:346: in gen_adata 1159s X = X_type(random_state.binomial(100, 0.005, (M, N)).astype(X_dtype)) 1159s /usr/lib/python3.13/functools.py:934: in wrapper 1159s return dispatch(args[0].__class__)(*args, **kw) 1159s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1159s 1159s val = array([[1., 0., 0., 0., 1., 2., 0., 0., 2., 0., 0., 1., 2., 0., 0.], 1159s [2., 1., 0., 0., 0., 0., 0., 0., 0., 1., 1...1., 0., 0., 1., 0., 1., 1.], 1159s [0., 0., 1., 1., 0., 0., 0., 1., 0., 1., 0., 0., 1., 0., 1.]], 1159s dtype=float32) 1159s typ = 1159s 1159s @singledispatch 1159s def as_cupy(val, typ=None): 1159s """ 1159s Rough conversion function 1159s 1159s Will try to infer target type from input type if not specified. 1159s """ 1159s if typ is None: 1159s typ = resolve_cupy_type(val) 1159s 1159s if issubclass(typ, CupyArray): 1159s > import cupy as cp 1159s E ModuleNotFoundError: No module named 'cupy' 1159s 1159s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:1010: ModuleNotFoundError 1159s ______ test_view_of_view[cupy_array-list_int_subset-spmatrix_bool_subset] ______ 1159s 1159s matrix_type = functools.partial(, typ=) 1159s subset_func = 1159s subset_func2 = 1159s 1159s def test_view_of_view(matrix_type, subset_func, subset_func2): 1159s > adata = gen_adata((30, 15), X_type=matrix_type) 1159s 1159s tests/test_views.py:531: 1159s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1159s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:346: in gen_adata 1159s X = X_type(random_state.binomial(100, 0.005, (M, N)).astype(X_dtype)) 1159s /usr/lib/python3.13/functools.py:934: in wrapper 1159s return dispatch(args[0].__class__)(*args, **kw) 1159s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1159s 1159s val = array([[0., 0., 0., 2., 1., 0., 1., 0., 1., 1., 0., 0., 0., 3., 1.], 1159s [1., 0., 1., 1., 1., 2., 1., 0., 0., 1., 1...1., 1., 0., 3., 0., 1., 1.], 1159s [1., 1., 0., 2., 1., 2., 0., 2., 2., 0., 0., 1., 1., 0., 0.]], 1159s dtype=float32) 1159s typ = 1159s 1159s @singledispatch 1159s def as_cupy(val, typ=None): 1159s """ 1159s Rough conversion function 1159s 1159s Will try to infer target type from input type if not specified. 1159s """ 1159s if typ is None: 1159s typ = resolve_cupy_type(val) 1159s 1159s if issubclass(typ, CupyArray): 1159s > import cupy as cp 1159s E ModuleNotFoundError: No module named 'cupy' 1159s 1159s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:1010: ModuleNotFoundError 1159s ______ test_view_of_view[cupy_array-list_int_subset-sparray_bool_subset] _______ 1159s 1159s matrix_type = functools.partial(, typ=) 1159s subset_func = 1159s subset_func2 = 1159s 1159s def test_view_of_view(matrix_type, subset_func, subset_func2): 1159s > adata = gen_adata((30, 15), X_type=matrix_type) 1159s 1159s tests/test_views.py:531: 1159s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1159s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:346: in gen_adata 1159s X = X_type(random_state.binomial(100, 0.005, (M, N)).astype(X_dtype)) 1159s /usr/lib/python3.13/functools.py:934: in wrapper 1159s return dispatch(args[0].__class__)(*args, **kw) 1159s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1159s 1159s val = array([[1., 1., 0., 0., 1., 0., 2., 0., 1., 0., 2., 2., 0., 1., 1.], 1159s [1., 0., 0., 0., 0., 0., 0., 0., 1., 0., 0...0., 1., 0., 0., 0., 2., 0.], 1159s [1., 2., 0., 1., 0., 2., 0., 0., 0., 0., 0., 0., 0., 1., 0.]], 1159s dtype=float32) 1159s typ = 1159s 1159s @singledispatch 1159s def as_cupy(val, typ=None): 1159s """ 1159s Rough conversion function 1159s 1159s Will try to infer target type from input type if not specified. 1159s """ 1159s if typ is None: 1159s typ = resolve_cupy_type(val) 1159s 1159s if issubclass(typ, CupyArray): 1159s > import cupy as cp 1159s E ModuleNotFoundError: No module named 'cupy' 1159s 1159s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:1010: ModuleNotFoundError 1159s _________ test_view_of_view[cupy_array-array_bool_subset-array_subset] _________ 1159s 1159s matrix_type = functools.partial(, typ=) 1159s subset_func = 1159s subset_func2 = 1159s 1159s def test_view_of_view(matrix_type, subset_func, subset_func2): 1159s > adata = gen_adata((30, 15), X_type=matrix_type) 1159s 1159s tests/test_views.py:531: 1159s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1159s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:346: in gen_adata 1159s X = X_type(random_state.binomial(100, 0.005, (M, N)).astype(X_dtype)) 1159s /usr/lib/python3.13/functools.py:934: in wrapper 1159s return dispatch(args[0].__class__)(*args, **kw) 1159s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1159s 1159s val = array([[0., 0., 0., 0., 0., 3., 0., 2., 0., 1., 0., 1., 0., 0., 0.], 1159s [0., 0., 1., 0., 0., 1., 1., 0., 0., 1., 1...1., 1., 1., 0., 0., 0., 0.], 1159s [1., 0., 0., 0., 1., 0., 0., 1., 0., 0., 0., 0., 0., 2., 1.]], 1159s dtype=float32) 1159s typ = 1159s 1159s @singledispatch 1159s def as_cupy(val, typ=None): 1159s """ 1159s Rough conversion function 1159s 1159s Will try to infer target type from input type if not specified. 1159s """ 1159s if typ is None: 1159s typ = resolve_cupy_type(val) 1159s 1159s if issubclass(typ, CupyArray): 1159s > import cupy as cp 1159s E ModuleNotFoundError: No module named 'cupy' 1159s 1159s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:1010: ModuleNotFoundError 1159s _________ test_view_of_view[cupy_array-array_bool_subset-slice_subset] _________ 1159s 1159s matrix_type = functools.partial(, typ=) 1159s subset_func = 1159s subset_func2 = 1159s 1159s def test_view_of_view(matrix_type, subset_func, subset_func2): 1159s > adata = gen_adata((30, 15), X_type=matrix_type) 1159s 1159s tests/test_views.py:531: 1159s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1159s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:346: in gen_adata 1159s X = X_type(random_state.binomial(100, 0.005, (M, N)).astype(X_dtype)) 1159s /usr/lib/python3.13/functools.py:934: in wrapper 1159s return dispatch(args[0].__class__)(*args, **kw) 1159s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1159s 1159s val = array([[0., 1., 2., 0., 1., 0., 0., 0., 1., 0., 0., 1., 0., 1., 0.], 1159s [0., 2., 1., 0., 1., 0., 1., 0., 0., 1., 0...0., 0., 0., 0., 0., 0., 1.], 1159s [0., 0., 0., 0., 0., 0., 1., 0., 0., 0., 0., 1., 0., 1., 0.]], 1159s dtype=float32) 1159s typ = 1159s 1159s @singledispatch 1159s def as_cupy(val, typ=None): 1159s """ 1159s Rough conversion function 1159s 1159s Will try to infer target type from input type if not specified. 1159s """ 1159s if typ is None: 1159s typ = resolve_cupy_type(val) 1159s 1159s if issubclass(typ, CupyArray): 1159s > import cupy as cp 1159s E ModuleNotFoundError: No module named 'cupy' 1159s 1159s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:1010: ModuleNotFoundError 1159s ________ test_view_of_view[cupy_array-array_bool_subset-single_subset] _________ 1159s 1159s matrix_type = functools.partial(, typ=) 1159s subset_func = 1159s subset_func2 = 1159s 1159s def test_view_of_view(matrix_type, subset_func, subset_func2): 1159s > adata = gen_adata((30, 15), X_type=matrix_type) 1159s 1159s tests/test_views.py:531: 1159s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1159s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:346: in gen_adata 1159s X = X_type(random_state.binomial(100, 0.005, (M, N)).astype(X_dtype)) 1159s /usr/lib/python3.13/functools.py:934: in wrapper 1159s return dispatch(args[0].__class__)(*args, **kw) 1159s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1159s 1159s val = array([[0., 2., 1., 0., 1., 0., 2., 0., 0., 1., 0., 1., 0., 0., 0.], 1159s [1., 0., 0., 3., 0., 0., 1., 1., 2., 1., 0...0., 1., 0., 0., 1., 1., 0.], 1159s [0., 0., 0., 1., 1., 4., 1., 0., 0., 0., 1., 0., 1., 1., 2.]], 1159s dtype=float32) 1159s typ = 1159s 1159s @singledispatch 1159s def as_cupy(val, typ=None): 1159s """ 1159s Rough conversion function 1159s 1159s Will try to infer target type from input type if not specified. 1159s """ 1159s if typ is None: 1159s typ = resolve_cupy_type(val) 1159s 1159s if issubclass(typ, CupyArray): 1159s > import cupy as cp 1159s E ModuleNotFoundError: No module named 'cupy' 1159s 1159s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:1010: ModuleNotFoundError 1159s _______ test_view_of_view[cupy_array-array_bool_subset-array_int_subset] _______ 1159s 1159s matrix_type = functools.partial(, typ=) 1159s subset_func = 1159s subset_func2 = 1159s 1159s def test_view_of_view(matrix_type, subset_func, subset_func2): 1159s > adata = gen_adata((30, 15), X_type=matrix_type) 1159s 1159s tests/test_views.py:531: 1159s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1159s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:346: in gen_adata 1159s X = X_type(random_state.binomial(100, 0.005, (M, N)).astype(X_dtype)) 1159s /usr/lib/python3.13/functools.py:934: in wrapper 1159s return dispatch(args[0].__class__)(*args, **kw) 1159s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1159s 1159s val = array([[0., 1., 1., 1., 2., 0., 1., 0., 0., 2., 1., 0., 0., 0., 0.], 1159s [2., 0., 0., 0., 0., 0., 0., 1., 1., 0., 1...0., 2., 0., 0., 0., 0., 0.], 1159s [0., 0., 1., 0., 0., 0., 0., 1., 0., 0., 1., 0., 0., 0., 0.]], 1159s dtype=float32) 1159s typ = 1159s 1159s @singledispatch 1159s def as_cupy(val, typ=None): 1159s """ 1159s Rough conversion function 1159s 1159s Will try to infer target type from input type if not specified. 1159s """ 1159s if typ is None: 1159s typ = resolve_cupy_type(val) 1159s 1159s if issubclass(typ, CupyArray): 1159s > import cupy as cp 1159s E ModuleNotFoundError: No module named 'cupy' 1159s 1159s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:1010: ModuleNotFoundError 1159s _______ test_view_of_view[cupy_array-array_bool_subset-list_int_subset] ________ 1159s 1159s matrix_type = functools.partial(, typ=) 1159s subset_func = 1159s subset_func2 = 1159s 1159s def test_view_of_view(matrix_type, subset_func, subset_func2): 1159s > adata = gen_adata((30, 15), X_type=matrix_type) 1159s 1159s tests/test_views.py:531: 1159s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1159s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:346: in gen_adata 1159s X = X_type(random_state.binomial(100, 0.005, (M, N)).astype(X_dtype)) 1159s /usr/lib/python3.13/functools.py:934: in wrapper 1159s return dispatch(args[0].__class__)(*args, **kw) 1159s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1159s 1159s val = array([[1., 0., 2., 1., 0., 1., 0., 0., 0., 1., 1., 0., 3., 0., 1.], 1159s [1., 0., 0., 0., 1., 0., 0., 0., 1., 0., 1...0., 1., 0., 3., 0., 0., 0.], 1159s [0., 1., 0., 1., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0.]], 1159s dtype=float32) 1159s typ = 1159s 1159s @singledispatch 1159s def as_cupy(val, typ=None): 1159s """ 1159s Rough conversion function 1159s 1159s Will try to infer target type from input type if not specified. 1159s """ 1159s if typ is None: 1159s typ = resolve_cupy_type(val) 1159s 1159s if issubclass(typ, CupyArray): 1159s > import cupy as cp 1159s E ModuleNotFoundError: No module named 'cupy' 1159s 1159s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:1010: ModuleNotFoundError 1159s ______ test_view_of_view[cupy_array-array_bool_subset-array_bool_subset] _______ 1159s 1159s matrix_type = functools.partial(, typ=) 1159s subset_func = 1159s subset_func2 = 1159s 1159s def test_view_of_view(matrix_type, subset_func, subset_func2): 1159s > adata = gen_adata((30, 15), X_type=matrix_type) 1159s 1159s tests/test_views.py:531: 1159s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1159s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:346: in gen_adata 1159s X = X_type(random_state.binomial(100, 0.005, (M, N)).astype(X_dtype)) 1159s /usr/lib/python3.13/functools.py:934: in wrapper 1159s return dispatch(args[0].__class__)(*args, **kw) 1159s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1159s 1159s val = array([[1., 0., 1., 0., 0., 2., 1., 0., 0., 0., 0., 0., 1., 1., 0.], 1159s [0., 0., 0., 0., 2., 0., 1., 0., 1., 1., 0...0., 1., 1., 0., 0., 0., 1.], 1159s [0., 0., 0., 1., 0., 0., 0., 1., 1., 2., 0., 0., 0., 0., 1.]], 1159s dtype=float32) 1159s typ = 1159s 1159s @singledispatch 1159s def as_cupy(val, typ=None): 1159s """ 1159s Rough conversion function 1159s 1159s Will try to infer target type from input type if not specified. 1159s """ 1159s if typ is None: 1159s typ = resolve_cupy_type(val) 1159s 1159s if issubclass(typ, CupyArray): 1159s > import cupy as cp 1159s E ModuleNotFoundError: No module named 'cupy' 1159s 1159s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:1010: ModuleNotFoundError 1159s _______ test_view_of_view[cupy_array-array_bool_subset-list_bool_subset] _______ 1159s 1159s matrix_type = functools.partial(, typ=) 1159s subset_func = 1159s subset_func2 = 1159s 1159s def test_view_of_view(matrix_type, subset_func, subset_func2): 1159s > adata = gen_adata((30, 15), X_type=matrix_type) 1159s 1159s tests/test_views.py:531: 1159s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1159s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:346: in gen_adata 1159s X = X_type(random_state.binomial(100, 0.005, (M, N)).astype(X_dtype)) 1159s /usr/lib/python3.13/functools.py:934: in wrapper 1159s return dispatch(args[0].__class__)(*args, **kw) 1159s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1159s 1159s val = array([[0., 1., 0., 1., 0., 0., 1., 0., 1., 0., 1., 1., 0., 0., 0.], 1159s [0., 0., 0., 0., 1., 0., 0., 1., 1., 1., 0...1., 2., 0., 0., 0., 1., 0.], 1159s [0., 0., 0., 1., 0., 0., 1., 1., 0., 1., 1., 1., 2., 1., 0.]], 1159s dtype=float32) 1159s typ = 1159s 1159s @singledispatch 1159s def as_cupy(val, typ=None): 1159s """ 1159s Rough conversion function 1159s 1159s Will try to infer target type from input type if not specified. 1159s """ 1159s if typ is None: 1159s typ = resolve_cupy_type(val) 1159s 1159s if issubclass(typ, CupyArray): 1159s > import cupy as cp 1159s E ModuleNotFoundError: No module named 'cupy' 1159s 1159s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:1010: ModuleNotFoundError 1159s ______ test_view_of_view[cupy_array-array_bool_subset-matrix_bool_subset] ______ 1159s 1159s matrix_type = functools.partial(, typ=) 1159s subset_func = 1159s subset_func2 = 1159s 1159s def test_view_of_view(matrix_type, subset_func, subset_func2): 1159s > adata = gen_adata((30, 15), X_type=matrix_type) 1159s 1159s tests/test_views.py:531: 1159s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1159s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:346: in gen_adata 1159s X = X_type(random_state.binomial(100, 0.005, (M, N)).astype(X_dtype)) 1159s /usr/lib/python3.13/functools.py:934: in wrapper 1159s return dispatch(args[0].__class__)(*args, **kw) 1159s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1159s 1159s val = array([[0., 0., 0., 0., 0., 1., 0., 1., 0., 0., 1., 0., 0., 1., 2.], 1159s [2., 0., 0., 0., 0., 1., 0., 1., 0., 1., 0...0., 1., 1., 0., 0., 1., 1.], 1159s [0., 1., 0., 1., 1., 0., 0., 0., 1., 1., 0., 1., 0., 0., 0.]], 1159s dtype=float32) 1159s typ = 1159s 1159s @singledispatch 1159s def as_cupy(val, typ=None): 1159s """ 1159s Rough conversion function 1159s 1159s Will try to infer target type from input type if not specified. 1159s """ 1159s if typ is None: 1159s typ = resolve_cupy_type(val) 1159s 1159s if issubclass(typ, CupyArray): 1159s > import cupy as cp 1159s E ModuleNotFoundError: No module named 'cupy' 1159s 1159s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:1010: ModuleNotFoundError 1159s _____ test_view_of_view[cupy_array-array_bool_subset-spmatrix_bool_subset] _____ 1159s 1159s matrix_type = functools.partial(, typ=) 1159s subset_func = 1159s subset_func2 = 1159s 1159s def test_view_of_view(matrix_type, subset_func, subset_func2): 1159s > adata = gen_adata((30, 15), X_type=matrix_type) 1159s 1159s tests/test_views.py:531: 1159s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1159s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:346: in gen_adata 1159s X = X_type(random_state.binomial(100, 0.005, (M, N)).astype(X_dtype)) 1159s /usr/lib/python3.13/functools.py:934: in wrapper 1159s return dispatch(args[0].__class__)(*args, **kw) 1159s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1159s 1159s val = array([[0., 2., 0., 0., 1., 0., 1., 1., 1., 0., 1., 2., 1., 1., 0.], 1159s [0., 0., 0., 1., 0., 0., 0., 0., 0., 0., 0...1., 0., 1., 0., 0., 0., 2.], 1159s [1., 0., 0., 0., 1., 1., 2., 0., 0., 1., 1., 0., 2., 0., 0.]], 1159s dtype=float32) 1159s typ = 1159s 1159s @singledispatch 1159s def as_cupy(val, typ=None): 1159s """ 1159s Rough conversion function 1159s 1159s Will try to infer target type from input type if not specified. 1159s """ 1159s if typ is None: 1159s typ = resolve_cupy_type(val) 1159s 1159s if issubclass(typ, CupyArray): 1159s > import cupy as cp 1159s E ModuleNotFoundError: No module named 'cupy' 1159s 1159s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:1010: ModuleNotFoundError 1159s _____ test_view_of_view[cupy_array-array_bool_subset-sparray_bool_subset] ______ 1159s 1159s matrix_type = functools.partial(, typ=) 1159s subset_func = 1159s subset_func2 = 1159s 1159s def test_view_of_view(matrix_type, subset_func, subset_func2): 1159s > adata = gen_adata((30, 15), X_type=matrix_type) 1159s 1159s tests/test_views.py:531: 1159s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1159s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:346: in gen_adata 1159s X = X_type(random_state.binomial(100, 0.005, (M, N)).astype(X_dtype)) 1159s /usr/lib/python3.13/functools.py:934: in wrapper 1159s return dispatch(args[0].__class__)(*args, **kw) 1159s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1159s 1159s val = array([[0., 0., 0., 0., 3., 3., 0., 0., 0., 1., 0., 0., 0., 1., 0.], 1159s [1., 0., 0., 1., 0., 1., 0., 2., 0., 0., 0...0., 1., 0., 2., 2., 1., 0.], 1159s [0., 0., 0., 1., 0., 1., 0., 1., 0., 0., 1., 1., 0., 1., 2.]], 1159s dtype=float32) 1159s typ = 1159s 1159s @singledispatch 1159s def as_cupy(val, typ=None): 1159s """ 1159s Rough conversion function 1159s 1159s Will try to infer target type from input type if not specified. 1159s """ 1159s if typ is None: 1159s typ = resolve_cupy_type(val) 1159s 1159s if issubclass(typ, CupyArray): 1159s > import cupy as cp 1159s E ModuleNotFoundError: No module named 'cupy' 1159s 1159s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:1010: ModuleNotFoundError 1159s _________ test_view_of_view[cupy_array-list_bool_subset-array_subset] __________ 1159s 1159s matrix_type = functools.partial(, typ=) 1159s subset_func = 1159s subset_func2 = 1159s 1159s def test_view_of_view(matrix_type, subset_func, subset_func2): 1159s > adata = gen_adata((30, 15), X_type=matrix_type) 1159s 1159s tests/test_views.py:531: 1159s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1159s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:346: in gen_adata 1159s X = X_type(random_state.binomial(100, 0.005, (M, N)).astype(X_dtype)) 1159s /usr/lib/python3.13/functools.py:934: in wrapper 1159s return dispatch(args[0].__class__)(*args, **kw) 1159s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1159s 1159s val = array([[1., 1., 4., 0., 1., 0., 0., 0., 0., 0., 0., 2., 0., 0., 0.], 1159s [0., 0., 2., 0., 0., 1., 2., 0., 0., 0., 0...1., 2., 1., 0., 0., 1., 1.], 1159s [2., 1., 0., 1., 0., 0., 0., 1., 1., 1., 0., 1., 1., 1., 1.]], 1159s dtype=float32) 1159s typ = 1159s 1159s @singledispatch 1159s def as_cupy(val, typ=None): 1159s """ 1159s Rough conversion function 1159s 1159s Will try to infer target type from input type if not specified. 1159s """ 1159s if typ is None: 1159s typ = resolve_cupy_type(val) 1159s 1159s if issubclass(typ, CupyArray): 1159s > import cupy as cp 1159s E ModuleNotFoundError: No module named 'cupy' 1159s 1159s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:1010: ModuleNotFoundError 1159s _________ test_view_of_view[cupy_array-list_bool_subset-slice_subset] __________ 1159s 1159s matrix_type = functools.partial(, typ=) 1159s subset_func = 1159s subset_func2 = 1159s 1159s def test_view_of_view(matrix_type, subset_func, subset_func2): 1159s > adata = gen_adata((30, 15), X_type=matrix_type) 1159s 1159s tests/test_views.py:531: 1159s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1159s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:346: in gen_adata 1159s X = X_type(random_state.binomial(100, 0.005, (M, N)).astype(X_dtype)) 1159s /usr/lib/python3.13/functools.py:934: in wrapper 1159s return dispatch(args[0].__class__)(*args, **kw) 1159s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1159s 1159s val = array([[1., 2., 0., 2., 2., 1., 1., 0., 0., 0., 0., 0., 0., 1., 1.], 1159s [0., 1., 0., 0., 0., 0., 0., 0., 0., 0., 0...1., 1., 0., 0., 0., 1., 0.], 1159s [0., 0., 0., 1., 1., 1., 1., 0., 0., 0., 0., 1., 0., 2., 0.]], 1159s dtype=float32) 1159s typ = 1159s 1159s @singledispatch 1159s def as_cupy(val, typ=None): 1159s """ 1159s Rough conversion function 1159s 1159s Will try to infer target type from input type if not specified. 1159s """ 1159s if typ is None: 1159s typ = resolve_cupy_type(val) 1159s 1159s if issubclass(typ, CupyArray): 1159s > import cupy as cp 1159s E ModuleNotFoundError: No module named 'cupy' 1159s 1159s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:1010: ModuleNotFoundError 1159s _________ test_view_of_view[cupy_array-list_bool_subset-single_subset] _________ 1159s 1159s matrix_type = functools.partial(, typ=) 1159s subset_func = 1159s subset_func2 = 1159s 1159s def test_view_of_view(matrix_type, subset_func, subset_func2): 1159s > adata = gen_adata((30, 15), X_type=matrix_type) 1159s 1159s tests/test_views.py:531: 1159s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1159s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:346: in gen_adata 1159s X = X_type(random_state.binomial(100, 0.005, (M, N)).astype(X_dtype)) 1159s /usr/lib/python3.13/functools.py:934: in wrapper 1159s return dispatch(args[0].__class__)(*args, **kw) 1159s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1159s 1159s val = array([[0., 0., 0., 0., 0., 0., 0., 0., 2., 0., 0., 2., 0., 1., 0.], 1159s [0., 0., 3., 0., 0., 1., 0., 0., 0., 0., 3...1., 0., 1., 0., 0., 0., 0.], 1159s [1., 0., 0., 1., 0., 0., 2., 0., 0., 0., 0., 0., 0., 1., 0.]], 1159s dtype=float32) 1159s typ = 1159s 1159s @singledispatch 1159s def as_cupy(val, typ=None): 1159s """ 1159s Rough conversion function 1159s 1159s Will try to infer target type from input type if not specified. 1159s """ 1159s if typ is None: 1159s typ = resolve_cupy_type(val) 1159s 1159s if issubclass(typ, CupyArray): 1159s > import cupy as cp 1159s E ModuleNotFoundError: No module named 'cupy' 1159s 1159s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:1010: ModuleNotFoundError 1159s _______ test_view_of_view[cupy_array-list_bool_subset-array_int_subset] ________ 1159s 1159s matrix_type = functools.partial(, typ=) 1159s subset_func = 1159s subset_func2 = 1159s 1159s def test_view_of_view(matrix_type, subset_func, subset_func2): 1159s > adata = gen_adata((30, 15), X_type=matrix_type) 1159s 1159s tests/test_views.py:531: 1159s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1159s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:346: in gen_adata 1159s X = X_type(random_state.binomial(100, 0.005, (M, N)).astype(X_dtype)) 1159s /usr/lib/python3.13/functools.py:934: in wrapper 1159s return dispatch(args[0].__class__)(*args, **kw) 1159s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1159s 1159s val = array([[2., 1., 0., 0., 1., 1., 0., 1., 0., 0., 0., 0., 0., 1., 1.], 1159s [0., 1., 1., 0., 2., 0., 0., 2., 1., 2., 1...0., 0., 1., 0., 0., 1., 1.], 1159s [1., 2., 1., 1., 0., 0., 0., 1., 1., 0., 1., 1., 0., 0., 0.]], 1159s dtype=float32) 1159s typ = 1159s 1159s @singledispatch 1159s def as_cupy(val, typ=None): 1159s """ 1159s Rough conversion function 1159s 1159s Will try to infer target type from input type if not specified. 1159s """ 1159s if typ is None: 1159s typ = resolve_cupy_type(val) 1159s 1159s if issubclass(typ, CupyArray): 1159s > import cupy as cp 1159s E ModuleNotFoundError: No module named 'cupy' 1159s 1159s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:1010: ModuleNotFoundError 1159s ________ test_view_of_view[cupy_array-list_bool_subset-list_int_subset] ________ 1159s 1159s matrix_type = functools.partial(, typ=) 1159s subset_func = 1159s subset_func2 = 1159s 1159s def test_view_of_view(matrix_type, subset_func, subset_func2): 1159s > adata = gen_adata((30, 15), X_type=matrix_type) 1159s 1159s tests/test_views.py:531: 1159s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1159s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:346: in gen_adata 1159s X = X_type(random_state.binomial(100, 0.005, (M, N)).astype(X_dtype)) 1159s /usr/lib/python3.13/functools.py:934: in wrapper 1159s return dispatch(args[0].__class__)(*args, **kw) 1159s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1159s 1159s val = array([[1., 0., 1., 0., 2., 1., 0., 0., 0., 0., 1., 2., 0., 2., 0.], 1159s [0., 0., 1., 0., 0., 1., 1., 1., 0., 1., 1...0., 0., 0., 0., 1., 1., 0.], 1159s [0., 1., 1., 3., 1., 0., 0., 2., 2., 1., 0., 0., 0., 0., 0.]], 1159s dtype=float32) 1159s typ = 1159s 1159s @singledispatch 1159s def as_cupy(val, typ=None): 1159s """ 1159s Rough conversion function 1159s 1159s Will try to infer target type from input type if not specified. 1159s """ 1159s if typ is None: 1159s typ = resolve_cupy_type(val) 1159s 1159s if issubclass(typ, CupyArray): 1159s > import cupy as cp 1159s E ModuleNotFoundError: No module named 'cupy' 1159s 1159s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:1010: ModuleNotFoundError 1159s _______ test_view_of_view[cupy_array-list_bool_subset-array_bool_subset] _______ 1159s 1159s matrix_type = functools.partial(, typ=) 1159s subset_func = 1159s subset_func2 = 1159s 1159s def test_view_of_view(matrix_type, subset_func, subset_func2): 1159s > adata = gen_adata((30, 15), X_type=matrix_type) 1159s 1159s tests/test_views.py:531: 1159s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1159s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:346: in gen_adata 1159s X = X_type(random_state.binomial(100, 0.005, (M, N)).astype(X_dtype)) 1159s /usr/lib/python3.13/functools.py:934: in wrapper 1159s return dispatch(args[0].__class__)(*args, **kw) 1159s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1159s 1159s val = array([[0., 0., 0., 0., 1., 1., 1., 0., 1., 0., 0., 0., 0., 0., 0.], 1159s [1., 0., 0., 0., 1., 2., 2., 1., 1., 2., 0...0., 0., 1., 0., 1., 0., 1.], 1159s [0., 0., 1., 0., 0., 1., 0., 1., 0., 0., 0., 0., 0., 0., 0.]], 1159s dtype=float32) 1159s typ = 1159s 1159s @singledispatch 1159s def as_cupy(val, typ=None): 1159s """ 1159s Rough conversion function 1159s 1159s Will try to infer target type from input type if not specified. 1159s """ 1159s if typ is None: 1159s typ = resolve_cupy_type(val) 1159s 1159s if issubclass(typ, CupyArray): 1159s > import cupy as cp 1159s E ModuleNotFoundError: No module named 'cupy' 1159s 1159s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:1010: ModuleNotFoundError 1159s _______ test_view_of_view[cupy_array-list_bool_subset-list_bool_subset] ________ 1159s 1159s matrix_type = functools.partial(, typ=) 1159s subset_func = 1159s subset_func2 = 1159s 1159s def test_view_of_view(matrix_type, subset_func, subset_func2): 1159s > adata = gen_adata((30, 15), X_type=matrix_type) 1159s 1159s tests/test_views.py:531: 1159s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1159s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:346: in gen_adata 1159s X = X_type(random_state.binomial(100, 0.005, (M, N)).astype(X_dtype)) 1159s /usr/lib/python3.13/functools.py:934: in wrapper 1159s return dispatch(args[0].__class__)(*args, **kw) 1159s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1159s 1159s val = array([[0., 0., 1., 1., 4., 0., 1., 0., 1., 0., 0., 0., 1., 0., 1.], 1159s [1., 0., 0., 1., 1., 2., 1., 0., 0., 3., 1...0., 0., 0., 0., 2., 2., 0.], 1159s [0., 0., 0., 0., 1., 0., 1., 0., 0., 0., 1., 2., 0., 0., 0.]], 1159s dtype=float32) 1159s typ = 1159s 1159s @singledispatch 1159s def as_cupy(val, typ=None): 1159s """ 1159s Rough conversion function 1159s 1159s Will try to infer target type from input type if not specified. 1159s """ 1159s if typ is None: 1159s typ = resolve_cupy_type(val) 1159s 1159s if issubclass(typ, CupyArray): 1159s > import cupy as cp 1159s E ModuleNotFoundError: No module named 'cupy' 1159s 1159s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:1010: ModuleNotFoundError 1159s ______ test_view_of_view[cupy_array-list_bool_subset-matrix_bool_subset] _______ 1159s 1159s matrix_type = functools.partial(, typ=) 1159s subset_func = 1159s subset_func2 = 1159s 1159s def test_view_of_view(matrix_type, subset_func, subset_func2): 1159s > adata = gen_adata((30, 15), X_type=matrix_type) 1159s 1159s tests/test_views.py:531: 1159s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1159s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:346: in gen_adata 1159s X = X_type(random_state.binomial(100, 0.005, (M, N)).astype(X_dtype)) 1159s /usr/lib/python3.13/functools.py:934: in wrapper 1159s return dispatch(args[0].__class__)(*args, **kw) 1159s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1159s 1159s val = array([[0., 0., 1., 0., 0., 0., 0., 0., 1., 1., 0., 0., 0., 0., 0.], 1159s [0., 0., 1., 0., 1., 1., 0., 1., 0., 0., 0...0., 1., 0., 1., 1., 0., 0.], 1159s [1., 0., 1., 0., 0., 0., 1., 0., 0., 0., 1., 0., 1., 0., 1.]], 1159s dtype=float32) 1159s typ = 1159s 1159s @singledispatch 1159s def as_cupy(val, typ=None): 1159s """ 1159s Rough conversion function 1159s 1159s Will try to infer target type from input type if not specified. 1159s """ 1159s if typ is None: 1159s typ = resolve_cupy_type(val) 1159s 1159s if issubclass(typ, CupyArray): 1159s > import cupy as cp 1159s E ModuleNotFoundError: No module named 'cupy' 1159s 1159s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:1010: ModuleNotFoundError 1159s _____ test_view_of_view[cupy_array-list_bool_subset-spmatrix_bool_subset] ______ 1159s 1159s matrix_type = functools.partial(, typ=) 1159s subset_func = 1159s subset_func2 = 1159s 1159s def test_view_of_view(matrix_type, subset_func, subset_func2): 1159s > adata = gen_adata((30, 15), X_type=matrix_type) 1159s 1159s tests/test_views.py:531: 1159s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1159s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:346: in gen_adata 1159s X = X_type(random_state.binomial(100, 0.005, (M, N)).astype(X_dtype)) 1159s /usr/lib/python3.13/functools.py:934: in wrapper 1159s return dispatch(args[0].__class__)(*args, **kw) 1159s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1159s 1159s val = array([[1., 1., 2., 0., 2., 1., 1., 1., 0., 0., 0., 0., 2., 0., 1.], 1159s [0., 1., 0., 0., 1., 0., 0., 0., 1., 0., 0...1., 0., 0., 0., 0., 1., 0.], 1159s [1., 1., 0., 0., 0., 0., 1., 1., 0., 1., 0., 0., 0., 0., 0.]], 1159s dtype=float32) 1159s typ = 1159s 1159s @singledispatch 1159s def as_cupy(val, typ=None): 1159s """ 1159s Rough conversion function 1159s 1159s Will try to infer target type from input type if not specified. 1159s """ 1159s if typ is None: 1159s typ = resolve_cupy_type(val) 1159s 1159s if issubclass(typ, CupyArray): 1159s > import cupy as cp 1159s E ModuleNotFoundError: No module named 'cupy' 1159s 1159s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:1010: ModuleNotFoundError 1159s ______ test_view_of_view[cupy_array-list_bool_subset-sparray_bool_subset] ______ 1159s 1159s matrix_type = functools.partial(, typ=) 1159s subset_func = 1159s subset_func2 = 1159s 1159s def test_view_of_view(matrix_type, subset_func, subset_func2): 1159s > adata = gen_adata((30, 15), X_type=matrix_type) 1159s 1159s tests/test_views.py:531: 1159s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1159s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:346: in gen_adata 1159s X = X_type(random_state.binomial(100, 0.005, (M, N)).astype(X_dtype)) 1159s /usr/lib/python3.13/functools.py:934: in wrapper 1159s return dispatch(args[0].__class__)(*args, **kw) 1159s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1159s 1159s val = array([[1., 0., 1., 1., 0., 0., 1., 1., 0., 2., 0., 0., 0., 1., 0.], 1159s [1., 0., 0., 1., 1., 0., 1., 0., 1., 1., 0...0., 0., 2., 0., 0., 0., 0.], 1159s [0., 0., 1., 0., 0., 2., 1., 0., 0., 0., 0., 1., 0., 0., 1.]], 1159s dtype=float32) 1159s typ = 1159s 1159s @singledispatch 1159s def as_cupy(val, typ=None): 1159s """ 1159s Rough conversion function 1159s 1159s Will try to infer target type from input type if not specified. 1159s """ 1159s if typ is None: 1159s typ = resolve_cupy_type(val) 1159s 1159s if issubclass(typ, CupyArray): 1159s > import cupy as cp 1159s E ModuleNotFoundError: No module named 'cupy' 1159s 1159s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:1010: ModuleNotFoundError 1159s ________ test_view_of_view[cupy_array-matrix_bool_subset-array_subset] _________ 1159s 1159s matrix_type = functools.partial(, typ=) 1159s subset_func = 1159s subset_func2 = 1159s 1159s def test_view_of_view(matrix_type, subset_func, subset_func2): 1159s > adata = gen_adata((30, 15), X_type=matrix_type) 1159s 1159s tests/test_views.py:531: 1159s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1159s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:346: in gen_adata 1159s X = X_type(random_state.binomial(100, 0.005, (M, N)).astype(X_dtype)) 1159s /usr/lib/python3.13/functools.py:934: in wrapper 1159s return dispatch(args[0].__class__)(*args, **kw) 1159s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1159s 1159s val = array([[0., 2., 2., 0., 0., 0., 1., 0., 1., 2., 0., 0., 0., 1., 0.], 1159s [0., 0., 1., 0., 0., 1., 0., 1., 2., 0., 0...1., 0., 0., 1., 0., 1., 0.], 1159s [0., 0., 0., 0., 0., 1., 1., 0., 1., 0., 0., 0., 0., 1., 1.]], 1159s dtype=float32) 1159s typ = 1159s 1159s @singledispatch 1159s def as_cupy(val, typ=None): 1159s """ 1159s Rough conversion function 1159s 1159s Will try to infer target type from input type if not specified. 1159s """ 1159s if typ is None: 1159s typ = resolve_cupy_type(val) 1159s 1159s if issubclass(typ, CupyArray): 1159s > import cupy as cp 1159s E ModuleNotFoundError: No module named 'cupy' 1159s 1159s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:1010: ModuleNotFoundError 1159s ________ test_view_of_view[cupy_array-matrix_bool_subset-slice_subset] _________ 1159s 1159s matrix_type = functools.partial(, typ=) 1159s subset_func = 1159s subset_func2 = 1159s 1159s def test_view_of_view(matrix_type, subset_func, subset_func2): 1159s > adata = gen_adata((30, 15), X_type=matrix_type) 1159s 1159s tests/test_views.py:531: 1159s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1159s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:346: in gen_adata 1159s X = X_type(random_state.binomial(100, 0.005, (M, N)).astype(X_dtype)) 1159s /usr/lib/python3.13/functools.py:934: in wrapper 1159s return dispatch(args[0].__class__)(*args, **kw) 1159s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1159s 1159s val = array([[0., 0., 0., 0., 1., 0., 1., 1., 0., 0., 0., 0., 0., 1., 0.], 1159s [0., 3., 2., 0., 1., 0., 0., 0., 0., 0., 0...0., 0., 0., 0., 0., 0., 0.], 1159s [0., 0., 1., 1., 0., 2., 0., 1., 0., 1., 1., 0., 1., 0., 1.]], 1159s dtype=float32) 1159s typ = 1159s 1159s @singledispatch 1159s def as_cupy(val, typ=None): 1159s """ 1159s Rough conversion function 1159s 1159s Will try to infer target type from input type if not specified. 1159s """ 1159s if typ is None: 1159s typ = resolve_cupy_type(val) 1159s 1159s if issubclass(typ, CupyArray): 1159s > import cupy as cp 1159s E ModuleNotFoundError: No module named 'cupy' 1159s 1159s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:1010: ModuleNotFoundError 1159s ________ test_view_of_view[cupy_array-matrix_bool_subset-single_subset] ________ 1159s 1159s matrix_type = functools.partial(, typ=) 1159s subset_func = 1159s subset_func2 = 1159s 1159s def test_view_of_view(matrix_type, subset_func, subset_func2): 1159s > adata = gen_adata((30, 15), X_type=matrix_type) 1159s 1159s tests/test_views.py:531: 1159s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1159s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:346: in gen_adata 1159s X = X_type(random_state.binomial(100, 0.005, (M, N)).astype(X_dtype)) 1159s /usr/lib/python3.13/functools.py:934: in wrapper 1159s return dispatch(args[0].__class__)(*args, **kw) 1159s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1159s 1159s val = array([[0., 0., 1., 1., 0., 1., 2., 0., 0., 1., 1., 1., 1., 1., 0.], 1159s [0., 0., 0., 0., 0., 1., 0., 0., 1., 0., 0...0., 1., 0., 1., 1., 0., 1.], 1159s [2., 0., 0., 5., 0., 0., 0., 0., 0., 1., 1., 2., 0., 2., 0.]], 1159s dtype=float32) 1159s typ = 1159s 1159s @singledispatch 1159s def as_cupy(val, typ=None): 1159s """ 1159s Rough conversion function 1159s 1159s Will try to infer target type from input type if not specified. 1159s """ 1159s if typ is None: 1159s typ = resolve_cupy_type(val) 1159s 1159s if issubclass(typ, CupyArray): 1159s > import cupy as cp 1159s E ModuleNotFoundError: No module named 'cupy' 1159s 1159s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:1010: ModuleNotFoundError 1159s ______ test_view_of_view[cupy_array-matrix_bool_subset-array_int_subset] _______ 1159s 1159s matrix_type = functools.partial(, typ=) 1159s subset_func = 1159s subset_func2 = 1159s 1159s def test_view_of_view(matrix_type, subset_func, subset_func2): 1159s > adata = gen_adata((30, 15), X_type=matrix_type) 1159s 1159s tests/test_views.py:531: 1159s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1159s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:346: in gen_adata 1159s X = X_type(random_state.binomial(100, 0.005, (M, N)).astype(X_dtype)) 1159s /usr/lib/python3.13/functools.py:934: in wrapper 1159s return dispatch(args[0].__class__)(*args, **kw) 1159s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1159s 1159s val = array([[0., 1., 1., 0., 1., 0., 1., 0., 0., 0., 2., 0., 0., 0., 1.], 1159s [1., 1., 1., 0., 0., 0., 0., 4., 0., 1., 0...0., 1., 0., 0., 0., 0., 1.], 1159s [1., 2., 0., 1., 0., 1., 0., 0., 2., 3., 1., 0., 0., 0., 0.]], 1159s dtype=float32) 1159s typ = 1159s 1159s @singledispatch 1159s def as_cupy(val, typ=None): 1159s """ 1159s Rough conversion function 1159s 1159s Will try to infer target type from input type if not specified. 1159s """ 1159s if typ is None: 1159s typ = resolve_cupy_type(val) 1159s 1159s if issubclass(typ, CupyArray): 1159s > import cupy as cp 1159s E ModuleNotFoundError: No module named 'cupy' 1159s 1159s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:1010: ModuleNotFoundError 1159s _______ test_view_of_view[cupy_array-matrix_bool_subset-list_int_subset] _______ 1159s 1159s matrix_type = functools.partial(, typ=) 1159s subset_func = 1159s subset_func2 = 1159s 1159s def test_view_of_view(matrix_type, subset_func, subset_func2): 1159s > adata = gen_adata((30, 15), X_type=matrix_type) 1159s 1159s tests/test_views.py:531: 1159s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1159s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:346: in gen_adata 1159s X = X_type(random_state.binomial(100, 0.005, (M, N)).astype(X_dtype)) 1159s /usr/lib/python3.13/functools.py:934: in wrapper 1159s return dispatch(args[0].__class__)(*args, **kw) 1159s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1159s 1159s val = array([[3., 1., 0., 1., 0., 1., 0., 0., 2., 1., 0., 1., 0., 2., 1.], 1159s [1., 1., 0., 0., 0., 0., 0., 1., 0., 0., 0...0., 1., 0., 0., 0., 0., 1.], 1159s [1., 1., 0., 0., 0., 1., 0., 1., 0., 0., 2., 0., 1., 1., 0.]], 1159s dtype=float32) 1159s typ = 1159s 1159s @singledispatch 1159s def as_cupy(val, typ=None): 1159s """ 1159s Rough conversion function 1159s 1159s Will try to infer target type from input type if not specified. 1159s """ 1159s if typ is None: 1159s typ = resolve_cupy_type(val) 1159s 1159s if issubclass(typ, CupyArray): 1159s > import cupy as cp 1159s E ModuleNotFoundError: No module named 'cupy' 1159s 1159s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:1010: ModuleNotFoundError 1159s ______ test_view_of_view[cupy_array-matrix_bool_subset-array_bool_subset] ______ 1159s 1159s matrix_type = functools.partial(, typ=) 1159s subset_func = 1159s subset_func2 = 1159s 1159s def test_view_of_view(matrix_type, subset_func, subset_func2): 1159s > adata = gen_adata((30, 15), X_type=matrix_type) 1159s 1159s tests/test_views.py:531: 1159s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1159s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:346: in gen_adata 1159s X = X_type(random_state.binomial(100, 0.005, (M, N)).astype(X_dtype)) 1159s /usr/lib/python3.13/functools.py:934: in wrapper 1159s return dispatch(args[0].__class__)(*args, **kw) 1159s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1159s 1159s val = array([[0., 1., 1., 0., 1., 1., 0., 0., 1., 0., 0., 0., 1., 0., 0.], 1159s [0., 1., 1., 1., 0., 0., 1., 1., 1., 1., 2...0., 1., 2., 0., 0., 1., 0.], 1159s [0., 0., 0., 2., 1., 0., 0., 0., 1., 0., 0., 1., 0., 2., 0.]], 1159s dtype=float32) 1159s typ = 1159s 1159s @singledispatch 1159s def as_cupy(val, typ=None): 1159s """ 1159s Rough conversion function 1159s 1159s Will try to infer target type from input type if not specified. 1159s """ 1159s if typ is None: 1159s typ = resolve_cupy_type(val) 1159s 1159s if issubclass(typ, CupyArray): 1159s > import cupy as cp 1159s E ModuleNotFoundError: No module named 'cupy' 1159s 1159s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:1010: ModuleNotFoundError 1159s ______ test_view_of_view[cupy_array-matrix_bool_subset-list_bool_subset] _______ 1159s 1159s matrix_type = functools.partial(, typ=) 1159s subset_func = 1159s subset_func2 = 1159s 1159s def test_view_of_view(matrix_type, subset_func, subset_func2): 1159s > adata = gen_adata((30, 15), X_type=matrix_type) 1159s 1159s tests/test_views.py:531: 1159s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1159s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:346: in gen_adata 1159s X = X_type(random_state.binomial(100, 0.005, (M, N)).astype(X_dtype)) 1159s /usr/lib/python3.13/functools.py:934: in wrapper 1159s return dispatch(args[0].__class__)(*args, **kw) 1159s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1159s 1159s val = array([[0., 0., 0., 2., 2., 1., 0., 0., 0., 0., 1., 0., 1., 1., 1.], 1159s [0., 1., 0., 0., 0., 0., 0., 2., 1., 0., 0...0., 0., 1., 1., 1., 0., 0.], 1159s [0., 0., 2., 1., 0., 0., 1., 0., 0., 2., 1., 0., 0., 0., 1.]], 1159s dtype=float32) 1159s typ = 1159s 1159s @singledispatch 1159s def as_cupy(val, typ=None): 1159s """ 1159s Rough conversion function 1159s 1159s Will try to infer target type from input type if not specified. 1159s """ 1159s if typ is None: 1159s typ = resolve_cupy_type(val) 1159s 1159s if issubclass(typ, CupyArray): 1159s > import cupy as cp 1159s E ModuleNotFoundError: No module named 'cupy' 1159s 1159s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:1010: ModuleNotFoundError 1159s _____ test_view_of_view[cupy_array-matrix_bool_subset-matrix_bool_subset] ______ 1159s 1159s matrix_type = functools.partial(, typ=) 1159s subset_func = 1159s subset_func2 = 1159s 1159s def test_view_of_view(matrix_type, subset_func, subset_func2): 1159s > adata = gen_adata((30, 15), X_type=matrix_type) 1159s 1159s tests/test_views.py:531: 1159s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1159s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:346: in gen_adata 1159s X = X_type(random_state.binomial(100, 0.005, (M, N)).astype(X_dtype)) 1159s /usr/lib/python3.13/functools.py:934: in wrapper 1159s return dispatch(args[0].__class__)(*args, **kw) 1159s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1159s 1159s val = array([[0., 1., 1., 0., 0., 0., 0., 0., 1., 1., 0., 0., 0., 0., 1.], 1159s [0., 2., 1., 2., 1., 0., 1., 0., 0., 1., 0...1., 0., 0., 0., 0., 0., 0.], 1159s [0., 0., 1., 2., 0., 1., 1., 1., 0., 1., 1., 0., 2., 0., 0.]], 1159s dtype=float32) 1159s typ = 1159s 1159s @singledispatch 1159s def as_cupy(val, typ=None): 1159s """ 1159s Rough conversion function 1159s 1159s Will try to infer target type from input type if not specified. 1159s """ 1159s if typ is None: 1159s typ = resolve_cupy_type(val) 1159s 1159s if issubclass(typ, CupyArray): 1159s > import cupy as cp 1159s E ModuleNotFoundError: No module named 'cupy' 1159s 1159s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:1010: ModuleNotFoundError 1159s ____ test_view_of_view[cupy_array-matrix_bool_subset-spmatrix_bool_subset] _____ 1159s 1159s matrix_type = functools.partial(, typ=) 1159s subset_func = 1159s subset_func2 = 1159s 1159s def test_view_of_view(matrix_type, subset_func, subset_func2): 1159s > adata = gen_adata((30, 15), X_type=matrix_type) 1159s 1159s tests/test_views.py:531: 1159s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1159s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:346: in gen_adata 1159s X = X_type(random_state.binomial(100, 0.005, (M, N)).astype(X_dtype)) 1159s /usr/lib/python3.13/functools.py:934: in wrapper 1159s return dispatch(args[0].__class__)(*args, **kw) 1159s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1159s 1159s val = array([[0., 1., 0., 1., 0., 2., 2., 1., 1., 0., 3., 2., 1., 0., 1.], 1159s [0., 0., 1., 0., 0., 0., 1., 1., 0., 0., 0...2., 1., 0., 1., 2., 1., 0.], 1159s [1., 1., 0., 0., 1., 1., 0., 0., 1., 0., 2., 1., 0., 0., 2.]], 1159s dtype=float32) 1159s typ = 1159s 1159s @singledispatch 1159s def as_cupy(val, typ=None): 1159s """ 1159s Rough conversion function 1159s 1159s Will try to infer target type from input type if not specified. 1159s """ 1159s if typ is None: 1159s typ = resolve_cupy_type(val) 1159s 1159s if issubclass(typ, CupyArray): 1159s > import cupy as cp 1159s E ModuleNotFoundError: No module named 'cupy' 1159s 1159s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:1010: ModuleNotFoundError 1159s _____ test_view_of_view[cupy_array-matrix_bool_subset-sparray_bool_subset] _____ 1159s 1159s matrix_type = functools.partial(, typ=) 1159s subset_func = 1159s subset_func2 = 1159s 1159s def test_view_of_view(matrix_type, subset_func, subset_func2): 1159s > adata = gen_adata((30, 15), X_type=matrix_type) 1159s 1159s tests/test_views.py:531: 1159s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1159s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:346: in gen_adata 1159s X = X_type(random_state.binomial(100, 0.005, (M, N)).astype(X_dtype)) 1159s /usr/lib/python3.13/functools.py:934: in wrapper 1159s return dispatch(args[0].__class__)(*args, **kw) 1159s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1159s 1159s val = array([[0., 0., 0., 0., 1., 0., 0., 1., 0., 0., 0., 0., 2., 1., 1.], 1159s [1., 0., 0., 0., 2., 1., 0., 1., 0., 0., 3...0., 0., 1., 0., 1., 1., 0.], 1159s [0., 0., 0., 1., 1., 1., 2., 0., 0., 0., 2., 0., 1., 0., 0.]], 1159s dtype=float32) 1159s typ = 1159s 1159s @singledispatch 1159s def as_cupy(val, typ=None): 1159s """ 1159s Rough conversion function 1159s 1159s Will try to infer target type from input type if not specified. 1159s """ 1159s if typ is None: 1159s typ = resolve_cupy_type(val) 1159s 1159s if issubclass(typ, CupyArray): 1159s > import cupy as cp 1159s E ModuleNotFoundError: No module named 'cupy' 1159s 1159s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:1010: ModuleNotFoundError 1159s _______ test_view_of_view[cupy_array-spmatrix_bool_subset-array_subset] ________ 1159s 1159s matrix_type = functools.partial(, typ=) 1159s subset_func = 1159s subset_func2 = 1159s 1159s def test_view_of_view(matrix_type, subset_func, subset_func2): 1159s > adata = gen_adata((30, 15), X_type=matrix_type) 1159s 1159s tests/test_views.py:531: 1159s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1159s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:346: in gen_adata 1159s X = X_type(random_state.binomial(100, 0.005, (M, N)).astype(X_dtype)) 1159s /usr/lib/python3.13/functools.py:934: in wrapper 1159s return dispatch(args[0].__class__)(*args, **kw) 1159s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1159s 1159s val = array([[0., 1., 0., 0., 2., 1., 2., 1., 1., 2., 0., 0., 0., 1., 0.], 1159s [0., 1., 1., 0., 0., 0., 0., 0., 1., 1., 0...1., 0., 1., 1., 0., 0., 2.], 1159s [1., 1., 0., 0., 0., 0., 0., 0., 0., 0., 1., 0., 2., 1., 0.]], 1159s dtype=float32) 1159s typ = 1159s 1159s @singledispatch 1159s def as_cupy(val, typ=None): 1159s """ 1159s Rough conversion function 1159s 1159s Will try to infer target type from input type if not specified. 1159s """ 1159s if typ is None: 1159s typ = resolve_cupy_type(val) 1159s 1159s if issubclass(typ, CupyArray): 1159s > import cupy as cp 1159s E ModuleNotFoundError: No module named 'cupy' 1159s 1159s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:1010: ModuleNotFoundError 1159s _______ test_view_of_view[cupy_array-spmatrix_bool_subset-slice_subset] ________ 1159s 1159s matrix_type = functools.partial(, typ=) 1159s subset_func = 1159s subset_func2 = 1159s 1159s def test_view_of_view(matrix_type, subset_func, subset_func2): 1159s > adata = gen_adata((30, 15), X_type=matrix_type) 1159s 1159s tests/test_views.py:531: 1159s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1159s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:346: in gen_adata 1159s X = X_type(random_state.binomial(100, 0.005, (M, N)).astype(X_dtype)) 1159s /usr/lib/python3.13/functools.py:934: in wrapper 1159s return dispatch(args[0].__class__)(*args, **kw) 1159s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1159s 1159s val = array([[0., 0., 0., 0., 1., 0., 0., 0., 0., 0., 0., 2., 0., 2., 1.], 1159s [1., 1., 0., 0., 0., 0., 0., 1., 0., 0., 1...1., 0., 0., 0., 0., 0., 1.], 1159s [1., 0., 0., 0., 0., 2., 0., 0., 0., 0., 0., 0., 0., 1., 0.]], 1159s dtype=float32) 1159s typ = 1159s 1159s @singledispatch 1159s def as_cupy(val, typ=None): 1159s """ 1159s Rough conversion function 1159s 1159s Will try to infer target type from input type if not specified. 1159s """ 1159s if typ is None: 1159s typ = resolve_cupy_type(val) 1159s 1159s if issubclass(typ, CupyArray): 1159s > import cupy as cp 1159s E ModuleNotFoundError: No module named 'cupy' 1159s 1159s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:1010: ModuleNotFoundError 1159s _______ test_view_of_view[cupy_array-spmatrix_bool_subset-single_subset] _______ 1159s 1159s matrix_type = functools.partial(, typ=) 1159s subset_func = 1159s subset_func2 = 1159s 1159s def test_view_of_view(matrix_type, subset_func, subset_func2): 1159s > adata = gen_adata((30, 15), X_type=matrix_type) 1159s 1159s tests/test_views.py:531: 1159s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1159s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:346: in gen_adata 1159s X = X_type(random_state.binomial(100, 0.005, (M, N)).astype(X_dtype)) 1159s /usr/lib/python3.13/functools.py:934: in wrapper 1159s return dispatch(args[0].__class__)(*args, **kw) 1159s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1159s 1159s val = array([[0., 0., 1., 0., 2., 0., 1., 0., 0., 2., 1., 1., 0., 1., 0.], 1159s [1., 0., 0., 0., 0., 2., 2., 0., 3., 0., 0...1., 1., 1., 1., 1., 0., 1.], 1159s [1., 1., 0., 0., 0., 2., 0., 0., 1., 0., 0., 1., 1., 1., 1.]], 1159s dtype=float32) 1159s typ = 1159s 1159s @singledispatch 1159s def as_cupy(val, typ=None): 1159s """ 1159s Rough conversion function 1159s 1159s Will try to infer target type from input type if not specified. 1159s """ 1159s if typ is None: 1159s typ = resolve_cupy_type(val) 1159s 1159s if issubclass(typ, CupyArray): 1159s > import cupy as cp 1159s E ModuleNotFoundError: No module named 'cupy' 1159s 1159s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:1010: ModuleNotFoundError 1159s _____ test_view_of_view[cupy_array-spmatrix_bool_subset-array_int_subset] ______ 1159s 1159s matrix_type = functools.partial(, typ=) 1159s subset_func = 1159s subset_func2 = 1159s 1159s def test_view_of_view(matrix_type, subset_func, subset_func2): 1159s > adata = gen_adata((30, 15), X_type=matrix_type) 1159s 1159s tests/test_views.py:531: 1159s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1159s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:346: in gen_adata 1159s X = X_type(random_state.binomial(100, 0.005, (M, N)).astype(X_dtype)) 1159s /usr/lib/python3.13/functools.py:934: in wrapper 1159s return dispatch(args[0].__class__)(*args, **kw) 1159s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1159s 1159s val = array([[2., 3., 0., 0., 0., 1., 0., 1., 0., 0., 1., 1., 0., 3., 0.], 1159s [2., 1., 1., 1., 2., 1., 1., 2., 2., 0., 0...1., 0., 0., 2., 0., 0., 1.], 1159s [1., 1., 1., 1., 0., 0., 0., 0., 0., 1., 0., 1., 0., 2., 1.]], 1159s dtype=float32) 1159s typ = 1159s 1159s @singledispatch 1159s def as_cupy(val, typ=None): 1159s """ 1159s Rough conversion function 1159s 1159s Will try to infer target type from input type if not specified. 1159s """ 1159s if typ is None: 1159s typ = resolve_cupy_type(val) 1159s 1159s if issubclass(typ, CupyArray): 1159s > import cupy as cp 1159s E ModuleNotFoundError: No module named 'cupy' 1159s 1159s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:1010: ModuleNotFoundError 1159s ______ test_view_of_view[cupy_array-spmatrix_bool_subset-list_int_subset] ______ 1159s 1159s matrix_type = functools.partial(, typ=) 1159s subset_func = 1159s subset_func2 = 1159s 1159s def test_view_of_view(matrix_type, subset_func, subset_func2): 1159s > adata = gen_adata((30, 15), X_type=matrix_type) 1159s 1159s tests/test_views.py:531: 1159s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1159s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:346: in gen_adata 1159s X = X_type(random_state.binomial(100, 0.005, (M, N)).astype(X_dtype)) 1159s /usr/lib/python3.13/functools.py:934: in wrapper 1159s return dispatch(args[0].__class__)(*args, **kw) 1159s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1159s 1159s val = array([[1., 1., 0., 0., 2., 0., 0., 0., 0., 2., 0., 0., 2., 1., 0.], 1159s [1., 0., 1., 0., 0., 2., 1., 0., 0., 2., 1...0., 0., 0., 0., 1., 1., 0.], 1159s [0., 1., 0., 0., 1., 0., 0., 0., 0., 0., 1., 2., 1., 0., 0.]], 1159s dtype=float32) 1159s typ = 1159s 1159s @singledispatch 1159s def as_cupy(val, typ=None): 1159s """ 1159s Rough conversion function 1159s 1159s Will try to infer target type from input type if not specified. 1159s """ 1159s if typ is None: 1159s typ = resolve_cupy_type(val) 1159s 1159s if issubclass(typ, CupyArray): 1159s > import cupy as cp 1159s E ModuleNotFoundError: No module named 'cupy' 1159s 1159s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:1010: ModuleNotFoundError 1159s _____ test_view_of_view[cupy_array-spmatrix_bool_subset-array_bool_subset] _____ 1159s 1159s matrix_type = functools.partial(, typ=) 1159s subset_func = 1159s subset_func2 = 1159s 1159s def test_view_of_view(matrix_type, subset_func, subset_func2): 1159s > adata = gen_adata((30, 15), X_type=matrix_type) 1159s 1159s tests/test_views.py:531: 1159s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1159s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:346: in gen_adata 1159s X = X_type(random_state.binomial(100, 0.005, (M, N)).astype(X_dtype)) 1159s /usr/lib/python3.13/functools.py:934: in wrapper 1159s return dispatch(args[0].__class__)(*args, **kw) 1159s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1159s 1159s val = array([[1., 0., 0., 1., 1., 0., 1., 0., 1., 0., 0., 0., 2., 1., 0.], 1159s [0., 1., 0., 0., 0., 0., 1., 1., 1., 0., 0...0., 1., 0., 2., 0., 0., 0.], 1159s [0., 1., 0., 1., 0., 1., 1., 3., 0., 0., 0., 0., 0., 0., 1.]], 1159s dtype=float32) 1159s typ = 1159s 1159s @singledispatch 1159s def as_cupy(val, typ=None): 1159s """ 1159s Rough conversion function 1159s 1159s Will try to infer target type from input type if not specified. 1159s """ 1159s if typ is None: 1159s typ = resolve_cupy_type(val) 1159s 1159s if issubclass(typ, CupyArray): 1159s > import cupy as cp 1159s E ModuleNotFoundError: No module named 'cupy' 1159s 1159s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:1010: ModuleNotFoundError 1159s _____ test_view_of_view[cupy_array-spmatrix_bool_subset-list_bool_subset] ______ 1159s 1159s matrix_type = functools.partial(, typ=) 1159s subset_func = 1159s subset_func2 = 1159s 1159s def test_view_of_view(matrix_type, subset_func, subset_func2): 1159s > adata = gen_adata((30, 15), X_type=matrix_type) 1159s 1159s tests/test_views.py:531: 1159s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1159s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:346: in gen_adata 1159s X = X_type(random_state.binomial(100, 0.005, (M, N)).astype(X_dtype)) 1159s /usr/lib/python3.13/functools.py:934: in wrapper 1159s return dispatch(args[0].__class__)(*args, **kw) 1159s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1159s 1159s val = array([[0., 0., 2., 0., 0., 0., 0., 1., 0., 1., 0., 0., 1., 1., 2.], 1159s [1., 2., 1., 0., 1., 0., 0., 2., 0., 0., 1...1., 0., 0., 0., 0., 2., 0.], 1159s [0., 0., 0., 1., 0., 3., 0., 0., 1., 1., 2., 0., 0., 0., 1.]], 1159s dtype=float32) 1159s typ = 1159s 1159s @singledispatch 1159s def as_cupy(val, typ=None): 1159s """ 1159s Rough conversion function 1159s 1159s Will try to infer target type from input type if not specified. 1159s """ 1159s if typ is None: 1159s typ = resolve_cupy_type(val) 1159s 1159s if issubclass(typ, CupyArray): 1159s > import cupy as cp 1159s E ModuleNotFoundError: No module named 'cupy' 1159s 1159s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:1010: ModuleNotFoundError 1159s ____ test_view_of_view[cupy_array-spmatrix_bool_subset-matrix_bool_subset] _____ 1159s 1159s matrix_type = functools.partial(, typ=) 1159s subset_func = 1159s subset_func2 = 1159s 1159s def test_view_of_view(matrix_type, subset_func, subset_func2): 1159s > adata = gen_adata((30, 15), X_type=matrix_type) 1159s 1159s tests/test_views.py:531: 1159s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1159s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:346: in gen_adata 1159s X = X_type(random_state.binomial(100, 0.005, (M, N)).astype(X_dtype)) 1159s /usr/lib/python3.13/functools.py:934: in wrapper 1159s return dispatch(args[0].__class__)(*args, **kw) 1159s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1159s 1159s val = array([[1., 0., 1., 0., 0., 1., 0., 0., 2., 1., 2., 2., 0., 1., 0.], 1159s [1., 0., 2., 1., 0., 1., 0., 0., 1., 0., 0...1., 1., 1., 1., 1., 0., 0.], 1159s [1., 1., 1., 1., 2., 1., 0., 0., 1., 1., 0., 0., 0., 0., 2.]], 1159s dtype=float32) 1159s typ = 1159s 1159s @singledispatch 1159s def as_cupy(val, typ=None): 1159s """ 1159s Rough conversion function 1159s 1159s Will try to infer target type from input type if not specified. 1159s """ 1159s if typ is None: 1159s typ = resolve_cupy_type(val) 1159s 1159s if issubclass(typ, CupyArray): 1159s > import cupy as cp 1159s E ModuleNotFoundError: No module named 'cupy' 1159s 1159s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:1010: ModuleNotFoundError 1159s ___ test_view_of_view[cupy_array-spmatrix_bool_subset-spmatrix_bool_subset] ____ 1159s 1159s matrix_type = functools.partial(, typ=) 1159s subset_func = 1159s subset_func2 = 1159s 1159s def test_view_of_view(matrix_type, subset_func, subset_func2): 1159s > adata = gen_adata((30, 15), X_type=matrix_type) 1159s 1159s tests/test_views.py:531: 1159s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1159s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:346: in gen_adata 1159s X = X_type(random_state.binomial(100, 0.005, (M, N)).astype(X_dtype)) 1159s /usr/lib/python3.13/functools.py:934: in wrapper 1159s return dispatch(args[0].__class__)(*args, **kw) 1159s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1159s 1159s val = array([[0., 2., 0., 0., 2., 0., 0., 0., 0., 1., 0., 0., 0., 0., 1.], 1159s [0., 0., 0., 0., 1., 0., 0., 0., 0., 0., 0...1., 3., 0., 1., 0., 0., 1.], 1159s [0., 1., 0., 0., 1., 1., 1., 0., 0., 0., 2., 0., 0., 1., 0.]], 1159s dtype=float32) 1159s typ = 1159s 1159s @singledispatch 1159s def as_cupy(val, typ=None): 1159s """ 1159s Rough conversion function 1159s 1159s Will try to infer target type from input type if not specified. 1159s """ 1159s if typ is None: 1159s typ = resolve_cupy_type(val) 1159s 1159s if issubclass(typ, CupyArray): 1159s > import cupy as cp 1159s E ModuleNotFoundError: No module named 'cupy' 1159s 1159s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:1010: ModuleNotFoundError 1159s ____ test_view_of_view[cupy_array-spmatrix_bool_subset-sparray_bool_subset] ____ 1159s 1159s matrix_type = functools.partial(, typ=) 1159s subset_func = 1159s subset_func2 = 1159s 1159s def test_view_of_view(matrix_type, subset_func, subset_func2): 1159s > adata = gen_adata((30, 15), X_type=matrix_type) 1159s 1159s tests/test_views.py:531: 1159s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1159s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:346: in gen_adata 1159s X = X_type(random_state.binomial(100, 0.005, (M, N)).astype(X_dtype)) 1159s /usr/lib/python3.13/functools.py:934: in wrapper 1159s return dispatch(args[0].__class__)(*args, **kw) 1159s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1159s 1159s val = array([[0., 1., 0., 0., 1., 0., 1., 1., 1., 1., 0., 0., 0., 0., 0.], 1159s [0., 0., 0., 1., 1., 0., 1., 0., 2., 2., 3...0., 2., 0., 1., 0., 0., 2.], 1159s [0., 0., 0., 0., 0., 0., 1., 0., 1., 1., 0., 0., 0., 1., 1.]], 1159s dtype=float32) 1159s typ = 1159s 1159s @singledispatch 1159s def as_cupy(val, typ=None): 1159s """ 1159s Rough conversion function 1159s 1159s Will try to infer target type from input type if not specified. 1159s """ 1159s if typ is None: 1159s typ = resolve_cupy_type(val) 1159s 1159s if issubclass(typ, CupyArray): 1159s > import cupy as cp 1159s E ModuleNotFoundError: No module named 'cupy' 1159s 1159s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:1010: ModuleNotFoundError 1159s ________ test_view_of_view[cupy_array-sparray_bool_subset-array_subset] ________ 1159s 1159s matrix_type = functools.partial(, typ=) 1159s subset_func = 1159s subset_func2 = 1159s 1159s def test_view_of_view(matrix_type, subset_func, subset_func2): 1159s > adata = gen_adata((30, 15), X_type=matrix_type) 1159s 1159s tests/test_views.py:531: 1159s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1159s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:346: in gen_adata 1159s X = X_type(random_state.binomial(100, 0.005, (M, N)).astype(X_dtype)) 1159s /usr/lib/python3.13/functools.py:934: in wrapper 1159s return dispatch(args[0].__class__)(*args, **kw) 1159s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1159s 1159s val = array([[0., 0., 0., 1., 1., 0., 0., 1., 1., 1., 0., 1., 0., 0., 0.], 1159s [0., 2., 3., 0., 0., 0., 0., 1., 0., 1., 1...0., 1., 0., 0., 0., 0., 0.], 1159s [1., 0., 0., 0., 1., 0., 1., 0., 1., 0., 0., 0., 1., 1., 0.]], 1159s dtype=float32) 1159s typ = 1159s 1159s @singledispatch 1159s def as_cupy(val, typ=None): 1159s """ 1159s Rough conversion function 1159s 1159s Will try to infer target type from input type if not specified. 1159s """ 1159s if typ is None: 1159s typ = resolve_cupy_type(val) 1159s 1159s if issubclass(typ, CupyArray): 1159s > import cupy as cp 1159s E ModuleNotFoundError: No module named 'cupy' 1159s 1159s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:1010: ModuleNotFoundError 1159s ________ test_view_of_view[cupy_array-sparray_bool_subset-slice_subset] ________ 1159s 1159s matrix_type = functools.partial(, typ=) 1159s subset_func = 1159s subset_func2 = 1159s 1159s def test_view_of_view(matrix_type, subset_func, subset_func2): 1159s > adata = gen_adata((30, 15), X_type=matrix_type) 1159s 1159s tests/test_views.py:531: 1159s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1159s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:346: in gen_adata 1159s X = X_type(random_state.binomial(100, 0.005, (M, N)).astype(X_dtype)) 1159s /usr/lib/python3.13/functools.py:934: in wrapper 1159s return dispatch(args[0].__class__)(*args, **kw) 1159s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1159s 1159s val = array([[0., 0., 1., 2., 0., 1., 0., 0., 0., 0., 0., 0., 0., 0., 0.], 1159s [1., 0., 2., 0., 0., 0., 0., 0., 0., 0., 1...1., 1., 0., 0., 0., 0., 0.], 1159s [1., 1., 1., 0., 0., 1., 0., 0., 0., 1., 0., 0., 1., 1., 0.]], 1159s dtype=float32) 1159s typ = 1159s 1159s @singledispatch 1159s def as_cupy(val, typ=None): 1159s """ 1159s Rough conversion function 1159s 1159s Will try to infer target type from input type if not specified. 1159s """ 1159s if typ is None: 1159s typ = resolve_cupy_type(val) 1159s 1159s if issubclass(typ, CupyArray): 1159s > import cupy as cp 1159s E ModuleNotFoundError: No module named 'cupy' 1159s 1159s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:1010: ModuleNotFoundError 1159s _______ test_view_of_view[cupy_array-sparray_bool_subset-single_subset] ________ 1159s 1159s matrix_type = functools.partial(, typ=) 1159s subset_func = 1159s subset_func2 = 1159s 1159s def test_view_of_view(matrix_type, subset_func, subset_func2): 1159s > adata = gen_adata((30, 15), X_type=matrix_type) 1159s 1159s tests/test_views.py:531: 1159s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1159s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:346: in gen_adata 1159s X = X_type(random_state.binomial(100, 0.005, (M, N)).astype(X_dtype)) 1159s /usr/lib/python3.13/functools.py:934: in wrapper 1159s return dispatch(args[0].__class__)(*args, **kw) 1159s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1159s 1159s val = array([[0., 2., 0., 0., 1., 0., 0., 0., 1., 0., 0., 1., 0., 1., 0.], 1159s [0., 0., 1., 0., 2., 2., 0., 2., 1., 1., 1...0., 1., 0., 0., 1., 0., 2.], 1159s [0., 1., 0., 0., 0., 1., 0., 1., 1., 1., 1., 2., 0., 1., 0.]], 1159s dtype=float32) 1159s typ = 1159s 1159s @singledispatch 1159s def as_cupy(val, typ=None): 1159s """ 1159s Rough conversion function 1159s 1159s Will try to infer target type from input type if not specified. 1159s """ 1159s if typ is None: 1159s typ = resolve_cupy_type(val) 1159s 1159s if issubclass(typ, CupyArray): 1159s > import cupy as cp 1159s E ModuleNotFoundError: No module named 'cupy' 1159s 1159s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:1010: ModuleNotFoundError 1159s ______ test_view_of_view[cupy_array-sparray_bool_subset-array_int_subset] ______ 1159s 1159s matrix_type = functools.partial(, typ=) 1159s subset_func = 1159s subset_func2 = 1159s 1159s def test_view_of_view(matrix_type, subset_func, subset_func2): 1159s > adata = gen_adata((30, 15), X_type=matrix_type) 1159s 1159s tests/test_views.py:531: 1159s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1159s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:346: in gen_adata 1159s X = X_type(random_state.binomial(100, 0.005, (M, N)).astype(X_dtype)) 1159s /usr/lib/python3.13/functools.py:934: in wrapper 1159s return dispatch(args[0].__class__)(*args, **kw) 1159s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1159s 1159s val = array([[0., 1., 0., 0., 1., 0., 2., 1., 0., 1., 0., 0., 0., 1., 2.], 1159s [0., 2., 1., 0., 1., 1., 0., 0., 2., 0., 0...1., 0., 0., 0., 0., 0., 0.], 1159s [1., 0., 0., 0., 1., 0., 1., 0., 1., 1., 0., 0., 0., 0., 1.]], 1159s dtype=float32) 1159s typ = 1159s 1159s @singledispatch 1159s def as_cupy(val, typ=None): 1159s """ 1159s Rough conversion function 1159s 1159s Will try to infer target type from input type if not specified. 1159s """ 1159s if typ is None: 1159s typ = resolve_cupy_type(val) 1159s 1159s if issubclass(typ, CupyArray): 1159s > import cupy as cp 1159s E ModuleNotFoundError: No module named 'cupy' 1159s 1159s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:1010: ModuleNotFoundError 1159s ______ test_view_of_view[cupy_array-sparray_bool_subset-list_int_subset] _______ 1159s 1159s matrix_type = functools.partial(, typ=) 1159s subset_func = 1159s subset_func2 = 1159s 1159s def test_view_of_view(matrix_type, subset_func, subset_func2): 1159s > adata = gen_adata((30, 15), X_type=matrix_type) 1159s 1159s tests/test_views.py:531: 1159s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1159s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:346: in gen_adata 1159s X = X_type(random_state.binomial(100, 0.005, (M, N)).astype(X_dtype)) 1159s /usr/lib/python3.13/functools.py:934: in wrapper 1159s return dispatch(args[0].__class__)(*args, **kw) 1159s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1159s 1159s val = array([[0., 1., 0., 1., 0., 0., 2., 0., 0., 1., 0., 2., 0., 0., 0.], 1159s [0., 0., 0., 0., 1., 0., 0., 0., 0., 0., 0...0., 0., 0., 0., 0., 0., 1.], 1159s [1., 0., 2., 3., 0., 2., 0., 0., 0., 0., 0., 0., 0., 2., 0.]], 1159s dtype=float32) 1159s typ = 1159s 1159s @singledispatch 1159s def as_cupy(val, typ=None): 1159s """ 1159s Rough conversion function 1159s 1159s Will try to infer target type from input type if not specified. 1159s """ 1159s if typ is None: 1159s typ = resolve_cupy_type(val) 1159s 1159s if issubclass(typ, CupyArray): 1159s > import cupy as cp 1159s E ModuleNotFoundError: No module named 'cupy' 1159s 1159s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:1010: ModuleNotFoundError 1159s _____ test_view_of_view[cupy_array-sparray_bool_subset-array_bool_subset] ______ 1159s 1159s matrix_type = functools.partial(, typ=) 1159s subset_func = 1159s subset_func2 = 1159s 1159s def test_view_of_view(matrix_type, subset_func, subset_func2): 1159s > adata = gen_adata((30, 15), X_type=matrix_type) 1159s 1159s tests/test_views.py:531: 1159s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1159s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:346: in gen_adata 1159s X = X_type(random_state.binomial(100, 0.005, (M, N)).astype(X_dtype)) 1159s /usr/lib/python3.13/functools.py:934: in wrapper 1159s return dispatch(args[0].__class__)(*args, **kw) 1159s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1159s 1159s val = array([[0., 1., 1., 1., 0., 3., 0., 0., 2., 0., 0., 1., 0., 1., 0.], 1159s [0., 0., 0., 0., 0., 0., 0., 1., 0., 1., 0...1., 0., 0., 0., 0., 0., 1.], 1159s [0., 1., 0., 1., 1., 1., 0., 0., 0., 1., 0., 1., 1., 0., 1.]], 1159s dtype=float32) 1159s typ = 1159s 1159s @singledispatch 1159s def as_cupy(val, typ=None): 1159s """ 1159s Rough conversion function 1159s 1159s Will try to infer target type from input type if not specified. 1159s """ 1159s if typ is None: 1159s typ = resolve_cupy_type(val) 1159s 1159s if issubclass(typ, CupyArray): 1159s > import cupy as cp 1159s E ModuleNotFoundError: No module named 'cupy' 1159s 1159s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:1010: ModuleNotFoundError 1159s ______ test_view_of_view[cupy_array-sparray_bool_subset-list_bool_subset] ______ 1159s 1159s matrix_type = functools.partial(, typ=) 1159s subset_func = 1159s subset_func2 = 1159s 1159s def test_view_of_view(matrix_type, subset_func, subset_func2): 1159s > adata = gen_adata((30, 15), X_type=matrix_type) 1159s 1159s tests/test_views.py:531: 1159s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1159s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:346: in gen_adata 1159s X = X_type(random_state.binomial(100, 0.005, (M, N)).astype(X_dtype)) 1159s /usr/lib/python3.13/functools.py:934: in wrapper 1159s return dispatch(args[0].__class__)(*args, **kw) 1159s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1159s 1159s val = array([[0., 0., 0., 1., 1., 0., 1., 0., 0., 1., 0., 0., 2., 1., 1.], 1159s [0., 0., 1., 0., 2., 1., 2., 0., 1., 2., 1...0., 1., 1., 0., 0., 2., 1.], 1159s [1., 1., 0., 0., 0., 2., 1., 0., 1., 0., 1., 1., 1., 1., 0.]], 1159s dtype=float32) 1159s typ = 1159s 1159s @singledispatch 1159s def as_cupy(val, typ=None): 1159s """ 1159s Rough conversion function 1159s 1159s Will try to infer target type from input type if not specified. 1159s """ 1159s if typ is None: 1159s typ = resolve_cupy_type(val) 1159s 1159s if issubclass(typ, CupyArray): 1159s > import cupy as cp 1159s E ModuleNotFoundError: No module named 'cupy' 1159s 1159s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:1010: ModuleNotFoundError 1159s _____ test_view_of_view[cupy_array-sparray_bool_subset-matrix_bool_subset] _____ 1159s 1159s matrix_type = functools.partial(, typ=) 1159s subset_func = 1159s subset_func2 = 1159s 1159s def test_view_of_view(matrix_type, subset_func, subset_func2): 1159s > adata = gen_adata((30, 15), X_type=matrix_type) 1159s 1159s tests/test_views.py:531: 1159s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1159s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:346: in gen_adata 1159s X = X_type(random_state.binomial(100, 0.005, (M, N)).astype(X_dtype)) 1159s /usr/lib/python3.13/functools.py:934: in wrapper 1159s return dispatch(args[0].__class__)(*args, **kw) 1159s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1159s 1159s val = array([[2., 1., 0., 1., 0., 0., 0., 0., 1., 0., 0., 0., 0., 0., 1.], 1159s [0., 1., 0., 1., 1., 0., 0., 0., 0., 2., 0...2., 0., 1., 0., 1., 1., 3.], 1159s [0., 0., 0., 0., 1., 0., 1., 1., 0., 0., 1., 0., 1., 0., 0.]], 1159s dtype=float32) 1159s typ = 1159s 1159s @singledispatch 1159s def as_cupy(val, typ=None): 1159s """ 1159s Rough conversion function 1159s 1159s Will try to infer target type from input type if not specified. 1159s """ 1159s if typ is None: 1159s typ = resolve_cupy_type(val) 1159s 1159s if issubclass(typ, CupyArray): 1159s > import cupy as cp 1159s E ModuleNotFoundError: No module named 'cupy' 1159s 1159s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:1010: ModuleNotFoundError 1159s ____ test_view_of_view[cupy_array-sparray_bool_subset-spmatrix_bool_subset] ____ 1159s 1159s matrix_type = functools.partial(, typ=) 1159s subset_func = 1159s subset_func2 = 1159s 1159s def test_view_of_view(matrix_type, subset_func, subset_func2): 1159s > adata = gen_adata((30, 15), X_type=matrix_type) 1159s 1159s tests/test_views.py:531: 1159s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1159s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:346: in gen_adata 1159s X = X_type(random_state.binomial(100, 0.005, (M, N)).astype(X_dtype)) 1159s /usr/lib/python3.13/functools.py:934: in wrapper 1159s return dispatch(args[0].__class__)(*args, **kw) 1159s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1159s 1159s val = array([[1., 0., 0., 0., 0., 0., 0., 0., 0., 2., 1., 1., 0., 0., 0.], 1159s [0., 1., 0., 0., 0., 2., 0., 0., 0., 0., 0...0., 0., 0., 0., 0., 0., 0.], 1159s [1., 0., 0., 0., 0., 1., 1., 0., 0., 1., 1., 2., 0., 0., 0.]], 1159s dtype=float32) 1159s typ = 1159s 1159s @singledispatch 1159s def as_cupy(val, typ=None): 1159s """ 1159s Rough conversion function 1159s 1159s Will try to infer target type from input type if not specified. 1159s """ 1159s if typ is None: 1159s typ = resolve_cupy_type(val) 1159s 1159s if issubclass(typ, CupyArray): 1159s > import cupy as cp 1159s E ModuleNotFoundError: No module named 'cupy' 1159s 1159s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:1010: ModuleNotFoundError 1159s ____ test_view_of_view[cupy_array-sparray_bool_subset-sparray_bool_subset] _____ 1159s 1159s matrix_type = functools.partial(, typ=) 1159s subset_func = 1159s subset_func2 = 1159s 1159s def test_view_of_view(matrix_type, subset_func, subset_func2): 1159s > adata = gen_adata((30, 15), X_type=matrix_type) 1159s 1159s tests/test_views.py:531: 1159s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1159s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:346: in gen_adata 1159s X = X_type(random_state.binomial(100, 0.005, (M, N)).astype(X_dtype)) 1159s /usr/lib/python3.13/functools.py:934: in wrapper 1159s return dispatch(args[0].__class__)(*args, **kw) 1159s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1159s 1159s val = array([[1., 1., 2., 0., 2., 3., 1., 0., 0., 0., 0., 4., 0., 0., 0.], 1159s [0., 1., 1., 0., 0., 0., 2., 0., 0., 0., 1...0., 0., 0., 0., 1., 2., 0.], 1159s [2., 0., 1., 0., 0., 1., 0., 3., 0., 1., 1., 0., 0., 2., 0.]], 1159s dtype=float32) 1159s typ = 1159s 1159s @singledispatch 1159s def as_cupy(val, typ=None): 1159s """ 1159s Rough conversion function 1159s 1159s Will try to infer target type from input type if not specified. 1159s """ 1159s if typ is None: 1159s typ = resolve_cupy_type(val) 1159s 1159s if issubclass(typ, CupyArray): 1159s > import cupy as cp 1159s E ModuleNotFoundError: No module named 'cupy' 1159s 1159s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:1010: ModuleNotFoundError 1159s ____________ test_view_of_view[cupy_csr-array_subset-array_subset] _____________ 1159s 1159s matrix_type = functools.partial(, typ=) 1159s subset_func = 1159s subset_func2 = 1159s 1159s def test_view_of_view(matrix_type, subset_func, subset_func2): 1159s > adata = gen_adata((30, 15), X_type=matrix_type) 1159s 1159s tests/test_views.py:531: 1159s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1159s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:346: in gen_adata 1159s X = X_type(random_state.binomial(100, 0.005, (M, N)).astype(X_dtype)) 1159s /usr/lib/python3.13/functools.py:934: in wrapper 1159s return dispatch(args[0].__class__)(*args, **kw) 1159s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1159s 1159s val = array([[0., 1., 0., 0., 0., 0., 0., 0., 1., 0., 1., 1., 1., 0., 2.], 1159s [1., 0., 1., 1., 2., 0., 1., 0., 1., 0., 0...0., 2., 1., 0., 1., 1., 0.], 1159s [0., 0., 0., 0., 0., 1., 1., 0., 2., 0., 2., 1., 0., 0., 1.]], 1159s dtype=float32) 1159s typ = 1159s 1159s @singledispatch 1159s def as_cupy(val, typ=None): 1159s """ 1159s Rough conversion function 1159s 1159s Will try to infer target type from input type if not specified. 1159s """ 1159s if typ is None: 1159s typ = resolve_cupy_type(val) 1159s 1159s if issubclass(typ, CupyArray): 1159s import cupy as cp 1159s 1159s if isinstance(val, CSMatrix): 1159s val = val.toarray() 1159s return cp.array(val) 1159s elif issubclass(typ, CupyCSRMatrix): 1159s > import cupy as cp 1159s E ModuleNotFoundError: No module named 'cupy' 1159s 1159s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:1016: ModuleNotFoundError 1159s ____________ test_view_of_view[cupy_csr-array_subset-slice_subset] _____________ 1159s 1159s matrix_type = functools.partial(, typ=) 1159s subset_func = 1159s subset_func2 = 1159s 1159s def test_view_of_view(matrix_type, subset_func, subset_func2): 1159s > adata = gen_adata((30, 15), X_type=matrix_type) 1159s 1159s tests/test_views.py:531: 1159s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1159s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:346: in gen_adata 1159s X = X_type(random_state.binomial(100, 0.005, (M, N)).astype(X_dtype)) 1159s /usr/lib/python3.13/functools.py:934: in wrapper 1159s return dispatch(args[0].__class__)(*args, **kw) 1159s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1159s 1159s val = array([[0., 0., 1., 0., 0., 0., 2., 0., 0., 0., 0., 2., 0., 1., 0.], 1159s [1., 2., 1., 0., 0., 0., 0., 1., 2., 0., 1...1., 1., 1., 1., 1., 1., 0.], 1159s [0., 0., 0., 0., 1., 1., 0., 0., 0., 1., 1., 0., 1., 4., 0.]], 1159s dtype=float32) 1159s typ = 1159s 1159s @singledispatch 1159s def as_cupy(val, typ=None): 1159s """ 1159s Rough conversion function 1159s 1159s Will try to infer target type from input type if not specified. 1159s """ 1159s if typ is None: 1159s typ = resolve_cupy_type(val) 1159s 1159s if issubclass(typ, CupyArray): 1159s import cupy as cp 1159s 1159s if isinstance(val, CSMatrix): 1159s val = val.toarray() 1159s return cp.array(val) 1159s elif issubclass(typ, CupyCSRMatrix): 1159s > import cupy as cp 1159s E ModuleNotFoundError: No module named 'cupy' 1159s 1159s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:1016: ModuleNotFoundError 1159s ____________ test_view_of_view[cupy_csr-array_subset-single_subset] ____________ 1159s 1159s matrix_type = functools.partial(, typ=) 1159s subset_func = 1159s subset_func2 = 1159s 1159s def test_view_of_view(matrix_type, subset_func, subset_func2): 1159s > adata = gen_adata((30, 15), X_type=matrix_type) 1159s 1159s tests/test_views.py:531: 1159s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1159s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:346: in gen_adata 1159s X = X_type(random_state.binomial(100, 0.005, (M, N)).astype(X_dtype)) 1159s /usr/lib/python3.13/functools.py:934: in wrapper 1159s return dispatch(args[0].__class__)(*args, **kw) 1159s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1159s 1159s val = array([[0., 2., 0., 1., 0., 1., 0., 0., 0., 0., 1., 0., 0., 0., 0.], 1159s [0., 0., 4., 0., 0., 0., 0., 0., 1., 0., 0...0., 1., 0., 0., 1., 0., 0.], 1159s [0., 0., 0., 0., 0., 0., 0., 0., 1., 0., 0., 2., 0., 1., 0.]], 1159s dtype=float32) 1159s typ = 1159s 1159s @singledispatch 1159s def as_cupy(val, typ=None): 1159s """ 1159s Rough conversion function 1159s 1159s Will try to infer target type from input type if not specified. 1159s """ 1159s if typ is None: 1159s typ = resolve_cupy_type(val) 1159s 1159s if issubclass(typ, CupyArray): 1159s import cupy as cp 1159s 1159s if isinstance(val, CSMatrix): 1159s val = val.toarray() 1159s return cp.array(val) 1159s elif issubclass(typ, CupyCSRMatrix): 1159s > import cupy as cp 1159s E ModuleNotFoundError: No module named 'cupy' 1159s 1159s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:1016: ModuleNotFoundError 1159s __________ test_view_of_view[cupy_csr-array_subset-array_int_subset] ___________ 1159s 1159s matrix_type = functools.partial(, typ=) 1159s subset_func = 1159s subset_func2 = 1159s 1159s def test_view_of_view(matrix_type, subset_func, subset_func2): 1159s > adata = gen_adata((30, 15), X_type=matrix_type) 1159s 1159s tests/test_views.py:531: 1159s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1159s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:346: in gen_adata 1159s X = X_type(random_state.binomial(100, 0.005, (M, N)).astype(X_dtype)) 1159s /usr/lib/python3.13/functools.py:934: in wrapper 1159s return dispatch(args[0].__class__)(*args, **kw) 1159s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1159s 1159s val = array([[0., 0., 1., 2., 1., 1., 2., 0., 1., 0., 0., 0., 0., 0., 0.], 1159s [4., 2., 0., 0., 0., 0., 1., 2., 0., 0., 0...0., 0., 0., 1., 0., 0., 0.], 1159s [0., 0., 0., 0., 0., 1., 0., 1., 0., 1., 0., 1., 1., 2., 1.]], 1159s dtype=float32) 1159s typ = 1159s 1159s @singledispatch 1159s def as_cupy(val, typ=None): 1159s """ 1159s Rough conversion function 1159s 1159s Will try to infer target type from input type if not specified. 1159s """ 1159s if typ is None: 1159s typ = resolve_cupy_type(val) 1159s 1159s if issubclass(typ, CupyArray): 1159s import cupy as cp 1159s 1159s if isinstance(val, CSMatrix): 1159s val = val.toarray() 1159s return cp.array(val) 1159s elif issubclass(typ, CupyCSRMatrix): 1159s > import cupy as cp 1159s E ModuleNotFoundError: No module named 'cupy' 1159s 1159s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:1016: ModuleNotFoundError 1159s ___________ test_view_of_view[cupy_csr-array_subset-list_int_subset] ___________ 1159s 1159s matrix_type = functools.partial(, typ=) 1159s subset_func = 1159s subset_func2 = 1159s 1159s def test_view_of_view(matrix_type, subset_func, subset_func2): 1159s > adata = gen_adata((30, 15), X_type=matrix_type) 1159s 1159s tests/test_views.py:531: 1159s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1159s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:346: in gen_adata 1159s X = X_type(random_state.binomial(100, 0.005, (M, N)).astype(X_dtype)) 1159s /usr/lib/python3.13/functools.py:934: in wrapper 1159s return dispatch(args[0].__class__)(*args, **kw) 1159s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1159s 1159s val = array([[0., 1., 0., 1., 1., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0.], 1159s [1., 3., 0., 1., 0., 1., 1., 1., 2., 1., 0...0., 0., 0., 2., 1., 1., 2.], 1159s [1., 0., 0., 0., 0., 1., 0., 0., 1., 0., 0., 0., 1., 0., 1.]], 1159s dtype=float32) 1159s typ = 1159s 1159s @singledispatch 1159s def as_cupy(val, typ=None): 1159s """ 1159s Rough conversion function 1159s 1159s Will try to infer target type from input type if not specified. 1159s """ 1159s if typ is None: 1159s typ = resolve_cupy_type(val) 1159s 1159s if issubclass(typ, CupyArray): 1159s import cupy as cp 1159s 1159s if isinstance(val, CSMatrix): 1159s val = val.toarray() 1159s return cp.array(val) 1159s elif issubclass(typ, CupyCSRMatrix): 1159s > import cupy as cp 1159s E ModuleNotFoundError: No module named 'cupy' 1159s 1159s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:1016: ModuleNotFoundError 1159s __________ test_view_of_view[cupy_csr-array_subset-array_bool_subset] __________ 1159s 1159s matrix_type = functools.partial(, typ=) 1159s subset_func = 1159s subset_func2 = 1159s 1159s def test_view_of_view(matrix_type, subset_func, subset_func2): 1159s > adata = gen_adata((30, 15), X_type=matrix_type) 1159s 1159s tests/test_views.py:531: 1159s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1159s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:346: in gen_adata 1159s X = X_type(random_state.binomial(100, 0.005, (M, N)).astype(X_dtype)) 1159s /usr/lib/python3.13/functools.py:934: in wrapper 1159s return dispatch(args[0].__class__)(*args, **kw) 1159s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1159s 1159s val = array([[2., 3., 1., 1., 1., 0., 1., 0., 0., 0., 0., 1., 0., 1., 0.], 1159s [0., 0., 0., 1., 0., 0., 0., 0., 0., 0., 0...1., 1., 0., 0., 0., 0., 0.], 1159s [2., 0., 0., 1., 0., 0., 1., 0., 2., 0., 1., 0., 0., 0., 0.]], 1159s dtype=float32) 1159s typ = 1159s 1159s @singledispatch 1159s def as_cupy(val, typ=None): 1159s """ 1159s Rough conversion function 1159s 1159s Will try to infer target type from input type if not specified. 1159s """ 1159s if typ is None: 1159s typ = resolve_cupy_type(val) 1159s 1159s if issubclass(typ, CupyArray): 1159s import cupy as cp 1159s 1159s if isinstance(val, CSMatrix): 1159s val = val.toarray() 1159s return cp.array(val) 1159s elif issubclass(typ, CupyCSRMatrix): 1159s > import cupy as cp 1159s E ModuleNotFoundError: No module named 'cupy' 1159s 1159s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:1016: ModuleNotFoundError 1159s __________ test_view_of_view[cupy_csr-array_subset-list_bool_subset] ___________ 1159s 1159s matrix_type = functools.partial(, typ=) 1159s subset_func = 1159s subset_func2 = 1159s 1159s def test_view_of_view(matrix_type, subset_func, subset_func2): 1159s > adata = gen_adata((30, 15), X_type=matrix_type) 1159s 1159s tests/test_views.py:531: 1159s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1159s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:346: in gen_adata 1159s X = X_type(random_state.binomial(100, 0.005, (M, N)).astype(X_dtype)) 1159s /usr/lib/python3.13/functools.py:934: in wrapper 1159s return dispatch(args[0].__class__)(*args, **kw) 1159s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1159s 1159s val = array([[0., 0., 0., 0., 1., 0., 1., 0., 0., 0., 2., 3., 0., 1., 1.], 1159s [0., 1., 0., 1., 0., 0., 0., 0., 1., 0., 0...2., 0., 2., 1., 0., 0., 2.], 1159s [1., 3., 1., 0., 0., 0., 0., 0., 0., 0., 1., 0., 1., 1., 1.]], 1159s dtype=float32) 1159s typ = 1159s 1159s @singledispatch 1159s def as_cupy(val, typ=None): 1159s """ 1159s Rough conversion function 1159s 1159s Will try to infer target type from input type if not specified. 1159s """ 1159s if typ is None: 1159s typ = resolve_cupy_type(val) 1159s 1159s if issubclass(typ, CupyArray): 1159s import cupy as cp 1159s 1159s if isinstance(val, CSMatrix): 1159s val = val.toarray() 1159s return cp.array(val) 1159s elif issubclass(typ, CupyCSRMatrix): 1159s > import cupy as cp 1159s E ModuleNotFoundError: No module named 'cupy' 1159s 1159s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:1016: ModuleNotFoundError 1159s _________ test_view_of_view[cupy_csr-array_subset-matrix_bool_subset] __________ 1159s 1159s matrix_type = functools.partial(, typ=) 1159s subset_func = 1159s subset_func2 = 1159s 1159s def test_view_of_view(matrix_type, subset_func, subset_func2): 1159s > adata = gen_adata((30, 15), X_type=matrix_type) 1159s 1159s tests/test_views.py:531: 1159s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1159s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:346: in gen_adata 1159s X = X_type(random_state.binomial(100, 0.005, (M, N)).astype(X_dtype)) 1159s /usr/lib/python3.13/functools.py:934: in wrapper 1159s return dispatch(args[0].__class__)(*args, **kw) 1159s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1159s 1159s val = array([[1., 0., 2., 0., 2., 0., 1., 1., 0., 0., 0., 0., 0., 2., 0.], 1159s [2., 0., 0., 1., 0., 0., 0., 1., 1., 0., 0...0., 1., 0., 1., 0., 0., 2.], 1159s [0., 1., 0., 0., 1., 0., 1., 0., 0., 0., 0., 0., 2., 0., 2.]], 1159s dtype=float32) 1159s typ = 1159s 1159s @singledispatch 1159s def as_cupy(val, typ=None): 1159s """ 1159s Rough conversion function 1159s 1159s Will try to infer target type from input type if not specified. 1159s """ 1159s if typ is None: 1159s typ = resolve_cupy_type(val) 1159s 1159s if issubclass(typ, CupyArray): 1159s import cupy as cp 1159s 1159s if isinstance(val, CSMatrix): 1159s val = val.toarray() 1159s return cp.array(val) 1159s elif issubclass(typ, CupyCSRMatrix): 1159s > import cupy as cp 1159s E ModuleNotFoundError: No module named 'cupy' 1159s 1159s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:1016: ModuleNotFoundError 1159s ________ test_view_of_view[cupy_csr-array_subset-spmatrix_bool_subset] _________ 1159s 1159s matrix_type = functools.partial(, typ=) 1159s subset_func = 1159s subset_func2 = 1159s 1159s def test_view_of_view(matrix_type, subset_func, subset_func2): 1159s > adata = gen_adata((30, 15), X_type=matrix_type) 1159s 1159s tests/test_views.py:531: 1159s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1159s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:346: in gen_adata 1159s X = X_type(random_state.binomial(100, 0.005, (M, N)).astype(X_dtype)) 1159s /usr/lib/python3.13/functools.py:934: in wrapper 1159s return dispatch(args[0].__class__)(*args, **kw) 1159s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1159s 1159s val = array([[1., 1., 1., 0., 1., 0., 2., 1., 1., 0., 0., 1., 2., 0., 2.], 1159s [2., 0., 0., 1., 0., 0., 0., 1., 0., 0., 0...0., 0., 1., 1., 0., 0., 1.], 1159s [0., 1., 0., 0., 0., 0., 0., 0., 0., 0., 2., 0., 1., 3., 1.]], 1159s dtype=float32) 1159s typ = 1159s 1159s @singledispatch 1159s def as_cupy(val, typ=None): 1159s """ 1159s Rough conversion function 1159s 1159s Will try to infer target type from input type if not specified. 1159s """ 1159s if typ is None: 1159s typ = resolve_cupy_type(val) 1159s 1159s if issubclass(typ, CupyArray): 1159s import cupy as cp 1159s 1159s if isinstance(val, CSMatrix): 1159s val = val.toarray() 1159s return cp.array(val) 1159s elif issubclass(typ, CupyCSRMatrix): 1159s > import cupy as cp 1159s E ModuleNotFoundError: No module named 'cupy' 1159s 1159s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:1016: ModuleNotFoundError 1159s _________ test_view_of_view[cupy_csr-array_subset-sparray_bool_subset] _________ 1159s 1159s matrix_type = functools.partial(, typ=) 1159s subset_func = 1159s subset_func2 = 1159s 1159s def test_view_of_view(matrix_type, subset_func, subset_func2): 1159s > adata = gen_adata((30, 15), X_type=matrix_type) 1159s 1159s tests/test_views.py:531: 1159s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1159s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:346: in gen_adata 1159s X = X_type(random_state.binomial(100, 0.005, (M, N)).astype(X_dtype)) 1159s /usr/lib/python3.13/functools.py:934: in wrapper 1159s return dispatch(args[0].__class__)(*args, **kw) 1159s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1159s 1159s val = array([[0., 0., 2., 1., 0., 0., 2., 3., 0., 0., 1., 0., 0., 2., 1.], 1159s [0., 0., 1., 0., 0., 0., 0., 0., 1., 0., 1...1., 0., 1., 0., 0., 1., 0.], 1159s [2., 0., 0., 0., 0., 0., 0., 2., 0., 1., 1., 1., 0., 0., 1.]], 1159s dtype=float32) 1159s typ = 1159s 1159s @singledispatch 1159s def as_cupy(val, typ=None): 1159s """ 1159s Rough conversion function 1159s 1159s Will try to infer target type from input type if not specified. 1159s """ 1159s if typ is None: 1159s typ = resolve_cupy_type(val) 1159s 1159s if issubclass(typ, CupyArray): 1159s import cupy as cp 1159s 1159s if isinstance(val, CSMatrix): 1159s val = val.toarray() 1159s return cp.array(val) 1159s elif issubclass(typ, CupyCSRMatrix): 1159s > import cupy as cp 1159s E ModuleNotFoundError: No module named 'cupy' 1159s 1159s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:1016: ModuleNotFoundError 1159s ____________ test_view_of_view[cupy_csr-slice_subset-array_subset] _____________ 1159s 1159s matrix_type = functools.partial(, typ=) 1159s subset_func = 1159s subset_func2 = 1159s 1159s def test_view_of_view(matrix_type, subset_func, subset_func2): 1159s > adata = gen_adata((30, 15), X_type=matrix_type) 1159s 1159s tests/test_views.py:531: 1159s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1159s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:346: in gen_adata 1159s X = X_type(random_state.binomial(100, 0.005, (M, N)).astype(X_dtype)) 1159s /usr/lib/python3.13/functools.py:934: in wrapper 1159s return dispatch(args[0].__class__)(*args, **kw) 1159s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1159s 1159s val = array([[0., 2., 1., 1., 1., 0., 1., 3., 1., 0., 2., 0., 1., 1., 0.], 1159s [0., 0., 0., 0., 0., 0., 0., 1., 0., 2., 0...1., 2., 1., 1., 0., 0., 0.], 1159s [0., 1., 2., 0., 2., 0., 1., 0., 0., 0., 0., 0., 0., 0., 0.]], 1159s dtype=float32) 1159s typ = 1159s 1159s @singledispatch 1159s def as_cupy(val, typ=None): 1159s """ 1159s Rough conversion function 1159s 1159s Will try to infer target type from input type if not specified. 1159s """ 1159s if typ is None: 1159s typ = resolve_cupy_type(val) 1159s 1159s if issubclass(typ, CupyArray): 1159s import cupy as cp 1159s 1159s if isinstance(val, CSMatrix): 1159s val = val.toarray() 1159s return cp.array(val) 1159s elif issubclass(typ, CupyCSRMatrix): 1159s > import cupy as cp 1159s E ModuleNotFoundError: No module named 'cupy' 1159s 1159s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:1016: ModuleNotFoundError 1159s ____________ test_view_of_view[cupy_csr-slice_subset-slice_subset] _____________ 1159s 1159s matrix_type = functools.partial(, typ=) 1159s subset_func = 1159s subset_func2 = 1159s 1159s def test_view_of_view(matrix_type, subset_func, subset_func2): 1159s > adata = gen_adata((30, 15), X_type=matrix_type) 1159s 1159s tests/test_views.py:531: 1159s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1159s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:346: in gen_adata 1159s X = X_type(random_state.binomial(100, 0.005, (M, N)).astype(X_dtype)) 1159s /usr/lib/python3.13/functools.py:934: in wrapper 1159s return dispatch(args[0].__class__)(*args, **kw) 1159s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1159s 1159s val = array([[1., 0., 0., 0., 0., 0., 1., 0., 0., 0., 0., 1., 0., 0., 0.], 1159s [1., 0., 2., 0., 2., 0., 0., 0., 0., 1., 0...1., 0., 1., 2., 1., 1., 0.], 1159s [0., 0., 0., 1., 3., 0., 0., 0., 0., 0., 4., 0., 1., 0., 1.]], 1159s dtype=float32) 1159s typ = 1159s 1159s @singledispatch 1159s def as_cupy(val, typ=None): 1159s """ 1159s Rough conversion function 1159s 1159s Will try to infer target type from input type if not specified. 1159s """ 1159s if typ is None: 1159s typ = resolve_cupy_type(val) 1159s 1159s if issubclass(typ, CupyArray): 1159s import cupy as cp 1159s 1159s if isinstance(val, CSMatrix): 1159s val = val.toarray() 1159s return cp.array(val) 1159s elif issubclass(typ, CupyCSRMatrix): 1159s > import cupy as cp 1159s E ModuleNotFoundError: No module named 'cupy' 1159s 1159s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:1016: ModuleNotFoundError 1159s ____________ test_view_of_view[cupy_csr-slice_subset-single_subset] ____________ 1159s 1159s matrix_type = functools.partial(, typ=) 1159s subset_func = 1159s subset_func2 = 1159s 1159s def test_view_of_view(matrix_type, subset_func, subset_func2): 1159s > adata = gen_adata((30, 15), X_type=matrix_type) 1159s 1159s tests/test_views.py:531: 1159s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1159s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:346: in gen_adata 1159s X = X_type(random_state.binomial(100, 0.005, (M, N)).astype(X_dtype)) 1159s /usr/lib/python3.13/functools.py:934: in wrapper 1159s return dispatch(args[0].__class__)(*args, **kw) 1159s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1159s 1159s val = array([[1., 1., 0., 1., 0., 0., 1., 0., 0., 2., 0., 2., 1., 0., 0.], 1159s [1., 0., 0., 1., 0., 0., 0., 0., 0., 1., 1...0., 0., 1., 0., 0., 1., 2.], 1159s [0., 0., 0., 0., 0., 0., 1., 0., 1., 0., 0., 1., 1., 0., 0.]], 1159s dtype=float32) 1159s typ = 1159s 1159s @singledispatch 1159s def as_cupy(val, typ=None): 1159s """ 1159s Rough conversion function 1159s 1159s Will try to infer target type from input type if not specified. 1159s """ 1159s if typ is None: 1159s typ = resolve_cupy_type(val) 1159s 1159s if issubclass(typ, CupyArray): 1159s import cupy as cp 1159s 1159s if isinstance(val, CSMatrix): 1159s val = val.toarray() 1159s return cp.array(val) 1159s elif issubclass(typ, CupyCSRMatrix): 1159s > import cupy as cp 1159s E ModuleNotFoundError: No module named 'cupy' 1159s 1159s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:1016: ModuleNotFoundError 1159s __________ test_view_of_view[cupy_csr-slice_subset-array_int_subset] ___________ 1159s 1159s matrix_type = functools.partial(, typ=) 1159s subset_func = 1159s subset_func2 = 1159s 1159s def test_view_of_view(matrix_type, subset_func, subset_func2): 1159s > adata = gen_adata((30, 15), X_type=matrix_type) 1159s 1159s tests/test_views.py:531: 1159s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1159s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:346: in gen_adata 1159s X = X_type(random_state.binomial(100, 0.005, (M, N)).astype(X_dtype)) 1159s /usr/lib/python3.13/functools.py:934: in wrapper 1159s return dispatch(args[0].__class__)(*args, **kw) 1159s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1159s 1159s val = array([[0., 0., 0., 1., 2., 1., 2., 0., 1., 1., 0., 0., 0., 1., 1.], 1159s [1., 0., 0., 1., 0., 1., 0., 1., 0., 0., 1...0., 1., 0., 0., 0., 0., 2.], 1159s [1., 1., 0., 0., 2., 0., 0., 0., 0., 2., 2., 1., 1., 1., 1.]], 1159s dtype=float32) 1159s typ = 1159s 1159s @singledispatch 1159s def as_cupy(val, typ=None): 1159s """ 1159s Rough conversion function 1159s 1159s Will try to infer target type from input type if not specified. 1159s """ 1159s if typ is None: 1159s typ = resolve_cupy_type(val) 1159s 1159s if issubclass(typ, CupyArray): 1159s import cupy as cp 1159s 1159s if isinstance(val, CSMatrix): 1159s val = val.toarray() 1159s return cp.array(val) 1159s elif issubclass(typ, CupyCSRMatrix): 1159s > import cupy as cp 1159s E ModuleNotFoundError: No module named 'cupy' 1159s 1159s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:1016: ModuleNotFoundError 1159s ___________ test_view_of_view[cupy_csr-slice_subset-list_int_subset] ___________ 1159s 1159s matrix_type = functools.partial(, typ=) 1159s subset_func = 1159s subset_func2 = 1159s 1159s def test_view_of_view(matrix_type, subset_func, subset_func2): 1159s > adata = gen_adata((30, 15), X_type=matrix_type) 1159s 1159s tests/test_views.py:531: 1159s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1159s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:346: in gen_adata 1159s X = X_type(random_state.binomial(100, 0.005, (M, N)).astype(X_dtype)) 1159s /usr/lib/python3.13/functools.py:934: in wrapper 1159s return dispatch(args[0].__class__)(*args, **kw) 1159s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1159s 1159s val = array([[1., 1., 0., 0., 0., 1., 1., 0., 0., 1., 1., 2., 0., 0., 0.], 1159s [0., 3., 1., 1., 0., 2., 0., 0., 1., 1., 3...0., 1., 0., 1., 2., 1., 1.], 1159s [1., 1., 0., 0., 1., 1., 0., 0., 1., 0., 0., 0., 0., 0., 0.]], 1159s dtype=float32) 1159s typ = 1159s 1159s @singledispatch 1159s def as_cupy(val, typ=None): 1159s """ 1159s Rough conversion function 1159s 1159s Will try to infer target type from input type if not specified. 1159s """ 1159s if typ is None: 1159s typ = resolve_cupy_type(val) 1159s 1159s if issubclass(typ, CupyArray): 1159s import cupy as cp 1159s 1159s if isinstance(val, CSMatrix): 1159s val = val.toarray() 1159s return cp.array(val) 1159s elif issubclass(typ, CupyCSRMatrix): 1159s > import cupy as cp 1159s E ModuleNotFoundError: No module named 'cupy' 1159s 1159s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:1016: ModuleNotFoundError 1159s __________ test_view_of_view[cupy_csr-slice_subset-array_bool_subset] __________ 1159s 1159s matrix_type = functools.partial(, typ=) 1159s subset_func = 1159s subset_func2 = 1159s 1159s def test_view_of_view(matrix_type, subset_func, subset_func2): 1159s > adata = gen_adata((30, 15), X_type=matrix_type) 1159s 1159s tests/test_views.py:531: 1159s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1159s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:346: in gen_adata 1159s X = X_type(random_state.binomial(100, 0.005, (M, N)).astype(X_dtype)) 1159s /usr/lib/python3.13/functools.py:934: in wrapper 1159s return dispatch(args[0].__class__)(*args, **kw) 1159s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1159s 1159s val = array([[1., 0., 3., 0., 0., 1., 1., 0., 0., 0., 0., 0., 1., 1., 0.], 1159s [0., 1., 0., 2., 0., 1., 0., 0., 0., 1., 1...0., 1., 0., 1., 0., 0., 1.], 1159s [0., 0., 1., 1., 0., 0., 1., 2., 1., 0., 0., 0., 1., 0., 0.]], 1159s dtype=float32) 1159s typ = 1159s 1159s @singledispatch 1159s def as_cupy(val, typ=None): 1159s """ 1159s Rough conversion function 1159s 1159s Will try to infer target type from input type if not specified. 1159s """ 1159s if typ is None: 1159s typ = resolve_cupy_type(val) 1159s 1159s if issubclass(typ, CupyArray): 1159s import cupy as cp 1159s 1159s if isinstance(val, CSMatrix): 1159s val = val.toarray() 1159s return cp.array(val) 1159s elif issubclass(typ, CupyCSRMatrix): 1159s > import cupy as cp 1159s E ModuleNotFoundError: No module named 'cupy' 1159s 1159s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:1016: ModuleNotFoundError 1159s __________ test_view_of_view[cupy_csr-slice_subset-list_bool_subset] ___________ 1159s 1159s matrix_type = functools.partial(, typ=) 1159s subset_func = 1159s subset_func2 = 1159s 1159s def test_view_of_view(matrix_type, subset_func, subset_func2): 1159s > adata = gen_adata((30, 15), X_type=matrix_type) 1159s 1159s tests/test_views.py:531: 1159s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1159s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:346: in gen_adata 1159s X = X_type(random_state.binomial(100, 0.005, (M, N)).astype(X_dtype)) 1159s /usr/lib/python3.13/functools.py:934: in wrapper 1159s return dispatch(args[0].__class__)(*args, **kw) 1159s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1159s 1159s val = array([[0., 1., 0., 0., 1., 1., 1., 0., 0., 0., 0., 1., 0., 0., 2.], 1159s [0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 1...0., 0., 0., 0., 0., 0., 0.], 1159s [0., 0., 2., 0., 1., 1., 0., 2., 1., 0., 0., 0., 0., 0., 0.]], 1159s dtype=float32) 1159s typ = 1159s 1159s @singledispatch 1159s def as_cupy(val, typ=None): 1159s """ 1159s Rough conversion function 1159s 1159s Will try to infer target type from input type if not specified. 1159s """ 1159s if typ is None: 1159s typ = resolve_cupy_type(val) 1159s 1159s if issubclass(typ, CupyArray): 1159s import cupy as cp 1159s 1159s if isinstance(val, CSMatrix): 1159s val = val.toarray() 1159s return cp.array(val) 1159s elif issubclass(typ, CupyCSRMatrix): 1159s > import cupy as cp 1159s E ModuleNotFoundError: No module named 'cupy' 1159s 1159s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:1016: ModuleNotFoundError 1159s _________ test_view_of_view[cupy_csr-slice_subset-matrix_bool_subset] __________ 1159s 1159s matrix_type = functools.partial(, typ=) 1159s subset_func = 1159s subset_func2 = 1159s 1159s def test_view_of_view(matrix_type, subset_func, subset_func2): 1159s > adata = gen_adata((30, 15), X_type=matrix_type) 1159s 1159s tests/test_views.py:531: 1159s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1159s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:346: in gen_adata 1159s X = X_type(random_state.binomial(100, 0.005, (M, N)).astype(X_dtype)) 1159s /usr/lib/python3.13/functools.py:934: in wrapper 1159s return dispatch(args[0].__class__)(*args, **kw) 1159s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1159s 1159s val = array([[0., 1., 0., 0., 1., 0., 1., 2., 0., 0., 2., 0., 1., 0., 0.], 1159s [1., 1., 0., 0., 0., 0., 1., 0., 0., 1., 0...0., 0., 1., 1., 0., 0., 1.], 1159s [0., 1., 0., 0., 0., 0., 1., 3., 0., 0., 1., 0., 0., 0., 1.]], 1159s dtype=float32) 1159s typ = 1159s 1159s @singledispatch 1159s def as_cupy(val, typ=None): 1159s """ 1159s Rough conversion function 1159s 1159s Will try to infer target type from input type if not specified. 1159s """ 1159s if typ is None: 1159s typ = resolve_cupy_type(val) 1159s 1159s if issubclass(typ, CupyArray): 1159s import cupy as cp 1159s 1159s if isinstance(val, CSMatrix): 1159s val = val.toarray() 1159s return cp.array(val) 1159s elif issubclass(typ, CupyCSRMatrix): 1159s > import cupy as cp 1159s E ModuleNotFoundError: No module named 'cupy' 1159s 1159s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:1016: ModuleNotFoundError 1159s ________ test_view_of_view[cupy_csr-slice_subset-spmatrix_bool_subset] _________ 1159s 1159s matrix_type = functools.partial(, typ=) 1159s subset_func = 1159s subset_func2 = 1159s 1159s def test_view_of_view(matrix_type, subset_func, subset_func2): 1159s > adata = gen_adata((30, 15), X_type=matrix_type) 1159s 1159s tests/test_views.py:531: 1159s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1159s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:346: in gen_adata 1159s X = X_type(random_state.binomial(100, 0.005, (M, N)).astype(X_dtype)) 1159s /usr/lib/python3.13/functools.py:934: in wrapper 1159s return dispatch(args[0].__class__)(*args, **kw) 1159s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1159s 1159s val = array([[2., 0., 0., 0., 0., 0., 0., 0., 0., 1., 1., 2., 0., 0., 2.], 1159s [0., 2., 0., 1., 1., 1., 0., 1., 1., 0., 1...1., 0., 0., 0., 0., 1., 0.], 1159s [1., 1., 0., 1., 1., 1., 1., 1., 0., 0., 1., 1., 1., 0., 0.]], 1159s dtype=float32) 1159s typ = 1159s 1159s @singledispatch 1159s def as_cupy(val, typ=None): 1159s """ 1159s Rough conversion function 1159s 1159s Will try to infer target type from input type if not specified. 1159s """ 1159s if typ is None: 1159s typ = resolve_cupy_type(val) 1159s 1159s if issubclass(typ, CupyArray): 1159s import cupy as cp 1159s 1159s if isinstance(val, CSMatrix): 1159s val = val.toarray() 1159s return cp.array(val) 1159s elif issubclass(typ, CupyCSRMatrix): 1159s > import cupy as cp 1159s E ModuleNotFoundError: No module named 'cupy' 1159s 1159s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:1016: ModuleNotFoundError 1159s _________ test_view_of_view[cupy_csr-slice_subset-sparray_bool_subset] _________ 1159s 1159s matrix_type = functools.partial(, typ=) 1159s subset_func = 1159s subset_func2 = 1159s 1159s def test_view_of_view(matrix_type, subset_func, subset_func2): 1159s > adata = gen_adata((30, 15), X_type=matrix_type) 1159s 1159s tests/test_views.py:531: 1159s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1159s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:346: in gen_adata 1159s X = X_type(random_state.binomial(100, 0.005, (M, N)).astype(X_dtype)) 1159s /usr/lib/python3.13/functools.py:934: in wrapper 1159s return dispatch(args[0].__class__)(*args, **kw) 1159s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1159s 1159s val = array([[1., 1., 1., 0., 0., 1., 0., 0., 0., 0., 0., 0., 1., 0., 0.], 1159s [0., 1., 1., 0., 0., 0., 2., 0., 1., 0., 0...1., 1., 1., 0., 1., 0., 1.], 1159s [1., 0., 2., 1., 1., 1., 0., 0., 0., 0., 2., 0., 0., 0., 0.]], 1159s dtype=float32) 1159s typ = 1159s 1159s @singledispatch 1159s def as_cupy(val, typ=None): 1159s """ 1159s Rough conversion function 1159s 1159s Will try to infer target type from input type if not specified. 1159s """ 1159s if typ is None: 1159s typ = resolve_cupy_type(val) 1159s 1159s if issubclass(typ, CupyArray): 1159s import cupy as cp 1159s 1159s if isinstance(val, CSMatrix): 1159s val = val.toarray() 1159s return cp.array(val) 1159s elif issubclass(typ, CupyCSRMatrix): 1159s > import cupy as cp 1159s E ModuleNotFoundError: No module named 'cupy' 1159s 1159s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:1016: ModuleNotFoundError 1159s ____________ test_view_of_view[cupy_csr-single_subset-array_subset] ____________ 1159s 1159s matrix_type = functools.partial(, typ=) 1159s subset_func = 1159s subset_func2 = 1159s 1159s def test_view_of_view(matrix_type, subset_func, subset_func2): 1159s > adata = gen_adata((30, 15), X_type=matrix_type) 1159s 1159s tests/test_views.py:531: 1159s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1159s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:346: in gen_adata 1159s X = X_type(random_state.binomial(100, 0.005, (M, N)).astype(X_dtype)) 1159s /usr/lib/python3.13/functools.py:934: in wrapper 1159s return dispatch(args[0].__class__)(*args, **kw) 1159s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1159s 1159s val = array([[0., 1., 0., 0., 1., 2., 0., 0., 1., 1., 0., 1., 1., 1., 0.], 1159s [0., 1., 1., 0., 2., 0., 0., 0., 1., 0., 1...0., 0., 0., 0., 0., 2., 0.], 1159s [0., 0., 2., 0., 0., 0., 0., 2., 1., 0., 0., 0., 2., 2., 1.]], 1159s dtype=float32) 1159s typ = 1159s 1159s @singledispatch 1159s def as_cupy(val, typ=None): 1159s """ 1159s Rough conversion function 1159s 1159s Will try to infer target type from input type if not specified. 1159s """ 1159s if typ is None: 1159s typ = resolve_cupy_type(val) 1159s 1159s if issubclass(typ, CupyArray): 1159s import cupy as cp 1159s 1159s if isinstance(val, CSMatrix): 1159s val = val.toarray() 1159s return cp.array(val) 1159s elif issubclass(typ, CupyCSRMatrix): 1159s > import cupy as cp 1159s E ModuleNotFoundError: No module named 'cupy' 1159s 1159s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:1016: ModuleNotFoundError 1159s ____________ test_view_of_view[cupy_csr-single_subset-slice_subset] ____________ 1159s 1159s matrix_type = functools.partial(, typ=) 1159s subset_func = 1159s subset_func2 = 1159s 1159s def test_view_of_view(matrix_type, subset_func, subset_func2): 1159s > adata = gen_adata((30, 15), X_type=matrix_type) 1159s 1159s tests/test_views.py:531: 1159s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1159s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:346: in gen_adata 1159s X = X_type(random_state.binomial(100, 0.005, (M, N)).astype(X_dtype)) 1159s /usr/lib/python3.13/functools.py:934: in wrapper 1159s return dispatch(args[0].__class__)(*args, **kw) 1159s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1159s 1159s val = array([[1., 0., 2., 1., 0., 0., 0., 0., 2., 1., 1., 0., 0., 0., 0.], 1159s [1., 1., 1., 0., 2., 1., 0., 2., 0., 1., 0...0., 1., 0., 0., 0., 1., 0.], 1159s [0., 3., 2., 0., 0., 0., 0., 2., 0., 1., 1., 2., 0., 0., 0.]], 1159s dtype=float32) 1159s typ = 1159s 1159s @singledispatch 1159s def as_cupy(val, typ=None): 1159s """ 1159s Rough conversion function 1159s 1159s Will try to infer target type from input type if not specified. 1159s """ 1159s if typ is None: 1159s typ = resolve_cupy_type(val) 1159s 1159s if issubclass(typ, CupyArray): 1159s import cupy as cp 1159s 1159s if isinstance(val, CSMatrix): 1159s val = val.toarray() 1159s return cp.array(val) 1159s elif issubclass(typ, CupyCSRMatrix): 1159s > import cupy as cp 1159s E ModuleNotFoundError: No module named 'cupy' 1159s 1159s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:1016: ModuleNotFoundError 1159s ___________ test_view_of_view[cupy_csr-single_subset-single_subset] ____________ 1159s 1159s matrix_type = functools.partial(, typ=) 1159s subset_func = 1159s subset_func2 = 1159s 1159s def test_view_of_view(matrix_type, subset_func, subset_func2): 1159s > adata = gen_adata((30, 15), X_type=matrix_type) 1159s 1159s tests/test_views.py:531: 1159s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1159s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:346: in gen_adata 1159s X = X_type(random_state.binomial(100, 0.005, (M, N)).astype(X_dtype)) 1159s /usr/lib/python3.13/functools.py:934: in wrapper 1159s return dispatch(args[0].__class__)(*args, **kw) 1159s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1159s 1159s val = array([[0., 3., 0., 0., 0., 0., 1., 0., 0., 0., 2., 0., 2., 0., 0.], 1159s [0., 0., 0., 0., 0., 0., 1., 1., 1., 0., 0...1., 0., 1., 0., 0., 1., 0.], 1159s [1., 0., 1., 2., 1., 0., 1., 1., 0., 0., 0., 0., 0., 0., 2.]], 1159s dtype=float32) 1159s typ = 1159s 1159s @singledispatch 1159s def as_cupy(val, typ=None): 1159s """ 1159s Rough conversion function 1159s 1159s Will try to infer target type from input type if not specified. 1159s """ 1159s if typ is None: 1159s typ = resolve_cupy_type(val) 1159s 1159s if issubclass(typ, CupyArray): 1159s import cupy as cp 1159s 1159s if isinstance(val, CSMatrix): 1159s val = val.toarray() 1159s return cp.array(val) 1159s elif issubclass(typ, CupyCSRMatrix): 1159s > import cupy as cp 1159s E ModuleNotFoundError: No module named 'cupy' 1159s 1159s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:1016: ModuleNotFoundError 1159s __________ test_view_of_view[cupy_csr-single_subset-array_int_subset] __________ 1159s 1159s matrix_type = functools.partial(, typ=) 1159s subset_func = 1159s subset_func2 = 1159s 1159s def test_view_of_view(matrix_type, subset_func, subset_func2): 1159s > adata = gen_adata((30, 15), X_type=matrix_type) 1159s 1159s tests/test_views.py:531: 1159s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1159s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:346: in gen_adata 1159s X = X_type(random_state.binomial(100, 0.005, (M, N)).astype(X_dtype)) 1159s /usr/lib/python3.13/functools.py:934: in wrapper 1159s return dispatch(args[0].__class__)(*args, **kw) 1159s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1159s 1159s val = array([[0., 2., 0., 1., 0., 0., 0., 3., 0., 0., 0., 1., 2., 0., 1.], 1159s [0., 1., 1., 3., 1., 0., 1., 0., 0., 0., 0...1., 0., 1., 0., 1., 2., 0.], 1159s [1., 0., 1., 0., 3., 2., 0., 0., 0., 0., 0., 1., 0., 0., 1.]], 1159s dtype=float32) 1159s typ = 1159s 1159s @singledispatch 1159s def as_cupy(val, typ=None): 1159s """ 1159s Rough conversion function 1159s 1159s Will try to infer target type from input type if not specified. 1159s """ 1159s if typ is None: 1159s typ = resolve_cupy_type(val) 1159s 1159s if issubclass(typ, CupyArray): 1159s import cupy as cp 1159s 1159s if isinstance(val, CSMatrix): 1159s val = val.toarray() 1159s return cp.array(val) 1159s elif issubclass(typ, CupyCSRMatrix): 1159s > import cupy as cp 1159s E ModuleNotFoundError: No module named 'cupy' 1159s 1159s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:1016: ModuleNotFoundError 1159s __________ test_view_of_view[cupy_csr-single_subset-list_int_subset] ___________ 1159s 1159s matrix_type = functools.partial(, typ=) 1159s subset_func = 1159s subset_func2 = 1159s 1159s def test_view_of_view(matrix_type, subset_func, subset_func2): 1159s > adata = gen_adata((30, 15), X_type=matrix_type) 1159s 1159s tests/test_views.py:531: 1159s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1159s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:346: in gen_adata 1159s X = X_type(random_state.binomial(100, 0.005, (M, N)).astype(X_dtype)) 1159s /usr/lib/python3.13/functools.py:934: in wrapper 1159s return dispatch(args[0].__class__)(*args, **kw) 1159s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1159s 1159s val = array([[1., 1., 0., 0., 1., 0., 0., 0., 0., 0., 3., 0., 0., 1., 0.], 1159s [1., 0., 1., 1., 0., 0., 1., 0., 0., 1., 0...1., 0., 0., 0., 0., 0., 1.], 1159s [2., 0., 1., 1., 1., 0., 0., 0., 1., 1., 0., 1., 0., 1., 0.]], 1159s dtype=float32) 1159s typ = 1159s 1159s @singledispatch 1159s def as_cupy(val, typ=None): 1159s """ 1159s Rough conversion function 1159s 1159s Will try to infer target type from input type if not specified. 1159s """ 1159s if typ is None: 1159s typ = resolve_cupy_type(val) 1159s 1159s if issubclass(typ, CupyArray): 1159s import cupy as cp 1159s 1159s if isinstance(val, CSMatrix): 1159s val = val.toarray() 1159s return cp.array(val) 1159s elif issubclass(typ, CupyCSRMatrix): 1159s > import cupy as cp 1159s E ModuleNotFoundError: No module named 'cupy' 1159s 1159s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:1016: ModuleNotFoundError 1159s _________ test_view_of_view[cupy_csr-single_subset-array_bool_subset] __________ 1159s 1159s matrix_type = functools.partial(, typ=) 1159s subset_func = 1159s subset_func2 = 1159s 1159s def test_view_of_view(matrix_type, subset_func, subset_func2): 1159s > adata = gen_adata((30, 15), X_type=matrix_type) 1159s 1159s tests/test_views.py:531: 1159s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1159s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:346: in gen_adata 1159s X = X_type(random_state.binomial(100, 0.005, (M, N)).astype(X_dtype)) 1159s /usr/lib/python3.13/functools.py:934: in wrapper 1159s return dispatch(args[0].__class__)(*args, **kw) 1159s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1159s 1159s val = array([[0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 1., 0., 0., 0., 0.], 1159s [1., 2., 1., 1., 1., 0., 2., 0., 1., 0., 0...0., 1., 1., 1., 0., 1., 1.], 1159s [0., 0., 2., 1., 0., 0., 0., 1., 0., 1., 0., 0., 1., 1., 1.]], 1159s dtype=float32) 1159s typ = 1159s 1159s @singledispatch 1159s def as_cupy(val, typ=None): 1159s """ 1159s Rough conversion function 1159s 1159s Will try to infer target type from input type if not specified. 1159s """ 1159s if typ is None: 1159s typ = resolve_cupy_type(val) 1159s 1159s if issubclass(typ, CupyArray): 1159s import cupy as cp 1159s 1159s if isinstance(val, CSMatrix): 1159s val = val.toarray() 1159s return cp.array(val) 1159s elif issubclass(typ, CupyCSRMatrix): 1159s > import cupy as cp 1159s E ModuleNotFoundError: No module named 'cupy' 1159s 1159s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:1016: ModuleNotFoundError 1159s __________ test_view_of_view[cupy_csr-single_subset-list_bool_subset] __________ 1159s 1159s matrix_type = functools.partial(, typ=) 1159s subset_func = 1159s subset_func2 = 1159s 1159s def test_view_of_view(matrix_type, subset_func, subset_func2): 1159s > adata = gen_adata((30, 15), X_type=matrix_type) 1159s 1159s tests/test_views.py:531: 1159s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1159s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:346: in gen_adata 1159s X = X_type(random_state.binomial(100, 0.005, (M, N)).astype(X_dtype)) 1159s /usr/lib/python3.13/functools.py:934: in wrapper 1159s return dispatch(args[0].__class__)(*args, **kw) 1159s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1159s 1159s val = array([[0., 0., 1., 1., 2., 0., 0., 1., 0., 0., 1., 0., 0., 1., 0.], 1159s [0., 1., 1., 0., 0., 0., 1., 0., 0., 0., 0...0., 0., 0., 1., 2., 1., 0.], 1159s [0., 1., 1., 1., 0., 1., 1., 0., 1., 2., 1., 0., 2., 0., 0.]], 1159s dtype=float32) 1159s typ = 1159s 1159s @singledispatch 1159s def as_cupy(val, typ=None): 1159s """ 1159s Rough conversion function 1159s 1159s Will try to infer target type from input type if not specified. 1159s """ 1159s if typ is None: 1159s typ = resolve_cupy_type(val) 1159s 1159s if issubclass(typ, CupyArray): 1159s import cupy as cp 1159s 1159s if isinstance(val, CSMatrix): 1159s val = val.toarray() 1159s return cp.array(val) 1159s elif issubclass(typ, CupyCSRMatrix): 1159s > import cupy as cp 1159s E ModuleNotFoundError: No module named 'cupy' 1159s 1159s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:1016: ModuleNotFoundError 1159s _________ test_view_of_view[cupy_csr-single_subset-matrix_bool_subset] _________ 1159s 1159s matrix_type = functools.partial(, typ=) 1159s subset_func = 1159s subset_func2 = 1159s 1159s def test_view_of_view(matrix_type, subset_func, subset_func2): 1159s > adata = gen_adata((30, 15), X_type=matrix_type) 1159s 1159s tests/test_views.py:531: 1159s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1159s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:346: in gen_adata 1159s X = X_type(random_state.binomial(100, 0.005, (M, N)).astype(X_dtype)) 1159s /usr/lib/python3.13/functools.py:934: in wrapper 1159s return dispatch(args[0].__class__)(*args, **kw) 1159s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1159s 1159s val = array([[0., 1., 1., 0., 2., 0., 2., 3., 1., 0., 0., 0., 1., 0., 1.], 1159s [0., 0., 2., 0., 1., 0., 1., 0., 0., 0., 1...0., 0., 2., 0., 1., 0., 3.], 1159s [0., 0., 0., 0., 0., 1., 1., 1., 1., 1., 1., 0., 1., 0., 0.]], 1159s dtype=float32) 1159s typ = 1159s 1159s @singledispatch 1159s def as_cupy(val, typ=None): 1159s """ 1159s Rough conversion function 1159s 1159s Will try to infer target type from input type if not specified. 1159s """ 1159s if typ is None: 1159s typ = resolve_cupy_type(val) 1159s 1159s if issubclass(typ, CupyArray): 1159s import cupy as cp 1159s 1159s if isinstance(val, CSMatrix): 1159s val = val.toarray() 1159s return cp.array(val) 1159s elif issubclass(typ, CupyCSRMatrix): 1159s > import cupy as cp 1159s E ModuleNotFoundError: No module named 'cupy' 1159s 1159s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:1016: ModuleNotFoundError 1159s ________ test_view_of_view[cupy_csr-single_subset-spmatrix_bool_subset] ________ 1159s 1159s matrix_type = functools.partial(, typ=) 1159s subset_func = 1159s subset_func2 = 1159s 1159s def test_view_of_view(matrix_type, subset_func, subset_func2): 1159s > adata = gen_adata((30, 15), X_type=matrix_type) 1159s 1159s tests/test_views.py:531: 1159s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1159s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:346: in gen_adata 1159s X = X_type(random_state.binomial(100, 0.005, (M, N)).astype(X_dtype)) 1159s /usr/lib/python3.13/functools.py:934: in wrapper 1159s return dispatch(args[0].__class__)(*args, **kw) 1159s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1159s 1159s val = array([[0., 1., 1., 0., 1., 0., 0., 1., 1., 0., 0., 0., 3., 0., 0.], 1159s [0., 0., 0., 0., 2., 0., 0., 0., 0., 1., 0...0., 0., 0., 2., 1., 0., 0.], 1159s [0., 0., 0., 0., 0., 0., 0., 0., 0., 1., 0., 2., 1., 1., 0.]], 1159s dtype=float32) 1159s typ = 1159s 1159s @singledispatch 1159s def as_cupy(val, typ=None): 1159s """ 1159s Rough conversion function 1159s 1159s Will try to infer target type from input type if not specified. 1159s """ 1159s if typ is None: 1159s typ = resolve_cupy_type(val) 1159s 1159s if issubclass(typ, CupyArray): 1159s import cupy as cp 1159s 1159s if isinstance(val, CSMatrix): 1159s val = val.toarray() 1159s return cp.array(val) 1159s elif issubclass(typ, CupyCSRMatrix): 1159s > import cupy as cp 1159s E ModuleNotFoundError: No module named 'cupy' 1159s 1159s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:1016: ModuleNotFoundError 1159s ________ test_view_of_view[cupy_csr-single_subset-sparray_bool_subset] _________ 1159s 1159s matrix_type = functools.partial(, typ=) 1159s subset_func = 1159s subset_func2 = 1159s 1159s def test_view_of_view(matrix_type, subset_func, subset_func2): 1159s > adata = gen_adata((30, 15), X_type=matrix_type) 1159s 1159s tests/test_views.py:531: 1159s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1159s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:346: in gen_adata 1159s X = X_type(random_state.binomial(100, 0.005, (M, N)).astype(X_dtype)) 1159s /usr/lib/python3.13/functools.py:934: in wrapper 1159s return dispatch(args[0].__class__)(*args, **kw) 1159s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1159s 1159s val = array([[0., 0., 0., 0., 0., 0., 0., 2., 1., 0., 0., 0., 0., 0., 2.], 1159s [2., 1., 1., 0., 0., 0., 0., 0., 0., 0., 0...1., 0., 1., 1., 1., 1., 0.], 1159s [3., 1., 0., 0., 1., 0., 0., 0., 1., 0., 0., 0., 1., 0., 0.]], 1159s dtype=float32) 1159s typ = 1160s 1160s @singledispatch 1160s def as_cupy(val, typ=None): 1160s """ 1160s Rough conversion function 1160s 1160s Will try to infer target type from input type if not specified. 1160s """ 1160s if typ is None: 1160s typ = resolve_cupy_type(val) 1160s 1160s if issubclass(typ, CupyArray): 1160s import cupy as cp 1160s 1160s if isinstance(val, CSMatrix): 1160s val = val.toarray() 1160s return cp.array(val) 1160s elif issubclass(typ, CupyCSRMatrix): 1160s > import cupy as cp 1160s E ModuleNotFoundError: No module named 'cupy' 1160s 1160s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:1016: ModuleNotFoundError 1160s __________ test_view_of_view[cupy_csr-array_int_subset-array_subset] ___________ 1160s 1160s matrix_type = functools.partial(, typ=) 1160s subset_func = 1160s subset_func2 = 1160s 1160s def test_view_of_view(matrix_type, subset_func, subset_func2): 1160s > adata = gen_adata((30, 15), X_type=matrix_type) 1160s 1160s tests/test_views.py:531: 1160s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1160s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:346: in gen_adata 1160s X = X_type(random_state.binomial(100, 0.005, (M, N)).astype(X_dtype)) 1160s /usr/lib/python3.13/functools.py:934: in wrapper 1160s return dispatch(args[0].__class__)(*args, **kw) 1160s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1160s 1160s val = array([[0., 0., 0., 1., 0., 0., 1., 0., 1., 1., 2., 1., 0., 0., 1.], 1160s [1., 0., 0., 0., 1., 0., 1., 0., 1., 0., 1...0., 1., 0., 1., 1., 0., 0.], 1160s [1., 1., 0., 0., 2., 0., 1., 1., 0., 1., 1., 0., 0., 1., 0.]], 1160s dtype=float32) 1160s typ = 1160s 1160s @singledispatch 1160s def as_cupy(val, typ=None): 1160s """ 1160s Rough conversion function 1160s 1160s Will try to infer target type from input type if not specified. 1160s """ 1160s if typ is None: 1160s typ = resolve_cupy_type(val) 1160s 1160s if issubclass(typ, CupyArray): 1160s import cupy as cp 1160s 1160s if isinstance(val, CSMatrix): 1160s val = val.toarray() 1160s return cp.array(val) 1160s elif issubclass(typ, CupyCSRMatrix): 1160s > import cupy as cp 1160s E ModuleNotFoundError: No module named 'cupy' 1160s 1160s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:1016: ModuleNotFoundError 1160s __________ test_view_of_view[cupy_csr-array_int_subset-slice_subset] ___________ 1160s 1160s matrix_type = functools.partial(, typ=) 1160s subset_func = 1160s subset_func2 = 1160s 1160s def test_view_of_view(matrix_type, subset_func, subset_func2): 1160s > adata = gen_adata((30, 15), X_type=matrix_type) 1160s 1160s tests/test_views.py:531: 1160s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1160s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:346: in gen_adata 1160s X = X_type(random_state.binomial(100, 0.005, (M, N)).astype(X_dtype)) 1160s /usr/lib/python3.13/functools.py:934: in wrapper 1160s return dispatch(args[0].__class__)(*args, **kw) 1160s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1160s 1160s val = array([[2., 0., 0., 0., 0., 0., 1., 0., 0., 1., 1., 2., 0., 1., 0.], 1160s [0., 0., 0., 0., 2., 0., 1., 0., 1., 0., 0...0., 2., 0., 0., 1., 0., 0.], 1160s [1., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 1., 0., 0., 0.]], 1160s dtype=float32) 1160s typ = 1160s 1160s @singledispatch 1160s def as_cupy(val, typ=None): 1160s """ 1160s Rough conversion function 1160s 1160s Will try to infer target type from input type if not specified. 1160s """ 1160s if typ is None: 1160s typ = resolve_cupy_type(val) 1160s 1160s if issubclass(typ, CupyArray): 1160s import cupy as cp 1160s 1160s if isinstance(val, CSMatrix): 1160s val = val.toarray() 1160s return cp.array(val) 1160s elif issubclass(typ, CupyCSRMatrix): 1160s > import cupy as cp 1160s E ModuleNotFoundError: No module named 'cupy' 1160s 1160s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:1016: ModuleNotFoundError 1160s __________ test_view_of_view[cupy_csr-array_int_subset-single_subset] __________ 1160s 1160s matrix_type = functools.partial(, typ=) 1160s subset_func = 1160s subset_func2 = 1160s 1160s def test_view_of_view(matrix_type, subset_func, subset_func2): 1160s > adata = gen_adata((30, 15), X_type=matrix_type) 1160s 1160s tests/test_views.py:531: 1160s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1160s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:346: in gen_adata 1160s X = X_type(random_state.binomial(100, 0.005, (M, N)).astype(X_dtype)) 1160s /usr/lib/python3.13/functools.py:934: in wrapper 1160s return dispatch(args[0].__class__)(*args, **kw) 1160s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1160s 1160s val = array([[0., 0., 1., 1., 0., 0., 0., 1., 1., 0., 2., 0., 0., 1., 1.], 1160s [1., 1., 0., 2., 1., 0., 0., 0., 0., 0., 1...0., 0., 0., 0., 2., 0., 0.], 1160s [1., 1., 0., 1., 3., 1., 2., 1., 1., 1., 0., 1., 0., 0., 1.]], 1160s dtype=float32) 1160s typ = 1160s 1160s @singledispatch 1160s def as_cupy(val, typ=None): 1160s """ 1160s Rough conversion function 1160s 1160s Will try to infer target type from input type if not specified. 1160s """ 1160s if typ is None: 1160s typ = resolve_cupy_type(val) 1160s 1160s if issubclass(typ, CupyArray): 1160s import cupy as cp 1160s 1160s if isinstance(val, CSMatrix): 1160s val = val.toarray() 1160s return cp.array(val) 1160s elif issubclass(typ, CupyCSRMatrix): 1160s > import cupy as cp 1160s E ModuleNotFoundError: No module named 'cupy' 1160s 1160s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:1016: ModuleNotFoundError 1160s ________ test_view_of_view[cupy_csr-array_int_subset-array_int_subset] _________ 1160s 1160s matrix_type = functools.partial(, typ=) 1160s subset_func = 1160s subset_func2 = 1160s 1160s def test_view_of_view(matrix_type, subset_func, subset_func2): 1160s > adata = gen_adata((30, 15), X_type=matrix_type) 1160s 1160s tests/test_views.py:531: 1160s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1160s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:346: in gen_adata 1160s X = X_type(random_state.binomial(100, 0.005, (M, N)).astype(X_dtype)) 1160s /usr/lib/python3.13/functools.py:934: in wrapper 1160s return dispatch(args[0].__class__)(*args, **kw) 1160s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1160s 1160s val = array([[0., 0., 0., 0., 0., 2., 0., 0., 1., 2., 0., 0., 1., 1., 0.], 1160s [1., 0., 0., 1., 0., 0., 1., 0., 0., 0., 1...0., 0., 0., 0., 0., 1., 0.], 1160s [0., 0., 0., 0., 1., 0., 0., 1., 1., 0., 0., 1., 0., 0., 0.]], 1160s dtype=float32) 1160s typ = 1160s 1160s @singledispatch 1160s def as_cupy(val, typ=None): 1160s """ 1160s Rough conversion function 1160s 1160s Will try to infer target type from input type if not specified. 1160s """ 1160s if typ is None: 1160s typ = resolve_cupy_type(val) 1160s 1160s if issubclass(typ, CupyArray): 1160s import cupy as cp 1160s 1160s if isinstance(val, CSMatrix): 1160s val = val.toarray() 1160s return cp.array(val) 1160s elif issubclass(typ, CupyCSRMatrix): 1160s > import cupy as cp 1160s E ModuleNotFoundError: No module named 'cupy' 1160s 1160s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:1016: ModuleNotFoundError 1160s _________ test_view_of_view[cupy_csr-array_int_subset-list_int_subset] _________ 1160s 1160s matrix_type = functools.partial(, typ=) 1160s subset_func = 1160s subset_func2 = 1160s 1160s def test_view_of_view(matrix_type, subset_func, subset_func2): 1160s > adata = gen_adata((30, 15), X_type=matrix_type) 1160s 1160s tests/test_views.py:531: 1160s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1160s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:346: in gen_adata 1160s X = X_type(random_state.binomial(100, 0.005, (M, N)).astype(X_dtype)) 1160s /usr/lib/python3.13/functools.py:934: in wrapper 1160s return dispatch(args[0].__class__)(*args, **kw) 1160s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1160s 1160s val = array([[0., 0., 0., 1., 1., 1., 1., 0., 1., 0., 0., 0., 0., 1., 0.], 1160s [0., 0., 0., 0., 0., 1., 0., 0., 0., 0., 0...3., 0., 2., 1., 1., 0., 0.], 1160s [0., 0., 1., 1., 0., 0., 0., 1., 0., 0., 3., 0., 1., 0., 1.]], 1160s dtype=float32) 1160s typ = 1160s 1160s @singledispatch 1160s def as_cupy(val, typ=None): 1160s """ 1160s Rough conversion function 1160s 1160s Will try to infer target type from input type if not specified. 1160s """ 1160s if typ is None: 1160s typ = resolve_cupy_type(val) 1160s 1160s if issubclass(typ, CupyArray): 1160s import cupy as cp 1160s 1160s if isinstance(val, CSMatrix): 1160s val = val.toarray() 1160s return cp.array(val) 1160s elif issubclass(typ, CupyCSRMatrix): 1160s > import cupy as cp 1160s E ModuleNotFoundError: No module named 'cupy' 1160s 1160s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:1016: ModuleNotFoundError 1160s ________ test_view_of_view[cupy_csr-array_int_subset-array_bool_subset] ________ 1160s 1160s matrix_type = functools.partial(, typ=) 1160s subset_func = 1160s subset_func2 = 1160s 1160s def test_view_of_view(matrix_type, subset_func, subset_func2): 1160s > adata = gen_adata((30, 15), X_type=matrix_type) 1160s 1160s tests/test_views.py:531: 1160s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1160s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:346: in gen_adata 1160s X = X_type(random_state.binomial(100, 0.005, (M, N)).astype(X_dtype)) 1160s /usr/lib/python3.13/functools.py:934: in wrapper 1160s return dispatch(args[0].__class__)(*args, **kw) 1160s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1160s 1160s val = array([[0., 0., 0., 0., 0., 0., 0., 2., 0., 0., 0., 0., 0., 0., 0.], 1160s [1., 0., 0., 0., 2., 0., 0., 1., 0., 0., 3...0., 0., 0., 2., 0., 0., 0.], 1160s [0., 0., 1., 0., 1., 0., 1., 1., 1., 0., 0., 0., 0., 2., 1.]], 1160s dtype=float32) 1160s typ = 1160s 1160s @singledispatch 1160s def as_cupy(val, typ=None): 1160s """ 1160s Rough conversion function 1160s 1160s Will try to infer target type from input type if not specified. 1160s """ 1160s if typ is None: 1160s typ = resolve_cupy_type(val) 1160s 1160s if issubclass(typ, CupyArray): 1160s import cupy as cp 1160s 1160s if isinstance(val, CSMatrix): 1160s val = val.toarray() 1160s return cp.array(val) 1160s elif issubclass(typ, CupyCSRMatrix): 1160s > import cupy as cp 1160s E ModuleNotFoundError: No module named 'cupy' 1160s 1160s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:1016: ModuleNotFoundError 1160s ________ test_view_of_view[cupy_csr-array_int_subset-list_bool_subset] _________ 1160s 1160s matrix_type = functools.partial(, typ=) 1160s subset_func = 1160s subset_func2 = 1160s 1160s def test_view_of_view(matrix_type, subset_func, subset_func2): 1160s > adata = gen_adata((30, 15), X_type=matrix_type) 1160s 1160s tests/test_views.py:531: 1160s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1160s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:346: in gen_adata 1160s X = X_type(random_state.binomial(100, 0.005, (M, N)).astype(X_dtype)) 1160s /usr/lib/python3.13/functools.py:934: in wrapper 1160s return dispatch(args[0].__class__)(*args, **kw) 1160s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1160s 1160s val = array([[0., 1., 0., 1., 0., 0., 0., 0., 0., 0., 0., 1., 0., 0., 0.], 1160s [0., 0., 0., 0., 0., 1., 0., 0., 2., 0., 0...0., 1., 2., 0., 0., 0., 1.], 1160s [1., 0., 0., 0., 1., 1., 1., 2., 0., 1., 0., 0., 1., 1., 1.]], 1160s dtype=float32) 1160s typ = 1160s 1160s @singledispatch 1160s def as_cupy(val, typ=None): 1160s """ 1160s Rough conversion function 1160s 1160s Will try to infer target type from input type if not specified. 1160s """ 1160s if typ is None: 1160s typ = resolve_cupy_type(val) 1160s 1160s if issubclass(typ, CupyArray): 1160s import cupy as cp 1160s 1160s if isinstance(val, CSMatrix): 1160s val = val.toarray() 1160s return cp.array(val) 1160s elif issubclass(typ, CupyCSRMatrix): 1160s > import cupy as cp 1160s E ModuleNotFoundError: No module named 'cupy' 1160s 1160s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:1016: ModuleNotFoundError 1160s _______ test_view_of_view[cupy_csr-array_int_subset-matrix_bool_subset] ________ 1160s 1160s matrix_type = functools.partial(, typ=) 1160s subset_func = 1160s subset_func2 = 1160s 1160s def test_view_of_view(matrix_type, subset_func, subset_func2): 1160s > adata = gen_adata((30, 15), X_type=matrix_type) 1160s 1160s tests/test_views.py:531: 1160s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1160s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:346: in gen_adata 1160s X = X_type(random_state.binomial(100, 0.005, (M, N)).astype(X_dtype)) 1160s /usr/lib/python3.13/functools.py:934: in wrapper 1160s return dispatch(args[0].__class__)(*args, **kw) 1160s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1160s 1160s val = array([[1., 1., 1., 0., 3., 1., 1., 0., 0., 0., 0., 1., 0., 0., 0.], 1160s [0., 0., 0., 0., 0., 0., 1., 0., 3., 1., 0...0., 1., 2., 0., 1., 1., 0.], 1160s [2., 0., 0., 1., 1., 0., 0., 1., 0., 0., 0., 1., 0., 0., 0.]], 1160s dtype=float32) 1160s typ = 1160s 1160s @singledispatch 1160s def as_cupy(val, typ=None): 1160s """ 1160s Rough conversion function 1160s 1160s Will try to infer target type from input type if not specified. 1160s """ 1160s if typ is None: 1160s typ = resolve_cupy_type(val) 1160s 1160s if issubclass(typ, CupyArray): 1160s import cupy as cp 1160s 1160s if isinstance(val, CSMatrix): 1160s val = val.toarray() 1160s return cp.array(val) 1160s elif issubclass(typ, CupyCSRMatrix): 1160s > import cupy as cp 1160s E ModuleNotFoundError: No module named 'cupy' 1160s 1160s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:1016: ModuleNotFoundError 1160s ______ test_view_of_view[cupy_csr-array_int_subset-spmatrix_bool_subset] _______ 1160s 1160s matrix_type = functools.partial(, typ=) 1160s subset_func = 1160s subset_func2 = 1160s 1160s def test_view_of_view(matrix_type, subset_func, subset_func2): 1160s > adata = gen_adata((30, 15), X_type=matrix_type) 1160s 1160s tests/test_views.py:531: 1160s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1160s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:346: in gen_adata 1160s X = X_type(random_state.binomial(100, 0.005, (M, N)).astype(X_dtype)) 1160s /usr/lib/python3.13/functools.py:934: in wrapper 1160s return dispatch(args[0].__class__)(*args, **kw) 1160s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1160s 1160s val = array([[1., 1., 0., 1., 2., 0., 0., 2., 0., 0., 1., 0., 0., 2., 1.], 1160s [0., 1., 2., 0., 0., 1., 0., 1., 1., 0., 0...1., 0., 0., 0., 0., 2., 0.], 1160s [0., 1., 0., 1., 0., 0., 1., 1., 0., 0., 0., 0., 0., 1., 2.]], 1160s dtype=float32) 1160s typ = 1160s 1160s @singledispatch 1160s def as_cupy(val, typ=None): 1160s """ 1160s Rough conversion function 1160s 1160s Will try to infer target type from input type if not specified. 1160s """ 1160s if typ is None: 1160s typ = resolve_cupy_type(val) 1160s 1160s if issubclass(typ, CupyArray): 1160s import cupy as cp 1160s 1160s if isinstance(val, CSMatrix): 1160s val = val.toarray() 1160s return cp.array(val) 1160s elif issubclass(typ, CupyCSRMatrix): 1160s > import cupy as cp 1160s E ModuleNotFoundError: No module named 'cupy' 1160s 1160s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:1016: ModuleNotFoundError 1160s _______ test_view_of_view[cupy_csr-array_int_subset-sparray_bool_subset] _______ 1160s 1160s matrix_type = functools.partial(, typ=) 1160s subset_func = 1160s subset_func2 = 1160s 1160s def test_view_of_view(matrix_type, subset_func, subset_func2): 1160s > adata = gen_adata((30, 15), X_type=matrix_type) 1160s 1160s tests/test_views.py:531: 1160s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1160s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:346: in gen_adata 1160s X = X_type(random_state.binomial(100, 0.005, (M, N)).astype(X_dtype)) 1160s /usr/lib/python3.13/functools.py:934: in wrapper 1160s return dispatch(args[0].__class__)(*args, **kw) 1160s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1160s 1160s val = array([[1., 1., 1., 0., 0., 1., 0., 0., 0., 1., 1., 3., 3., 0., 0.], 1160s [0., 0., 1., 1., 2., 1., 0., 0., 0., 1., 0...0., 1., 1., 1., 0., 0., 1.], 1160s [1., 1., 0., 1., 0., 2., 0., 1., 0., 0., 0., 0., 2., 0., 0.]], 1160s dtype=float32) 1160s typ = 1160s 1160s @singledispatch 1160s def as_cupy(val, typ=None): 1160s """ 1160s Rough conversion function 1160s 1160s Will try to infer target type from input type if not specified. 1160s """ 1160s if typ is None: 1160s typ = resolve_cupy_type(val) 1160s 1160s if issubclass(typ, CupyArray): 1160s import cupy as cp 1160s 1160s if isinstance(val, CSMatrix): 1160s val = val.toarray() 1160s return cp.array(val) 1160s elif issubclass(typ, CupyCSRMatrix): 1160s > import cupy as cp 1160s E ModuleNotFoundError: No module named 'cupy' 1160s 1160s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:1016: ModuleNotFoundError 1160s ___________ test_view_of_view[cupy_csr-list_int_subset-array_subset] ___________ 1160s 1160s matrix_type = functools.partial(, typ=) 1160s subset_func = 1160s subset_func2 = 1160s 1160s def test_view_of_view(matrix_type, subset_func, subset_func2): 1160s > adata = gen_adata((30, 15), X_type=matrix_type) 1160s 1160s tests/test_views.py:531: 1160s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1160s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:346: in gen_adata 1160s X = X_type(random_state.binomial(100, 0.005, (M, N)).astype(X_dtype)) 1160s /usr/lib/python3.13/functools.py:934: in wrapper 1160s return dispatch(args[0].__class__)(*args, **kw) 1160s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1160s 1160s val = array([[0., 0., 0., 2., 0., 0., 1., 0., 1., 0., 0., 0., 2., 1., 0.], 1160s [0., 0., 1., 0., 0., 0., 1., 0., 0., 0., 1...0., 1., 0., 0., 1., 1., 1.], 1160s [0., 0., 0., 0., 1., 0., 1., 1., 1., 1., 0., 1., 0., 1., 0.]], 1160s dtype=float32) 1160s typ = 1160s 1160s @singledispatch 1160s def as_cupy(val, typ=None): 1160s """ 1160s Rough conversion function 1160s 1160s Will try to infer target type from input type if not specified. 1160s """ 1160s if typ is None: 1160s typ = resolve_cupy_type(val) 1160s 1160s if issubclass(typ, CupyArray): 1160s import cupy as cp 1160s 1160s if isinstance(val, CSMatrix): 1160s val = val.toarray() 1160s return cp.array(val) 1160s elif issubclass(typ, CupyCSRMatrix): 1160s > import cupy as cp 1160s E ModuleNotFoundError: No module named 'cupy' 1160s 1160s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:1016: ModuleNotFoundError 1160s ___________ test_view_of_view[cupy_csr-list_int_subset-slice_subset] ___________ 1160s 1160s matrix_type = functools.partial(, typ=) 1160s subset_func = 1160s subset_func2 = 1160s 1160s def test_view_of_view(matrix_type, subset_func, subset_func2): 1160s > adata = gen_adata((30, 15), X_type=matrix_type) 1160s 1160s tests/test_views.py:531: 1160s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1160s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:346: in gen_adata 1160s X = X_type(random_state.binomial(100, 0.005, (M, N)).astype(X_dtype)) 1160s /usr/lib/python3.13/functools.py:934: in wrapper 1160s return dispatch(args[0].__class__)(*args, **kw) 1160s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1160s 1160s val = array([[1., 1., 0., 0., 0., 1., 0., 1., 0., 1., 0., 1., 0., 0., 0.], 1160s [0., 0., 1., 0., 1., 1., 0., 1., 2., 1., 1...0., 0., 1., 0., 0., 1., 1.], 1160s [0., 2., 0., 0., 0., 0., 0., 0., 1., 0., 0., 2., 1., 0., 1.]], 1160s dtype=float32) 1160s typ = 1160s 1160s @singledispatch 1160s def as_cupy(val, typ=None): 1160s """ 1160s Rough conversion function 1160s 1160s Will try to infer target type from input type if not specified. 1160s """ 1160s if typ is None: 1160s typ = resolve_cupy_type(val) 1160s 1160s if issubclass(typ, CupyArray): 1160s import cupy as cp 1160s 1160s if isinstance(val, CSMatrix): 1160s val = val.toarray() 1160s return cp.array(val) 1160s elif issubclass(typ, CupyCSRMatrix): 1160s > import cupy as cp 1160s E ModuleNotFoundError: No module named 'cupy' 1160s 1160s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:1016: ModuleNotFoundError 1160s __________ test_view_of_view[cupy_csr-list_int_subset-single_subset] ___________ 1160s 1160s matrix_type = functools.partial(, typ=) 1160s subset_func = 1160s subset_func2 = 1160s 1160s def test_view_of_view(matrix_type, subset_func, subset_func2): 1160s > adata = gen_adata((30, 15), X_type=matrix_type) 1160s 1160s tests/test_views.py:531: 1160s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1160s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:346: in gen_adata 1160s X = X_type(random_state.binomial(100, 0.005, (M, N)).astype(X_dtype)) 1160s /usr/lib/python3.13/functools.py:934: in wrapper 1160s return dispatch(args[0].__class__)(*args, **kw) 1160s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1160s 1160s val = array([[0., 0., 0., 0., 1., 0., 0., 0., 3., 0., 1., 0., 0., 0., 0.], 1160s [0., 0., 0., 1., 2., 2., 0., 2., 0., 2., 0...0., 0., 0., 1., 0., 0., 0.], 1160s [1., 1., 0., 0., 1., 1., 1., 1., 0., 1., 0., 0., 1., 1., 0.]], 1160s dtype=float32) 1160s typ = 1160s 1160s @singledispatch 1160s def as_cupy(val, typ=None): 1160s """ 1160s Rough conversion function 1160s 1160s Will try to infer target type from input type if not specified. 1160s """ 1160s if typ is None: 1160s typ = resolve_cupy_type(val) 1160s 1160s if issubclass(typ, CupyArray): 1160s import cupy as cp 1160s 1160s if isinstance(val, CSMatrix): 1160s val = val.toarray() 1160s return cp.array(val) 1160s elif issubclass(typ, CupyCSRMatrix): 1160s > import cupy as cp 1160s E ModuleNotFoundError: No module named 'cupy' 1160s 1160s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:1016: ModuleNotFoundError 1160s _________ test_view_of_view[cupy_csr-list_int_subset-array_int_subset] _________ 1160s 1160s matrix_type = functools.partial(, typ=) 1160s subset_func = 1160s subset_func2 = 1160s 1160s def test_view_of_view(matrix_type, subset_func, subset_func2): 1160s > adata = gen_adata((30, 15), X_type=matrix_type) 1160s 1160s tests/test_views.py:531: 1160s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1160s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:346: in gen_adata 1160s X = X_type(random_state.binomial(100, 0.005, (M, N)).astype(X_dtype)) 1160s /usr/lib/python3.13/functools.py:934: in wrapper 1160s return dispatch(args[0].__class__)(*args, **kw) 1160s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1160s 1160s val = array([[0., 0., 0., 1., 0., 0., 0., 1., 1., 0., 1., 0., 1., 1., 0.], 1160s [2., 0., 2., 1., 0., 1., 2., 0., 1., 0., 0...0., 1., 0., 0., 0., 0., 0.], 1160s [1., 1., 1., 1., 0., 0., 1., 1., 1., 1., 0., 0., 1., 0., 0.]], 1160s dtype=float32) 1160s typ = 1160s 1160s @singledispatch 1160s def as_cupy(val, typ=None): 1160s """ 1160s Rough conversion function 1160s 1160s Will try to infer target type from input type if not specified. 1160s """ 1160s if typ is None: 1160s typ = resolve_cupy_type(val) 1160s 1160s if issubclass(typ, CupyArray): 1160s import cupy as cp 1160s 1160s if isinstance(val, CSMatrix): 1160s val = val.toarray() 1160s return cp.array(val) 1160s elif issubclass(typ, CupyCSRMatrix): 1160s > import cupy as cp 1160s E ModuleNotFoundError: No module named 'cupy' 1160s 1160s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:1016: ModuleNotFoundError 1160s _________ test_view_of_view[cupy_csr-list_int_subset-list_int_subset] __________ 1160s 1160s matrix_type = functools.partial(, typ=) 1160s subset_func = 1160s subset_func2 = 1160s 1160s def test_view_of_view(matrix_type, subset_func, subset_func2): 1160s > adata = gen_adata((30, 15), X_type=matrix_type) 1160s 1160s tests/test_views.py:531: 1160s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1160s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:346: in gen_adata 1160s X = X_type(random_state.binomial(100, 0.005, (M, N)).astype(X_dtype)) 1160s /usr/lib/python3.13/functools.py:934: in wrapper 1160s return dispatch(args[0].__class__)(*args, **kw) 1160s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1160s 1160s val = array([[0., 0., 0., 1., 2., 1., 2., 1., 0., 0., 0., 0., 0., 0., 1.], 1160s [0., 1., 1., 0., 1., 1., 0., 0., 1., 0., 0...0., 0., 1., 1., 0., 1., 1.], 1160s [0., 0., 0., 0., 1., 0., 1., 1., 0., 0., 2., 0., 0., 1., 1.]], 1160s dtype=float32) 1160s typ = 1160s 1160s @singledispatch 1160s def as_cupy(val, typ=None): 1160s """ 1160s Rough conversion function 1160s 1160s Will try to infer target type from input type if not specified. 1160s """ 1160s if typ is None: 1160s typ = resolve_cupy_type(val) 1160s 1160s if issubclass(typ, CupyArray): 1160s import cupy as cp 1160s 1160s if isinstance(val, CSMatrix): 1160s val = val.toarray() 1160s return cp.array(val) 1160s elif issubclass(typ, CupyCSRMatrix): 1160s > import cupy as cp 1160s E ModuleNotFoundError: No module named 'cupy' 1160s 1160s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:1016: ModuleNotFoundError 1160s ________ test_view_of_view[cupy_csr-list_int_subset-array_bool_subset] _________ 1160s 1160s matrix_type = functools.partial(, typ=) 1160s subset_func = 1160s subset_func2 = 1160s 1160s def test_view_of_view(matrix_type, subset_func, subset_func2): 1160s > adata = gen_adata((30, 15), X_type=matrix_type) 1160s 1160s tests/test_views.py:531: 1160s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1160s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:346: in gen_adata 1160s X = X_type(random_state.binomial(100, 0.005, (M, N)).astype(X_dtype)) 1160s /usr/lib/python3.13/functools.py:934: in wrapper 1160s return dispatch(args[0].__class__)(*args, **kw) 1160s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1160s 1160s val = array([[0., 1., 0., 0., 1., 0., 1., 0., 0., 1., 0., 0., 1., 0., 1.], 1160s [0., 0., 1., 1., 0., 0., 0., 1., 0., 2., 0...0., 1., 0., 1., 0., 1., 0.], 1160s [0., 1., 2., 1., 2., 0., 0., 0., 0., 1., 0., 0., 1., 0., 1.]], 1160s dtype=float32) 1160s typ = 1160s 1160s @singledispatch 1160s def as_cupy(val, typ=None): 1160s """ 1160s Rough conversion function 1160s 1160s Will try to infer target type from input type if not specified. 1160s """ 1160s if typ is None: 1160s typ = resolve_cupy_type(val) 1160s 1160s if issubclass(typ, CupyArray): 1160s import cupy as cp 1160s 1160s if isinstance(val, CSMatrix): 1160s val = val.toarray() 1160s return cp.array(val) 1160s elif issubclass(typ, CupyCSRMatrix): 1160s > import cupy as cp 1160s E ModuleNotFoundError: No module named 'cupy' 1160s 1160s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:1016: ModuleNotFoundError 1160s _________ test_view_of_view[cupy_csr-list_int_subset-list_bool_subset] _________ 1160s 1160s matrix_type = functools.partial(, typ=) 1160s subset_func = 1160s subset_func2 = 1160s 1160s def test_view_of_view(matrix_type, subset_func, subset_func2): 1160s > adata = gen_adata((30, 15), X_type=matrix_type) 1160s 1160s tests/test_views.py:531: 1160s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1160s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:346: in gen_adata 1160s X = X_type(random_state.binomial(100, 0.005, (M, N)).astype(X_dtype)) 1160s /usr/lib/python3.13/functools.py:934: in wrapper 1160s return dispatch(args[0].__class__)(*args, **kw) 1160s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1160s 1160s val = array([[2., 1., 1., 3., 1., 2., 0., 2., 0., 0., 0., 0., 2., 0., 1.], 1160s [1., 1., 0., 0., 0., 0., 0., 1., 0., 1., 0...0., 0., 1., 0., 1., 0., 0.], 1160s [0., 1., 1., 0., 0., 0., 1., 1., 1., 0., 0., 0., 0., 0., 0.]], 1160s dtype=float32) 1160s typ = 1160s 1160s @singledispatch 1160s def as_cupy(val, typ=None): 1160s """ 1160s Rough conversion function 1160s 1160s Will try to infer target type from input type if not specified. 1160s """ 1160s if typ is None: 1160s typ = resolve_cupy_type(val) 1160s 1160s if issubclass(typ, CupyArray): 1160s import cupy as cp 1160s 1160s if isinstance(val, CSMatrix): 1160s val = val.toarray() 1160s return cp.array(val) 1160s elif issubclass(typ, CupyCSRMatrix): 1160s > import cupy as cp 1160s E ModuleNotFoundError: No module named 'cupy' 1160s 1160s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:1016: ModuleNotFoundError 1160s ________ test_view_of_view[cupy_csr-list_int_subset-matrix_bool_subset] ________ 1160s 1160s matrix_type = functools.partial(, typ=) 1160s subset_func = 1160s subset_func2 = 1160s 1160s def test_view_of_view(matrix_type, subset_func, subset_func2): 1160s > adata = gen_adata((30, 15), X_type=matrix_type) 1160s 1160s tests/test_views.py:531: 1160s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1160s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:346: in gen_adata 1160s X = X_type(random_state.binomial(100, 0.005, (M, N)).astype(X_dtype)) 1160s /usr/lib/python3.13/functools.py:934: in wrapper 1160s return dispatch(args[0].__class__)(*args, **kw) 1160s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1160s 1160s val = array([[0., 0., 0., 0., 1., 0., 0., 1., 1., 0., 0., 2., 1., 0., 0.], 1160s [1., 0., 0., 1., 0., 1., 0., 2., 1., 1., 0...0., 1., 0., 0., 0., 0., 1.], 1160s [1., 0., 0., 0., 0., 0., 0., 0., 0., 1., 0., 0., 0., 1., 0.]], 1160s dtype=float32) 1160s typ = 1160s 1160s @singledispatch 1160s def as_cupy(val, typ=None): 1160s """ 1160s Rough conversion function 1160s 1160s Will try to infer target type from input type if not specified. 1160s """ 1160s if typ is None: 1160s typ = resolve_cupy_type(val) 1160s 1160s if issubclass(typ, CupyArray): 1160s import cupy as cp 1160s 1160s if isinstance(val, CSMatrix): 1160s val = val.toarray() 1160s return cp.array(val) 1160s elif issubclass(typ, CupyCSRMatrix): 1160s > import cupy as cp 1160s E ModuleNotFoundError: No module named 'cupy' 1160s 1160s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:1016: ModuleNotFoundError 1160s _______ test_view_of_view[cupy_csr-list_int_subset-spmatrix_bool_subset] _______ 1160s 1160s matrix_type = functools.partial(, typ=) 1160s subset_func = 1160s subset_func2 = 1160s 1160s def test_view_of_view(matrix_type, subset_func, subset_func2): 1160s > adata = gen_adata((30, 15), X_type=matrix_type) 1160s 1160s tests/test_views.py:531: 1160s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1160s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:346: in gen_adata 1160s X = X_type(random_state.binomial(100, 0.005, (M, N)).astype(X_dtype)) 1160s /usr/lib/python3.13/functools.py:934: in wrapper 1160s return dispatch(args[0].__class__)(*args, **kw) 1160s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1160s 1160s val = array([[1., 1., 2., 0., 0., 0., 0., 1., 0., 0., 0., 0., 0., 0., 4.], 1160s [0., 1., 1., 1., 0., 2., 0., 1., 1., 1., 0...0., 0., 0., 1., 0., 0., 1.], 1160s [0., 0., 2., 0., 1., 0., 1., 0., 1., 0., 0., 1., 0., 0., 1.]], 1160s dtype=float32) 1160s typ = 1160s 1160s @singledispatch 1160s def as_cupy(val, typ=None): 1160s """ 1160s Rough conversion function 1160s 1160s Will try to infer target type from input type if not specified. 1160s """ 1160s if typ is None: 1160s typ = resolve_cupy_type(val) 1160s 1160s if issubclass(typ, CupyArray): 1160s import cupy as cp 1160s 1160s if isinstance(val, CSMatrix): 1160s val = val.toarray() 1160s return cp.array(val) 1160s elif issubclass(typ, CupyCSRMatrix): 1160s > import cupy as cp 1160s E ModuleNotFoundError: No module named 'cupy' 1160s 1160s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:1016: ModuleNotFoundError 1160s _______ test_view_of_view[cupy_csr-list_int_subset-sparray_bool_subset] ________ 1160s 1160s matrix_type = functools.partial(, typ=) 1160s subset_func = 1160s subset_func2 = 1160s 1160s def test_view_of_view(matrix_type, subset_func, subset_func2): 1160s > adata = gen_adata((30, 15), X_type=matrix_type) 1160s 1160s tests/test_views.py:531: 1160s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1160s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:346: in gen_adata 1160s X = X_type(random_state.binomial(100, 0.005, (M, N)).astype(X_dtype)) 1160s /usr/lib/python3.13/functools.py:934: in wrapper 1160s return dispatch(args[0].__class__)(*args, **kw) 1160s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1160s 1160s val = array([[0., 0., 0., 0., 0., 0., 0., 1., 2., 1., 1., 1., 0., 2., 0.], 1160s [1., 1., 0., 0., 0., 0., 1., 0., 0., 1., 1...2., 1., 1., 2., 0., 0., 1.], 1160s [0., 0., 0., 0., 0., 0., 0., 0., 1., 1., 1., 0., 0., 1., 0.]], 1160s dtype=float32) 1160s typ = 1160s 1160s @singledispatch 1160s def as_cupy(val, typ=None): 1160s """ 1160s Rough conversion function 1160s 1160s Will try to infer target type from input type if not specified. 1160s """ 1160s if typ is None: 1160s typ = resolve_cupy_type(val) 1160s 1160s if issubclass(typ, CupyArray): 1160s import cupy as cp 1160s 1160s if isinstance(val, CSMatrix): 1160s val = val.toarray() 1160s return cp.array(val) 1160s elif issubclass(typ, CupyCSRMatrix): 1160s > import cupy as cp 1160s E ModuleNotFoundError: No module named 'cupy' 1160s 1160s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:1016: ModuleNotFoundError 1160s __________ test_view_of_view[cupy_csr-array_bool_subset-array_subset] __________ 1160s 1160s matrix_type = functools.partial(, typ=) 1160s subset_func = 1160s subset_func2 = 1160s 1160s def test_view_of_view(matrix_type, subset_func, subset_func2): 1160s > adata = gen_adata((30, 15), X_type=matrix_type) 1160s 1160s tests/test_views.py:531: 1160s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1160s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:346: in gen_adata 1160s X = X_type(random_state.binomial(100, 0.005, (M, N)).astype(X_dtype)) 1160s /usr/lib/python3.13/functools.py:934: in wrapper 1160s return dispatch(args[0].__class__)(*args, **kw) 1160s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1160s 1160s val = array([[0., 0., 0., 1., 0., 1., 0., 1., 1., 2., 0., 0., 0., 0., 0.], 1160s [0., 0., 0., 1., 0., 0., 1., 2., 0., 2., 1...3., 1., 0., 0., 0., 2., 0.], 1160s [0., 0., 0., 0., 0., 1., 1., 0., 1., 1., 1., 0., 0., 0., 0.]], 1160s dtype=float32) 1160s typ = 1160s 1160s @singledispatch 1160s def as_cupy(val, typ=None): 1160s """ 1160s Rough conversion function 1160s 1160s Will try to infer target type from input type if not specified. 1160s """ 1160s if typ is None: 1160s typ = resolve_cupy_type(val) 1160s 1160s if issubclass(typ, CupyArray): 1160s import cupy as cp 1160s 1160s if isinstance(val, CSMatrix): 1160s val = val.toarray() 1160s return cp.array(val) 1160s elif issubclass(typ, CupyCSRMatrix): 1160s > import cupy as cp 1160s E ModuleNotFoundError: No module named 'cupy' 1160s 1160s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:1016: ModuleNotFoundError 1160s __________ test_view_of_view[cupy_csr-array_bool_subset-slice_subset] __________ 1160s 1160s matrix_type = functools.partial(, typ=) 1160s subset_func = 1160s subset_func2 = 1160s 1160s def test_view_of_view(matrix_type, subset_func, subset_func2): 1160s > adata = gen_adata((30, 15), X_type=matrix_type) 1160s 1160s tests/test_views.py:531: 1160s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1160s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:346: in gen_adata 1160s X = X_type(random_state.binomial(100, 0.005, (M, N)).astype(X_dtype)) 1160s /usr/lib/python3.13/functools.py:934: in wrapper 1160s return dispatch(args[0].__class__)(*args, **kw) 1160s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1160s 1160s val = array([[1., 0., 1., 1., 1., 1., 0., 0., 1., 0., 3., 0., 1., 1., 0.], 1160s [0., 0., 0., 1., 0., 0., 0., 1., 0., 1., 0...0., 3., 0., 0., 1., 1., 1.], 1160s [1., 0., 0., 0., 0., 0., 1., 1., 0., 0., 2., 0., 1., 1., 1.]], 1160s dtype=float32) 1160s typ = 1160s 1160s @singledispatch 1160s def as_cupy(val, typ=None): 1160s """ 1160s Rough conversion function 1160s 1160s Will try to infer target type from input type if not specified. 1160s """ 1160s if typ is None: 1160s typ = resolve_cupy_type(val) 1160s 1160s if issubclass(typ, CupyArray): 1160s import cupy as cp 1160s 1160s if isinstance(val, CSMatrix): 1160s val = val.toarray() 1160s return cp.array(val) 1160s elif issubclass(typ, CupyCSRMatrix): 1160s > import cupy as cp 1160s E ModuleNotFoundError: No module named 'cupy' 1160s 1160s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:1016: ModuleNotFoundError 1160s _________ test_view_of_view[cupy_csr-array_bool_subset-single_subset] __________ 1160s 1160s matrix_type = functools.partial(, typ=) 1160s subset_func = 1160s subset_func2 = 1160s 1160s def test_view_of_view(matrix_type, subset_func, subset_func2): 1160s > adata = gen_adata((30, 15), X_type=matrix_type) 1160s 1160s tests/test_views.py:531: 1160s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1160s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:346: in gen_adata 1160s X = X_type(random_state.binomial(100, 0.005, (M, N)).astype(X_dtype)) 1160s /usr/lib/python3.13/functools.py:934: in wrapper 1160s return dispatch(args[0].__class__)(*args, **kw) 1160s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1160s 1160s val = array([[2., 0., 0., 1., 1., 1., 0., 0., 0., 1., 2., 1., 0., 0., 0.], 1160s [0., 0., 2., 1., 2., 0., 1., 0., 0., 0., 1...1., 1., 2., 1., 0., 1., 0.], 1160s [0., 0., 0., 1., 0., 0., 1., 2., 0., 1., 0., 0., 1., 0., 1.]], 1160s dtype=float32) 1160s typ = 1160s 1160s @singledispatch 1160s def as_cupy(val, typ=None): 1160s """ 1160s Rough conversion function 1160s 1160s Will try to infer target type from input type if not specified. 1160s """ 1160s if typ is None: 1160s typ = resolve_cupy_type(val) 1160s 1160s if issubclass(typ, CupyArray): 1160s import cupy as cp 1160s 1160s if isinstance(val, CSMatrix): 1160s val = val.toarray() 1160s return cp.array(val) 1160s elif issubclass(typ, CupyCSRMatrix): 1160s > import cupy as cp 1160s E ModuleNotFoundError: No module named 'cupy' 1160s 1160s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:1016: ModuleNotFoundError 1160s ________ test_view_of_view[cupy_csr-array_bool_subset-array_int_subset] ________ 1160s 1160s matrix_type = functools.partial(, typ=) 1160s subset_func = 1160s subset_func2 = 1160s 1160s def test_view_of_view(matrix_type, subset_func, subset_func2): 1160s > adata = gen_adata((30, 15), X_type=matrix_type) 1160s 1160s tests/test_views.py:531: 1160s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1160s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:346: in gen_adata 1160s X = X_type(random_state.binomial(100, 0.005, (M, N)).astype(X_dtype)) 1160s /usr/lib/python3.13/functools.py:934: in wrapper 1160s return dispatch(args[0].__class__)(*args, **kw) 1160s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1160s 1160s val = array([[0., 0., 2., 2., 0., 0., 0., 1., 0., 1., 0., 0., 1., 2., 1.], 1160s [0., 0., 0., 0., 0., 0., 1., 0., 1., 0., 1...2., 0., 0., 0., 0., 1., 0.], 1160s [0., 0., 0., 0., 0., 1., 0., 1., 1., 0., 0., 1., 1., 0., 0.]], 1160s dtype=float32) 1160s typ = 1160s 1160s @singledispatch 1160s def as_cupy(val, typ=None): 1160s """ 1160s Rough conversion function 1160s 1160s Will try to infer target type from input type if not specified. 1160s """ 1160s if typ is None: 1160s typ = resolve_cupy_type(val) 1160s 1160s if issubclass(typ, CupyArray): 1160s import cupy as cp 1160s 1160s if isinstance(val, CSMatrix): 1160s val = val.toarray() 1160s return cp.array(val) 1160s elif issubclass(typ, CupyCSRMatrix): 1160s > import cupy as cp 1160s E ModuleNotFoundError: No module named 'cupy' 1160s 1160s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:1016: ModuleNotFoundError 1160s ________ test_view_of_view[cupy_csr-array_bool_subset-list_int_subset] _________ 1160s 1160s matrix_type = functools.partial(, typ=) 1160s subset_func = 1160s subset_func2 = 1160s 1160s def test_view_of_view(matrix_type, subset_func, subset_func2): 1160s > adata = gen_adata((30, 15), X_type=matrix_type) 1160s 1160s tests/test_views.py:531: 1160s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1160s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:346: in gen_adata 1160s X = X_type(random_state.binomial(100, 0.005, (M, N)).astype(X_dtype)) 1160s /usr/lib/python3.13/functools.py:934: in wrapper 1160s return dispatch(args[0].__class__)(*args, **kw) 1160s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1160s 1160s val = array([[0., 0., 1., 0., 1., 0., 1., 0., 0., 0., 0., 0., 1., 1., 2.], 1160s [0., 0., 0., 3., 1., 1., 0., 1., 0., 0., 0...1., 0., 0., 0., 2., 1., 0.], 1160s [0., 0., 1., 0., 1., 1., 1., 1., 0., 0., 0., 2., 0., 0., 0.]], 1160s dtype=float32) 1160s typ = 1160s 1160s @singledispatch 1160s def as_cupy(val, typ=None): 1160s """ 1160s Rough conversion function 1160s 1160s Will try to infer target type from input type if not specified. 1160s """ 1160s if typ is None: 1160s typ = resolve_cupy_type(val) 1160s 1160s if issubclass(typ, CupyArray): 1160s import cupy as cp 1160s 1160s if isinstance(val, CSMatrix): 1160s val = val.toarray() 1160s return cp.array(val) 1160s elif issubclass(typ, CupyCSRMatrix): 1160s > import cupy as cp 1160s E ModuleNotFoundError: No module named 'cupy' 1160s 1160s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:1016: ModuleNotFoundError 1160s _______ test_view_of_view[cupy_csr-array_bool_subset-array_bool_subset] ________ 1160s 1160s matrix_type = functools.partial(, typ=) 1160s subset_func = 1160s subset_func2 = 1160s 1160s def test_view_of_view(matrix_type, subset_func, subset_func2): 1160s > adata = gen_adata((30, 15), X_type=matrix_type) 1160s 1160s tests/test_views.py:531: 1160s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1160s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:346: in gen_adata 1160s X = X_type(random_state.binomial(100, 0.005, (M, N)).astype(X_dtype)) 1160s /usr/lib/python3.13/functools.py:934: in wrapper 1160s return dispatch(args[0].__class__)(*args, **kw) 1160s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1160s 1160s val = array([[0., 1., 1., 0., 0., 1., 0., 0., 0., 1., 1., 0., 0., 0., 1.], 1160s [0., 0., 1., 0., 2., 1., 0., 0., 0., 3., 0...2., 2., 1., 2., 1., 1., 0.], 1160s [0., 1., 0., 0., 1., 0., 0., 0., 0., 0., 1., 1., 0., 0., 2.]], 1160s dtype=float32) 1160s typ = 1160s 1160s @singledispatch 1160s def as_cupy(val, typ=None): 1160s """ 1160s Rough conversion function 1160s 1160s Will try to infer target type from input type if not specified. 1160s """ 1160s if typ is None: 1160s typ = resolve_cupy_type(val) 1160s 1160s if issubclass(typ, CupyArray): 1160s import cupy as cp 1160s 1160s if isinstance(val, CSMatrix): 1160s val = val.toarray() 1160s return cp.array(val) 1160s elif issubclass(typ, CupyCSRMatrix): 1160s > import cupy as cp 1160s E ModuleNotFoundError: No module named 'cupy' 1160s 1160s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:1016: ModuleNotFoundError 1160s ________ test_view_of_view[cupy_csr-array_bool_subset-list_bool_subset] ________ 1160s 1160s matrix_type = functools.partial(, typ=) 1160s subset_func = 1160s subset_func2 = 1160s 1160s def test_view_of_view(matrix_type, subset_func, subset_func2): 1160s > adata = gen_adata((30, 15), X_type=matrix_type) 1160s 1160s tests/test_views.py:531: 1160s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1160s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:346: in gen_adata 1160s X = X_type(random_state.binomial(100, 0.005, (M, N)).astype(X_dtype)) 1160s /usr/lib/python3.13/functools.py:934: in wrapper 1160s return dispatch(args[0].__class__)(*args, **kw) 1160s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1160s 1160s val = array([[0., 1., 0., 1., 0., 0., 0., 0., 0., 3., 0., 0., 0., 0., 1.], 1160s [1., 0., 1., 0., 2., 1., 2., 1., 0., 1., 0...0., 0., 0., 3., 1., 0., 1.], 1160s [0., 0., 2., 0., 0., 0., 1., 0., 0., 0., 1., 1., 1., 0., 3.]], 1160s dtype=float32) 1160s typ = 1160s 1160s @singledispatch 1160s def as_cupy(val, typ=None): 1160s """ 1160s Rough conversion function 1160s 1160s Will try to infer target type from input type if not specified. 1160s """ 1160s if typ is None: 1160s typ = resolve_cupy_type(val) 1160s 1160s if issubclass(typ, CupyArray): 1160s import cupy as cp 1160s 1160s if isinstance(val, CSMatrix): 1160s val = val.toarray() 1160s return cp.array(val) 1160s elif issubclass(typ, CupyCSRMatrix): 1160s > import cupy as cp 1160s E ModuleNotFoundError: No module named 'cupy' 1160s 1160s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:1016: ModuleNotFoundError 1160s _______ test_view_of_view[cupy_csr-array_bool_subset-matrix_bool_subset] _______ 1160s 1160s matrix_type = functools.partial(, typ=) 1160s subset_func = 1160s subset_func2 = 1160s 1160s def test_view_of_view(matrix_type, subset_func, subset_func2): 1160s > adata = gen_adata((30, 15), X_type=matrix_type) 1160s 1160s tests/test_views.py:531: 1160s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1160s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:346: in gen_adata 1160s X = X_type(random_state.binomial(100, 0.005, (M, N)).astype(X_dtype)) 1160s /usr/lib/python3.13/functools.py:934: in wrapper 1160s return dispatch(args[0].__class__)(*args, **kw) 1160s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1160s 1160s val = array([[0., 2., 1., 1., 0., 2., 0., 0., 2., 0., 0., 2., 0., 0., 1.], 1160s [1., 0., 0., 1., 1., 0., 1., 0., 1., 0., 0...2., 1., 0., 0., 1., 1., 0.], 1160s [1., 0., 0., 0., 0., 0., 0., 2., 2., 1., 2., 0., 0., 1., 0.]], 1160s dtype=float32) 1160s typ = 1160s 1160s @singledispatch 1160s def as_cupy(val, typ=None): 1160s """ 1160s Rough conversion function 1160s 1160s Will try to infer target type from input type if not specified. 1160s """ 1160s if typ is None: 1160s typ = resolve_cupy_type(val) 1160s 1160s if issubclass(typ, CupyArray): 1160s import cupy as cp 1160s 1160s if isinstance(val, CSMatrix): 1160s val = val.toarray() 1160s return cp.array(val) 1160s elif issubclass(typ, CupyCSRMatrix): 1160s > import cupy as cp 1160s E ModuleNotFoundError: No module named 'cupy' 1160s 1160s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:1016: ModuleNotFoundError 1160s ______ test_view_of_view[cupy_csr-array_bool_subset-spmatrix_bool_subset] ______ 1160s 1160s matrix_type = functools.partial(, typ=) 1160s subset_func = 1160s subset_func2 = 1160s 1160s def test_view_of_view(matrix_type, subset_func, subset_func2): 1160s > adata = gen_adata((30, 15), X_type=matrix_type) 1160s 1160s tests/test_views.py:531: 1160s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1160s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:346: in gen_adata 1160s X = X_type(random_state.binomial(100, 0.005, (M, N)).astype(X_dtype)) 1160s /usr/lib/python3.13/functools.py:934: in wrapper 1160s return dispatch(args[0].__class__)(*args, **kw) 1160s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1160s 1160s val = array([[1., 1., 0., 2., 0., 0., 0., 1., 0., 2., 0., 1., 1., 2., 0.], 1160s [1., 1., 0., 2., 1., 0., 0., 0., 0., 0., 1...0., 2., 0., 0., 1., 1., 1.], 1160s [0., 0., 0., 2., 1., 1., 0., 0., 0., 1., 0., 0., 0., 0., 0.]], 1160s dtype=float32) 1160s typ = 1160s 1160s @singledispatch 1160s def as_cupy(val, typ=None): 1160s """ 1160s Rough conversion function 1160s 1160s Will try to infer target type from input type if not specified. 1160s """ 1160s if typ is None: 1160s typ = resolve_cupy_type(val) 1160s 1160s if issubclass(typ, CupyArray): 1160s import cupy as cp 1160s 1160s if isinstance(val, CSMatrix): 1160s val = val.toarray() 1160s return cp.array(val) 1160s elif issubclass(typ, CupyCSRMatrix): 1160s > import cupy as cp 1160s E ModuleNotFoundError: No module named 'cupy' 1160s 1160s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:1016: ModuleNotFoundError 1160s ______ test_view_of_view[cupy_csr-array_bool_subset-sparray_bool_subset] _______ 1160s 1160s matrix_type = functools.partial(, typ=) 1160s subset_func = 1160s subset_func2 = 1160s 1160s def test_view_of_view(matrix_type, subset_func, subset_func2): 1160s > adata = gen_adata((30, 15), X_type=matrix_type) 1160s 1160s tests/test_views.py:531: 1160s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1160s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:346: in gen_adata 1160s X = X_type(random_state.binomial(100, 0.005, (M, N)).astype(X_dtype)) 1160s /usr/lib/python3.13/functools.py:934: in wrapper 1160s return dispatch(args[0].__class__)(*args, **kw) 1160s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1160s 1160s val = array([[0., 0., 0., 2., 0., 0., 0., 0., 0., 0., 0., 0., 1., 0., 0.], 1160s [1., 1., 1., 0., 0., 0., 0., 0., 0., 0., 1...0., 0., 0., 1., 0., 2., 2.], 1160s [2., 0., 1., 0., 0., 0., 0., 1., 1., 0., 0., 0., 2., 0., 0.]], 1160s dtype=float32) 1160s typ = 1160s 1160s @singledispatch 1160s def as_cupy(val, typ=None): 1160s """ 1160s Rough conversion function 1160s 1160s Will try to infer target type from input type if not specified. 1160s """ 1160s if typ is None: 1160s typ = resolve_cupy_type(val) 1160s 1160s if issubclass(typ, CupyArray): 1160s import cupy as cp 1160s 1160s if isinstance(val, CSMatrix): 1160s val = val.toarray() 1160s return cp.array(val) 1160s elif issubclass(typ, CupyCSRMatrix): 1160s > import cupy as cp 1160s E ModuleNotFoundError: No module named 'cupy' 1160s 1160s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:1016: ModuleNotFoundError 1160s __________ test_view_of_view[cupy_csr-list_bool_subset-array_subset] ___________ 1160s 1160s matrix_type = functools.partial(, typ=) 1160s subset_func = 1160s subset_func2 = 1160s 1160s def test_view_of_view(matrix_type, subset_func, subset_func2): 1160s > adata = gen_adata((30, 15), X_type=matrix_type) 1160s 1160s tests/test_views.py:531: 1160s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1160s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:346: in gen_adata 1160s X = X_type(random_state.binomial(100, 0.005, (M, N)).astype(X_dtype)) 1160s /usr/lib/python3.13/functools.py:934: in wrapper 1160s return dispatch(args[0].__class__)(*args, **kw) 1160s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1160s 1160s val = array([[1., 0., 1., 1., 0., 0., 0., 1., 2., 1., 2., 1., 0., 1., 0.], 1160s [1., 0., 0., 1., 0., 0., 0., 0., 0., 0., 0...0., 0., 1., 1., 2., 0., 0.], 1160s [0., 1., 0., 1., 0., 0., 0., 1., 2., 1., 1., 0., 1., 0., 1.]], 1160s dtype=float32) 1160s typ = 1160s 1160s @singledispatch 1160s def as_cupy(val, typ=None): 1160s """ 1160s Rough conversion function 1160s 1160s Will try to infer target type from input type if not specified. 1160s """ 1160s if typ is None: 1160s typ = resolve_cupy_type(val) 1160s 1160s if issubclass(typ, CupyArray): 1160s import cupy as cp 1160s 1160s if isinstance(val, CSMatrix): 1160s val = val.toarray() 1160s return cp.array(val) 1160s elif issubclass(typ, CupyCSRMatrix): 1160s > import cupy as cp 1160s E ModuleNotFoundError: No module named 'cupy' 1160s 1160s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:1016: ModuleNotFoundError 1160s __________ test_view_of_view[cupy_csr-list_bool_subset-slice_subset] ___________ 1160s 1160s matrix_type = functools.partial(, typ=) 1160s subset_func = 1160s subset_func2 = 1160s 1160s def test_view_of_view(matrix_type, subset_func, subset_func2): 1160s > adata = gen_adata((30, 15), X_type=matrix_type) 1160s 1160s tests/test_views.py:531: 1160s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1160s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:346: in gen_adata 1160s X = X_type(random_state.binomial(100, 0.005, (M, N)).astype(X_dtype)) 1160s /usr/lib/python3.13/functools.py:934: in wrapper 1160s return dispatch(args[0].__class__)(*args, **kw) 1160s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1160s 1160s val = array([[1., 2., 0., 0., 1., 0., 0., 1., 1., 1., 0., 0., 1., 0., 0.], 1160s [1., 0., 0., 0., 1., 0., 1., 0., 0., 2., 0...0., 0., 0., 0., 0., 0., 2.], 1160s [1., 1., 0., 1., 1., 0., 0., 1., 0., 0., 0., 0., 0., 0., 0.]], 1160s dtype=float32) 1160s typ = 1160s 1160s @singledispatch 1160s def as_cupy(val, typ=None): 1160s """ 1160s Rough conversion function 1160s 1160s Will try to infer target type from input type if not specified. 1160s """ 1160s if typ is None: 1160s typ = resolve_cupy_type(val) 1160s 1160s if issubclass(typ, CupyArray): 1160s import cupy as cp 1160s 1160s if isinstance(val, CSMatrix): 1160s val = val.toarray() 1160s return cp.array(val) 1160s elif issubclass(typ, CupyCSRMatrix): 1160s > import cupy as cp 1160s E ModuleNotFoundError: No module named 'cupy' 1160s 1160s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:1016: ModuleNotFoundError 1160s __________ test_view_of_view[cupy_csr-list_bool_subset-single_subset] __________ 1160s 1160s matrix_type = functools.partial(, typ=) 1160s subset_func = 1160s subset_func2 = 1160s 1160s def test_view_of_view(matrix_type, subset_func, subset_func2): 1160s > adata = gen_adata((30, 15), X_type=matrix_type) 1160s 1160s tests/test_views.py:531: 1160s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1160s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:346: in gen_adata 1160s X = X_type(random_state.binomial(100, 0.005, (M, N)).astype(X_dtype)) 1160s /usr/lib/python3.13/functools.py:934: in wrapper 1160s return dispatch(args[0].__class__)(*args, **kw) 1160s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1160s 1160s val = array([[0., 1., 1., 2., 0., 0., 1., 1., 2., 0., 0., 0., 0., 0., 0.], 1160s [1., 0., 1., 0., 0., 1., 2., 0., 0., 0., 0...3., 1., 0., 0., 0., 0., 1.], 1160s [0., 0., 0., 0., 0., 0., 1., 2., 0., 1., 1., 1., 1., 2., 0.]], 1160s dtype=float32) 1160s typ = 1160s 1160s @singledispatch 1160s def as_cupy(val, typ=None): 1160s """ 1160s Rough conversion function 1160s 1160s Will try to infer target type from input type if not specified. 1160s """ 1160s if typ is None: 1160s typ = resolve_cupy_type(val) 1160s 1160s if issubclass(typ, CupyArray): 1160s import cupy as cp 1160s 1160s if isinstance(val, CSMatrix): 1160s val = val.toarray() 1160s return cp.array(val) 1160s elif issubclass(typ, CupyCSRMatrix): 1160s > import cupy as cp 1160s E ModuleNotFoundError: No module named 'cupy' 1160s 1160s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:1016: ModuleNotFoundError 1160s ________ test_view_of_view[cupy_csr-list_bool_subset-array_int_subset] _________ 1160s 1160s matrix_type = functools.partial(, typ=) 1160s subset_func = 1160s subset_func2 = 1160s 1160s def test_view_of_view(matrix_type, subset_func, subset_func2): 1160s > adata = gen_adata((30, 15), X_type=matrix_type) 1160s 1160s tests/test_views.py:531: 1160s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1160s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:346: in gen_adata 1160s X = X_type(random_state.binomial(100, 0.005, (M, N)).astype(X_dtype)) 1160s /usr/lib/python3.13/functools.py:934: in wrapper 1160s return dispatch(args[0].__class__)(*args, **kw) 1160s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1160s 1160s val = array([[0., 2., 0., 0., 1., 0., 1., 0., 0., 1., 0., 0., 1., 1., 2.], 1160s [0., 0., 0., 0., 2., 1., 1., 1., 0., 0., 0...0., 0., 1., 0., 0., 1., 0.], 1160s [2., 0., 0., 2., 0., 1., 0., 0., 0., 0., 1., 0., 0., 0., 0.]], 1160s dtype=float32) 1160s typ = 1160s 1160s @singledispatch 1160s def as_cupy(val, typ=None): 1160s """ 1160s Rough conversion function 1160s 1160s Will try to infer target type from input type if not specified. 1160s """ 1160s if typ is None: 1160s typ = resolve_cupy_type(val) 1160s 1160s if issubclass(typ, CupyArray): 1160s import cupy as cp 1160s 1160s if isinstance(val, CSMatrix): 1160s val = val.toarray() 1160s return cp.array(val) 1160s elif issubclass(typ, CupyCSRMatrix): 1160s > import cupy as cp 1160s E ModuleNotFoundError: No module named 'cupy' 1160s 1160s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:1016: ModuleNotFoundError 1160s _________ test_view_of_view[cupy_csr-list_bool_subset-list_int_subset] _________ 1160s 1160s matrix_type = functools.partial(, typ=) 1160s subset_func = 1160s subset_func2 = 1160s 1160s def test_view_of_view(matrix_type, subset_func, subset_func2): 1160s > adata = gen_adata((30, 15), X_type=matrix_type) 1160s 1160s tests/test_views.py:531: 1160s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1160s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:346: in gen_adata 1160s X = X_type(random_state.binomial(100, 0.005, (M, N)).astype(X_dtype)) 1160s /usr/lib/python3.13/functools.py:934: in wrapper 1160s return dispatch(args[0].__class__)(*args, **kw) 1160s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1160s 1160s val = array([[1., 0., 4., 0., 1., 0., 0., 0., 0., 0., 0., 1., 0., 0., 0.], 1160s [1., 0., 0., 0., 1., 0., 1., 0., 0., 1., 1...0., 0., 0., 2., 1., 0., 0.], 1160s [1., 1., 0., 0., 2., 1., 0., 0., 0., 0., 0., 0., 0., 1., 0.]], 1160s dtype=float32) 1160s typ = 1160s 1160s @singledispatch 1160s def as_cupy(val, typ=None): 1160s """ 1160s Rough conversion function 1160s 1160s Will try to infer target type from input type if not specified. 1160s """ 1160s if typ is None: 1160s typ = resolve_cupy_type(val) 1160s 1160s if issubclass(typ, CupyArray): 1160s import cupy as cp 1160s 1160s if isinstance(val, CSMatrix): 1160s val = val.toarray() 1160s return cp.array(val) 1160s elif issubclass(typ, CupyCSRMatrix): 1160s > import cupy as cp 1160s E ModuleNotFoundError: No module named 'cupy' 1160s 1160s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:1016: ModuleNotFoundError 1160s ________ test_view_of_view[cupy_csr-list_bool_subset-array_bool_subset] ________ 1160s 1160s matrix_type = functools.partial(, typ=) 1160s subset_func = 1160s subset_func2 = 1160s 1160s def test_view_of_view(matrix_type, subset_func, subset_func2): 1160s > adata = gen_adata((30, 15), X_type=matrix_type) 1160s 1160s tests/test_views.py:531: 1160s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1160s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:346: in gen_adata 1160s X = X_type(random_state.binomial(100, 0.005, (M, N)).astype(X_dtype)) 1160s /usr/lib/python3.13/functools.py:934: in wrapper 1160s return dispatch(args[0].__class__)(*args, **kw) 1160s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1160s 1160s val = array([[0., 0., 0., 2., 0., 0., 3., 0., 0., 1., 0., 1., 0., 4., 0.], 1160s [2., 0., 0., 2., 0., 0., 1., 0., 1., 0., 0...0., 0., 0., 1., 0., 0., 0.], 1160s [0., 0., 1., 0., 0., 0., 0., 1., 0., 0., 0., 2., 1., 0., 1.]], 1160s dtype=float32) 1160s typ = 1160s 1160s @singledispatch 1160s def as_cupy(val, typ=None): 1160s """ 1160s Rough conversion function 1160s 1160s Will try to infer target type from input type if not specified. 1160s """ 1160s if typ is None: 1160s typ = resolve_cupy_type(val) 1160s 1160s if issubclass(typ, CupyArray): 1160s import cupy as cp 1160s 1160s if isinstance(val, CSMatrix): 1160s val = val.toarray() 1160s return cp.array(val) 1160s elif issubclass(typ, CupyCSRMatrix): 1160s > import cupy as cp 1160s E ModuleNotFoundError: No module named 'cupy' 1160s 1160s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:1016: ModuleNotFoundError 1160s ________ test_view_of_view[cupy_csr-list_bool_subset-list_bool_subset] _________ 1160s 1160s matrix_type = functools.partial(, typ=) 1160s subset_func = 1160s subset_func2 = 1160s 1160s def test_view_of_view(matrix_type, subset_func, subset_func2): 1160s > adata = gen_adata((30, 15), X_type=matrix_type) 1160s 1160s tests/test_views.py:531: 1160s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1160s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:346: in gen_adata 1160s X = X_type(random_state.binomial(100, 0.005, (M, N)).astype(X_dtype)) 1160s /usr/lib/python3.13/functools.py:934: in wrapper 1160s return dispatch(args[0].__class__)(*args, **kw) 1160s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1160s 1160s val = array([[0., 0., 0., 1., 1., 1., 0., 1., 1., 1., 1., 1., 1., 2., 0.], 1160s [0., 0., 0., 1., 0., 1., 2., 1., 2., 0., 2...0., 2., 1., 0., 0., 0., 0.], 1160s [0., 1., 0., 0., 2., 1., 0., 0., 0., 1., 0., 0., 0., 0., 0.]], 1160s dtype=float32) 1160s typ = 1160s 1160s @singledispatch 1160s def as_cupy(val, typ=None): 1160s """ 1160s Rough conversion function 1160s 1160s Will try to infer target type from input type if not specified. 1160s """ 1160s if typ is None: 1160s typ = resolve_cupy_type(val) 1160s 1160s if issubclass(typ, CupyArray): 1160s import cupy as cp 1160s 1160s if isinstance(val, CSMatrix): 1160s val = val.toarray() 1160s return cp.array(val) 1160s elif issubclass(typ, CupyCSRMatrix): 1160s > import cupy as cp 1160s E ModuleNotFoundError: No module named 'cupy' 1160s 1160s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:1016: ModuleNotFoundError 1160s _______ test_view_of_view[cupy_csr-list_bool_subset-matrix_bool_subset] ________ 1160s 1160s matrix_type = functools.partial(, typ=) 1160s subset_func = 1160s subset_func2 = 1160s 1160s def test_view_of_view(matrix_type, subset_func, subset_func2): 1160s > adata = gen_adata((30, 15), X_type=matrix_type) 1160s 1160s tests/test_views.py:531: 1160s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1160s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:346: in gen_adata 1160s X = X_type(random_state.binomial(100, 0.005, (M, N)).astype(X_dtype)) 1160s /usr/lib/python3.13/functools.py:934: in wrapper 1160s return dispatch(args[0].__class__)(*args, **kw) 1160s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1160s 1160s val = array([[0., 0., 1., 1., 0., 0., 3., 2., 1., 0., 0., 1., 1., 1., 0.], 1160s [0., 1., 0., 1., 0., 0., 1., 1., 0., 3., 0...0., 1., 0., 1., 1., 1., 0.], 1160s [0., 0., 0., 1., 0., 1., 0., 1., 0., 0., 1., 0., 1., 0., 0.]], 1160s dtype=float32) 1160s typ = 1160s 1160s @singledispatch 1160s def as_cupy(val, typ=None): 1160s """ 1160s Rough conversion function 1160s 1160s Will try to infer target type from input type if not specified. 1160s """ 1160s if typ is None: 1160s typ = resolve_cupy_type(val) 1160s 1160s if issubclass(typ, CupyArray): 1160s import cupy as cp 1160s 1160s if isinstance(val, CSMatrix): 1160s val = val.toarray() 1160s return cp.array(val) 1160s elif issubclass(typ, CupyCSRMatrix): 1160s > import cupy as cp 1160s E ModuleNotFoundError: No module named 'cupy' 1160s 1160s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:1016: ModuleNotFoundError 1160s ______ test_view_of_view[cupy_csr-list_bool_subset-spmatrix_bool_subset] _______ 1160s 1160s matrix_type = functools.partial(, typ=) 1160s subset_func = 1160s subset_func2 = 1160s 1160s def test_view_of_view(matrix_type, subset_func, subset_func2): 1160s > adata = gen_adata((30, 15), X_type=matrix_type) 1160s 1160s tests/test_views.py:531: 1160s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1160s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:346: in gen_adata 1160s X = X_type(random_state.binomial(100, 0.005, (M, N)).astype(X_dtype)) 1160s /usr/lib/python3.13/functools.py:934: in wrapper 1160s return dispatch(args[0].__class__)(*args, **kw) 1160s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1160s 1160s val = array([[0., 0., 1., 1., 1., 0., 0., 0., 1., 0., 0., 0., 3., 0., 1.], 1160s [0., 0., 0., 2., 1., 0., 0., 0., 0., 1., 0...0., 1., 0., 0., 0., 0., 1.], 1160s [0., 0., 0., 0., 2., 0., 0., 0., 0., 0., 1., 0., 0., 0., 0.]], 1160s dtype=float32) 1160s typ = 1160s 1160s @singledispatch 1160s def as_cupy(val, typ=None): 1160s """ 1160s Rough conversion function 1160s 1160s Will try to infer target type from input type if not specified. 1160s """ 1160s if typ is None: 1160s typ = resolve_cupy_type(val) 1160s 1160s if issubclass(typ, CupyArray): 1160s import cupy as cp 1160s 1160s if isinstance(val, CSMatrix): 1160s val = val.toarray() 1160s return cp.array(val) 1160s elif issubclass(typ, CupyCSRMatrix): 1160s > import cupy as cp 1160s E ModuleNotFoundError: No module named 'cupy' 1160s 1160s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:1016: ModuleNotFoundError 1160s _______ test_view_of_view[cupy_csr-list_bool_subset-sparray_bool_subset] _______ 1160s 1160s matrix_type = functools.partial(, typ=) 1160s subset_func = 1160s subset_func2 = 1160s 1160s def test_view_of_view(matrix_type, subset_func, subset_func2): 1160s > adata = gen_adata((30, 15), X_type=matrix_type) 1160s 1160s tests/test_views.py:531: 1160s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1160s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:346: in gen_adata 1160s X = X_type(random_state.binomial(100, 0.005, (M, N)).astype(X_dtype)) 1160s /usr/lib/python3.13/functools.py:934: in wrapper 1160s return dispatch(args[0].__class__)(*args, **kw) 1160s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1160s 1160s val = array([[0., 1., 0., 2., 0., 0., 1., 1., 0., 0., 0., 0., 0., 0., 0.], 1160s [0., 1., 1., 0., 0., 0., 0., 0., 0., 1., 0...0., 1., 1., 0., 1., 4., 2.], 1160s [1., 0., 1., 1., 0., 0., 1., 1., 1., 0., 1., 1., 0., 0., 2.]], 1160s dtype=float32) 1160s typ = 1160s 1160s @singledispatch 1160s def as_cupy(val, typ=None): 1160s """ 1160s Rough conversion function 1160s 1160s Will try to infer target type from input type if not specified. 1160s """ 1160s if typ is None: 1160s typ = resolve_cupy_type(val) 1160s 1160s if issubclass(typ, CupyArray): 1160s import cupy as cp 1160s 1160s if isinstance(val, CSMatrix): 1160s val = val.toarray() 1160s return cp.array(val) 1160s elif issubclass(typ, CupyCSRMatrix): 1160s > import cupy as cp 1160s E ModuleNotFoundError: No module named 'cupy' 1160s 1160s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:1016: ModuleNotFoundError 1160s _________ test_view_of_view[cupy_csr-matrix_bool_subset-array_subset] __________ 1160s 1160s matrix_type = functools.partial(, typ=) 1160s subset_func = 1160s subset_func2 = 1160s 1160s def test_view_of_view(matrix_type, subset_func, subset_func2): 1160s > adata = gen_adata((30, 15), X_type=matrix_type) 1160s 1160s tests/test_views.py:531: 1160s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1160s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:346: in gen_adata 1160s X = X_type(random_state.binomial(100, 0.005, (M, N)).astype(X_dtype)) 1160s /usr/lib/python3.13/functools.py:934: in wrapper 1160s return dispatch(args[0].__class__)(*args, **kw) 1160s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1160s 1160s val = array([[0., 0., 1., 1., 2., 0., 0., 1., 0., 0., 0., 1., 1., 1., 0.], 1160s [0., 0., 0., 0., 0., 0., 0., 1., 0., 1., 1...0., 0., 0., 1., 1., 2., 0.], 1160s [0., 0., 0., 0., 0., 0., 0., 0., 2., 1., 1., 1., 0., 0., 0.]], 1160s dtype=float32) 1160s typ = 1160s 1160s @singledispatch 1160s def as_cupy(val, typ=None): 1160s """ 1160s Rough conversion function 1160s 1160s Will try to infer target type from input type if not specified. 1160s """ 1160s if typ is None: 1160s typ = resolve_cupy_type(val) 1160s 1160s if issubclass(typ, CupyArray): 1160s import cupy as cp 1160s 1160s if isinstance(val, CSMatrix): 1160s val = val.toarray() 1160s return cp.array(val) 1160s elif issubclass(typ, CupyCSRMatrix): 1160s > import cupy as cp 1160s E ModuleNotFoundError: No module named 'cupy' 1160s 1160s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:1016: ModuleNotFoundError 1160s _________ test_view_of_view[cupy_csr-matrix_bool_subset-slice_subset] __________ 1160s 1160s matrix_type = functools.partial(, typ=) 1160s subset_func = 1160s subset_func2 = 1160s 1160s def test_view_of_view(matrix_type, subset_func, subset_func2): 1160s > adata = gen_adata((30, 15), X_type=matrix_type) 1160s 1160s tests/test_views.py:531: 1160s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1160s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:346: in gen_adata 1160s X = X_type(random_state.binomial(100, 0.005, (M, N)).astype(X_dtype)) 1160s /usr/lib/python3.13/functools.py:934: in wrapper 1160s return dispatch(args[0].__class__)(*args, **kw) 1160s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1160s 1160s val = array([[0., 1., 0., 0., 1., 1., 0., 0., 0., 1., 0., 0., 0., 0., 0.], 1160s [0., 1., 0., 0., 1., 1., 0., 1., 0., 0., 1...0., 0., 1., 0., 0., 0., 0.], 1160s [3., 0., 1., 2., 0., 0., 1., 0., 0., 1., 1., 0., 0., 0., 0.]], 1160s dtype=float32) 1160s typ = 1160s 1160s @singledispatch 1160s def as_cupy(val, typ=None): 1160s """ 1160s Rough conversion function 1160s 1160s Will try to infer target type from input type if not specified. 1160s """ 1160s if typ is None: 1160s typ = resolve_cupy_type(val) 1160s 1160s if issubclass(typ, CupyArray): 1160s import cupy as cp 1160s 1160s if isinstance(val, CSMatrix): 1160s val = val.toarray() 1160s return cp.array(val) 1160s elif issubclass(typ, CupyCSRMatrix): 1160s > import cupy as cp 1160s E ModuleNotFoundError: No module named 'cupy' 1160s 1160s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:1016: ModuleNotFoundError 1160s _________ test_view_of_view[cupy_csr-matrix_bool_subset-single_subset] _________ 1160s 1160s matrix_type = functools.partial(, typ=) 1160s subset_func = 1160s subset_func2 = 1160s 1160s def test_view_of_view(matrix_type, subset_func, subset_func2): 1160s > adata = gen_adata((30, 15), X_type=matrix_type) 1160s 1160s tests/test_views.py:531: 1160s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1160s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:346: in gen_adata 1160s X = X_type(random_state.binomial(100, 0.005, (M, N)).astype(X_dtype)) 1160s /usr/lib/python3.13/functools.py:934: in wrapper 1160s return dispatch(args[0].__class__)(*args, **kw) 1160s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1160s 1160s val = array([[1., 2., 0., 0., 1., 1., 0., 0., 1., 0., 1., 1., 1., 1., 1.], 1160s [0., 0., 0., 1., 0., 1., 0., 1., 1., 1., 2...0., 1., 0., 0., 1., 0., 1.], 1160s [0., 1., 0., 1., 0., 1., 1., 0., 1., 0., 1., 0., 0., 1., 0.]], 1160s dtype=float32) 1160s typ = 1160s 1160s @singledispatch 1160s def as_cupy(val, typ=None): 1160s """ 1160s Rough conversion function 1160s 1160s Will try to infer target type from input type if not specified. 1160s """ 1160s if typ is None: 1160s typ = resolve_cupy_type(val) 1160s 1160s if issubclass(typ, CupyArray): 1160s import cupy as cp 1160s 1160s if isinstance(val, CSMatrix): 1160s val = val.toarray() 1160s return cp.array(val) 1160s elif issubclass(typ, CupyCSRMatrix): 1160s > import cupy as cp 1160s E ModuleNotFoundError: No module named 'cupy' 1160s 1160s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:1016: ModuleNotFoundError 1160s _______ test_view_of_view[cupy_csr-matrix_bool_subset-array_int_subset] ________ 1160s 1160s matrix_type = functools.partial(, typ=) 1160s subset_func = 1160s subset_func2 = 1160s 1160s def test_view_of_view(matrix_type, subset_func, subset_func2): 1160s > adata = gen_adata((30, 15), X_type=matrix_type) 1160s 1160s tests/test_views.py:531: 1160s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1160s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:346: in gen_adata 1160s X = X_type(random_state.binomial(100, 0.005, (M, N)).astype(X_dtype)) 1160s /usr/lib/python3.13/functools.py:934: in wrapper 1160s return dispatch(args[0].__class__)(*args, **kw) 1160s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1160s 1160s val = array([[1., 1., 1., 2., 1., 1., 0., 1., 0., 1., 0., 1., 0., 0., 0.], 1160s [0., 0., 1., 0., 0., 1., 0., 1., 0., 0., 0...2., 1., 0., 0., 0., 0., 0.], 1160s [0., 0., 1., 0., 0., 0., 0., 0., 1., 0., 1., 2., 0., 0., 0.]], 1160s dtype=float32) 1160s typ = 1160s 1160s @singledispatch 1160s def as_cupy(val, typ=None): 1160s """ 1160s Rough conversion function 1160s 1160s Will try to infer target type from input type if not specified. 1160s """ 1160s if typ is None: 1160s typ = resolve_cupy_type(val) 1160s 1160s if issubclass(typ, CupyArray): 1160s import cupy as cp 1160s 1160s if isinstance(val, CSMatrix): 1160s val = val.toarray() 1160s return cp.array(val) 1160s elif issubclass(typ, CupyCSRMatrix): 1160s > import cupy as cp 1160s E ModuleNotFoundError: No module named 'cupy' 1160s 1160s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:1016: ModuleNotFoundError 1160s ________ test_view_of_view[cupy_csr-matrix_bool_subset-list_int_subset] ________ 1160s 1160s matrix_type = functools.partial(, typ=) 1160s subset_func = 1160s subset_func2 = 1160s 1160s def test_view_of_view(matrix_type, subset_func, subset_func2): 1160s > adata = gen_adata((30, 15), X_type=matrix_type) 1160s 1160s tests/test_views.py:531: 1160s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1160s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:346: in gen_adata 1160s X = X_type(random_state.binomial(100, 0.005, (M, N)).astype(X_dtype)) 1160s /usr/lib/python3.13/functools.py:934: in wrapper 1160s return dispatch(args[0].__class__)(*args, **kw) 1160s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1160s 1160s val = array([[0., 1., 1., 1., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 1.], 1160s [0., 0., 0., 0., 0., 0., 0., 1., 2., 1., 1...0., 0., 2., 1., 1., 3., 1.], 1160s [0., 1., 1., 0., 1., 0., 1., 0., 1., 0., 1., 1., 1., 1., 2.]], 1160s dtype=float32) 1160s typ = 1160s 1160s @singledispatch 1160s def as_cupy(val, typ=None): 1160s """ 1160s Rough conversion function 1160s 1160s Will try to infer target type from input type if not specified. 1160s """ 1160s if typ is None: 1160s typ = resolve_cupy_type(val) 1160s 1160s if issubclass(typ, CupyArray): 1160s import cupy as cp 1160s 1160s if isinstance(val, CSMatrix): 1160s val = val.toarray() 1160s return cp.array(val) 1160s elif issubclass(typ, CupyCSRMatrix): 1160s > import cupy as cp 1160s E ModuleNotFoundError: No module named 'cupy' 1160s 1160s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:1016: ModuleNotFoundError 1160s _______ test_view_of_view[cupy_csr-matrix_bool_subset-array_bool_subset] _______ 1160s 1160s matrix_type = functools.partial(, typ=) 1160s subset_func = 1160s subset_func2 = 1160s 1160s def test_view_of_view(matrix_type, subset_func, subset_func2): 1160s > adata = gen_adata((30, 15), X_type=matrix_type) 1160s 1160s tests/test_views.py:531: 1160s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1160s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:346: in gen_adata 1160s X = X_type(random_state.binomial(100, 0.005, (M, N)).astype(X_dtype)) 1160s /usr/lib/python3.13/functools.py:934: in wrapper 1160s return dispatch(args[0].__class__)(*args, **kw) 1160s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1160s 1160s val = array([[0., 0., 0., 0., 0., 0., 2., 0., 0., 0., 0., 1., 2., 0., 0.], 1160s [1., 1., 0., 0., 0., 0., 2., 2., 0., 0., 0...1., 1., 0., 0., 0., 0., 0.], 1160s [1., 1., 2., 0., 1., 0., 0., 1., 1., 0., 3., 1., 0., 0., 3.]], 1160s dtype=float32) 1160s typ = 1160s 1160s @singledispatch 1160s def as_cupy(val, typ=None): 1160s """ 1160s Rough conversion function 1160s 1160s Will try to infer target type from input type if not specified. 1160s """ 1160s if typ is None: 1160s typ = resolve_cupy_type(val) 1160s 1160s if issubclass(typ, CupyArray): 1160s import cupy as cp 1160s 1160s if isinstance(val, CSMatrix): 1160s val = val.toarray() 1160s return cp.array(val) 1160s elif issubclass(typ, CupyCSRMatrix): 1160s > import cupy as cp 1160s E ModuleNotFoundError: No module named 'cupy' 1160s 1160s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:1016: ModuleNotFoundError 1160s _______ test_view_of_view[cupy_csr-matrix_bool_subset-list_bool_subset] ________ 1160s 1160s matrix_type = functools.partial(, typ=) 1160s subset_func = 1160s subset_func2 = 1160s 1160s def test_view_of_view(matrix_type, subset_func, subset_func2): 1160s > adata = gen_adata((30, 15), X_type=matrix_type) 1160s 1160s tests/test_views.py:531: 1160s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1160s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:346: in gen_adata 1160s X = X_type(random_state.binomial(100, 0.005, (M, N)).astype(X_dtype)) 1160s /usr/lib/python3.13/functools.py:934: in wrapper 1160s return dispatch(args[0].__class__)(*args, **kw) 1160s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1160s 1160s val = array([[0., 0., 0., 0., 0., 0., 0., 1., 2., 2., 1., 0., 2., 1., 0.], 1160s [1., 1., 0., 0., 1., 2., 1., 0., 1., 0., 1...0., 1., 1., 1., 0., 0., 0.], 1160s [2., 0., 1., 1., 1., 0., 1., 0., 1., 0., 1., 1., 0., 1., 0.]], 1160s dtype=float32) 1160s typ = 1160s 1160s @singledispatch 1160s def as_cupy(val, typ=None): 1160s """ 1160s Rough conversion function 1160s 1160s Will try to infer target type from input type if not specified. 1160s """ 1160s if typ is None: 1160s typ = resolve_cupy_type(val) 1160s 1160s if issubclass(typ, CupyArray): 1160s import cupy as cp 1160s 1160s if isinstance(val, CSMatrix): 1160s val = val.toarray() 1160s return cp.array(val) 1160s elif issubclass(typ, CupyCSRMatrix): 1160s > import cupy as cp 1160s E ModuleNotFoundError: No module named 'cupy' 1160s 1160s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:1016: ModuleNotFoundError 1160s ______ test_view_of_view[cupy_csr-matrix_bool_subset-matrix_bool_subset] _______ 1160s 1160s matrix_type = functools.partial(, typ=) 1160s subset_func = 1160s subset_func2 = 1160s 1160s def test_view_of_view(matrix_type, subset_func, subset_func2): 1160s > adata = gen_adata((30, 15), X_type=matrix_type) 1160s 1160s tests/test_views.py:531: 1160s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1160s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:346: in gen_adata 1160s X = X_type(random_state.binomial(100, 0.005, (M, N)).astype(X_dtype)) 1160s /usr/lib/python3.13/functools.py:934: in wrapper 1160s return dispatch(args[0].__class__)(*args, **kw) 1160s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1160s 1160s val = array([[0., 0., 0., 1., 0., 0., 0., 2., 0., 1., 0., 0., 0., 1., 2.], 1160s [0., 0., 1., 0., 1., 0., 0., 0., 0., 1., 0...2., 0., 1., 0., 0., 0., 0.], 1160s [0., 1., 0., 0., 2., 2., 0., 0., 1., 1., 0., 0., 0., 0., 0.]], 1160s dtype=float32) 1160s typ = 1160s 1160s @singledispatch 1160s def as_cupy(val, typ=None): 1160s """ 1160s Rough conversion function 1160s 1160s Will try to infer target type from input type if not specified. 1160s """ 1160s if typ is None: 1160s typ = resolve_cupy_type(val) 1160s 1160s if issubclass(typ, CupyArray): 1160s import cupy as cp 1160s 1160s if isinstance(val, CSMatrix): 1160s val = val.toarray() 1160s return cp.array(val) 1160s elif issubclass(typ, CupyCSRMatrix): 1160s > import cupy as cp 1160s E ModuleNotFoundError: No module named 'cupy' 1160s 1160s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:1016: ModuleNotFoundError 1160s _____ test_view_of_view[cupy_csr-matrix_bool_subset-spmatrix_bool_subset] ______ 1160s 1160s matrix_type = functools.partial(, typ=) 1160s subset_func = 1160s subset_func2 = 1160s 1160s def test_view_of_view(matrix_type, subset_func, subset_func2): 1160s > adata = gen_adata((30, 15), X_type=matrix_type) 1160s 1160s tests/test_views.py:531: 1160s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1160s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:346: in gen_adata 1160s X = X_type(random_state.binomial(100, 0.005, (M, N)).astype(X_dtype)) 1160s /usr/lib/python3.13/functools.py:934: in wrapper 1160s return dispatch(args[0].__class__)(*args, **kw) 1160s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1160s 1160s val = array([[0., 0., 0., 4., 0., 0., 0., 0., 1., 1., 1., 1., 1., 2., 0.], 1160s [1., 0., 0., 0., 0., 0., 0., 0., 3., 1., 0...1., 0., 2., 0., 0., 0., 1.], 1160s [1., 0., 1., 1., 0., 1., 0., 0., 0., 0., 2., 1., 1., 0., 1.]], 1160s dtype=float32) 1160s typ = 1160s 1160s @singledispatch 1160s def as_cupy(val, typ=None): 1160s """ 1160s Rough conversion function 1160s 1160s Will try to infer target type from input type if not specified. 1160s """ 1160s if typ is None: 1160s typ = resolve_cupy_type(val) 1160s 1160s if issubclass(typ, CupyArray): 1160s import cupy as cp 1160s 1160s if isinstance(val, CSMatrix): 1160s val = val.toarray() 1160s return cp.array(val) 1160s elif issubclass(typ, CupyCSRMatrix): 1160s > import cupy as cp 1160s E ModuleNotFoundError: No module named 'cupy' 1160s 1160s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:1016: ModuleNotFoundError 1160s ______ test_view_of_view[cupy_csr-matrix_bool_subset-sparray_bool_subset] ______ 1160s 1160s matrix_type = functools.partial(, typ=) 1160s subset_func = 1160s subset_func2 = 1160s 1160s def test_view_of_view(matrix_type, subset_func, subset_func2): 1160s > adata = gen_adata((30, 15), X_type=matrix_type) 1160s 1160s tests/test_views.py:531: 1160s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1160s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:346: in gen_adata 1160s X = X_type(random_state.binomial(100, 0.005, (M, N)).astype(X_dtype)) 1160s /usr/lib/python3.13/functools.py:934: in wrapper 1160s return dispatch(args[0].__class__)(*args, **kw) 1160s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1160s 1160s val = array([[0., 0., 0., 1., 0., 0., 0., 0., 0., 0., 0., 0., 1., 0., 0.], 1160s [0., 1., 0., 0., 0., 0., 0., 1., 0., 0., 0...0., 1., 0., 2., 0., 0., 2.], 1160s [3., 1., 3., 0., 0., 1., 0., 0., 0., 0., 2., 0., 1., 0., 2.]], 1160s dtype=float32) 1160s typ = 1160s 1160s @singledispatch 1160s def as_cupy(val, typ=None): 1160s """ 1160s Rough conversion function 1160s 1160s Will try to infer target type from input type if not specified. 1160s """ 1160s if typ is None: 1160s typ = resolve_cupy_type(val) 1160s 1160s if issubclass(typ, CupyArray): 1160s import cupy as cp 1160s 1160s if isinstance(val, CSMatrix): 1160s val = val.toarray() 1160s return cp.array(val) 1160s elif issubclass(typ, CupyCSRMatrix): 1160s > import cupy as cp 1160s E ModuleNotFoundError: No module named 'cupy' 1160s 1160s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:1016: ModuleNotFoundError 1160s ________ test_view_of_view[cupy_csr-spmatrix_bool_subset-array_subset] _________ 1160s 1160s matrix_type = functools.partial(, typ=) 1160s subset_func = 1160s subset_func2 = 1160s 1160s def test_view_of_view(matrix_type, subset_func, subset_func2): 1160s > adata = gen_adata((30, 15), X_type=matrix_type) 1160s 1160s tests/test_views.py:531: 1160s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1160s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:346: in gen_adata 1160s X = X_type(random_state.binomial(100, 0.005, (M, N)).astype(X_dtype)) 1160s /usr/lib/python3.13/functools.py:934: in wrapper 1160s return dispatch(args[0].__class__)(*args, **kw) 1160s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1160s 1160s val = array([[0., 0., 0., 0., 1., 1., 1., 1., 1., 1., 3., 0., 0., 2., 1.], 1160s [1., 0., 0., 2., 0., 1., 0., 1., 0., 0., 1...0., 0., 1., 0., 0., 0., 0.], 1160s [0., 1., 0., 1., 1., 0., 0., 0., 0., 0., 0., 0., 1., 1., 0.]], 1160s dtype=float32) 1160s typ = 1160s 1160s @singledispatch 1160s def as_cupy(val, typ=None): 1160s """ 1160s Rough conversion function 1160s 1160s Will try to infer target type from input type if not specified. 1160s """ 1160s if typ is None: 1160s typ = resolve_cupy_type(val) 1160s 1160s if issubclass(typ, CupyArray): 1160s import cupy as cp 1160s 1160s if isinstance(val, CSMatrix): 1160s val = val.toarray() 1160s return cp.array(val) 1160s elif issubclass(typ, CupyCSRMatrix): 1160s > import cupy as cp 1160s E ModuleNotFoundError: No module named 'cupy' 1160s 1160s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:1016: ModuleNotFoundError 1160s ________ test_view_of_view[cupy_csr-spmatrix_bool_subset-slice_subset] _________ 1160s 1160s matrix_type = functools.partial(, typ=) 1160s subset_func = 1160s subset_func2 = 1160s 1160s def test_view_of_view(matrix_type, subset_func, subset_func2): 1160s > adata = gen_adata((30, 15), X_type=matrix_type) 1160s 1160s tests/test_views.py:531: 1160s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1160s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:346: in gen_adata 1160s X = X_type(random_state.binomial(100, 0.005, (M, N)).astype(X_dtype)) 1160s /usr/lib/python3.13/functools.py:934: in wrapper 1160s return dispatch(args[0].__class__)(*args, **kw) 1160s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1160s 1160s val = array([[0., 1., 0., 1., 0., 1., 1., 0., 1., 0., 1., 2., 0., 2., 0.], 1160s [0., 0., 1., 1., 4., 1., 2., 0., 0., 0., 1...0., 0., 1., 0., 0., 1., 0.], 1160s [1., 0., 0., 0., 0., 1., 1., 0., 1., 0., 0., 0., 0., 0., 1.]], 1160s dtype=float32) 1160s typ = 1160s 1160s @singledispatch 1160s def as_cupy(val, typ=None): 1160s """ 1160s Rough conversion function 1160s 1160s Will try to infer target type from input type if not specified. 1160s """ 1160s if typ is None: 1160s typ = resolve_cupy_type(val) 1160s 1160s if issubclass(typ, CupyArray): 1160s import cupy as cp 1160s 1160s if isinstance(val, CSMatrix): 1160s val = val.toarray() 1160s return cp.array(val) 1160s elif issubclass(typ, CupyCSRMatrix): 1160s > import cupy as cp 1160s E ModuleNotFoundError: No module named 'cupy' 1160s 1160s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:1016: ModuleNotFoundError 1160s ________ test_view_of_view[cupy_csr-spmatrix_bool_subset-single_subset] ________ 1160s 1160s matrix_type = functools.partial(, typ=) 1160s subset_func = 1160s subset_func2 = 1160s 1160s def test_view_of_view(matrix_type, subset_func, subset_func2): 1160s > adata = gen_adata((30, 15), X_type=matrix_type) 1160s 1160s tests/test_views.py:531: 1160s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1160s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:346: in gen_adata 1160s X = X_type(random_state.binomial(100, 0.005, (M, N)).astype(X_dtype)) 1160s /usr/lib/python3.13/functools.py:934: in wrapper 1160s return dispatch(args[0].__class__)(*args, **kw) 1160s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1160s 1160s val = array([[0., 0., 2., 0., 2., 1., 1., 1., 2., 2., 1., 0., 0., 2., 0.], 1160s [0., 1., 0., 0., 0., 2., 0., 2., 0., 0., 3...0., 0., 0., 1., 0., 0., 0.], 1160s [0., 0., 1., 0., 1., 0., 0., 0., 0., 1., 2., 0., 0., 0., 0.]], 1160s dtype=float32) 1160s typ = 1160s 1160s @singledispatch 1160s def as_cupy(val, typ=None): 1160s """ 1160s Rough conversion function 1160s 1160s Will try to infer target type from input type if not specified. 1160s """ 1160s if typ is None: 1160s typ = resolve_cupy_type(val) 1160s 1160s if issubclass(typ, CupyArray): 1160s import cupy as cp 1160s 1160s if isinstance(val, CSMatrix): 1160s val = val.toarray() 1160s return cp.array(val) 1160s elif issubclass(typ, CupyCSRMatrix): 1160s > import cupy as cp 1160s E ModuleNotFoundError: No module named 'cupy' 1160s 1160s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:1016: ModuleNotFoundError 1160s ______ test_view_of_view[cupy_csr-spmatrix_bool_subset-array_int_subset] _______ 1160s 1160s matrix_type = functools.partial(, typ=) 1160s subset_func = 1160s subset_func2 = 1160s 1160s def test_view_of_view(matrix_type, subset_func, subset_func2): 1160s > adata = gen_adata((30, 15), X_type=matrix_type) 1160s 1160s tests/test_views.py:531: 1160s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1160s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:346: in gen_adata 1160s X = X_type(random_state.binomial(100, 0.005, (M, N)).astype(X_dtype)) 1160s /usr/lib/python3.13/functools.py:934: in wrapper 1160s return dispatch(args[0].__class__)(*args, **kw) 1160s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1160s 1160s val = array([[2., 1., 1., 0., 1., 0., 1., 0., 0., 2., 0., 0., 2., 1., 0.], 1160s [0., 0., 0., 0., 0., 0., 1., 1., 0., 0., 0...0., 1., 0., 0., 0., 1., 0.], 1160s [0., 0., 1., 0., 0., 1., 0., 1., 0., 0., 1., 0., 1., 0., 1.]], 1160s dtype=float32) 1160s typ = 1160s 1160s @singledispatch 1160s def as_cupy(val, typ=None): 1160s """ 1160s Rough conversion function 1160s 1160s Will try to infer target type from input type if not specified. 1160s """ 1160s if typ is None: 1160s typ = resolve_cupy_type(val) 1160s 1160s if issubclass(typ, CupyArray): 1160s import cupy as cp 1160s 1160s if isinstance(val, CSMatrix): 1160s val = val.toarray() 1160s return cp.array(val) 1160s elif issubclass(typ, CupyCSRMatrix): 1160s > import cupy as cp 1160s E ModuleNotFoundError: No module named 'cupy' 1160s 1160s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:1016: ModuleNotFoundError 1160s _______ test_view_of_view[cupy_csr-spmatrix_bool_subset-list_int_subset] _______ 1160s 1160s matrix_type = functools.partial(, typ=) 1160s subset_func = 1160s subset_func2 = 1160s 1160s def test_view_of_view(matrix_type, subset_func, subset_func2): 1160s > adata = gen_adata((30, 15), X_type=matrix_type) 1160s 1160s tests/test_views.py:531: 1160s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1160s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:346: in gen_adata 1160s X = X_type(random_state.binomial(100, 0.005, (M, N)).astype(X_dtype)) 1160s /usr/lib/python3.13/functools.py:934: in wrapper 1160s return dispatch(args[0].__class__)(*args, **kw) 1160s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1160s 1160s val = array([[2., 1., 0., 0., 1., 0., 3., 0., 0., 3., 0., 1., 1., 1., 1.], 1160s [0., 0., 2., 0., 1., 1., 0., 1., 1., 0., 0...1., 0., 0., 0., 1., 0., 0.], 1160s [1., 0., 1., 0., 1., 0., 0., 0., 0., 0., 0., 0., 0., 2., 1.]], 1160s dtype=float32) 1160s typ = 1160s 1160s @singledispatch 1160s def as_cupy(val, typ=None): 1160s """ 1160s Rough conversion function 1160s 1160s Will try to infer target type from input type if not specified. 1160s """ 1160s if typ is None: 1160s typ = resolve_cupy_type(val) 1160s 1160s if issubclass(typ, CupyArray): 1160s import cupy as cp 1160s 1160s if isinstance(val, CSMatrix): 1160s val = val.toarray() 1160s return cp.array(val) 1160s elif issubclass(typ, CupyCSRMatrix): 1160s > import cupy as cp 1160s E ModuleNotFoundError: No module named 'cupy' 1160s 1160s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:1016: ModuleNotFoundError 1160s ______ test_view_of_view[cupy_csr-spmatrix_bool_subset-array_bool_subset] ______ 1160s 1160s matrix_type = functools.partial(, typ=) 1160s subset_func = 1160s subset_func2 = 1160s 1160s def test_view_of_view(matrix_type, subset_func, subset_func2): 1160s > adata = gen_adata((30, 15), X_type=matrix_type) 1160s 1160s tests/test_views.py:531: 1160s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1160s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:346: in gen_adata 1160s X = X_type(random_state.binomial(100, 0.005, (M, N)).astype(X_dtype)) 1160s /usr/lib/python3.13/functools.py:934: in wrapper 1160s return dispatch(args[0].__class__)(*args, **kw) 1160s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1160s 1160s val = array([[0., 1., 0., 0., 1., 1., 2., 0., 0., 0., 1., 3., 0., 0., 0.], 1160s [0., 3., 0., 2., 0., 0., 1., 0., 1., 0., 0...0., 1., 0., 0., 0., 0., 1.], 1160s [0., 0., 0., 1., 0., 1., 0., 0., 0., 1., 2., 1., 1., 2., 1.]], 1160s dtype=float32) 1160s typ = 1160s 1160s @singledispatch 1160s def as_cupy(val, typ=None): 1160s """ 1160s Rough conversion function 1160s 1160s Will try to infer target type from input type if not specified. 1160s """ 1160s if typ is None: 1160s typ = resolve_cupy_type(val) 1160s 1160s if issubclass(typ, CupyArray): 1160s import cupy as cp 1160s 1160s if isinstance(val, CSMatrix): 1160s val = val.toarray() 1160s return cp.array(val) 1160s elif issubclass(typ, CupyCSRMatrix): 1160s > import cupy as cp 1160s E ModuleNotFoundError: No module named 'cupy' 1160s 1160s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:1016: ModuleNotFoundError 1160s ______ test_view_of_view[cupy_csr-spmatrix_bool_subset-list_bool_subset] _______ 1160s 1160s matrix_type = functools.partial(, typ=) 1160s subset_func = 1160s subset_func2 = 1160s 1160s def test_view_of_view(matrix_type, subset_func, subset_func2): 1160s > adata = gen_adata((30, 15), X_type=matrix_type) 1160s 1160s tests/test_views.py:531: 1160s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1160s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:346: in gen_adata 1160s X = X_type(random_state.binomial(100, 0.005, (M, N)).astype(X_dtype)) 1160s /usr/lib/python3.13/functools.py:934: in wrapper 1160s return dispatch(args[0].__class__)(*args, **kw) 1160s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1160s 1160s val = array([[2., 1., 1., 1., 1., 0., 1., 0., 0., 1., 0., 0., 1., 0., 1.], 1160s [0., 0., 0., 1., 0., 0., 1., 0., 0., 0., 2...0., 2., 0., 1., 0., 1., 0.], 1160s [0., 1., 0., 0., 0., 2., 1., 1., 0., 2., 0., 0., 0., 0., 0.]], 1160s dtype=float32) 1160s typ = 1160s 1160s @singledispatch 1160s def as_cupy(val, typ=None): 1160s """ 1160s Rough conversion function 1160s 1160s Will try to infer target type from input type if not specified. 1160s """ 1160s if typ is None: 1160s typ = resolve_cupy_type(val) 1160s 1160s if issubclass(typ, CupyArray): 1160s import cupy as cp 1160s 1160s if isinstance(val, CSMatrix): 1160s val = val.toarray() 1160s return cp.array(val) 1160s elif issubclass(typ, CupyCSRMatrix): 1160s > import cupy as cp 1160s E ModuleNotFoundError: No module named 'cupy' 1160s 1160s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:1016: ModuleNotFoundError 1160s _____ test_view_of_view[cupy_csr-spmatrix_bool_subset-matrix_bool_subset] ______ 1160s 1160s matrix_type = functools.partial(, typ=) 1160s subset_func = 1160s subset_func2 = 1160s 1160s def test_view_of_view(matrix_type, subset_func, subset_func2): 1160s > adata = gen_adata((30, 15), X_type=matrix_type) 1160s 1160s tests/test_views.py:531: 1160s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1160s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:346: in gen_adata 1160s X = X_type(random_state.binomial(100, 0.005, (M, N)).astype(X_dtype)) 1160s /usr/lib/python3.13/functools.py:934: in wrapper 1160s return dispatch(args[0].__class__)(*args, **kw) 1160s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1160s 1160s val = array([[0., 0., 2., 1., 0., 1., 2., 0., 1., 0., 0., 1., 0., 0., 0.], 1160s [0., 0., 0., 0., 2., 0., 2., 0., 0., 0., 1...0., 0., 1., 1., 1., 0., 2.], 1160s [1., 0., 0., 1., 1., 1., 0., 0., 0., 0., 0., 0., 0., 1., 0.]], 1160s dtype=float32) 1160s typ = 1160s 1160s @singledispatch 1160s def as_cupy(val, typ=None): 1160s """ 1160s Rough conversion function 1160s 1160s Will try to infer target type from input type if not specified. 1160s """ 1160s if typ is None: 1160s typ = resolve_cupy_type(val) 1160s 1160s if issubclass(typ, CupyArray): 1160s import cupy as cp 1160s 1160s if isinstance(val, CSMatrix): 1160s val = val.toarray() 1160s return cp.array(val) 1160s elif issubclass(typ, CupyCSRMatrix): 1160s > import cupy as cp 1160s E ModuleNotFoundError: No module named 'cupy' 1160s 1160s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:1016: ModuleNotFoundError 1160s ____ test_view_of_view[cupy_csr-spmatrix_bool_subset-spmatrix_bool_subset] _____ 1160s 1160s matrix_type = functools.partial(, typ=) 1160s subset_func = 1160s subset_func2 = 1160s 1160s def test_view_of_view(matrix_type, subset_func, subset_func2): 1160s > adata = gen_adata((30, 15), X_type=matrix_type) 1160s 1160s tests/test_views.py:531: 1160s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1160s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:346: in gen_adata 1160s X = X_type(random_state.binomial(100, 0.005, (M, N)).astype(X_dtype)) 1160s /usr/lib/python3.13/functools.py:934: in wrapper 1160s return dispatch(args[0].__class__)(*args, **kw) 1160s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1160s 1160s val = array([[0., 2., 0., 0., 0., 2., 1., 0., 2., 0., 0., 1., 0., 2., 1.], 1160s [1., 0., 1., 0., 0., 1., 0., 2., 0., 0., 1...0., 0., 1., 1., 0., 1., 0.], 1160s [1., 0., 0., 1., 0., 1., 0., 2., 1., 0., 0., 0., 0., 0., 1.]], 1160s dtype=float32) 1160s typ = 1160s 1160s @singledispatch 1160s def as_cupy(val, typ=None): 1160s """ 1160s Rough conversion function 1160s 1160s Will try to infer target type from input type if not specified. 1160s """ 1160s if typ is None: 1160s typ = resolve_cupy_type(val) 1160s 1160s if issubclass(typ, CupyArray): 1160s import cupy as cp 1160s 1160s if isinstance(val, CSMatrix): 1160s val = val.toarray() 1160s return cp.array(val) 1160s elif issubclass(typ, CupyCSRMatrix): 1160s > import cupy as cp 1160s E ModuleNotFoundError: No module named 'cupy' 1160s 1160s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:1016: ModuleNotFoundError 1160s _____ test_view_of_view[cupy_csr-spmatrix_bool_subset-sparray_bool_subset] _____ 1160s 1160s matrix_type = functools.partial(, typ=) 1160s subset_func = 1160s subset_func2 = 1160s 1160s def test_view_of_view(matrix_type, subset_func, subset_func2): 1160s > adata = gen_adata((30, 15), X_type=matrix_type) 1160s 1160s tests/test_views.py:531: 1160s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1160s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:346: in gen_adata 1160s X = X_type(random_state.binomial(100, 0.005, (M, N)).astype(X_dtype)) 1160s /usr/lib/python3.13/functools.py:934: in wrapper 1160s return dispatch(args[0].__class__)(*args, **kw) 1160s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1160s 1160s val = array([[0., 0., 0., 0., 1., 2., 0., 2., 0., 0., 1., 0., 2., 1., 0.], 1160s [0., 0., 0., 1., 0., 2., 0., 2., 0., 0., 0...0., 1., 0., 1., 1., 0., 2.], 1160s [0., 0., 0., 0., 0., 0., 1., 0., 0., 0., 0., 0., 2., 0., 0.]], 1160s dtype=float32) 1160s typ = 1160s 1160s @singledispatch 1160s def as_cupy(val, typ=None): 1160s """ 1160s Rough conversion function 1160s 1160s Will try to infer target type from input type if not specified. 1160s """ 1160s if typ is None: 1160s typ = resolve_cupy_type(val) 1160s 1160s if issubclass(typ, CupyArray): 1160s import cupy as cp 1160s 1160s if isinstance(val, CSMatrix): 1160s val = val.toarray() 1160s return cp.array(val) 1160s elif issubclass(typ, CupyCSRMatrix): 1160s > import cupy as cp 1160s E ModuleNotFoundError: No module named 'cupy' 1160s 1160s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:1016: ModuleNotFoundError 1160s _________ test_view_of_view[cupy_csr-sparray_bool_subset-array_subset] _________ 1160s 1160s matrix_type = functools.partial(, typ=) 1160s subset_func = 1160s subset_func2 = 1160s 1160s def test_view_of_view(matrix_type, subset_func, subset_func2): 1160s > adata = gen_adata((30, 15), X_type=matrix_type) 1160s 1160s tests/test_views.py:531: 1160s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1160s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:346: in gen_adata 1160s X = X_type(random_state.binomial(100, 0.005, (M, N)).astype(X_dtype)) 1160s /usr/lib/python3.13/functools.py:934: in wrapper 1160s return dispatch(args[0].__class__)(*args, **kw) 1160s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1160s 1160s val = array([[1., 0., 2., 0., 1., 1., 0., 0., 0., 0., 0., 0., 1., 3., 0.], 1160s [0., 0., 0., 1., 0., 1., 0., 0., 1., 1., 1...1., 2., 1., 1., 2., 1., 2.], 1160s [1., 1., 0., 2., 0., 0., 1., 0., 0., 0., 0., 1., 1., 0., 0.]], 1160s dtype=float32) 1160s typ = 1160s 1160s @singledispatch 1160s def as_cupy(val, typ=None): 1160s """ 1160s Rough conversion function 1160s 1160s Will try to infer target type from input type if not specified. 1160s """ 1160s if typ is None: 1160s typ = resolve_cupy_type(val) 1160s 1160s if issubclass(typ, CupyArray): 1160s import cupy as cp 1160s 1160s if isinstance(val, CSMatrix): 1160s val = val.toarray() 1160s return cp.array(val) 1160s elif issubclass(typ, CupyCSRMatrix): 1160s > import cupy as cp 1160s E ModuleNotFoundError: No module named 'cupy' 1160s 1160s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:1016: ModuleNotFoundError 1160s _________ test_view_of_view[cupy_csr-sparray_bool_subset-slice_subset] _________ 1160s 1160s matrix_type = functools.partial(, typ=) 1160s subset_func = 1160s subset_func2 = 1160s 1160s def test_view_of_view(matrix_type, subset_func, subset_func2): 1160s > adata = gen_adata((30, 15), X_type=matrix_type) 1160s 1160s tests/test_views.py:531: 1160s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1160s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:346: in gen_adata 1160s X = X_type(random_state.binomial(100, 0.005, (M, N)).astype(X_dtype)) 1160s /usr/lib/python3.13/functools.py:934: in wrapper 1160s return dispatch(args[0].__class__)(*args, **kw) 1160s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1160s 1160s val = array([[0., 1., 0., 0., 1., 3., 1., 0., 0., 1., 0., 1., 1., 0., 1.], 1160s [1., 0., 1., 1., 0., 0., 0., 1., 0., 0., 1...2., 0., 0., 0., 0., 0., 0.], 1160s [2., 0., 0., 0., 0., 1., 1., 0., 0., 1., 2., 0., 0., 0., 2.]], 1160s dtype=float32) 1160s typ = 1160s 1160s @singledispatch 1160s def as_cupy(val, typ=None): 1160s """ 1160s Rough conversion function 1160s 1160s Will try to infer target type from input type if not specified. 1160s """ 1160s if typ is None: 1160s typ = resolve_cupy_type(val) 1160s 1160s if issubclass(typ, CupyArray): 1160s import cupy as cp 1160s 1160s if isinstance(val, CSMatrix): 1160s val = val.toarray() 1160s return cp.array(val) 1160s elif issubclass(typ, CupyCSRMatrix): 1160s > import cupy as cp 1160s E ModuleNotFoundError: No module named 'cupy' 1160s 1160s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:1016: ModuleNotFoundError 1160s ________ test_view_of_view[cupy_csr-sparray_bool_subset-single_subset] _________ 1160s 1160s matrix_type = functools.partial(, typ=) 1160s subset_func = 1160s subset_func2 = 1160s 1160s def test_view_of_view(matrix_type, subset_func, subset_func2): 1160s > adata = gen_adata((30, 15), X_type=matrix_type) 1160s 1160s tests/test_views.py:531: 1160s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1160s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:346: in gen_adata 1160s X = X_type(random_state.binomial(100, 0.005, (M, N)).astype(X_dtype)) 1160s /usr/lib/python3.13/functools.py:934: in wrapper 1160s return dispatch(args[0].__class__)(*args, **kw) 1160s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1160s 1160s val = array([[0., 0., 0., 0., 0., 0., 1., 0., 0., 0., 0., 0., 1., 1., 1.], 1160s [0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0...1., 1., 0., 1., 1., 0., 0.], 1160s [0., 0., 0., 1., 1., 1., 0., 1., 1., 2., 0., 1., 1., 0., 0.]], 1160s dtype=float32) 1160s typ = 1160s 1160s @singledispatch 1160s def as_cupy(val, typ=None): 1160s """ 1160s Rough conversion function 1160s 1160s Will try to infer target type from input type if not specified. 1160s """ 1160s if typ is None: 1160s typ = resolve_cupy_type(val) 1160s 1160s if issubclass(typ, CupyArray): 1160s import cupy as cp 1160s 1160s if isinstance(val, CSMatrix): 1160s val = val.toarray() 1160s return cp.array(val) 1160s elif issubclass(typ, CupyCSRMatrix): 1160s > import cupy as cp 1160s E ModuleNotFoundError: No module named 'cupy' 1160s 1160s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:1016: ModuleNotFoundError 1160s _______ test_view_of_view[cupy_csr-sparray_bool_subset-array_int_subset] _______ 1160s 1160s matrix_type = functools.partial(, typ=) 1160s subset_func = 1160s subset_func2 = 1160s 1160s def test_view_of_view(matrix_type, subset_func, subset_func2): 1160s > adata = gen_adata((30, 15), X_type=matrix_type) 1160s 1160s tests/test_views.py:531: 1160s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1160s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:346: in gen_adata 1160s X = X_type(random_state.binomial(100, 0.005, (M, N)).astype(X_dtype)) 1160s /usr/lib/python3.13/functools.py:934: in wrapper 1160s return dispatch(args[0].__class__)(*args, **kw) 1160s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1160s 1160s val = array([[1., 1., 0., 0., 0., 0., 0., 1., 0., 0., 2., 1., 0., 0., 1.], 1160s [1., 1., 1., 0., 0., 1., 0., 0., 0., 0., 0...1., 1., 0., 1., 0., 1., 0.], 1160s [1., 0., 0., 0., 0., 1., 0., 0., 1., 0., 1., 1., 0., 1., 1.]], 1160s dtype=float32) 1160s typ = 1160s 1160s @singledispatch 1160s def as_cupy(val, typ=None): 1160s """ 1160s Rough conversion function 1160s 1160s Will try to infer target type from input type if not specified. 1160s """ 1160s if typ is None: 1160s typ = resolve_cupy_type(val) 1160s 1160s if issubclass(typ, CupyArray): 1160s import cupy as cp 1160s 1160s if isinstance(val, CSMatrix): 1160s val = val.toarray() 1160s return cp.array(val) 1160s elif issubclass(typ, CupyCSRMatrix): 1160s > import cupy as cp 1160s E ModuleNotFoundError: No module named 'cupy' 1160s 1160s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:1016: ModuleNotFoundError 1160s _______ test_view_of_view[cupy_csr-sparray_bool_subset-list_int_subset] ________ 1160s 1160s matrix_type = functools.partial(, typ=) 1160s subset_func = 1160s subset_func2 = 1160s 1160s def test_view_of_view(matrix_type, subset_func, subset_func2): 1160s > adata = gen_adata((30, 15), X_type=matrix_type) 1160s 1160s tests/test_views.py:531: 1160s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1160s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:346: in gen_adata 1160s X = X_type(random_state.binomial(100, 0.005, (M, N)).astype(X_dtype)) 1160s /usr/lib/python3.13/functools.py:934: in wrapper 1160s return dispatch(args[0].__class__)(*args, **kw) 1160s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1160s 1160s val = array([[0., 1., 1., 0., 0., 2., 0., 1., 1., 0., 0., 1., 0., 0., 0.], 1160s [1., 1., 0., 0., 1., 1., 0., 0., 1., 0., 0...0., 0., 0., 1., 0., 1., 0.], 1160s [2., 1., 0., 0., 1., 0., 0., 1., 1., 1., 0., 0., 0., 1., 0.]], 1160s dtype=float32) 1160s typ = 1160s 1160s @singledispatch 1160s def as_cupy(val, typ=None): 1160s """ 1160s Rough conversion function 1160s 1160s Will try to infer target type from input type if not specified. 1160s """ 1160s if typ is None: 1160s typ = resolve_cupy_type(val) 1160s 1160s if issubclass(typ, CupyArray): 1160s import cupy as cp 1160s 1160s if isinstance(val, CSMatrix): 1160s val = val.toarray() 1160s return cp.array(val) 1160s elif issubclass(typ, CupyCSRMatrix): 1160s > import cupy as cp 1160s E ModuleNotFoundError: No module named 'cupy' 1160s 1160s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:1016: ModuleNotFoundError 1160s ______ test_view_of_view[cupy_csr-sparray_bool_subset-array_bool_subset] _______ 1160s 1160s matrix_type = functools.partial(, typ=) 1160s subset_func = 1160s subset_func2 = 1160s 1160s def test_view_of_view(matrix_type, subset_func, subset_func2): 1160s > adata = gen_adata((30, 15), X_type=matrix_type) 1160s 1160s tests/test_views.py:531: 1160s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1160s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:346: in gen_adata 1160s X = X_type(random_state.binomial(100, 0.005, (M, N)).astype(X_dtype)) 1160s /usr/lib/python3.13/functools.py:934: in wrapper 1160s return dispatch(args[0].__class__)(*args, **kw) 1160s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1160s 1160s val = array([[0., 0., 1., 0., 0., 1., 0., 0., 0., 0., 1., 0., 1., 1., 0.], 1160s [3., 0., 0., 0., 0., 1., 0., 0., 0., 1., 1...0., 0., 1., 1., 0., 1., 2.], 1160s [0., 1., 0., 0., 1., 0., 0., 0., 1., 0., 1., 0., 0., 3., 0.]], 1160s dtype=float32) 1160s typ = 1160s 1160s @singledispatch 1160s def as_cupy(val, typ=None): 1160s """ 1160s Rough conversion function 1160s 1160s Will try to infer target type from input type if not specified. 1160s """ 1160s if typ is None: 1160s typ = resolve_cupy_type(val) 1160s 1160s if issubclass(typ, CupyArray): 1160s import cupy as cp 1160s 1160s if isinstance(val, CSMatrix): 1160s val = val.toarray() 1160s return cp.array(val) 1160s elif issubclass(typ, CupyCSRMatrix): 1160s > import cupy as cp 1160s E ModuleNotFoundError: No module named 'cupy' 1160s 1160s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:1016: ModuleNotFoundError 1160s _______ test_view_of_view[cupy_csr-sparray_bool_subset-list_bool_subset] _______ 1160s 1160s matrix_type = functools.partial(, typ=) 1160s subset_func = 1160s subset_func2 = 1160s 1160s def test_view_of_view(matrix_type, subset_func, subset_func2): 1160s > adata = gen_adata((30, 15), X_type=matrix_type) 1160s 1160s tests/test_views.py:531: 1160s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1160s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:346: in gen_adata 1160s X = X_type(random_state.binomial(100, 0.005, (M, N)).astype(X_dtype)) 1160s /usr/lib/python3.13/functools.py:934: in wrapper 1160s return dispatch(args[0].__class__)(*args, **kw) 1160s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1160s 1160s val = array([[0., 0., 0., 0., 3., 0., 2., 1., 0., 1., 1., 0., 0., 0., 0.], 1160s [0., 1., 1., 0., 0., 0., 0., 0., 0., 0., 0...0., 0., 1., 0., 1., 0., 0.], 1160s [1., 1., 0., 0., 1., 1., 0., 0., 1., 0., 1., 0., 0., 0., 0.]], 1160s dtype=float32) 1160s typ = 1160s 1160s @singledispatch 1160s def as_cupy(val, typ=None): 1160s """ 1160s Rough conversion function 1160s 1160s Will try to infer target type from input type if not specified. 1160s """ 1160s if typ is None: 1160s typ = resolve_cupy_type(val) 1160s 1160s if issubclass(typ, CupyArray): 1160s import cupy as cp 1160s 1160s if isinstance(val, CSMatrix): 1160s val = val.toarray() 1160s return cp.array(val) 1160s elif issubclass(typ, CupyCSRMatrix): 1160s > import cupy as cp 1160s E ModuleNotFoundError: No module named 'cupy' 1160s 1160s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:1016: ModuleNotFoundError 1160s ______ test_view_of_view[cupy_csr-sparray_bool_subset-matrix_bool_subset] ______ 1160s 1160s matrix_type = functools.partial(, typ=) 1160s subset_func = 1160s subset_func2 = 1160s 1160s def test_view_of_view(matrix_type, subset_func, subset_func2): 1160s > adata = gen_adata((30, 15), X_type=matrix_type) 1160s 1160s tests/test_views.py:531: 1160s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1160s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:346: in gen_adata 1160s X = X_type(random_state.binomial(100, 0.005, (M, N)).astype(X_dtype)) 1160s /usr/lib/python3.13/functools.py:934: in wrapper 1160s return dispatch(args[0].__class__)(*args, **kw) 1160s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1160s 1160s val = array([[1., 2., 1., 0., 1., 1., 1., 1., 0., 0., 0., 0., 2., 0., 0.], 1160s [0., 0., 1., 0., 0., 0., 1., 0., 1., 0., 1...0., 0., 1., 1., 1., 0., 0.], 1160s [1., 1., 0., 0., 0., 0., 0., 0., 2., 1., 0., 0., 0., 0., 2.]], 1160s dtype=float32) 1160s typ = 1160s 1160s @singledispatch 1160s def as_cupy(val, typ=None): 1160s """ 1160s Rough conversion function 1160s 1160s Will try to infer target type from input type if not specified. 1160s """ 1160s if typ is None: 1160s typ = resolve_cupy_type(val) 1160s 1160s if issubclass(typ, CupyArray): 1160s import cupy as cp 1160s 1160s if isinstance(val, CSMatrix): 1160s val = val.toarray() 1160s return cp.array(val) 1160s elif issubclass(typ, CupyCSRMatrix): 1160s > import cupy as cp 1160s E ModuleNotFoundError: No module named 'cupy' 1160s 1160s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:1016: ModuleNotFoundError 1160s _____ test_view_of_view[cupy_csr-sparray_bool_subset-spmatrix_bool_subset] _____ 1160s 1160s matrix_type = functools.partial(, typ=) 1160s subset_func = 1160s subset_func2 = 1160s 1160s def test_view_of_view(matrix_type, subset_func, subset_func2): 1160s > adata = gen_adata((30, 15), X_type=matrix_type) 1160s 1160s tests/test_views.py:531: 1160s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1160s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:346: in gen_adata 1160s X = X_type(random_state.binomial(100, 0.005, (M, N)).astype(X_dtype)) 1160s /usr/lib/python3.13/functools.py:934: in wrapper 1160s return dispatch(args[0].__class__)(*args, **kw) 1160s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1160s 1160s val = array([[3., 0., 0., 0., 1., 1., 0., 1., 0., 0., 0., 0., 0., 0., 1.], 1160s [0., 1., 1., 0., 0., 0., 1., 1., 1., 1., 0...0., 1., 0., 0., 0., 1., 0.], 1160s [0., 1., 0., 0., 0., 0., 0., 1., 0., 0., 2., 0., 0., 0., 1.]], 1160s dtype=float32) 1160s typ = 1160s 1160s @singledispatch 1160s def as_cupy(val, typ=None): 1160s """ 1160s Rough conversion function 1160s 1160s Will try to infer target type from input type if not specified. 1160s """ 1160s if typ is None: 1160s typ = resolve_cupy_type(val) 1160s 1160s if issubclass(typ, CupyArray): 1160s import cupy as cp 1160s 1160s if isinstance(val, CSMatrix): 1160s val = val.toarray() 1160s return cp.array(val) 1160s elif issubclass(typ, CupyCSRMatrix): 1160s > import cupy as cp 1160s E ModuleNotFoundError: No module named 'cupy' 1160s 1160s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:1016: ModuleNotFoundError 1160s _____ test_view_of_view[cupy_csr-sparray_bool_subset-sparray_bool_subset] ______ 1160s 1160s matrix_type = functools.partial(, typ=) 1160s subset_func = 1160s subset_func2 = 1160s 1160s def test_view_of_view(matrix_type, subset_func, subset_func2): 1160s > adata = gen_adata((30, 15), X_type=matrix_type) 1160s 1160s tests/test_views.py:531: 1160s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1160s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:346: in gen_adata 1160s X = X_type(random_state.binomial(100, 0.005, (M, N)).astype(X_dtype)) 1160s /usr/lib/python3.13/functools.py:934: in wrapper 1160s return dispatch(args[0].__class__)(*args, **kw) 1160s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1160s 1160s val = array([[1., 1., 0., 0., 0., 0., 1., 2., 0., 1., 0., 0., 2., 0., 0.], 1160s [0., 0., 0., 0., 0., 1., 0., 1., 1., 1., 0...1., 0., 1., 0., 1., 0., 1.], 1160s [0., 0., 0., 1., 0., 0., 0., 0., 0., 2., 0., 0., 0., 0., 1.]], 1160s dtype=float32) 1160s typ = 1160s 1160s @singledispatch 1160s def as_cupy(val, typ=None): 1160s """ 1160s Rough conversion function 1160s 1160s Will try to infer target type from input type if not specified. 1160s """ 1160s if typ is None: 1160s typ = resolve_cupy_type(val) 1160s 1160s if issubclass(typ, CupyArray): 1160s import cupy as cp 1160s 1160s if isinstance(val, CSMatrix): 1160s val = val.toarray() 1160s return cp.array(val) 1160s elif issubclass(typ, CupyCSRMatrix): 1160s > import cupy as cp 1160s E ModuleNotFoundError: No module named 'cupy' 1160s 1160s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:1016: ModuleNotFoundError 1160s ____________ test_view_of_view[cupy_csc-array_subset-array_subset] _____________ 1160s 1160s matrix_type = functools.partial(, typ=) 1160s subset_func = 1160s subset_func2 = 1160s 1160s def test_view_of_view(matrix_type, subset_func, subset_func2): 1160s > adata = gen_adata((30, 15), X_type=matrix_type) 1160s 1160s tests/test_views.py:531: 1160s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1160s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:346: in gen_adata 1160s X = X_type(random_state.binomial(100, 0.005, (M, N)).astype(X_dtype)) 1160s /usr/lib/python3.13/functools.py:934: in wrapper 1160s return dispatch(args[0].__class__)(*args, **kw) 1160s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1160s 1160s val = array([[0., 0., 1., 1., 0., 0., 2., 1., 0., 0., 0., 0., 0., 0., 1.], 1160s [0., 0., 1., 0., 0., 1., 0., 0., 0., 0., 0...0., 1., 0., 0., 1., 1., 0.], 1160s [1., 0., 1., 1., 0., 1., 1., 0., 0., 2., 0., 0., 2., 0., 0.]], 1160s dtype=float32) 1160s typ = 1160s 1160s @singledispatch 1160s def as_cupy(val, typ=None): 1160s """ 1160s Rough conversion function 1160s 1160s Will try to infer target type from input type if not specified. 1160s """ 1160s if typ is None: 1160s typ = resolve_cupy_type(val) 1160s 1160s if issubclass(typ, CupyArray): 1160s import cupy as cp 1160s 1160s if isinstance(val, CSMatrix): 1160s val = val.toarray() 1160s return cp.array(val) 1160s elif issubclass(typ, CupyCSRMatrix): 1160s import cupy as cp 1160s import cupyx.scipy.sparse as cpsparse 1160s 1160s if isinstance(val, np.ndarray): 1160s return cpsparse.csr_matrix(cp.array(val)) 1160s else: 1160s return cpsparse.csr_matrix(val) 1160s elif issubclass(typ, CupyCSCMatrix): 1160s > import cupy as cp 1160s E ModuleNotFoundError: No module named 'cupy' 1160s 1160s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:1024: ModuleNotFoundError 1160s ____________ test_view_of_view[cupy_csc-array_subset-slice_subset] _____________ 1160s 1160s matrix_type = functools.partial(, typ=) 1160s subset_func = 1160s subset_func2 = 1160s 1160s def test_view_of_view(matrix_type, subset_func, subset_func2): 1160s > adata = gen_adata((30, 15), X_type=matrix_type) 1160s 1160s tests/test_views.py:531: 1160s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1160s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:346: in gen_adata 1160s X = X_type(random_state.binomial(100, 0.005, (M, N)).astype(X_dtype)) 1160s /usr/lib/python3.13/functools.py:934: in wrapper 1160s return dispatch(args[0].__class__)(*args, **kw) 1160s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1160s 1160s val = array([[1., 0., 1., 0., 2., 1., 1., 0., 2., 1., 1., 0., 1., 1., 0.], 1160s [1., 1., 1., 0., 0., 0., 0., 0., 1., 0., 0...0., 0., 0., 1., 0., 0., 2.], 1160s [2., 0., 0., 0., 0., 2., 2., 0., 0., 0., 1., 0., 1., 0., 0.]], 1160s dtype=float32) 1160s typ = 1160s 1160s @singledispatch 1160s def as_cupy(val, typ=None): 1160s """ 1160s Rough conversion function 1160s 1160s Will try to infer target type from input type if not specified. 1160s """ 1160s if typ is None: 1160s typ = resolve_cupy_type(val) 1160s 1160s if issubclass(typ, CupyArray): 1160s import cupy as cp 1160s 1160s if isinstance(val, CSMatrix): 1160s val = val.toarray() 1160s return cp.array(val) 1160s elif issubclass(typ, CupyCSRMatrix): 1160s import cupy as cp 1160s import cupyx.scipy.sparse as cpsparse 1160s 1160s if isinstance(val, np.ndarray): 1160s return cpsparse.csr_matrix(cp.array(val)) 1160s else: 1160s return cpsparse.csr_matrix(val) 1160s elif issubclass(typ, CupyCSCMatrix): 1160s > import cupy as cp 1160s E ModuleNotFoundError: No module named 'cupy' 1160s 1160s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:1024: ModuleNotFoundError 1160s ____________ test_view_of_view[cupy_csc-array_subset-single_subset] ____________ 1160s 1160s matrix_type = functools.partial(, typ=) 1160s subset_func = 1160s subset_func2 = 1160s 1160s def test_view_of_view(matrix_type, subset_func, subset_func2): 1160s > adata = gen_adata((30, 15), X_type=matrix_type) 1160s 1160s tests/test_views.py:531: 1160s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1160s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:346: in gen_adata 1160s X = X_type(random_state.binomial(100, 0.005, (M, N)).astype(X_dtype)) 1160s /usr/lib/python3.13/functools.py:934: in wrapper 1160s return dispatch(args[0].__class__)(*args, **kw) 1160s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1160s 1160s val = array([[1., 0., 0., 1., 0., 0., 2., 0., 0., 0., 0., 0., 0., 0., 0.], 1160s [0., 3., 2., 0., 0., 1., 0., 0., 1., 0., 0...1., 0., 1., 1., 0., 1., 0.], 1160s [0., 4., 1., 1., 2., 1., 0., 1., 0., 0., 0., 1., 0., 0., 0.]], 1160s dtype=float32) 1160s typ = 1160s 1160s @singledispatch 1160s def as_cupy(val, typ=None): 1160s """ 1160s Rough conversion function 1160s 1160s Will try to infer target type from input type if not specified. 1160s """ 1160s if typ is None: 1160s typ = resolve_cupy_type(val) 1160s 1160s if issubclass(typ, CupyArray): 1160s import cupy as cp 1160s 1160s if isinstance(val, CSMatrix): 1160s val = val.toarray() 1160s return cp.array(val) 1160s elif issubclass(typ, CupyCSRMatrix): 1160s import cupy as cp 1160s import cupyx.scipy.sparse as cpsparse 1160s 1160s if isinstance(val, np.ndarray): 1160s return cpsparse.csr_matrix(cp.array(val)) 1160s else: 1160s return cpsparse.csr_matrix(val) 1160s elif issubclass(typ, CupyCSCMatrix): 1160s > import cupy as cp 1160s E ModuleNotFoundError: No module named 'cupy' 1160s 1160s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:1024: ModuleNotFoundError 1160s __________ test_view_of_view[cupy_csc-array_subset-array_int_subset] ___________ 1160s 1160s matrix_type = functools.partial(, typ=) 1160s subset_func = 1160s subset_func2 = 1160s 1160s def test_view_of_view(matrix_type, subset_func, subset_func2): 1160s > adata = gen_adata((30, 15), X_type=matrix_type) 1160s 1160s tests/test_views.py:531: 1160s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1160s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:346: in gen_adata 1160s X = X_type(random_state.binomial(100, 0.005, (M, N)).astype(X_dtype)) 1160s /usr/lib/python3.13/functools.py:934: in wrapper 1160s return dispatch(args[0].__class__)(*args, **kw) 1160s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1160s 1160s val = array([[1., 1., 1., 1., 0., 0., 0., 0., 2., 2., 0., 0., 0., 0., 0.], 1160s [0., 2., 0., 1., 1., 0., 0., 1., 1., 0., 0...0., 0., 0., 0., 1., 0., 0.], 1160s [0., 1., 0., 0., 2., 1., 0., 1., 0., 0., 1., 0., 1., 0., 0.]], 1160s dtype=float32) 1160s typ = 1160s 1160s @singledispatch 1160s def as_cupy(val, typ=None): 1160s """ 1160s Rough conversion function 1160s 1160s Will try to infer target type from input type if not specified. 1160s """ 1160s if typ is None: 1160s typ = resolve_cupy_type(val) 1160s 1160s if issubclass(typ, CupyArray): 1160s import cupy as cp 1160s 1160s if isinstance(val, CSMatrix): 1160s val = val.toarray() 1160s return cp.array(val) 1160s elif issubclass(typ, CupyCSRMatrix): 1160s import cupy as cp 1160s import cupyx.scipy.sparse as cpsparse 1160s 1160s if isinstance(val, np.ndarray): 1160s return cpsparse.csr_matrix(cp.array(val)) 1160s else: 1160s return cpsparse.csr_matrix(val) 1160s elif issubclass(typ, CupyCSCMatrix): 1160s > import cupy as cp 1160s E ModuleNotFoundError: No module named 'cupy' 1160s 1160s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:1024: ModuleNotFoundError 1160s ___________ test_view_of_view[cupy_csc-array_subset-list_int_subset] ___________ 1160s 1160s matrix_type = functools.partial(, typ=) 1160s subset_func = 1160s subset_func2 = 1160s 1160s def test_view_of_view(matrix_type, subset_func, subset_func2): 1160s > adata = gen_adata((30, 15), X_type=matrix_type) 1160s 1160s tests/test_views.py:531: 1160s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1160s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:346: in gen_adata 1160s X = X_type(random_state.binomial(100, 0.005, (M, N)).astype(X_dtype)) 1160s /usr/lib/python3.13/functools.py:934: in wrapper 1160s return dispatch(args[0].__class__)(*args, **kw) 1160s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1160s 1160s val = array([[1., 0., 0., 0., 0., 0., 1., 0., 0., 0., 2., 0., 1., 0., 0.], 1160s [1., 0., 1., 2., 0., 0., 2., 0., 1., 1., 1...0., 1., 1., 0., 1., 1., 1.], 1160s [0., 0., 0., 0., 0., 0., 1., 0., 0., 0., 1., 1., 0., 0., 2.]], 1160s dtype=float32) 1160s typ = 1160s 1160s @singledispatch 1160s def as_cupy(val, typ=None): 1160s """ 1160s Rough conversion function 1160s 1160s Will try to infer target type from input type if not specified. 1160s """ 1160s if typ is None: 1160s typ = resolve_cupy_type(val) 1160s 1160s if issubclass(typ, CupyArray): 1160s import cupy as cp 1160s 1160s if isinstance(val, CSMatrix): 1160s val = val.toarray() 1160s return cp.array(val) 1160s elif issubclass(typ, CupyCSRMatrix): 1160s import cupy as cp 1160s import cupyx.scipy.sparse as cpsparse 1160s 1160s if isinstance(val, np.ndarray): 1160s return cpsparse.csr_matrix(cp.array(val)) 1160s else: 1160s return cpsparse.csr_matrix(val) 1160s elif issubclass(typ, CupyCSCMatrix): 1160s > import cupy as cp 1160s E ModuleNotFoundError: No module named 'cupy' 1160s 1160s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:1024: ModuleNotFoundError 1160s __________ test_view_of_view[cupy_csc-array_subset-array_bool_subset] __________ 1160s 1160s matrix_type = functools.partial(, typ=) 1160s subset_func = 1160s subset_func2 = 1160s 1160s def test_view_of_view(matrix_type, subset_func, subset_func2): 1160s > adata = gen_adata((30, 15), X_type=matrix_type) 1160s 1160s tests/test_views.py:531: 1160s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1160s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:346: in gen_adata 1160s X = X_type(random_state.binomial(100, 0.005, (M, N)).astype(X_dtype)) 1160s /usr/lib/python3.13/functools.py:934: in wrapper 1160s return dispatch(args[0].__class__)(*args, **kw) 1160s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1160s 1160s val = array([[0., 0., 0., 0., 1., 0., 2., 1., 0., 0., 0., 1., 1., 0., 1.], 1160s [1., 0., 0., 2., 0., 1., 0., 1., 1., 0., 1...1., 2., 0., 0., 0., 1., 2.], 1160s [1., 0., 1., 0., 1., 0., 0., 1., 0., 1., 0., 0., 0., 2., 0.]], 1160s dtype=float32) 1160s typ = 1160s 1160s @singledispatch 1160s def as_cupy(val, typ=None): 1160s """ 1160s Rough conversion function 1160s 1160s Will try to infer target type from input type if not specified. 1160s """ 1160s if typ is None: 1160s typ = resolve_cupy_type(val) 1160s 1160s if issubclass(typ, CupyArray): 1160s import cupy as cp 1160s 1160s if isinstance(val, CSMatrix): 1160s val = val.toarray() 1160s return cp.array(val) 1160s elif issubclass(typ, CupyCSRMatrix): 1160s import cupy as cp 1160s import cupyx.scipy.sparse as cpsparse 1160s 1160s if isinstance(val, np.ndarray): 1160s return cpsparse.csr_matrix(cp.array(val)) 1160s else: 1160s return cpsparse.csr_matrix(val) 1160s elif issubclass(typ, CupyCSCMatrix): 1160s > import cupy as cp 1160s E ModuleNotFoundError: No module named 'cupy' 1160s 1160s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:1024: ModuleNotFoundError 1160s __________ test_view_of_view[cupy_csc-array_subset-list_bool_subset] ___________ 1160s 1160s matrix_type = functools.partial(, typ=) 1160s subset_func = 1160s subset_func2 = 1160s 1160s def test_view_of_view(matrix_type, subset_func, subset_func2): 1160s > adata = gen_adata((30, 15), X_type=matrix_type) 1160s 1160s tests/test_views.py:531: 1160s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1160s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:346: in gen_adata 1160s X = X_type(random_state.binomial(100, 0.005, (M, N)).astype(X_dtype)) 1160s /usr/lib/python3.13/functools.py:934: in wrapper 1160s return dispatch(args[0].__class__)(*args, **kw) 1160s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1160s 1160s val = array([[0., 4., 0., 0., 0., 0., 0., 0., 0., 2., 2., 1., 0., 1., 1.], 1160s [0., 1., 0., 1., 0., 0., 1., 1., 0., 0., 2...0., 0., 1., 1., 2., 0., 0.], 1160s [1., 0., 0., 0., 0., 0., 0., 0., 0., 1., 1., 0., 1., 0., 0.]], 1160s dtype=float32) 1160s typ = 1160s 1160s @singledispatch 1160s def as_cupy(val, typ=None): 1160s """ 1160s Rough conversion function 1160s 1160s Will try to infer target type from input type if not specified. 1160s """ 1160s if typ is None: 1160s typ = resolve_cupy_type(val) 1160s 1160s if issubclass(typ, CupyArray): 1160s import cupy as cp 1160s 1160s if isinstance(val, CSMatrix): 1160s val = val.toarray() 1160s return cp.array(val) 1160s elif issubclass(typ, CupyCSRMatrix): 1160s import cupy as cp 1160s import cupyx.scipy.sparse as cpsparse 1160s 1160s if isinstance(val, np.ndarray): 1160s return cpsparse.csr_matrix(cp.array(val)) 1160s else: 1160s return cpsparse.csr_matrix(val) 1160s elif issubclass(typ, CupyCSCMatrix): 1160s > import cupy as cp 1160s E ModuleNotFoundError: No module named 'cupy' 1160s 1160s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:1024: ModuleNotFoundError 1160s _________ test_view_of_view[cupy_csc-array_subset-matrix_bool_subset] __________ 1160s 1160s matrix_type = functools.partial(, typ=) 1160s subset_func = 1160s subset_func2 = 1160s 1160s def test_view_of_view(matrix_type, subset_func, subset_func2): 1160s > adata = gen_adata((30, 15), X_type=matrix_type) 1160s 1160s tests/test_views.py:531: 1160s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1160s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:346: in gen_adata 1160s X = X_type(random_state.binomial(100, 0.005, (M, N)).astype(X_dtype)) 1160s /usr/lib/python3.13/functools.py:934: in wrapper 1160s return dispatch(args[0].__class__)(*args, **kw) 1160s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1160s 1160s val = array([[1., 0., 0., 1., 0., 1., 0., 0., 0., 1., 0., 0., 0., 0., 2.], 1160s [0., 0., 0., 0., 0., 0., 0., 0., 0., 3., 1...0., 1., 1., 1., 1., 0., 0.], 1160s [1., 1., 0., 0., 2., 1., 2., 0., 1., 1., 1., 0., 0., 0., 1.]], 1160s dtype=float32) 1160s typ = 1160s 1160s @singledispatch 1160s def as_cupy(val, typ=None): 1160s """ 1160s Rough conversion function 1160s 1160s Will try to infer target type from input type if not specified. 1160s """ 1160s if typ is None: 1160s typ = resolve_cupy_type(val) 1160s 1160s if issubclass(typ, CupyArray): 1160s import cupy as cp 1160s 1160s if isinstance(val, CSMatrix): 1160s val = val.toarray() 1160s return cp.array(val) 1160s elif issubclass(typ, CupyCSRMatrix): 1160s import cupy as cp 1160s import cupyx.scipy.sparse as cpsparse 1160s 1160s if isinstance(val, np.ndarray): 1160s return cpsparse.csr_matrix(cp.array(val)) 1160s else: 1160s return cpsparse.csr_matrix(val) 1160s elif issubclass(typ, CupyCSCMatrix): 1160s > import cupy as cp 1160s E ModuleNotFoundError: No module named 'cupy' 1160s 1160s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:1024: ModuleNotFoundError 1160s ________ test_view_of_view[cupy_csc-array_subset-spmatrix_bool_subset] _________ 1160s 1160s matrix_type = functools.partial(, typ=) 1160s subset_func = 1160s subset_func2 = 1160s 1160s def test_view_of_view(matrix_type, subset_func, subset_func2): 1160s > adata = gen_adata((30, 15), X_type=matrix_type) 1160s 1160s tests/test_views.py:531: 1160s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1160s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:346: in gen_adata 1160s X = X_type(random_state.binomial(100, 0.005, (M, N)).astype(X_dtype)) 1160s /usr/lib/python3.13/functools.py:934: in wrapper 1160s return dispatch(args[0].__class__)(*args, **kw) 1160s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1160s 1160s val = array([[0., 0., 0., 0., 0., 1., 1., 0., 1., 0., 0., 0., 0., 0., 1.], 1160s [0., 1., 0., 0., 0., 0., 0., 0., 0., 1., 1...0., 0., 2., 0., 1., 1., 0.], 1160s [1., 0., 0., 0., 1., 0., 0., 0., 1., 0., 0., 0., 0., 1., 1.]], 1160s dtype=float32) 1160s typ = 1160s 1160s @singledispatch 1160s def as_cupy(val, typ=None): 1160s """ 1160s Rough conversion function 1160s 1160s Will try to infer target type from input type if not specified. 1160s """ 1160s if typ is None: 1160s typ = resolve_cupy_type(val) 1160s 1160s if issubclass(typ, CupyArray): 1160s import cupy as cp 1160s 1160s if isinstance(val, CSMatrix): 1160s val = val.toarray() 1160s return cp.array(val) 1160s elif issubclass(typ, CupyCSRMatrix): 1160s import cupy as cp 1160s import cupyx.scipy.sparse as cpsparse 1160s 1160s if isinstance(val, np.ndarray): 1160s return cpsparse.csr_matrix(cp.array(val)) 1160s else: 1160s return cpsparse.csr_matrix(val) 1160s elif issubclass(typ, CupyCSCMatrix): 1160s > import cupy as cp 1160s E ModuleNotFoundError: No module named 'cupy' 1160s 1160s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:1024: ModuleNotFoundError 1160s _________ test_view_of_view[cupy_csc-array_subset-sparray_bool_subset] _________ 1160s 1160s matrix_type = functools.partial(, typ=) 1160s subset_func = 1160s subset_func2 = 1160s 1160s def test_view_of_view(matrix_type, subset_func, subset_func2): 1160s > adata = gen_adata((30, 15), X_type=matrix_type) 1160s 1160s tests/test_views.py:531: 1160s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1160s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:346: in gen_adata 1160s X = X_type(random_state.binomial(100, 0.005, (M, N)).astype(X_dtype)) 1160s /usr/lib/python3.13/functools.py:934: in wrapper 1160s return dispatch(args[0].__class__)(*args, **kw) 1160s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1160s 1160s val = array([[1., 0., 0., 2., 0., 0., 2., 0., 0., 0., 1., 1., 1., 0., 2.], 1160s [0., 1., 0., 1., 0., 1., 2., 0., 0., 0., 0...1., 1., 1., 0., 0., 2., 1.], 1160s [2., 2., 0., 0., 1., 1., 1., 1., 0., 0., 0., 0., 0., 0., 1.]], 1160s dtype=float32) 1160s typ = 1160s 1160s @singledispatch 1160s def as_cupy(val, typ=None): 1160s """ 1160s Rough conversion function 1160s 1160s Will try to infer target type from input type if not specified. 1160s """ 1160s if typ is None: 1160s typ = resolve_cupy_type(val) 1160s 1160s if issubclass(typ, CupyArray): 1160s import cupy as cp 1160s 1160s if isinstance(val, CSMatrix): 1160s val = val.toarray() 1160s return cp.array(val) 1160s elif issubclass(typ, CupyCSRMatrix): 1160s import cupy as cp 1160s import cupyx.scipy.sparse as cpsparse 1160s 1160s if isinstance(val, np.ndarray): 1160s return cpsparse.csr_matrix(cp.array(val)) 1160s else: 1160s return cpsparse.csr_matrix(val) 1160s elif issubclass(typ, CupyCSCMatrix): 1160s > import cupy as cp 1160s E ModuleNotFoundError: No module named 'cupy' 1160s 1160s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:1024: ModuleNotFoundError 1160s ____________ test_view_of_view[cupy_csc-slice_subset-array_subset] _____________ 1160s 1160s matrix_type = functools.partial(, typ=) 1160s subset_func = 1160s subset_func2 = 1160s 1160s def test_view_of_view(matrix_type, subset_func, subset_func2): 1160s > adata = gen_adata((30, 15), X_type=matrix_type) 1160s 1160s tests/test_views.py:531: 1160s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1160s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:346: in gen_adata 1160s X = X_type(random_state.binomial(100, 0.005, (M, N)).astype(X_dtype)) 1160s /usr/lib/python3.13/functools.py:934: in wrapper 1160s return dispatch(args[0].__class__)(*args, **kw) 1160s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1160s 1160s val = array([[0., 0., 1., 0., 0., 0., 4., 0., 1., 1., 0., 0., 1., 0., 1.], 1160s [0., 1., 1., 1., 0., 0., 2., 0., 0., 1., 1...0., 0., 0., 0., 0., 1., 0.], 1160s [0., 0., 0., 0., 2., 0., 1., 1., 0., 0., 1., 0., 0., 0., 0.]], 1160s dtype=float32) 1160s typ = 1160s 1160s @singledispatch 1160s def as_cupy(val, typ=None): 1160s """ 1160s Rough conversion function 1160s 1160s Will try to infer target type from input type if not specified. 1160s """ 1160s if typ is None: 1160s typ = resolve_cupy_type(val) 1160s 1160s if issubclass(typ, CupyArray): 1160s import cupy as cp 1160s 1160s if isinstance(val, CSMatrix): 1160s val = val.toarray() 1160s return cp.array(val) 1160s elif issubclass(typ, CupyCSRMatrix): 1160s import cupy as cp 1160s import cupyx.scipy.sparse as cpsparse 1160s 1160s if isinstance(val, np.ndarray): 1160s return cpsparse.csr_matrix(cp.array(val)) 1160s else: 1160s return cpsparse.csr_matrix(val) 1160s elif issubclass(typ, CupyCSCMatrix): 1160s > import cupy as cp 1160s E ModuleNotFoundError: No module named 'cupy' 1160s 1160s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:1024: ModuleNotFoundError 1160s ____________ test_view_of_view[cupy_csc-slice_subset-slice_subset] _____________ 1160s 1160s matrix_type = functools.partial(, typ=) 1160s subset_func = 1160s subset_func2 = 1160s 1160s def test_view_of_view(matrix_type, subset_func, subset_func2): 1160s > adata = gen_adata((30, 15), X_type=matrix_type) 1160s 1160s tests/test_views.py:531: 1160s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1160s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:346: in gen_adata 1160s X = X_type(random_state.binomial(100, 0.005, (M, N)).astype(X_dtype)) 1160s /usr/lib/python3.13/functools.py:934: in wrapper 1160s return dispatch(args[0].__class__)(*args, **kw) 1160s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1160s 1160s val = array([[1., 1., 1., 1., 1., 2., 0., 1., 2., 0., 0., 0., 1., 0., 0.], 1160s [0., 0., 0., 0., 1., 1., 0., 1., 1., 0., 1...1., 0., 0., 1., 1., 0., 0.], 1160s [1., 1., 0., 0., 0., 0., 0., 0., 1., 0., 0., 0., 0., 1., 0.]], 1160s dtype=float32) 1160s typ = 1160s 1160s @singledispatch 1160s def as_cupy(val, typ=None): 1160s """ 1160s Rough conversion function 1160s 1160s Will try to infer target type from input type if not specified. 1160s """ 1160s if typ is None: 1160s typ = resolve_cupy_type(val) 1160s 1160s if issubclass(typ, CupyArray): 1160s import cupy as cp 1160s 1160s if isinstance(val, CSMatrix): 1160s val = val.toarray() 1160s return cp.array(val) 1160s elif issubclass(typ, CupyCSRMatrix): 1160s import cupy as cp 1160s import cupyx.scipy.sparse as cpsparse 1160s 1160s if isinstance(val, np.ndarray): 1160s return cpsparse.csr_matrix(cp.array(val)) 1160s else: 1160s return cpsparse.csr_matrix(val) 1160s elif issubclass(typ, CupyCSCMatrix): 1160s > import cupy as cp 1160s E ModuleNotFoundError: No module named 'cupy' 1160s 1160s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:1024: ModuleNotFoundError 1160s ____________ test_view_of_view[cupy_csc-slice_subset-single_subset] ____________ 1160s 1160s matrix_type = functools.partial(, typ=) 1160s subset_func = 1160s subset_func2 = 1160s 1160s def test_view_of_view(matrix_type, subset_func, subset_func2): 1160s > adata = gen_adata((30, 15), X_type=matrix_type) 1160s 1160s tests/test_views.py:531: 1160s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1160s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:346: in gen_adata 1160s X = X_type(random_state.binomial(100, 0.005, (M, N)).astype(X_dtype)) 1160s /usr/lib/python3.13/functools.py:934: in wrapper 1160s return dispatch(args[0].__class__)(*args, **kw) 1160s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1160s 1160s val = array([[1., 0., 1., 2., 0., 2., 1., 1., 0., 1., 0., 0., 0., 1., 0.], 1160s [1., 0., 0., 0., 1., 1., 4., 0., 1., 0., 1...2., 0., 0., 0., 0., 1., 1.], 1160s [1., 0., 1., 2., 1., 0., 0., 0., 1., 0., 1., 1., 1., 0., 0.]], 1160s dtype=float32) 1160s typ = 1160s 1160s @singledispatch 1160s def as_cupy(val, typ=None): 1160s """ 1160s Rough conversion function 1160s 1160s Will try to infer target type from input type if not specified. 1160s """ 1160s if typ is None: 1160s typ = resolve_cupy_type(val) 1160s 1160s if issubclass(typ, CupyArray): 1160s import cupy as cp 1160s 1160s if isinstance(val, CSMatrix): 1160s val = val.toarray() 1160s return cp.array(val) 1160s elif issubclass(typ, CupyCSRMatrix): 1160s import cupy as cp 1160s import cupyx.scipy.sparse as cpsparse 1160s 1160s if isinstance(val, np.ndarray): 1160s return cpsparse.csr_matrix(cp.array(val)) 1160s else: 1160s return cpsparse.csr_matrix(val) 1160s elif issubclass(typ, CupyCSCMatrix): 1160s > import cupy as cp 1160s E ModuleNotFoundError: No module named 'cupy' 1160s 1160s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:1024: ModuleNotFoundError 1160s __________ test_view_of_view[cupy_csc-slice_subset-array_int_subset] ___________ 1160s 1160s matrix_type = functools.partial(, typ=) 1160s subset_func = 1160s subset_func2 = 1160s 1160s def test_view_of_view(matrix_type, subset_func, subset_func2): 1160s > adata = gen_adata((30, 15), X_type=matrix_type) 1160s 1160s tests/test_views.py:531: 1160s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1160s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:346: in gen_adata 1160s X = X_type(random_state.binomial(100, 0.005, (M, N)).astype(X_dtype)) 1160s /usr/lib/python3.13/functools.py:934: in wrapper 1160s return dispatch(args[0].__class__)(*args, **kw) 1160s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1160s 1160s val = array([[0., 0., 2., 1., 0., 1., 0., 1., 1., 1., 0., 0., 0., 0., 1.], 1160s [2., 2., 2., 0., 1., 1., 1., 0., 0., 0., 0...0., 1., 2., 3., 0., 0., 0.], 1160s [0., 0., 0., 0., 0., 1., 1., 0., 0., 1., 0., 0., 0., 1., 1.]], 1160s dtype=float32) 1160s typ = 1160s 1160s @singledispatch 1160s def as_cupy(val, typ=None): 1160s """ 1160s Rough conversion function 1160s 1160s Will try to infer target type from input type if not specified. 1160s """ 1160s if typ is None: 1160s typ = resolve_cupy_type(val) 1160s 1160s if issubclass(typ, CupyArray): 1160s import cupy as cp 1160s 1160s if isinstance(val, CSMatrix): 1160s val = val.toarray() 1160s return cp.array(val) 1160s elif issubclass(typ, CupyCSRMatrix): 1160s import cupy as cp 1160s import cupyx.scipy.sparse as cpsparse 1160s 1160s if isinstance(val, np.ndarray): 1160s return cpsparse.csr_matrix(cp.array(val)) 1160s else: 1160s return cpsparse.csr_matrix(val) 1160s elif issubclass(typ, CupyCSCMatrix): 1160s > import cupy as cp 1160s E ModuleNotFoundError: No module named 'cupy' 1160s 1160s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:1024: ModuleNotFoundError 1160s ___________ test_view_of_view[cupy_csc-slice_subset-list_int_subset] ___________ 1160s 1160s matrix_type = functools.partial(, typ=) 1160s subset_func = 1160s subset_func2 = 1160s 1160s def test_view_of_view(matrix_type, subset_func, subset_func2): 1160s > adata = gen_adata((30, 15), X_type=matrix_type) 1160s 1160s tests/test_views.py:531: 1160s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1160s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:346: in gen_adata 1160s X = X_type(random_state.binomial(100, 0.005, (M, N)).astype(X_dtype)) 1160s /usr/lib/python3.13/functools.py:934: in wrapper 1160s return dispatch(args[0].__class__)(*args, **kw) 1160s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1160s 1160s val = array([[1., 0., 1., 0., 2., 1., 1., 0., 1., 0., 1., 0., 0., 0., 0.], 1160s [3., 1., 1., 0., 0., 1., 0., 0., 0., 1., 0...0., 0., 1., 1., 1., 1., 1.], 1160s [0., 0., 0., 0., 0., 1., 0., 0., 1., 0., 1., 0., 0., 0., 1.]], 1160s dtype=float32) 1160s typ = 1160s 1160s @singledispatch 1160s def as_cupy(val, typ=None): 1160s """ 1160s Rough conversion function 1160s 1160s Will try to infer target type from input type if not specified. 1160s """ 1160s if typ is None: 1160s typ = resolve_cupy_type(val) 1160s 1160s if issubclass(typ, CupyArray): 1160s import cupy as cp 1160s 1160s if isinstance(val, CSMatrix): 1160s val = val.toarray() 1160s return cp.array(val) 1160s elif issubclass(typ, CupyCSRMatrix): 1160s import cupy as cp 1160s import cupyx.scipy.sparse as cpsparse 1160s 1160s if isinstance(val, np.ndarray): 1160s return cpsparse.csr_matrix(cp.array(val)) 1160s else: 1160s return cpsparse.csr_matrix(val) 1160s elif issubclass(typ, CupyCSCMatrix): 1160s > import cupy as cp 1160s E ModuleNotFoundError: No module named 'cupy' 1160s 1160s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:1024: ModuleNotFoundError 1160s __________ test_view_of_view[cupy_csc-slice_subset-array_bool_subset] __________ 1160s 1160s matrix_type = functools.partial(, typ=) 1160s subset_func = 1160s subset_func2 = 1160s 1160s def test_view_of_view(matrix_type, subset_func, subset_func2): 1160s > adata = gen_adata((30, 15), X_type=matrix_type) 1160s 1160s tests/test_views.py:531: 1160s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1160s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:346: in gen_adata 1160s X = X_type(random_state.binomial(100, 0.005, (M, N)).astype(X_dtype)) 1160s /usr/lib/python3.13/functools.py:934: in wrapper 1160s return dispatch(args[0].__class__)(*args, **kw) 1160s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1160s 1160s val = array([[0., 1., 1., 0., 1., 0., 0., 1., 1., 1., 1., 2., 1., 0., 0.], 1160s [1., 0., 0., 0., 0., 0., 0., 1., 0., 0., 0...0., 0., 0., 0., 0., 1., 0.], 1160s [2., 0., 0., 0., 0., 1., 1., 0., 1., 0., 0., 0., 2., 0., 0.]], 1160s dtype=float32) 1160s typ = 1160s 1160s @singledispatch 1160s def as_cupy(val, typ=None): 1160s """ 1160s Rough conversion function 1160s 1160s Will try to infer target type from input type if not specified. 1160s """ 1160s if typ is None: 1160s typ = resolve_cupy_type(val) 1160s 1160s if issubclass(typ, CupyArray): 1160s import cupy as cp 1160s 1160s if isinstance(val, CSMatrix): 1160s val = val.toarray() 1160s return cp.array(val) 1160s elif issubclass(typ, CupyCSRMatrix): 1160s import cupy as cp 1160s import cupyx.scipy.sparse as cpsparse 1160s 1160s if isinstance(val, np.ndarray): 1160s return cpsparse.csr_matrix(cp.array(val)) 1160s else: 1160s return cpsparse.csr_matrix(val) 1160s elif issubclass(typ, CupyCSCMatrix): 1160s > import cupy as cp 1160s E ModuleNotFoundError: No module named 'cupy' 1160s 1160s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:1024: ModuleNotFoundError 1160s __________ test_view_of_view[cupy_csc-slice_subset-list_bool_subset] ___________ 1160s 1160s matrix_type = functools.partial(, typ=) 1160s subset_func = 1160s subset_func2 = 1160s 1160s def test_view_of_view(matrix_type, subset_func, subset_func2): 1160s > adata = gen_adata((30, 15), X_type=matrix_type) 1160s 1160s tests/test_views.py:531: 1160s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1160s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:346: in gen_adata 1160s X = X_type(random_state.binomial(100, 0.005, (M, N)).astype(X_dtype)) 1160s /usr/lib/python3.13/functools.py:934: in wrapper 1160s return dispatch(args[0].__class__)(*args, **kw) 1160s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1160s 1160s val = array([[0., 2., 0., 1., 0., 0., 1., 0., 0., 1., 0., 0., 3., 0., 0.], 1160s [1., 1., 0., 1., 2., 0., 0., 1., 0., 1., 2...0., 0., 1., 0., 0., 1., 1.], 1160s [0., 1., 1., 1., 0., 0., 1., 2., 0., 0., 0., 1., 0., 2., 1.]], 1160s dtype=float32) 1160s typ = 1160s 1160s @singledispatch 1160s def as_cupy(val, typ=None): 1160s """ 1160s Rough conversion function 1160s 1160s Will try to infer target type from input type if not specified. 1160s """ 1160s if typ is None: 1160s typ = resolve_cupy_type(val) 1160s 1160s if issubclass(typ, CupyArray): 1160s import cupy as cp 1160s 1160s if isinstance(val, CSMatrix): 1160s val = val.toarray() 1160s return cp.array(val) 1160s elif issubclass(typ, CupyCSRMatrix): 1160s import cupy as cp 1160s import cupyx.scipy.sparse as cpsparse 1160s 1160s if isinstance(val, np.ndarray): 1160s return cpsparse.csr_matrix(cp.array(val)) 1160s else: 1160s return cpsparse.csr_matrix(val) 1160s elif issubclass(typ, CupyCSCMatrix): 1160s > import cupy as cp 1160s E ModuleNotFoundError: No module named 'cupy' 1160s 1160s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:1024: ModuleNotFoundError 1160s _________ test_view_of_view[cupy_csc-slice_subset-matrix_bool_subset] __________ 1160s 1160s matrix_type = functools.partial(, typ=) 1160s subset_func = 1160s subset_func2 = 1160s 1160s def test_view_of_view(matrix_type, subset_func, subset_func2): 1160s > adata = gen_adata((30, 15), X_type=matrix_type) 1160s 1160s tests/test_views.py:531: 1160s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1160s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:346: in gen_adata 1160s X = X_type(random_state.binomial(100, 0.005, (M, N)).astype(X_dtype)) 1160s /usr/lib/python3.13/functools.py:934: in wrapper 1160s return dispatch(args[0].__class__)(*args, **kw) 1160s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1160s 1160s val = array([[0., 2., 1., 0., 0., 0., 0., 2., 0., 0., 0., 2., 1., 1., 0.], 1160s [1., 1., 2., 2., 0., 0., 1., 0., 1., 1., 0...0., 1., 0., 0., 3., 0., 1.], 1160s [1., 0., 0., 0., 1., 0., 0., 0., 0., 1., 0., 1., 1., 0., 0.]], 1160s dtype=float32) 1160s typ = 1160s 1160s @singledispatch 1160s def as_cupy(val, typ=None): 1160s """ 1160s Rough conversion function 1160s 1160s Will try to infer target type from input type if not specified. 1160s """ 1160s if typ is None: 1160s typ = resolve_cupy_type(val) 1160s 1160s if issubclass(typ, CupyArray): 1160s import cupy as cp 1160s 1160s if isinstance(val, CSMatrix): 1160s val = val.toarray() 1160s return cp.array(val) 1160s elif issubclass(typ, CupyCSRMatrix): 1160s import cupy as cp 1160s import cupyx.scipy.sparse as cpsparse 1160s 1160s if isinstance(val, np.ndarray): 1160s return cpsparse.csr_matrix(cp.array(val)) 1160s else: 1160s return cpsparse.csr_matrix(val) 1160s elif issubclass(typ, CupyCSCMatrix): 1160s > import cupy as cp 1160s E ModuleNotFoundError: No module named 'cupy' 1160s 1160s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:1024: ModuleNotFoundError 1160s ________ test_view_of_view[cupy_csc-slice_subset-spmatrix_bool_subset] _________ 1160s 1160s matrix_type = functools.partial(, typ=) 1160s subset_func = 1160s subset_func2 = 1160s 1160s def test_view_of_view(matrix_type, subset_func, subset_func2): 1160s > adata = gen_adata((30, 15), X_type=matrix_type) 1160s 1160s tests/test_views.py:531: 1160s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1160s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:346: in gen_adata 1160s X = X_type(random_state.binomial(100, 0.005, (M, N)).astype(X_dtype)) 1160s /usr/lib/python3.13/functools.py:934: in wrapper 1160s return dispatch(args[0].__class__)(*args, **kw) 1160s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1160s 1160s val = array([[0., 1., 0., 2., 0., 0., 0., 1., 0., 0., 0., 0., 1., 1., 0.], 1160s [0., 0., 0., 2., 0., 0., 0., 1., 0., 1., 1...0., 0., 0., 0., 0., 0., 0.], 1160s [1., 2., 0., 0., 0., 1., 1., 0., 2., 0., 1., 2., 1., 0., 0.]], 1160s dtype=float32) 1160s typ = 1160s 1160s @singledispatch 1160s def as_cupy(val, typ=None): 1160s """ 1160s Rough conversion function 1160s 1160s Will try to infer target type from input type if not specified. 1160s """ 1160s if typ is None: 1160s typ = resolve_cupy_type(val) 1160s 1160s if issubclass(typ, CupyArray): 1160s import cupy as cp 1160s 1160s if isinstance(val, CSMatrix): 1160s val = val.toarray() 1160s return cp.array(val) 1160s elif issubclass(typ, CupyCSRMatrix): 1160s import cupy as cp 1160s import cupyx.scipy.sparse as cpsparse 1160s 1160s if isinstance(val, np.ndarray): 1160s return cpsparse.csr_matrix(cp.array(val)) 1160s else: 1160s return cpsparse.csr_matrix(val) 1160s elif issubclass(typ, CupyCSCMatrix): 1160s > import cupy as cp 1160s E ModuleNotFoundError: No module named 'cupy' 1160s 1160s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:1024: ModuleNotFoundError 1160s _________ test_view_of_view[cupy_csc-slice_subset-sparray_bool_subset] _________ 1160s 1160s matrix_type = functools.partial(, typ=) 1160s subset_func = 1160s subset_func2 = 1160s 1160s def test_view_of_view(matrix_type, subset_func, subset_func2): 1160s > adata = gen_adata((30, 15), X_type=matrix_type) 1160s 1160s tests/test_views.py:531: 1160s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1160s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:346: in gen_adata 1160s X = X_type(random_state.binomial(100, 0.005, (M, N)).astype(X_dtype)) 1160s /usr/lib/python3.13/functools.py:934: in wrapper 1160s return dispatch(args[0].__class__)(*args, **kw) 1160s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1160s 1160s val = array([[2., 2., 1., 0., 0., 2., 0., 1., 1., 0., 1., 0., 0., 0., 0.], 1160s [0., 0., 1., 1., 0., 0., 1., 0., 1., 1., 0...1., 0., 1., 0., 1., 1., 0.], 1160s [0., 0., 1., 0., 0., 0., 0., 0., 0., 0., 0., 2., 1., 0., 1.]], 1160s dtype=float32) 1160s typ = 1160s 1160s @singledispatch 1160s def as_cupy(val, typ=None): 1160s """ 1160s Rough conversion function 1160s 1160s Will try to infer target type from input type if not specified. 1160s """ 1160s if typ is None: 1160s typ = resolve_cupy_type(val) 1160s 1160s if issubclass(typ, CupyArray): 1160s import cupy as cp 1160s 1160s if isinstance(val, CSMatrix): 1160s val = val.toarray() 1160s return cp.array(val) 1160s elif issubclass(typ, CupyCSRMatrix): 1160s import cupy as cp 1160s import cupyx.scipy.sparse as cpsparse 1160s 1160s if isinstance(val, np.ndarray): 1160s return cpsparse.csr_matrix(cp.array(val)) 1160s else: 1160s return cpsparse.csr_matrix(val) 1160s elif issubclass(typ, CupyCSCMatrix): 1160s > import cupy as cp 1160s E ModuleNotFoundError: No module named 'cupy' 1160s 1160s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:1024: ModuleNotFoundError 1160s ____________ test_view_of_view[cupy_csc-single_subset-array_subset] ____________ 1160s 1160s matrix_type = functools.partial(, typ=) 1160s subset_func = 1160s subset_func2 = 1160s 1160s def test_view_of_view(matrix_type, subset_func, subset_func2): 1160s > adata = gen_adata((30, 15), X_type=matrix_type) 1160s 1160s tests/test_views.py:531: 1160s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1160s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:346: in gen_adata 1160s X = X_type(random_state.binomial(100, 0.005, (M, N)).astype(X_dtype)) 1160s /usr/lib/python3.13/functools.py:934: in wrapper 1160s return dispatch(args[0].__class__)(*args, **kw) 1160s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1160s 1160s val = array([[0., 0., 1., 0., 0., 0., 1., 1., 0., 0., 2., 1., 1., 1., 0.], 1160s [2., 1., 0., 0., 0., 1., 1., 0., 0., 0., 0...0., 0., 2., 0., 1., 0., 1.], 1160s [0., 1., 0., 0., 0., 0., 2., 0., 0., 0., 2., 1., 0., 0., 0.]], 1160s dtype=float32) 1160s typ = 1160s 1160s @singledispatch 1160s def as_cupy(val, typ=None): 1160s """ 1160s Rough conversion function 1160s 1160s Will try to infer target type from input type if not specified. 1160s """ 1160s if typ is None: 1160s typ = resolve_cupy_type(val) 1160s 1160s if issubclass(typ, CupyArray): 1160s import cupy as cp 1160s 1160s if isinstance(val, CSMatrix): 1160s val = val.toarray() 1160s return cp.array(val) 1160s elif issubclass(typ, CupyCSRMatrix): 1160s import cupy as cp 1160s import cupyx.scipy.sparse as cpsparse 1160s 1160s if isinstance(val, np.ndarray): 1160s return cpsparse.csr_matrix(cp.array(val)) 1160s else: 1160s return cpsparse.csr_matrix(val) 1160s elif issubclass(typ, CupyCSCMatrix): 1160s > import cupy as cp 1160s E ModuleNotFoundError: No module named 'cupy' 1160s 1160s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:1024: ModuleNotFoundError 1160s ____________ test_view_of_view[cupy_csc-single_subset-slice_subset] ____________ 1160s 1160s matrix_type = functools.partial(, typ=) 1160s subset_func = 1160s subset_func2 = 1160s 1160s def test_view_of_view(matrix_type, subset_func, subset_func2): 1160s > adata = gen_adata((30, 15), X_type=matrix_type) 1160s 1160s tests/test_views.py:531: 1160s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1160s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:346: in gen_adata 1160s X = X_type(random_state.binomial(100, 0.005, (M, N)).astype(X_dtype)) 1160s /usr/lib/python3.13/functools.py:934: in wrapper 1160s return dispatch(args[0].__class__)(*args, **kw) 1160s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1160s 1160s val = array([[0., 0., 0., 0., 0., 1., 1., 0., 1., 2., 1., 0., 0., 0., 0.], 1160s [1., 0., 0., 0., 0., 0., 1., 0., 1., 1., 0...1., 1., 0., 1., 2., 1., 1.], 1160s [0., 0., 0., 0., 1., 0., 0., 0., 0., 0., 1., 0., 0., 1., 1.]], 1160s dtype=float32) 1160s typ = 1160s 1160s @singledispatch 1160s def as_cupy(val, typ=None): 1160s """ 1160s Rough conversion function 1160s 1160s Will try to infer target type from input type if not specified. 1160s """ 1160s if typ is None: 1160s typ = resolve_cupy_type(val) 1160s 1160s if issubclass(typ, CupyArray): 1160s import cupy as cp 1160s 1160s if isinstance(val, CSMatrix): 1160s val = val.toarray() 1160s return cp.array(val) 1160s elif issubclass(typ, CupyCSRMatrix): 1160s import cupy as cp 1160s import cupyx.scipy.sparse as cpsparse 1160s 1160s if isinstance(val, np.ndarray): 1160s return cpsparse.csr_matrix(cp.array(val)) 1160s else: 1160s return cpsparse.csr_matrix(val) 1160s elif issubclass(typ, CupyCSCMatrix): 1160s > import cupy as cp 1160s E ModuleNotFoundError: No module named 'cupy' 1160s 1160s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:1024: ModuleNotFoundError 1160s ___________ test_view_of_view[cupy_csc-single_subset-single_subset] ____________ 1160s 1160s matrix_type = functools.partial(, typ=) 1160s subset_func = 1160s subset_func2 = 1160s 1160s def test_view_of_view(matrix_type, subset_func, subset_func2): 1160s > adata = gen_adata((30, 15), X_type=matrix_type) 1160s 1160s tests/test_views.py:531: 1160s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1160s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:346: in gen_adata 1160s X = X_type(random_state.binomial(100, 0.005, (M, N)).astype(X_dtype)) 1160s /usr/lib/python3.13/functools.py:934: in wrapper 1160s return dispatch(args[0].__class__)(*args, **kw) 1160s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1160s 1160s val = array([[0., 0., 0., 3., 1., 2., 0., 0., 2., 1., 0., 0., 0., 0., 0.], 1160s [2., 1., 1., 1., 1., 1., 0., 0., 0., 0., 0...0., 0., 0., 2., 0., 0., 1.], 1160s [1., 0., 0., 2., 1., 1., 1., 0., 0., 0., 1., 0., 0., 0., 0.]], 1160s dtype=float32) 1160s typ = 1160s 1160s @singledispatch 1160s def as_cupy(val, typ=None): 1160s """ 1160s Rough conversion function 1160s 1160s Will try to infer target type from input type if not specified. 1160s """ 1160s if typ is None: 1160s typ = resolve_cupy_type(val) 1160s 1160s if issubclass(typ, CupyArray): 1160s import cupy as cp 1160s 1160s if isinstance(val, CSMatrix): 1160s val = val.toarray() 1160s return cp.array(val) 1160s elif issubclass(typ, CupyCSRMatrix): 1160s import cupy as cp 1160s import cupyx.scipy.sparse as cpsparse 1160s 1160s if isinstance(val, np.ndarray): 1160s return cpsparse.csr_matrix(cp.array(val)) 1160s else: 1160s return cpsparse.csr_matrix(val) 1160s elif issubclass(typ, CupyCSCMatrix): 1160s > import cupy as cp 1160s E ModuleNotFoundError: No module named 'cupy' 1160s 1160s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:1024: ModuleNotFoundError 1160s __________ test_view_of_view[cupy_csc-single_subset-array_int_subset] __________ 1160s 1160s matrix_type = functools.partial(, typ=) 1160s subset_func = 1160s subset_func2 = 1160s 1160s def test_view_of_view(matrix_type, subset_func, subset_func2): 1160s > adata = gen_adata((30, 15), X_type=matrix_type) 1160s 1160s tests/test_views.py:531: 1160s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1160s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:346: in gen_adata 1160s X = X_type(random_state.binomial(100, 0.005, (M, N)).astype(X_dtype)) 1160s /usr/lib/python3.13/functools.py:934: in wrapper 1160s return dispatch(args[0].__class__)(*args, **kw) 1160s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1160s 1160s val = array([[0., 1., 1., 1., 0., 0., 1., 1., 2., 1., 1., 3., 0., 2., 0.], 1160s [0., 2., 1., 0., 3., 2., 0., 0., 0., 0., 1...2., 1., 0., 2., 1., 0., 0.], 1160s [1., 0., 0., 0., 0., 2., 1., 1., 0., 1., 0., 1., 0., 0., 0.]], 1160s dtype=float32) 1160s typ = 1160s 1160s @singledispatch 1160s def as_cupy(val, typ=None): 1160s """ 1160s Rough conversion function 1160s 1160s Will try to infer target type from input type if not specified. 1160s """ 1160s if typ is None: 1160s typ = resolve_cupy_type(val) 1160s 1160s if issubclass(typ, CupyArray): 1160s import cupy as cp 1160s 1160s if isinstance(val, CSMatrix): 1160s val = val.toarray() 1160s return cp.array(val) 1160s elif issubclass(typ, CupyCSRMatrix): 1160s import cupy as cp 1160s import cupyx.scipy.sparse as cpsparse 1160s 1160s if isinstance(val, np.ndarray): 1160s return cpsparse.csr_matrix(cp.array(val)) 1160s else: 1160s return cpsparse.csr_matrix(val) 1160s elif issubclass(typ, CupyCSCMatrix): 1160s > import cupy as cp 1160s E ModuleNotFoundError: No module named 'cupy' 1160s 1160s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:1024: ModuleNotFoundError 1160s __________ test_view_of_view[cupy_csc-single_subset-list_int_subset] ___________ 1160s 1160s matrix_type = functools.partial(, typ=) 1160s subset_func = 1160s subset_func2 = 1160s 1160s def test_view_of_view(matrix_type, subset_func, subset_func2): 1160s > adata = gen_adata((30, 15), X_type=matrix_type) 1160s 1160s tests/test_views.py:531: 1160s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1160s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:346: in gen_adata 1160s X = X_type(random_state.binomial(100, 0.005, (M, N)).astype(X_dtype)) 1160s /usr/lib/python3.13/functools.py:934: in wrapper 1160s return dispatch(args[0].__class__)(*args, **kw) 1160s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1160s 1160s val = array([[2., 0., 1., 0., 1., 0., 0., 0., 2., 0., 0., 1., 0., 0., 0.], 1160s [1., 0., 1., 0., 1., 0., 0., 2., 0., 1., 1...1., 0., 0., 0., 0., 0., 1.], 1160s [1., 0., 0., 0., 0., 1., 0., 0., 0., 1., 0., 1., 0., 0., 0.]], 1160s dtype=float32) 1160s typ = 1160s 1160s @singledispatch 1160s def as_cupy(val, typ=None): 1160s """ 1160s Rough conversion function 1160s 1160s Will try to infer target type from input type if not specified. 1160s """ 1160s if typ is None: 1160s typ = resolve_cupy_type(val) 1160s 1160s if issubclass(typ, CupyArray): 1160s import cupy as cp 1160s 1160s if isinstance(val, CSMatrix): 1160s val = val.toarray() 1160s return cp.array(val) 1160s elif issubclass(typ, CupyCSRMatrix): 1160s import cupy as cp 1160s import cupyx.scipy.sparse as cpsparse 1160s 1160s if isinstance(val, np.ndarray): 1160s return cpsparse.csr_matrix(cp.array(val)) 1160s else: 1160s return cpsparse.csr_matrix(val) 1160s elif issubclass(typ, CupyCSCMatrix): 1160s > import cupy as cp 1160s E ModuleNotFoundError: No module named 'cupy' 1160s 1160s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:1024: ModuleNotFoundError 1160s _________ test_view_of_view[cupy_csc-single_subset-array_bool_subset] __________ 1160s 1160s matrix_type = functools.partial(, typ=) 1160s subset_func = 1160s subset_func2 = 1160s 1160s def test_view_of_view(matrix_type, subset_func, subset_func2): 1160s > adata = gen_adata((30, 15), X_type=matrix_type) 1160s 1160s tests/test_views.py:531: 1160s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1160s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:346: in gen_adata 1160s X = X_type(random_state.binomial(100, 0.005, (M, N)).astype(X_dtype)) 1160s /usr/lib/python3.13/functools.py:934: in wrapper 1160s return dispatch(args[0].__class__)(*args, **kw) 1160s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1160s 1160s val = array([[0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 1., 0., 0.], 1160s [0., 1., 1., 0., 0., 3., 1., 1., 1., 1., 0...0., 1., 1., 0., 1., 1., 0.], 1160s [1., 2., 1., 0., 0., 0., 0., 0., 1., 1., 1., 1., 0., 1., 0.]], 1160s dtype=float32) 1160s typ = 1160s 1160s @singledispatch 1160s def as_cupy(val, typ=None): 1160s """ 1160s Rough conversion function 1160s 1160s Will try to infer target type from input type if not specified. 1160s """ 1160s if typ is None: 1160s typ = resolve_cupy_type(val) 1160s 1160s if issubclass(typ, CupyArray): 1160s import cupy as cp 1160s 1160s if isinstance(val, CSMatrix): 1160s val = val.toarray() 1160s return cp.array(val) 1160s elif issubclass(typ, CupyCSRMatrix): 1160s import cupy as cp 1160s import cupyx.scipy.sparse as cpsparse 1160s 1160s if isinstance(val, np.ndarray): 1160s return cpsparse.csr_matrix(cp.array(val)) 1160s else: 1160s return cpsparse.csr_matrix(val) 1160s elif issubclass(typ, CupyCSCMatrix): 1160s > import cupy as cp 1160s E ModuleNotFoundError: No module named 'cupy' 1160s 1160s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:1024: ModuleNotFoundError 1160s __________ test_view_of_view[cupy_csc-single_subset-list_bool_subset] __________ 1160s 1160s matrix_type = functools.partial(, typ=) 1160s subset_func = 1160s subset_func2 = 1160s 1160s def test_view_of_view(matrix_type, subset_func, subset_func2): 1160s > adata = gen_adata((30, 15), X_type=matrix_type) 1160s 1160s tests/test_views.py:531: 1160s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1160s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:346: in gen_adata 1160s X = X_type(random_state.binomial(100, 0.005, (M, N)).astype(X_dtype)) 1160s /usr/lib/python3.13/functools.py:934: in wrapper 1160s return dispatch(args[0].__class__)(*args, **kw) 1160s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1160s 1160s val = array([[0., 0., 0., 1., 0., 2., 1., 0., 1., 0., 1., 0., 0., 1., 0.], 1160s [0., 0., 1., 0., 1., 1., 0., 2., 0., 1., 0...2., 1., 0., 0., 0., 1., 0.], 1160s [0., 1., 1., 0., 0., 1., 0., 1., 0., 2., 1., 1., 1., 0., 0.]], 1160s dtype=float32) 1160s typ = 1160s 1160s @singledispatch 1160s def as_cupy(val, typ=None): 1160s """ 1160s Rough conversion function 1160s 1160s Will try to infer target type from input type if not specified. 1160s """ 1160s if typ is None: 1160s typ = resolve_cupy_type(val) 1160s 1160s if issubclass(typ, CupyArray): 1160s import cupy as cp 1160s 1160s if isinstance(val, CSMatrix): 1160s val = val.toarray() 1160s return cp.array(val) 1160s elif issubclass(typ, CupyCSRMatrix): 1160s import cupy as cp 1160s import cupyx.scipy.sparse as cpsparse 1160s 1160s if isinstance(val, np.ndarray): 1160s return cpsparse.csr_matrix(cp.array(val)) 1160s else: 1160s return cpsparse.csr_matrix(val) 1160s elif issubclass(typ, CupyCSCMatrix): 1160s > import cupy as cp 1160s E ModuleNotFoundError: No module named 'cupy' 1160s 1160s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:1024: ModuleNotFoundError 1160s _________ test_view_of_view[cupy_csc-single_subset-matrix_bool_subset] _________ 1160s 1160s matrix_type = functools.partial(, typ=) 1160s subset_func = 1160s subset_func2 = 1160s 1160s def test_view_of_view(matrix_type, subset_func, subset_func2): 1160s > adata = gen_adata((30, 15), X_type=matrix_type) 1160s 1160s tests/test_views.py:531: 1160s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1160s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:346: in gen_adata 1160s X = X_type(random_state.binomial(100, 0.005, (M, N)).astype(X_dtype)) 1160s /usr/lib/python3.13/functools.py:934: in wrapper 1160s return dispatch(args[0].__class__)(*args, **kw) 1160s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1160s 1160s val = array([[0., 1., 1., 0., 0., 2., 1., 0., 0., 0., 2., 1., 1., 0., 0.], 1160s [0., 0., 1., 1., 1., 0., 0., 1., 1., 1., 0...0., 1., 0., 0., 1., 0., 0.], 1160s [0., 1., 0., 0., 0., 0., 0., 0., 1., 0., 0., 0., 1., 0., 0.]], 1160s dtype=float32) 1160s typ = 1160s 1160s @singledispatch 1160s def as_cupy(val, typ=None): 1160s """ 1160s Rough conversion function 1160s 1160s Will try to infer target type from input type if not specified. 1160s """ 1160s if typ is None: 1160s typ = resolve_cupy_type(val) 1160s 1160s if issubclass(typ, CupyArray): 1160s import cupy as cp 1160s 1160s if isinstance(val, CSMatrix): 1160s val = val.toarray() 1160s return cp.array(val) 1160s elif issubclass(typ, CupyCSRMatrix): 1160s import cupy as cp 1160s import cupyx.scipy.sparse as cpsparse 1160s 1160s if isinstance(val, np.ndarray): 1160s return cpsparse.csr_matrix(cp.array(val)) 1160s else: 1160s return cpsparse.csr_matrix(val) 1160s elif issubclass(typ, CupyCSCMatrix): 1160s > import cupy as cp 1160s E ModuleNotFoundError: No module named 'cupy' 1160s 1160s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:1024: ModuleNotFoundError 1160s ________ test_view_of_view[cupy_csc-single_subset-spmatrix_bool_subset] ________ 1160s 1160s matrix_type = functools.partial(, typ=) 1160s subset_func = 1160s subset_func2 = 1160s 1160s def test_view_of_view(matrix_type, subset_func, subset_func2): 1160s > adata = gen_adata((30, 15), X_type=matrix_type) 1160s 1160s tests/test_views.py:531: 1160s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1160s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:346: in gen_adata 1160s X = X_type(random_state.binomial(100, 0.005, (M, N)).astype(X_dtype)) 1160s /usr/lib/python3.13/functools.py:934: in wrapper 1160s return dispatch(args[0].__class__)(*args, **kw) 1160s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1160s 1160s val = array([[0., 0., 0., 0., 1., 0., 0., 0., 2., 1., 0., 0., 0., 0., 0.], 1160s [2., 0., 0., 2., 0., 0., 0., 0., 0., 1., 2...2., 0., 0., 0., 0., 1., 0.], 1160s [0., 0., 0., 0., 0., 0., 0., 0., 1., 0., 0., 0., 0., 0., 0.]], 1160s dtype=float32) 1160s typ = 1160s 1160s @singledispatch 1160s def as_cupy(val, typ=None): 1160s """ 1160s Rough conversion function 1160s 1160s Will try to infer target type from input type if not specified. 1160s """ 1160s if typ is None: 1160s typ = resolve_cupy_type(val) 1160s 1160s if issubclass(typ, CupyArray): 1160s import cupy as cp 1160s 1160s if isinstance(val, CSMatrix): 1160s val = val.toarray() 1160s return cp.array(val) 1160s elif issubclass(typ, CupyCSRMatrix): 1160s import cupy as cp 1160s import cupyx.scipy.sparse as cpsparse 1160s 1160s if isinstance(val, np.ndarray): 1160s return cpsparse.csr_matrix(cp.array(val)) 1160s else: 1160s return cpsparse.csr_matrix(val) 1160s elif issubclass(typ, CupyCSCMatrix): 1160s > import cupy as cp 1160s E ModuleNotFoundError: No module named 'cupy' 1160s 1160s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:1024: ModuleNotFoundError 1160s ________ test_view_of_view[cupy_csc-single_subset-sparray_bool_subset] _________ 1160s 1160s matrix_type = functools.partial(, typ=) 1160s subset_func = 1160s subset_func2 = 1160s 1160s def test_view_of_view(matrix_type, subset_func, subset_func2): 1160s > adata = gen_adata((30, 15), X_type=matrix_type) 1160s 1160s tests/test_views.py:531: 1160s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1160s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:346: in gen_adata 1160s X = X_type(random_state.binomial(100, 0.005, (M, N)).astype(X_dtype)) 1160s /usr/lib/python3.13/functools.py:934: in wrapper 1160s return dispatch(args[0].__class__)(*args, **kw) 1160s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1160s 1160s val = array([[1., 1., 0., 1., 0., 0., 2., 0., 1., 0., 1., 0., 0., 0., 0.], 1160s [1., 1., 0., 0., 0., 1., 1., 1., 2., 2., 0...0., 0., 1., 0., 0., 0., 0.], 1160s [0., 1., 1., 0., 0., 0., 0., 1., 1., 0., 0., 0., 0., 0., 1.]], 1160s dtype=float32) 1160s typ = 1160s 1160s @singledispatch 1160s def as_cupy(val, typ=None): 1160s """ 1160s Rough conversion function 1160s 1160s Will try to infer target type from input type if not specified. 1160s """ 1160s if typ is None: 1160s typ = resolve_cupy_type(val) 1160s 1160s if issubclass(typ, CupyArray): 1160s import cupy as cp 1160s 1160s if isinstance(val, CSMatrix): 1160s val = val.toarray() 1160s return cp.array(val) 1160s elif issubclass(typ, CupyCSRMatrix): 1160s import cupy as cp 1160s import cupyx.scipy.sparse as cpsparse 1160s 1160s if isinstance(val, np.ndarray): 1160s return cpsparse.csr_matrix(cp.array(val)) 1160s else: 1160s return cpsparse.csr_matrix(val) 1160s elif issubclass(typ, CupyCSCMatrix): 1160s > import cupy as cp 1160s E ModuleNotFoundError: No module named 'cupy' 1160s 1160s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:1024: ModuleNotFoundError 1160s __________ test_view_of_view[cupy_csc-array_int_subset-array_subset] ___________ 1160s 1160s matrix_type = functools.partial(, typ=) 1160s subset_func = 1160s subset_func2 = 1160s 1160s def test_view_of_view(matrix_type, subset_func, subset_func2): 1160s > adata = gen_adata((30, 15), X_type=matrix_type) 1160s 1160s tests/test_views.py:531: 1160s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1160s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:346: in gen_adata 1160s X = X_type(random_state.binomial(100, 0.005, (M, N)).astype(X_dtype)) 1160s /usr/lib/python3.13/functools.py:934: in wrapper 1160s return dispatch(args[0].__class__)(*args, **kw) 1160s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1160s 1160s val = array([[0., 1., 0., 1., 0., 0., 1., 0., 0., 1., 2., 0., 1., 0., 2.], 1160s [0., 1., 0., 1., 1., 1., 0., 0., 2., 0., 1...1., 0., 1., 0., 0., 0., 0.], 1160s [1., 0., 1., 1., 0., 0., 1., 0., 0., 1., 0., 1., 1., 0., 0.]], 1160s dtype=float32) 1160s typ = 1160s 1160s @singledispatch 1160s def as_cupy(val, typ=None): 1160s """ 1160s Rough conversion function 1160s 1160s Will try to infer target type from input type if not specified. 1160s """ 1160s if typ is None: 1160s typ = resolve_cupy_type(val) 1160s 1160s if issubclass(typ, CupyArray): 1160s import cupy as cp 1160s 1160s if isinstance(val, CSMatrix): 1160s val = val.toarray() 1160s return cp.array(val) 1160s elif issubclass(typ, CupyCSRMatrix): 1160s import cupy as cp 1160s import cupyx.scipy.sparse as cpsparse 1160s 1160s if isinstance(val, np.ndarray): 1160s return cpsparse.csr_matrix(cp.array(val)) 1160s else: 1160s return cpsparse.csr_matrix(val) 1160s elif issubclass(typ, CupyCSCMatrix): 1160s > import cupy as cp 1160s E ModuleNotFoundError: No module named 'cupy' 1160s 1160s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:1024: ModuleNotFoundError 1160s __________ test_view_of_view[cupy_csc-array_int_subset-slice_subset] ___________ 1160s 1160s matrix_type = functools.partial(, typ=) 1160s subset_func = 1160s subset_func2 = 1160s 1160s def test_view_of_view(matrix_type, subset_func, subset_func2): 1160s > adata = gen_adata((30, 15), X_type=matrix_type) 1160s 1160s tests/test_views.py:531: 1160s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1160s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:346: in gen_adata 1160s X = X_type(random_state.binomial(100, 0.005, (M, N)).astype(X_dtype)) 1160s /usr/lib/python3.13/functools.py:934: in wrapper 1160s return dispatch(args[0].__class__)(*args, **kw) 1160s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1160s 1160s val = array([[0., 0., 0., 0., 1., 0., 0., 0., 0., 1., 0., 1., 1., 1., 0.], 1160s [0., 1., 1., 1., 1., 0., 0., 0., 0., 1., 0...0., 1., 0., 0., 1., 2., 0.], 1160s [0., 0., 0., 0., 0., 0., 0., 1., 0., 0., 1., 1., 0., 0., 0.]], 1160s dtype=float32) 1160s typ = 1160s 1160s @singledispatch 1160s def as_cupy(val, typ=None): 1160s """ 1160s Rough conversion function 1160s 1160s Will try to infer target type from input type if not specified. 1160s """ 1160s if typ is None: 1160s typ = resolve_cupy_type(val) 1160s 1160s if issubclass(typ, CupyArray): 1160s import cupy as cp 1160s 1160s if isinstance(val, CSMatrix): 1160s val = val.toarray() 1160s return cp.array(val) 1160s elif issubclass(typ, CupyCSRMatrix): 1160s import cupy as cp 1160s import cupyx.scipy.sparse as cpsparse 1160s 1160s if isinstance(val, np.ndarray): 1160s return cpsparse.csr_matrix(cp.array(val)) 1160s else: 1160s return cpsparse.csr_matrix(val) 1160s elif issubclass(typ, CupyCSCMatrix): 1160s > import cupy as cp 1160s E ModuleNotFoundError: No module named 'cupy' 1160s 1160s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:1024: ModuleNotFoundError 1160s __________ test_view_of_view[cupy_csc-array_int_subset-single_subset] __________ 1160s 1160s matrix_type = functools.partial(, typ=) 1160s subset_func = 1160s subset_func2 = 1160s 1160s def test_view_of_view(matrix_type, subset_func, subset_func2): 1160s > adata = gen_adata((30, 15), X_type=matrix_type) 1160s 1160s tests/test_views.py:531: 1160s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1160s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:346: in gen_adata 1160s X = X_type(random_state.binomial(100, 0.005, (M, N)).astype(X_dtype)) 1160s /usr/lib/python3.13/functools.py:934: in wrapper 1160s return dispatch(args[0].__class__)(*args, **kw) 1160s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1160s 1160s val = array([[0., 0., 1., 4., 1., 0., 0., 0., 0., 0., 1., 1., 0., 1., 0.], 1160s [0., 1., 1., 0., 1., 0., 0., 0., 0., 1., 0...0., 0., 0., 1., 1., 1., 0.], 1160s [0., 1., 1., 2., 1., 0., 1., 0., 0., 0., 0., 0., 0., 0., 1.]], 1160s dtype=float32) 1160s typ = 1160s 1160s @singledispatch 1160s def as_cupy(val, typ=None): 1160s """ 1160s Rough conversion function 1160s 1160s Will try to infer target type from input type if not specified. 1160s """ 1160s if typ is None: 1160s typ = resolve_cupy_type(val) 1160s 1160s if issubclass(typ, CupyArray): 1160s import cupy as cp 1160s 1160s if isinstance(val, CSMatrix): 1160s val = val.toarray() 1160s return cp.array(val) 1160s elif issubclass(typ, CupyCSRMatrix): 1160s import cupy as cp 1160s import cupyx.scipy.sparse as cpsparse 1160s 1160s if isinstance(val, np.ndarray): 1160s return cpsparse.csr_matrix(cp.array(val)) 1160s else: 1160s return cpsparse.csr_matrix(val) 1160s elif issubclass(typ, CupyCSCMatrix): 1160s > import cupy as cp 1160s E ModuleNotFoundError: No module named 'cupy' 1160s 1160s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:1024: ModuleNotFoundError 1160s ________ test_view_of_view[cupy_csc-array_int_subset-array_int_subset] _________ 1160s 1160s matrix_type = functools.partial(, typ=) 1160s subset_func = 1160s subset_func2 = 1160s 1160s def test_view_of_view(matrix_type, subset_func, subset_func2): 1160s > adata = gen_adata((30, 15), X_type=matrix_type) 1160s 1160s tests/test_views.py:531: 1160s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1160s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:346: in gen_adata 1160s X = X_type(random_state.binomial(100, 0.005, (M, N)).astype(X_dtype)) 1160s /usr/lib/python3.13/functools.py:934: in wrapper 1160s return dispatch(args[0].__class__)(*args, **kw) 1160s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1160s 1160s val = array([[0., 2., 0., 0., 1., 0., 0., 0., 0., 1., 0., 2., 1., 2., 1.], 1160s [0., 0., 2., 0., 0., 0., 0., 2., 1., 0., 0...0., 0., 0., 0., 0., 0., 0.], 1160s [1., 0., 0., 2., 1., 1., 0., 0., 1., 0., 2., 0., 1., 0., 0.]], 1160s dtype=float32) 1160s typ = 1160s 1160s @singledispatch 1160s def as_cupy(val, typ=None): 1160s """ 1160s Rough conversion function 1160s 1160s Will try to infer target type from input type if not specified. 1160s """ 1160s if typ is None: 1160s typ = resolve_cupy_type(val) 1160s 1160s if issubclass(typ, CupyArray): 1160s import cupy as cp 1160s 1160s if isinstance(val, CSMatrix): 1160s val = val.toarray() 1160s return cp.array(val) 1160s elif issubclass(typ, CupyCSRMatrix): 1160s import cupy as cp 1160s import cupyx.scipy.sparse as cpsparse 1160s 1160s if isinstance(val, np.ndarray): 1160s return cpsparse.csr_matrix(cp.array(val)) 1160s else: 1160s return cpsparse.csr_matrix(val) 1160s elif issubclass(typ, CupyCSCMatrix): 1160s > import cupy as cp 1160s E ModuleNotFoundError: No module named 'cupy' 1160s 1160s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:1024: ModuleNotFoundError 1160s _________ test_view_of_view[cupy_csc-array_int_subset-list_int_subset] _________ 1160s 1160s matrix_type = functools.partial(, typ=) 1160s subset_func = 1160s subset_func2 = 1160s 1160s def test_view_of_view(matrix_type, subset_func, subset_func2): 1160s > adata = gen_adata((30, 15), X_type=matrix_type) 1160s 1160s tests/test_views.py:531: 1160s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1160s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:346: in gen_adata 1160s X = X_type(random_state.binomial(100, 0.005, (M, N)).astype(X_dtype)) 1160s /usr/lib/python3.13/functools.py:934: in wrapper 1160s return dispatch(args[0].__class__)(*args, **kw) 1160s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1160s 1160s val = array([[0., 0., 0., 0., 1., 1., 0., 1., 0., 0., 0., 0., 0., 1., 0.], 1160s [0., 1., 0., 0., 1., 1., 0., 0., 2., 3., 0...0., 0., 0., 0., 2., 1., 2.], 1160s [0., 3., 0., 0., 0., 0., 0., 0., 0., 1., 0., 2., 0., 0., 0.]], 1160s dtype=float32) 1160s typ = 1160s 1160s @singledispatch 1160s def as_cupy(val, typ=None): 1160s """ 1160s Rough conversion function 1160s 1160s Will try to infer target type from input type if not specified. 1160s """ 1160s if typ is None: 1160s typ = resolve_cupy_type(val) 1160s 1160s if issubclass(typ, CupyArray): 1160s import cupy as cp 1160s 1160s if isinstance(val, CSMatrix): 1160s val = val.toarray() 1160s return cp.array(val) 1160s elif issubclass(typ, CupyCSRMatrix): 1160s import cupy as cp 1160s import cupyx.scipy.sparse as cpsparse 1160s 1160s if isinstance(val, np.ndarray): 1160s return cpsparse.csr_matrix(cp.array(val)) 1160s else: 1160s return cpsparse.csr_matrix(val) 1160s elif issubclass(typ, CupyCSCMatrix): 1160s > import cupy as cp 1160s E ModuleNotFoundError: No module named 'cupy' 1160s 1160s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:1024: ModuleNotFoundError 1160s ________ test_view_of_view[cupy_csc-array_int_subset-array_bool_subset] ________ 1160s 1160s matrix_type = functools.partial(, typ=) 1160s subset_func = 1160s subset_func2 = 1160s 1160s def test_view_of_view(matrix_type, subset_func, subset_func2): 1160s > adata = gen_adata((30, 15), X_type=matrix_type) 1160s 1160s tests/test_views.py:531: 1160s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1160s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:346: in gen_adata 1160s X = X_type(random_state.binomial(100, 0.005, (M, N)).astype(X_dtype)) 1160s /usr/lib/python3.13/functools.py:934: in wrapper 1160s return dispatch(args[0].__class__)(*args, **kw) 1160s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1160s 1160s val = array([[0., 0., 1., 0., 1., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0.], 1160s [1., 0., 0., 0., 0., 0., 0., 1., 0., 1., 0...1., 0., 2., 0., 0., 0., 1.], 1160s [0., 2., 2., 2., 1., 0., 0., 1., 1., 1., 1., 2., 0., 1., 0.]], 1160s dtype=float32) 1160s typ = 1160s 1160s @singledispatch 1160s def as_cupy(val, typ=None): 1160s """ 1160s Rough conversion function 1160s 1160s Will try to infer target type from input type if not specified. 1160s """ 1160s if typ is None: 1160s typ = resolve_cupy_type(val) 1160s 1160s if issubclass(typ, CupyArray): 1160s import cupy as cp 1160s 1160s if isinstance(val, CSMatrix): 1160s val = val.toarray() 1160s return cp.array(val) 1160s elif issubclass(typ, CupyCSRMatrix): 1160s import cupy as cp 1160s import cupyx.scipy.sparse as cpsparse 1160s 1160s if isinstance(val, np.ndarray): 1160s return cpsparse.csr_matrix(cp.array(val)) 1160s else: 1160s return cpsparse.csr_matrix(val) 1160s elif issubclass(typ, CupyCSCMatrix): 1160s > import cupy as cp 1160s E ModuleNotFoundError: No module named 'cupy' 1160s 1160s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:1024: ModuleNotFoundError 1160s ________ test_view_of_view[cupy_csc-array_int_subset-list_bool_subset] _________ 1160s 1160s matrix_type = functools.partial(, typ=) 1160s subset_func = 1160s subset_func2 = 1160s 1160s def test_view_of_view(matrix_type, subset_func, subset_func2): 1160s > adata = gen_adata((30, 15), X_type=matrix_type) 1160s 1160s tests/test_views.py:531: 1160s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1160s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:346: in gen_adata 1160s X = X_type(random_state.binomial(100, 0.005, (M, N)).astype(X_dtype)) 1160s /usr/lib/python3.13/functools.py:934: in wrapper 1160s return dispatch(args[0].__class__)(*args, **kw) 1160s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1160s 1160s val = array([[1., 0., 0., 1., 2., 1., 1., 0., 0., 0., 1., 1., 1., 0., 0.], 1160s [1., 1., 0., 2., 1., 3., 0., 1., 0., 0., 2...0., 0., 0., 0., 0., 0., 1.], 1160s [0., 1., 0., 0., 0., 0., 0., 0., 1., 0., 1., 1., 1., 1., 0.]], 1160s dtype=float32) 1160s typ = 1160s 1160s @singledispatch 1160s def as_cupy(val, typ=None): 1160s """ 1160s Rough conversion function 1160s 1160s Will try to infer target type from input type if not specified. 1160s """ 1160s if typ is None: 1160s typ = resolve_cupy_type(val) 1160s 1160s if issubclass(typ, CupyArray): 1160s import cupy as cp 1160s 1160s if isinstance(val, CSMatrix): 1160s val = val.toarray() 1160s return cp.array(val) 1160s elif issubclass(typ, CupyCSRMatrix): 1160s import cupy as cp 1160s import cupyx.scipy.sparse as cpsparse 1160s 1160s if isinstance(val, np.ndarray): 1160s return cpsparse.csr_matrix(cp.array(val)) 1160s else: 1160s return cpsparse.csr_matrix(val) 1160s elif issubclass(typ, CupyCSCMatrix): 1160s > import cupy as cp 1160s E ModuleNotFoundError: No module named 'cupy' 1160s 1160s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:1024: ModuleNotFoundError 1160s _______ test_view_of_view[cupy_csc-array_int_subset-matrix_bool_subset] ________ 1160s 1160s matrix_type = functools.partial(, typ=) 1160s subset_func = 1160s subset_func2 = 1160s 1160s def test_view_of_view(matrix_type, subset_func, subset_func2): 1160s > adata = gen_adata((30, 15), X_type=matrix_type) 1160s 1160s tests/test_views.py:531: 1160s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1160s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:346: in gen_adata 1160s X = X_type(random_state.binomial(100, 0.005, (M, N)).astype(X_dtype)) 1160s /usr/lib/python3.13/functools.py:934: in wrapper 1160s return dispatch(args[0].__class__)(*args, **kw) 1160s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1160s 1160s val = array([[0., 0., 1., 0., 1., 0., 0., 1., 0., 0., 1., 0., 0., 1., 1.], 1160s [1., 0., 1., 1., 1., 1., 0., 0., 1., 0., 2...0., 1., 0., 1., 2., 0., 0.], 1160s [0., 1., 0., 0., 1., 0., 1., 0., 1., 0., 0., 1., 0., 1., 0.]], 1160s dtype=float32) 1160s typ = 1160s 1160s @singledispatch 1160s def as_cupy(val, typ=None): 1160s """ 1160s Rough conversion function 1160s 1160s Will try to infer target type from input type if not specified. 1160s """ 1160s if typ is None: 1160s typ = resolve_cupy_type(val) 1160s 1160s if issubclass(typ, CupyArray): 1160s import cupy as cp 1160s 1160s if isinstance(val, CSMatrix): 1160s val = val.toarray() 1160s return cp.array(val) 1160s elif issubclass(typ, CupyCSRMatrix): 1160s import cupy as cp 1160s import cupyx.scipy.sparse as cpsparse 1160s 1160s if isinstance(val, np.ndarray): 1160s return cpsparse.csr_matrix(cp.array(val)) 1160s else: 1160s return cpsparse.csr_matrix(val) 1160s elif issubclass(typ, CupyCSCMatrix): 1160s > import cupy as cp 1160s E ModuleNotFoundError: No module named 'cupy' 1160s 1160s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:1024: ModuleNotFoundError 1160s ______ test_view_of_view[cupy_csc-array_int_subset-spmatrix_bool_subset] _______ 1160s 1160s matrix_type = functools.partial(, typ=) 1160s subset_func = 1160s subset_func2 = 1160s 1160s def test_view_of_view(matrix_type, subset_func, subset_func2): 1160s > adata = gen_adata((30, 15), X_type=matrix_type) 1160s 1160s tests/test_views.py:531: 1160s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1160s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:346: in gen_adata 1160s X = X_type(random_state.binomial(100, 0.005, (M, N)).astype(X_dtype)) 1160s /usr/lib/python3.13/functools.py:934: in wrapper 1160s return dispatch(args[0].__class__)(*args, **kw) 1160s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1160s 1160s val = array([[0., 1., 0., 0., 1., 0., 1., 0., 0., 2., 0., 0., 0., 1., 1.], 1160s [0., 1., 1., 0., 1., 1., 1., 0., 0., 0., 0...1., 0., 0., 1., 0., 0., 0.], 1160s [1., 1., 2., 1., 0., 0., 1., 1., 1., 0., 1., 0., 0., 0., 1.]], 1160s dtype=float32) 1160s typ = 1160s 1160s @singledispatch 1160s def as_cupy(val, typ=None): 1160s """ 1160s Rough conversion function 1160s 1160s Will try to infer target type from input type if not specified. 1160s """ 1160s if typ is None: 1160s typ = resolve_cupy_type(val) 1160s 1160s if issubclass(typ, CupyArray): 1160s import cupy as cp 1160s 1160s if isinstance(val, CSMatrix): 1160s val = val.toarray() 1160s return cp.array(val) 1160s elif issubclass(typ, CupyCSRMatrix): 1160s import cupy as cp 1160s import cupyx.scipy.sparse as cpsparse 1160s 1160s if isinstance(val, np.ndarray): 1160s return cpsparse.csr_matrix(cp.array(val)) 1160s else: 1160s return cpsparse.csr_matrix(val) 1160s elif issubclass(typ, CupyCSCMatrix): 1160s > import cupy as cp 1160s E ModuleNotFoundError: No module named 'cupy' 1160s 1160s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:1024: ModuleNotFoundError 1160s _______ test_view_of_view[cupy_csc-array_int_subset-sparray_bool_subset] _______ 1160s 1160s matrix_type = functools.partial(, typ=) 1160s subset_func = 1160s subset_func2 = 1160s 1160s def test_view_of_view(matrix_type, subset_func, subset_func2): 1160s > adata = gen_adata((30, 15), X_type=matrix_type) 1160s 1160s tests/test_views.py:531: 1160s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1160s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:346: in gen_adata 1160s X = X_type(random_state.binomial(100, 0.005, (M, N)).astype(X_dtype)) 1160s /usr/lib/python3.13/functools.py:934: in wrapper 1160s return dispatch(args[0].__class__)(*args, **kw) 1160s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1160s 1160s val = array([[0., 0., 0., 0., 0., 0., 0., 0., 1., 0., 1., 1., 0., 0., 0.], 1160s [0., 3., 2., 0., 0., 0., 1., 1., 2., 0., 0...0., 2., 1., 0., 1., 1., 2.], 1160s [0., 2., 0., 1., 1., 2., 0., 1., 0., 0., 0., 1., 0., 0., 1.]], 1160s dtype=float32) 1160s typ = 1160s 1160s @singledispatch 1160s def as_cupy(val, typ=None): 1160s """ 1160s Rough conversion function 1160s 1160s Will try to infer target type from input type if not specified. 1160s """ 1160s if typ is None: 1160s typ = resolve_cupy_type(val) 1160s 1160s if issubclass(typ, CupyArray): 1160s import cupy as cp 1160s 1160s if isinstance(val, CSMatrix): 1160s val = val.toarray() 1160s return cp.array(val) 1160s elif issubclass(typ, CupyCSRMatrix): 1160s import cupy as cp 1160s import cupyx.scipy.sparse as cpsparse 1160s 1160s if isinstance(val, np.ndarray): 1160s return cpsparse.csr_matrix(cp.array(val)) 1160s else: 1160s return cpsparse.csr_matrix(val) 1160s elif issubclass(typ, CupyCSCMatrix): 1160s > import cupy as cp 1160s E ModuleNotFoundError: No module named 'cupy' 1160s 1160s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:1024: ModuleNotFoundError 1160s ___________ test_view_of_view[cupy_csc-list_int_subset-array_subset] ___________ 1160s 1160s matrix_type = functools.partial(, typ=) 1160s subset_func = 1160s subset_func2 = 1160s 1160s def test_view_of_view(matrix_type, subset_func, subset_func2): 1160s > adata = gen_adata((30, 15), X_type=matrix_type) 1160s 1160s tests/test_views.py:531: 1160s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1160s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:346: in gen_adata 1160s X = X_type(random_state.binomial(100, 0.005, (M, N)).astype(X_dtype)) 1160s /usr/lib/python3.13/functools.py:934: in wrapper 1160s return dispatch(args[0].__class__)(*args, **kw) 1160s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1160s 1160s val = array([[1., 1., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 1., 1., 0.], 1160s [1., 0., 0., 0., 0., 0., 0., 0., 0., 0., 1...0., 1., 1., 0., 0., 0., 0.], 1160s [1., 3., 1., 1., 0., 1., 0., 0., 0., 1., 0., 1., 0., 2., 2.]], 1160s dtype=float32) 1160s typ = 1160s 1160s @singledispatch 1160s def as_cupy(val, typ=None): 1160s """ 1160s Rough conversion function 1160s 1160s Will try to infer target type from input type if not specified. 1160s """ 1160s if typ is None: 1160s typ = resolve_cupy_type(val) 1160s 1160s if issubclass(typ, CupyArray): 1160s import cupy as cp 1160s 1160s if isinstance(val, CSMatrix): 1160s val = val.toarray() 1160s return cp.array(val) 1160s elif issubclass(typ, CupyCSRMatrix): 1160s import cupy as cp 1160s import cupyx.scipy.sparse as cpsparse 1160s 1160s if isinstance(val, np.ndarray): 1160s return cpsparse.csr_matrix(cp.array(val)) 1160s else: 1160s return cpsparse.csr_matrix(val) 1160s elif issubclass(typ, CupyCSCMatrix): 1160s > import cupy as cp 1160s E ModuleNotFoundError: No module named 'cupy' 1160s 1160s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:1024: ModuleNotFoundError 1160s ___________ test_view_of_view[cupy_csc-list_int_subset-slice_subset] ___________ 1160s 1160s matrix_type = functools.partial(, typ=) 1160s subset_func = 1160s subset_func2 = 1160s 1160s def test_view_of_view(matrix_type, subset_func, subset_func2): 1160s > adata = gen_adata((30, 15), X_type=matrix_type) 1160s 1160s tests/test_views.py:531: 1160s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1160s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:346: in gen_adata 1160s X = X_type(random_state.binomial(100, 0.005, (M, N)).astype(X_dtype)) 1160s /usr/lib/python3.13/functools.py:934: in wrapper 1160s return dispatch(args[0].__class__)(*args, **kw) 1160s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1160s 1160s val = array([[0., 0., 0., 0., 1., 0., 1., 0., 1., 0., 1., 0., 0., 0., 0.], 1160s [0., 0., 0., 0., 1., 0., 0., 1., 1., 4., 1...0., 0., 0., 1., 1., 1., 0.], 1160s [0., 0., 0., 0., 0., 0., 0., 0., 1., 1., 1., 0., 1., 1., 1.]], 1160s dtype=float32) 1160s typ = 1160s 1160s @singledispatch 1160s def as_cupy(val, typ=None): 1160s """ 1160s Rough conversion function 1160s 1160s Will try to infer target type from input type if not specified. 1160s """ 1160s if typ is None: 1160s typ = resolve_cupy_type(val) 1160s 1160s if issubclass(typ, CupyArray): 1160s import cupy as cp 1160s 1160s if isinstance(val, CSMatrix): 1160s val = val.toarray() 1160s return cp.array(val) 1160s elif issubclass(typ, CupyCSRMatrix): 1160s import cupy as cp 1160s import cupyx.scipy.sparse as cpsparse 1160s 1160s if isinstance(val, np.ndarray): 1160s return cpsparse.csr_matrix(cp.array(val)) 1160s else: 1160s return cpsparse.csr_matrix(val) 1160s elif issubclass(typ, CupyCSCMatrix): 1160s > import cupy as cp 1160s E ModuleNotFoundError: No module named 'cupy' 1160s 1160s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:1024: ModuleNotFoundError 1160s __________ test_view_of_view[cupy_csc-list_int_subset-single_subset] ___________ 1160s 1160s matrix_type = functools.partial(, typ=) 1160s subset_func = 1160s subset_func2 = 1160s 1160s def test_view_of_view(matrix_type, subset_func, subset_func2): 1160s > adata = gen_adata((30, 15), X_type=matrix_type) 1160s 1160s tests/test_views.py:531: 1160s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1160s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:346: in gen_adata 1160s X = X_type(random_state.binomial(100, 0.005, (M, N)).astype(X_dtype)) 1160s /usr/lib/python3.13/functools.py:934: in wrapper 1160s return dispatch(args[0].__class__)(*args, **kw) 1160s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1160s 1160s val = array([[0., 1., 0., 0., 0., 0., 0., 0., 0., 1., 2., 0., 0., 0., 0.], 1160s [0., 1., 0., 0., 1., 0., 0., 1., 0., 2., 1...0., 2., 0., 0., 0., 0., 1.], 1160s [1., 0., 0., 0., 1., 0., 2., 1., 0., 0., 1., 0., 1., 1., 0.]], 1160s dtype=float32) 1160s typ = 1160s 1160s @singledispatch 1160s def as_cupy(val, typ=None): 1160s """ 1160s Rough conversion function 1160s 1160s Will try to infer target type from input type if not specified. 1160s """ 1160s if typ is None: 1160s typ = resolve_cupy_type(val) 1160s 1160s if issubclass(typ, CupyArray): 1160s import cupy as cp 1160s 1160s if isinstance(val, CSMatrix): 1160s val = val.toarray() 1160s return cp.array(val) 1160s elif issubclass(typ, CupyCSRMatrix): 1160s import cupy as cp 1160s import cupyx.scipy.sparse as cpsparse 1160s 1160s if isinstance(val, np.ndarray): 1160s return cpsparse.csr_matrix(cp.array(val)) 1160s else: 1160s return cpsparse.csr_matrix(val) 1160s elif issubclass(typ, CupyCSCMatrix): 1160s > import cupy as cp 1160s E ModuleNotFoundError: No module named 'cupy' 1160s 1160s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:1024: ModuleNotFoundError 1160s _________ test_view_of_view[cupy_csc-list_int_subset-array_int_subset] _________ 1160s 1160s matrix_type = functools.partial(, typ=) 1160s subset_func = 1160s subset_func2 = 1160s 1160s def test_view_of_view(matrix_type, subset_func, subset_func2): 1160s > adata = gen_adata((30, 15), X_type=matrix_type) 1160s 1160s tests/test_views.py:531: 1160s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1160s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:346: in gen_adata 1160s X = X_type(random_state.binomial(100, 0.005, (M, N)).astype(X_dtype)) 1160s /usr/lib/python3.13/functools.py:934: in wrapper 1160s return dispatch(args[0].__class__)(*args, **kw) 1160s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1160s 1160s val = array([[0., 0., 1., 2., 0., 0., 1., 0., 0., 0., 1., 2., 0., 2., 1.], 1160s [1., 0., 0., 0., 0., 0., 0., 1., 2., 0., 0...1., 0., 1., 0., 0., 0., 1.], 1160s [0., 0., 0., 1., 0., 1., 0., 0., 1., 1., 0., 2., 0., 1., 0.]], 1160s dtype=float32) 1160s typ = 1160s 1160s @singledispatch 1160s def as_cupy(val, typ=None): 1160s """ 1160s Rough conversion function 1160s 1160s Will try to infer target type from input type if not specified. 1160s """ 1160s if typ is None: 1160s typ = resolve_cupy_type(val) 1160s 1160s if issubclass(typ, CupyArray): 1160s import cupy as cp 1160s 1160s if isinstance(val, CSMatrix): 1160s val = val.toarray() 1160s return cp.array(val) 1160s elif issubclass(typ, CupyCSRMatrix): 1160s import cupy as cp 1160s import cupyx.scipy.sparse as cpsparse 1160s 1160s if isinstance(val, np.ndarray): 1160s return cpsparse.csr_matrix(cp.array(val)) 1160s else: 1160s return cpsparse.csr_matrix(val) 1160s elif issubclass(typ, CupyCSCMatrix): 1160s > import cupy as cp 1160s E ModuleNotFoundError: No module named 'cupy' 1160s 1160s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:1024: ModuleNotFoundError 1160s _________ test_view_of_view[cupy_csc-list_int_subset-list_int_subset] __________ 1160s 1160s matrix_type = functools.partial(, typ=) 1160s subset_func = 1160s subset_func2 = 1160s 1160s def test_view_of_view(matrix_type, subset_func, subset_func2): 1160s > adata = gen_adata((30, 15), X_type=matrix_type) 1160s 1160s tests/test_views.py:531: 1160s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1160s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:346: in gen_adata 1160s X = X_type(random_state.binomial(100, 0.005, (M, N)).astype(X_dtype)) 1160s /usr/lib/python3.13/functools.py:934: in wrapper 1160s return dispatch(args[0].__class__)(*args, **kw) 1160s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1160s 1160s val = array([[0., 0., 1., 1., 0., 0., 0., 0., 0., 2., 0., 0., 0., 0., 0.], 1160s [0., 0., 1., 0., 1., 1., 1., 2., 0., 0., 0...0., 1., 0., 0., 0., 0., 0.], 1160s [1., 0., 1., 0., 0., 0., 0., 2., 0., 0., 1., 0., 0., 1., 0.]], 1160s dtype=float32) 1160s typ = 1160s 1160s @singledispatch 1160s def as_cupy(val, typ=None): 1160s """ 1160s Rough conversion function 1160s 1160s Will try to infer target type from input type if not specified. 1160s """ 1160s if typ is None: 1160s typ = resolve_cupy_type(val) 1160s 1160s if issubclass(typ, CupyArray): 1160s import cupy as cp 1160s 1160s if isinstance(val, CSMatrix): 1160s val = val.toarray() 1160s return cp.array(val) 1160s elif issubclass(typ, CupyCSRMatrix): 1160s import cupy as cp 1160s import cupyx.scipy.sparse as cpsparse 1160s 1160s if isinstance(val, np.ndarray): 1160s return cpsparse.csr_matrix(cp.array(val)) 1160s else: 1160s return cpsparse.csr_matrix(val) 1160s elif issubclass(typ, CupyCSCMatrix): 1160s > import cupy as cp 1160s E ModuleNotFoundError: No module named 'cupy' 1160s 1160s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:1024: ModuleNotFoundError 1160s ________ test_view_of_view[cupy_csc-list_int_subset-array_bool_subset] _________ 1160s 1160s matrix_type = functools.partial(, typ=) 1160s subset_func = 1160s subset_func2 = 1160s 1160s def test_view_of_view(matrix_type, subset_func, subset_func2): 1160s > adata = gen_adata((30, 15), X_type=matrix_type) 1160s 1160s tests/test_views.py:531: 1160s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1160s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:346: in gen_adata 1160s X = X_type(random_state.binomial(100, 0.005, (M, N)).astype(X_dtype)) 1160s /usr/lib/python3.13/functools.py:934: in wrapper 1160s return dispatch(args[0].__class__)(*args, **kw) 1160s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1160s 1160s val = array([[1., 1., 0., 1., 2., 0., 2., 0., 0., 1., 0., 0., 0., 0., 0.], 1160s [1., 1., 0., 0., 1., 1., 1., 0., 1., 0., 0...0., 0., 2., 0., 0., 0., 1.], 1160s [0., 0., 2., 1., 1., 1., 0., 0., 0., 1., 1., 0., 0., 0., 0.]], 1160s dtype=float32) 1160s typ = 1160s 1160s @singledispatch 1160s def as_cupy(val, typ=None): 1160s """ 1160s Rough conversion function 1160s 1160s Will try to infer target type from input type if not specified. 1160s """ 1160s if typ is None: 1160s typ = resolve_cupy_type(val) 1160s 1160s if issubclass(typ, CupyArray): 1160s import cupy as cp 1160s 1160s if isinstance(val, CSMatrix): 1160s val = val.toarray() 1160s return cp.array(val) 1160s elif issubclass(typ, CupyCSRMatrix): 1160s import cupy as cp 1160s import cupyx.scipy.sparse as cpsparse 1160s 1160s if isinstance(val, np.ndarray): 1160s return cpsparse.csr_matrix(cp.array(val)) 1160s else: 1160s return cpsparse.csr_matrix(val) 1160s elif issubclass(typ, CupyCSCMatrix): 1160s > import cupy as cp 1160s E ModuleNotFoundError: No module named 'cupy' 1160s 1160s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:1024: ModuleNotFoundError 1160s _________ test_view_of_view[cupy_csc-list_int_subset-list_bool_subset] _________ 1160s 1160s matrix_type = functools.partial(, typ=) 1160s subset_func = 1160s subset_func2 = 1160s 1160s def test_view_of_view(matrix_type, subset_func, subset_func2): 1160s > adata = gen_adata((30, 15), X_type=matrix_type) 1160s 1160s tests/test_views.py:531: 1160s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1160s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:346: in gen_adata 1160s X = X_type(random_state.binomial(100, 0.005, (M, N)).astype(X_dtype)) 1160s /usr/lib/python3.13/functools.py:934: in wrapper 1160s return dispatch(args[0].__class__)(*args, **kw) 1160s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1160s 1160s val = array([[1., 1., 1., 0., 1., 0., 0., 0., 0., 1., 1., 0., 0., 1., 0.], 1160s [1., 0., 1., 1., 0., 0., 0., 0., 0., 1., 2...0., 0., 0., 0., 0., 0., 1.], 1160s [1., 0., 0., 0., 0., 1., 1., 1., 0., 1., 0., 0., 0., 0., 1.]], 1160s dtype=float32) 1160s typ = 1160s 1160s @singledispatch 1160s def as_cupy(val, typ=None): 1160s """ 1160s Rough conversion function 1160s 1160s Will try to infer target type from input type if not specified. 1160s """ 1160s if typ is None: 1160s typ = resolve_cupy_type(val) 1160s 1160s if issubclass(typ, CupyArray): 1160s import cupy as cp 1160s 1160s if isinstance(val, CSMatrix): 1160s val = val.toarray() 1160s return cp.array(val) 1160s elif issubclass(typ, CupyCSRMatrix): 1160s import cupy as cp 1160s import cupyx.scipy.sparse as cpsparse 1160s 1160s if isinstance(val, np.ndarray): 1160s return cpsparse.csr_matrix(cp.array(val)) 1160s else: 1160s return cpsparse.csr_matrix(val) 1160s elif issubclass(typ, CupyCSCMatrix): 1160s > import cupy as cp 1160s E ModuleNotFoundError: No module named 'cupy' 1160s 1160s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:1024: ModuleNotFoundError 1160s ________ test_view_of_view[cupy_csc-list_int_subset-matrix_bool_subset] ________ 1160s 1160s matrix_type = functools.partial(, typ=) 1160s subset_func = 1160s subset_func2 = 1160s 1160s def test_view_of_view(matrix_type, subset_func, subset_func2): 1160s > adata = gen_adata((30, 15), X_type=matrix_type) 1160s 1160s tests/test_views.py:531: 1160s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1160s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:346: in gen_adata 1160s X = X_type(random_state.binomial(100, 0.005, (M, N)).astype(X_dtype)) 1160s /usr/lib/python3.13/functools.py:934: in wrapper 1160s return dispatch(args[0].__class__)(*args, **kw) 1160s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1160s 1160s val = array([[2., 0., 1., 0., 0., 0., 1., 1., 2., 0., 0., 0., 0., 0., 0.], 1160s [1., 0., 0., 1., 0., 1., 0., 0., 0., 1., 1...0., 0., 0., 1., 0., 0., 0.], 1160s [0., 1., 0., 2., 1., 0., 0., 0., 0., 0., 0., 2., 1., 1., 1.]], 1160s dtype=float32) 1160s typ = 1160s 1160s @singledispatch 1160s def as_cupy(val, typ=None): 1160s """ 1160s Rough conversion function 1160s 1160s Will try to infer target type from input type if not specified. 1160s """ 1160s if typ is None: 1160s typ = resolve_cupy_type(val) 1160s 1160s if issubclass(typ, CupyArray): 1160s import cupy as cp 1160s 1160s if isinstance(val, CSMatrix): 1160s val = val.toarray() 1160s return cp.array(val) 1160s elif issubclass(typ, CupyCSRMatrix): 1160s import cupy as cp 1160s import cupyx.scipy.sparse as cpsparse 1160s 1160s if isinstance(val, np.ndarray): 1160s return cpsparse.csr_matrix(cp.array(val)) 1160s else: 1160s return cpsparse.csr_matrix(val) 1160s elif issubclass(typ, CupyCSCMatrix): 1160s > import cupy as cp 1160s E ModuleNotFoundError: No module named 'cupy' 1160s 1160s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:1024: ModuleNotFoundError 1160s _______ test_view_of_view[cupy_csc-list_int_subset-spmatrix_bool_subset] _______ 1160s 1160s matrix_type = functools.partial(, typ=) 1160s subset_func = 1160s subset_func2 = 1160s 1160s def test_view_of_view(matrix_type, subset_func, subset_func2): 1160s > adata = gen_adata((30, 15), X_type=matrix_type) 1160s 1160s tests/test_views.py:531: 1160s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1160s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:346: in gen_adata 1160s X = X_type(random_state.binomial(100, 0.005, (M, N)).astype(X_dtype)) 1160s /usr/lib/python3.13/functools.py:934: in wrapper 1160s return dispatch(args[0].__class__)(*args, **kw) 1160s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1160s 1160s val = array([[0., 0., 2., 0., 0., 1., 1., 1., 0., 0., 0., 1., 1., 1., 0.], 1160s [1., 0., 0., 1., 0., 0., 0., 0., 3., 0., 1...0., 1., 0., 2., 0., 1., 0.], 1160s [0., 0., 0., 0., 1., 1., 0., 0., 0., 0., 1., 0., 0., 0., 1.]], 1160s dtype=float32) 1160s typ = 1160s 1160s @singledispatch 1160s def as_cupy(val, typ=None): 1160s """ 1160s Rough conversion function 1160s 1160s Will try to infer target type from input type if not specified. 1160s """ 1160s if typ is None: 1160s typ = resolve_cupy_type(val) 1160s 1160s if issubclass(typ, CupyArray): 1160s import cupy as cp 1160s 1160s if isinstance(val, CSMatrix): 1160s val = val.toarray() 1160s return cp.array(val) 1160s elif issubclass(typ, CupyCSRMatrix): 1160s import cupy as cp 1160s import cupyx.scipy.sparse as cpsparse 1160s 1160s if isinstance(val, np.ndarray): 1160s return cpsparse.csr_matrix(cp.array(val)) 1160s else: 1160s return cpsparse.csr_matrix(val) 1160s elif issubclass(typ, CupyCSCMatrix): 1160s > import cupy as cp 1160s E ModuleNotFoundError: No module named 'cupy' 1160s 1160s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:1024: ModuleNotFoundError 1160s _______ test_view_of_view[cupy_csc-list_int_subset-sparray_bool_subset] ________ 1160s 1160s matrix_type = functools.partial(, typ=) 1160s subset_func = 1160s subset_func2 = 1160s 1160s def test_view_of_view(matrix_type, subset_func, subset_func2): 1160s > adata = gen_adata((30, 15), X_type=matrix_type) 1160s 1160s tests/test_views.py:531: 1160s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1160s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:346: in gen_adata 1160s X = X_type(random_state.binomial(100, 0.005, (M, N)).astype(X_dtype)) 1160s /usr/lib/python3.13/functools.py:934: in wrapper 1160s return dispatch(args[0].__class__)(*args, **kw) 1160s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1160s 1160s val = array([[1., 4., 0., 0., 1., 0., 1., 3., 0., 0., 1., 0., 1., 1., 0.], 1160s [0., 0., 0., 2., 1., 0., 1., 0., 1., 0., 0...0., 0., 0., 1., 0., 2., 0.], 1160s [0., 0., 1., 0., 1., 1., 0., 0., 0., 0., 0., 1., 0., 0., 0.]], 1160s dtype=float32) 1160s typ = 1160s 1160s @singledispatch 1160s def as_cupy(val, typ=None): 1160s """ 1160s Rough conversion function 1160s 1160s Will try to infer target type from input type if not specified. 1160s """ 1160s if typ is None: 1160s typ = resolve_cupy_type(val) 1160s 1160s if issubclass(typ, CupyArray): 1160s import cupy as cp 1160s 1160s if isinstance(val, CSMatrix): 1160s val = val.toarray() 1160s return cp.array(val) 1160s elif issubclass(typ, CupyCSRMatrix): 1160s import cupy as cp 1160s import cupyx.scipy.sparse as cpsparse 1160s 1160s if isinstance(val, np.ndarray): 1160s return cpsparse.csr_matrix(cp.array(val)) 1160s else: 1160s return cpsparse.csr_matrix(val) 1160s elif issubclass(typ, CupyCSCMatrix): 1160s > import cupy as cp 1160s E ModuleNotFoundError: No module named 'cupy' 1160s 1160s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:1024: ModuleNotFoundError 1160s __________ test_view_of_view[cupy_csc-array_bool_subset-array_subset] __________ 1160s 1160s matrix_type = functools.partial(, typ=) 1160s subset_func = 1160s subset_func2 = 1160s 1160s def test_view_of_view(matrix_type, subset_func, subset_func2): 1160s > adata = gen_adata((30, 15), X_type=matrix_type) 1160s 1160s tests/test_views.py:531: 1160s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1160s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:346: in gen_adata 1160s X = X_type(random_state.binomial(100, 0.005, (M, N)).astype(X_dtype)) 1160s /usr/lib/python3.13/functools.py:934: in wrapper 1160s return dispatch(args[0].__class__)(*args, **kw) 1160s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1160s 1160s val = array([[1., 1., 1., 0., 0., 1., 1., 0., 1., 0., 1., 1., 0., 0., 0.], 1160s [1., 0., 0., 0., 1., 1., 2., 0., 0., 0., 2...0., 1., 1., 0., 0., 0., 1.], 1160s [0., 0., 0., 0., 2., 0., 1., 2., 1., 1., 0., 0., 2., 0., 1.]], 1160s dtype=float32) 1160s typ = 1160s 1160s @singledispatch 1160s def as_cupy(val, typ=None): 1160s """ 1160s Rough conversion function 1160s 1160s Will try to infer target type from input type if not specified. 1160s """ 1160s if typ is None: 1160s typ = resolve_cupy_type(val) 1160s 1160s if issubclass(typ, CupyArray): 1160s import cupy as cp 1160s 1160s if isinstance(val, CSMatrix): 1160s val = val.toarray() 1160s return cp.array(val) 1160s elif issubclass(typ, CupyCSRMatrix): 1160s import cupy as cp 1160s import cupyx.scipy.sparse as cpsparse 1160s 1160s if isinstance(val, np.ndarray): 1160s return cpsparse.csr_matrix(cp.array(val)) 1160s else: 1160s return cpsparse.csr_matrix(val) 1160s elif issubclass(typ, CupyCSCMatrix): 1160s > import cupy as cp 1160s E ModuleNotFoundError: No module named 'cupy' 1160s 1160s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:1024: ModuleNotFoundError 1160s __________ test_view_of_view[cupy_csc-array_bool_subset-slice_subset] __________ 1160s 1160s matrix_type = functools.partial(, typ=) 1160s subset_func = 1160s subset_func2 = 1160s 1160s def test_view_of_view(matrix_type, subset_func, subset_func2): 1160s > adata = gen_adata((30, 15), X_type=matrix_type) 1160s 1160s tests/test_views.py:531: 1160s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1160s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:346: in gen_adata 1160s X = X_type(random_state.binomial(100, 0.005, (M, N)).astype(X_dtype)) 1160s /usr/lib/python3.13/functools.py:934: in wrapper 1160s return dispatch(args[0].__class__)(*args, **kw) 1160s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1160s 1160s val = array([[0., 0., 0., 0., 0., 0., 1., 0., 1., 0., 0., 1., 0., 1., 0.], 1160s [1., 0., 1., 1., 2., 1., 0., 2., 0., 1., 1...0., 2., 2., 0., 1., 0., 1.], 1160s [0., 0., 0., 1., 0., 0., 3., 1., 0., 0., 1., 1., 0., 0., 0.]], 1160s dtype=float32) 1160s typ = 1160s 1160s @singledispatch 1160s def as_cupy(val, typ=None): 1160s """ 1160s Rough conversion function 1160s 1160s Will try to infer target type from input type if not specified. 1160s """ 1160s if typ is None: 1160s typ = resolve_cupy_type(val) 1160s 1160s if issubclass(typ, CupyArray): 1160s import cupy as cp 1160s 1160s if isinstance(val, CSMatrix): 1160s val = val.toarray() 1160s return cp.array(val) 1160s elif issubclass(typ, CupyCSRMatrix): 1160s import cupy as cp 1160s import cupyx.scipy.sparse as cpsparse 1160s 1160s if isinstance(val, np.ndarray): 1160s return cpsparse.csr_matrix(cp.array(val)) 1160s else: 1160s return cpsparse.csr_matrix(val) 1160s elif issubclass(typ, CupyCSCMatrix): 1160s > import cupy as cp 1160s E ModuleNotFoundError: No module named 'cupy' 1160s 1160s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:1024: ModuleNotFoundError 1160s _________ test_view_of_view[cupy_csc-array_bool_subset-single_subset] __________ 1160s 1160s matrix_type = functools.partial(, typ=) 1160s subset_func = 1160s subset_func2 = 1160s 1160s def test_view_of_view(matrix_type, subset_func, subset_func2): 1160s > adata = gen_adata((30, 15), X_type=matrix_type) 1160s 1160s tests/test_views.py:531: 1160s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1160s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:346: in gen_adata 1160s X = X_type(random_state.binomial(100, 0.005, (M, N)).astype(X_dtype)) 1160s /usr/lib/python3.13/functools.py:934: in wrapper 1160s return dispatch(args[0].__class__)(*args, **kw) 1160s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1160s 1160s val = array([[2., 1., 1., 0., 0., 2., 1., 2., 1., 1., 0., 1., 0., 1., 2.], 1160s [1., 0., 2., 2., 1., 1., 0., 0., 0., 1., 0...1., 0., 0., 1., 0., 2., 1.], 1160s [1., 0., 1., 0., 0., 0., 0., 0., 0., 1., 0., 1., 1., 2., 0.]], 1160s dtype=float32) 1160s typ = 1160s 1160s @singledispatch 1160s def as_cupy(val, typ=None): 1160s """ 1160s Rough conversion function 1160s 1160s Will try to infer target type from input type if not specified. 1160s """ 1160s if typ is None: 1160s typ = resolve_cupy_type(val) 1160s 1160s if issubclass(typ, CupyArray): 1160s import cupy as cp 1160s 1160s if isinstance(val, CSMatrix): 1160s val = val.toarray() 1160s return cp.array(val) 1160s elif issubclass(typ, CupyCSRMatrix): 1160s import cupy as cp 1160s import cupyx.scipy.sparse as cpsparse 1160s 1160s if isinstance(val, np.ndarray): 1160s return cpsparse.csr_matrix(cp.array(val)) 1160s else: 1160s return cpsparse.csr_matrix(val) 1160s elif issubclass(typ, CupyCSCMatrix): 1160s > import cupy as cp 1160s E ModuleNotFoundError: No module named 'cupy' 1160s 1160s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:1024: ModuleNotFoundError 1160s ________ test_view_of_view[cupy_csc-array_bool_subset-array_int_subset] ________ 1160s 1160s matrix_type = functools.partial(, typ=) 1160s subset_func = 1160s subset_func2 = 1160s 1160s def test_view_of_view(matrix_type, subset_func, subset_func2): 1160s > adata = gen_adata((30, 15), X_type=matrix_type) 1160s 1160s tests/test_views.py:531: 1160s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1160s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:346: in gen_adata 1160s X = X_type(random_state.binomial(100, 0.005, (M, N)).astype(X_dtype)) 1160s /usr/lib/python3.13/functools.py:934: in wrapper 1160s return dispatch(args[0].__class__)(*args, **kw) 1160s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1160s 1160s val = array([[1., 0., 2., 0., 0., 0., 1., 1., 3., 0., 0., 0., 0., 1., 1.], 1160s [0., 0., 1., 0., 0., 2., 1., 1., 0., 1., 0...0., 0., 0., 0., 3., 3., 0.], 1160s [0., 2., 0., 0., 2., 1., 1., 0., 0., 0., 1., 1., 0., 2., 1.]], 1160s dtype=float32) 1160s typ = 1160s 1160s @singledispatch 1160s def as_cupy(val, typ=None): 1160s """ 1160s Rough conversion function 1160s 1160s Will try to infer target type from input type if not specified. 1160s """ 1160s if typ is None: 1160s typ = resolve_cupy_type(val) 1160s 1160s if issubclass(typ, CupyArray): 1160s import cupy as cp 1160s 1160s if isinstance(val, CSMatrix): 1160s val = val.toarray() 1160s return cp.array(val) 1160s elif issubclass(typ, CupyCSRMatrix): 1160s import cupy as cp 1160s import cupyx.scipy.sparse as cpsparse 1160s 1160s if isinstance(val, np.ndarray): 1160s return cpsparse.csr_matrix(cp.array(val)) 1160s else: 1160s return cpsparse.csr_matrix(val) 1160s elif issubclass(typ, CupyCSCMatrix): 1160s > import cupy as cp 1160s E ModuleNotFoundError: No module named 'cupy' 1160s 1160s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:1024: ModuleNotFoundError 1160s ________ test_view_of_view[cupy_csc-array_bool_subset-list_int_subset] _________ 1160s 1160s matrix_type = functools.partial(, typ=) 1160s subset_func = 1160s subset_func2 = 1160s 1160s def test_view_of_view(matrix_type, subset_func, subset_func2): 1160s > adata = gen_adata((30, 15), X_type=matrix_type) 1160s 1160s tests/test_views.py:531: 1160s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1160s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:346: in gen_adata 1160s X = X_type(random_state.binomial(100, 0.005, (M, N)).astype(X_dtype)) 1160s /usr/lib/python3.13/functools.py:934: in wrapper 1160s return dispatch(args[0].__class__)(*args, **kw) 1160s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1160s 1160s val = array([[0., 0., 2., 0., 0., 1., 0., 3., 0., 0., 0., 0., 0., 0., 1.], 1160s [0., 1., 1., 0., 1., 0., 1., 1., 1., 0., 0...0., 0., 0., 1., 0., 3., 0.], 1160s [0., 0., 2., 2., 0., 1., 1., 0., 1., 1., 0., 0., 0., 0., 0.]], 1160s dtype=float32) 1160s typ = 1160s 1160s @singledispatch 1160s def as_cupy(val, typ=None): 1160s """ 1160s Rough conversion function 1160s 1160s Will try to infer target type from input type if not specified. 1160s """ 1160s if typ is None: 1160s typ = resolve_cupy_type(val) 1160s 1160s if issubclass(typ, CupyArray): 1160s import cupy as cp 1160s 1160s if isinstance(val, CSMatrix): 1160s val = val.toarray() 1160s return cp.array(val) 1160s elif issubclass(typ, CupyCSRMatrix): 1160s import cupy as cp 1160s import cupyx.scipy.sparse as cpsparse 1160s 1160s if isinstance(val, np.ndarray): 1160s return cpsparse.csr_matrix(cp.array(val)) 1160s else: 1160s return cpsparse.csr_matrix(val) 1160s elif issubclass(typ, CupyCSCMatrix): 1160s > import cupy as cp 1160s E ModuleNotFoundError: No module named 'cupy' 1160s 1160s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:1024: ModuleNotFoundError 1160s _______ test_view_of_view[cupy_csc-array_bool_subset-array_bool_subset] ________ 1160s 1160s matrix_type = functools.partial(, typ=) 1160s subset_func = 1160s subset_func2 = 1160s 1160s def test_view_of_view(matrix_type, subset_func, subset_func2): 1160s > adata = gen_adata((30, 15), X_type=matrix_type) 1160s 1160s tests/test_views.py:531: 1160s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1160s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:346: in gen_adata 1160s X = X_type(random_state.binomial(100, 0.005, (M, N)).astype(X_dtype)) 1160s /usr/lib/python3.13/functools.py:934: in wrapper 1160s return dispatch(args[0].__class__)(*args, **kw) 1160s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1160s 1160s val = array([[0., 0., 1., 0., 0., 1., 2., 0., 0., 0., 1., 1., 0., 1., 0.], 1160s [1., 0., 1., 1., 1., 1., 1., 0., 0., 0., 1...1., 0., 0., 0., 0., 2., 0.], 1160s [0., 1., 0., 0., 1., 1., 3., 1., 0., 1., 2., 0., 0., 0., 0.]], 1160s dtype=float32) 1160s typ = 1160s 1160s @singledispatch 1160s def as_cupy(val, typ=None): 1160s """ 1160s Rough conversion function 1160s 1160s Will try to infer target type from input type if not specified. 1160s """ 1160s if typ is None: 1160s typ = resolve_cupy_type(val) 1160s 1160s if issubclass(typ, CupyArray): 1160s import cupy as cp 1160s 1160s if isinstance(val, CSMatrix): 1160s val = val.toarray() 1160s return cp.array(val) 1160s elif issubclass(typ, CupyCSRMatrix): 1160s import cupy as cp 1160s import cupyx.scipy.sparse as cpsparse 1160s 1160s if isinstance(val, np.ndarray): 1160s return cpsparse.csr_matrix(cp.array(val)) 1160s else: 1160s return cpsparse.csr_matrix(val) 1160s elif issubclass(typ, CupyCSCMatrix): 1160s > import cupy as cp 1160s E ModuleNotFoundError: No module named 'cupy' 1160s 1160s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:1024: ModuleNotFoundError 1160s ________ test_view_of_view[cupy_csc-array_bool_subset-list_bool_subset] ________ 1160s 1160s matrix_type = functools.partial(, typ=) 1160s subset_func = 1160s subset_func2 = 1160s 1160s def test_view_of_view(matrix_type, subset_func, subset_func2): 1160s > adata = gen_adata((30, 15), X_type=matrix_type) 1160s 1160s tests/test_views.py:531: 1160s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1160s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:346: in gen_adata 1160s X = X_type(random_state.binomial(100, 0.005, (M, N)).astype(X_dtype)) 1160s /usr/lib/python3.13/functools.py:934: in wrapper 1160s return dispatch(args[0].__class__)(*args, **kw) 1160s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1160s 1160s val = array([[1., 1., 0., 0., 1., 0., 0., 1., 0., 0., 0., 1., 2., 1., 0.], 1160s [0., 1., 0., 0., 0., 0., 0., 0., 1., 0., 2...0., 1., 0., 0., 0., 1., 0.], 1160s [1., 0., 0., 0., 0., 1., 0., 0., 0., 0., 1., 0., 0., 0., 0.]], 1160s dtype=float32) 1160s typ = 1160s 1160s @singledispatch 1160s def as_cupy(val, typ=None): 1160s """ 1160s Rough conversion function 1160s 1160s Will try to infer target type from input type if not specified. 1160s """ 1160s if typ is None: 1160s typ = resolve_cupy_type(val) 1160s 1160s if issubclass(typ, CupyArray): 1160s import cupy as cp 1160s 1160s if isinstance(val, CSMatrix): 1160s val = val.toarray() 1160s return cp.array(val) 1160s elif issubclass(typ, CupyCSRMatrix): 1160s import cupy as cp 1160s import cupyx.scipy.sparse as cpsparse 1160s 1160s if isinstance(val, np.ndarray): 1160s return cpsparse.csr_matrix(cp.array(val)) 1160s else: 1160s return cpsparse.csr_matrix(val) 1160s elif issubclass(typ, CupyCSCMatrix): 1160s > import cupy as cp 1160s E ModuleNotFoundError: No module named 'cupy' 1160s 1160s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:1024: ModuleNotFoundError 1160s _______ test_view_of_view[cupy_csc-array_bool_subset-matrix_bool_subset] _______ 1160s 1160s matrix_type = functools.partial(, typ=) 1160s subset_func = 1160s subset_func2 = 1160s 1160s def test_view_of_view(matrix_type, subset_func, subset_func2): 1160s > adata = gen_adata((30, 15), X_type=matrix_type) 1160s 1160s tests/test_views.py:531: 1160s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1160s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:346: in gen_adata 1160s X = X_type(random_state.binomial(100, 0.005, (M, N)).astype(X_dtype)) 1160s /usr/lib/python3.13/functools.py:934: in wrapper 1160s return dispatch(args[0].__class__)(*args, **kw) 1160s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1160s 1160s val = array([[1., 1., 0., 0., 1., 0., 1., 0., 2., 0., 1., 1., 0., 2., 1.], 1160s [0., 0., 0., 0., 1., 0., 0., 1., 0., 0., 1...0., 0., 1., 0., 0., 0., 0.], 1160s [0., 0., 1., 1., 2., 0., 0., 1., 0., 0., 0., 0., 0., 1., 0.]], 1160s dtype=float32) 1160s typ = 1160s 1160s @singledispatch 1160s def as_cupy(val, typ=None): 1160s """ 1160s Rough conversion function 1160s 1160s Will try to infer target type from input type if not specified. 1160s """ 1160s if typ is None: 1160s typ = resolve_cupy_type(val) 1160s 1160s if issubclass(typ, CupyArray): 1160s import cupy as cp 1160s 1160s if isinstance(val, CSMatrix): 1160s val = val.toarray() 1160s return cp.array(val) 1160s elif issubclass(typ, CupyCSRMatrix): 1160s import cupy as cp 1160s import cupyx.scipy.sparse as cpsparse 1160s 1160s if isinstance(val, np.ndarray): 1160s return cpsparse.csr_matrix(cp.array(val)) 1160s else: 1160s return cpsparse.csr_matrix(val) 1160s elif issubclass(typ, CupyCSCMatrix): 1160s > import cupy as cp 1160s E ModuleNotFoundError: No module named 'cupy' 1160s 1160s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:1024: ModuleNotFoundError 1160s ______ test_view_of_view[cupy_csc-array_bool_subset-spmatrix_bool_subset] ______ 1160s 1160s matrix_type = functools.partial(, typ=) 1160s subset_func = 1160s subset_func2 = 1160s 1160s def test_view_of_view(matrix_type, subset_func, subset_func2): 1160s > adata = gen_adata((30, 15), X_type=matrix_type) 1160s 1160s tests/test_views.py:531: 1160s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1160s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:346: in gen_adata 1160s X = X_type(random_state.binomial(100, 0.005, (M, N)).astype(X_dtype)) 1160s /usr/lib/python3.13/functools.py:934: in wrapper 1160s return dispatch(args[0].__class__)(*args, **kw) 1160s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1160s 1160s val = array([[0., 0., 1., 0., 0., 0., 0., 0., 0., 1., 1., 1., 0., 0., 0.], 1160s [0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0...2., 0., 0., 0., 0., 0., 0.], 1160s [0., 1., 0., 0., 0., 0., 0., 1., 0., 0., 0., 0., 0., 0., 2.]], 1160s dtype=float32) 1160s typ = 1160s 1160s @singledispatch 1160s def as_cupy(val, typ=None): 1160s """ 1160s Rough conversion function 1160s 1160s Will try to infer target type from input type if not specified. 1160s """ 1160s if typ is None: 1160s typ = resolve_cupy_type(val) 1160s 1160s if issubclass(typ, CupyArray): 1160s import cupy as cp 1160s 1160s if isinstance(val, CSMatrix): 1160s val = val.toarray() 1160s return cp.array(val) 1160s elif issubclass(typ, CupyCSRMatrix): 1160s import cupy as cp 1160s import cupyx.scipy.sparse as cpsparse 1160s 1160s if isinstance(val, np.ndarray): 1160s return cpsparse.csr_matrix(cp.array(val)) 1160s else: 1160s return cpsparse.csr_matrix(val) 1160s elif issubclass(typ, CupyCSCMatrix): 1160s > import cupy as cp 1160s E ModuleNotFoundError: No module named 'cupy' 1160s 1160s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:1024: ModuleNotFoundError 1160s ______ test_view_of_view[cupy_csc-array_bool_subset-sparray_bool_subset] _______ 1160s 1160s matrix_type = functools.partial(, typ=) 1160s subset_func = 1160s subset_func2 = 1160s 1160s def test_view_of_view(matrix_type, subset_func, subset_func2): 1160s > adata = gen_adata((30, 15), X_type=matrix_type) 1160s 1160s tests/test_views.py:531: 1160s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1160s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:346: in gen_adata 1160s X = X_type(random_state.binomial(100, 0.005, (M, N)).astype(X_dtype)) 1160s /usr/lib/python3.13/functools.py:934: in wrapper 1160s return dispatch(args[0].__class__)(*args, **kw) 1160s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1160s 1160s val = array([[2., 0., 1., 0., 1., 0., 0., 0., 0., 1., 0., 3., 0., 0., 0.], 1160s [0., 0., 0., 0., 0., 1., 0., 0., 0., 1., 0...0., 0., 1., 0., 0., 1., 0.], 1160s [1., 1., 0., 0., 0., 0., 0., 0., 1., 1., 1., 1., 0., 3., 0.]], 1160s dtype=float32) 1160s typ = 1160s 1160s @singledispatch 1160s def as_cupy(val, typ=None): 1160s """ 1160s Rough conversion function 1160s 1160s Will try to infer target type from input type if not specified. 1160s """ 1160s if typ is None: 1160s typ = resolve_cupy_type(val) 1160s 1160s if issubclass(typ, CupyArray): 1160s import cupy as cp 1160s 1160s if isinstance(val, CSMatrix): 1160s val = val.toarray() 1160s return cp.array(val) 1160s elif issubclass(typ, CupyCSRMatrix): 1160s import cupy as cp 1160s import cupyx.scipy.sparse as cpsparse 1160s 1160s if isinstance(val, np.ndarray): 1160s return cpsparse.csr_matrix(cp.array(val)) 1160s else: 1160s return cpsparse.csr_matrix(val) 1160s elif issubclass(typ, CupyCSCMatrix): 1160s > import cupy as cp 1160s E ModuleNotFoundError: No module named 'cupy' 1160s 1160s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:1024: ModuleNotFoundError 1160s __________ test_view_of_view[cupy_csc-list_bool_subset-array_subset] ___________ 1160s 1160s matrix_type = functools.partial(, typ=) 1160s subset_func = 1160s subset_func2 = 1160s 1160s def test_view_of_view(matrix_type, subset_func, subset_func2): 1160s > adata = gen_adata((30, 15), X_type=matrix_type) 1160s 1160s tests/test_views.py:531: 1160s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1160s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:346: in gen_adata 1160s X = X_type(random_state.binomial(100, 0.005, (M, N)).astype(X_dtype)) 1160s /usr/lib/python3.13/functools.py:934: in wrapper 1160s return dispatch(args[0].__class__)(*args, **kw) 1160s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1160s 1160s val = array([[0., 0., 0., 1., 0., 1., 2., 0., 0., 0., 1., 0., 1., 0., 0.], 1160s [0., 0., 1., 0., 0., 0., 0., 1., 1., 0., 0...0., 0., 0., 1., 1., 3., 0.], 1160s [1., 1., 1., 0., 0., 0., 1., 1., 0., 0., 0., 0., 0., 1., 1.]], 1160s dtype=float32) 1160s typ = 1160s 1160s @singledispatch 1160s def as_cupy(val, typ=None): 1160s """ 1160s Rough conversion function 1160s 1160s Will try to infer target type from input type if not specified. 1160s """ 1160s if typ is None: 1160s typ = resolve_cupy_type(val) 1160s 1160s if issubclass(typ, CupyArray): 1160s import cupy as cp 1160s 1160s if isinstance(val, CSMatrix): 1160s val = val.toarray() 1160s return cp.array(val) 1160s elif issubclass(typ, CupyCSRMatrix): 1160s import cupy as cp 1160s import cupyx.scipy.sparse as cpsparse 1160s 1160s if isinstance(val, np.ndarray): 1160s return cpsparse.csr_matrix(cp.array(val)) 1160s else: 1160s return cpsparse.csr_matrix(val) 1160s elif issubclass(typ, CupyCSCMatrix): 1160s > import cupy as cp 1160s E ModuleNotFoundError: No module named 'cupy' 1160s 1160s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:1024: ModuleNotFoundError 1160s __________ test_view_of_view[cupy_csc-list_bool_subset-slice_subset] ___________ 1160s 1160s matrix_type = functools.partial(, typ=) 1160s subset_func = 1160s subset_func2 = 1160s 1160s def test_view_of_view(matrix_type, subset_func, subset_func2): 1160s > adata = gen_adata((30, 15), X_type=matrix_type) 1160s 1160s tests/test_views.py:531: 1160s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1160s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:346: in gen_adata 1160s X = X_type(random_state.binomial(100, 0.005, (M, N)).astype(X_dtype)) 1160s /usr/lib/python3.13/functools.py:934: in wrapper 1160s return dispatch(args[0].__class__)(*args, **kw) 1160s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1160s 1160s val = array([[0., 1., 0., 0., 0., 1., 0., 0., 0., 0., 1., 0., 0., 0., 0.], 1160s [1., 0., 0., 0., 0., 0., 0., 0., 1., 0., 1...0., 1., 0., 0., 0., 0., 1.], 1160s [0., 0., 0., 0., 0., 0., 1., 1., 0., 1., 0., 1., 0., 0., 0.]], 1160s dtype=float32) 1160s typ = 1160s 1160s @singledispatch 1160s def as_cupy(val, typ=None): 1160s """ 1160s Rough conversion function 1160s 1160s Will try to infer target type from input type if not specified. 1160s """ 1160s if typ is None: 1160s typ = resolve_cupy_type(val) 1160s 1160s if issubclass(typ, CupyArray): 1160s import cupy as cp 1160s 1160s if isinstance(val, CSMatrix): 1160s val = val.toarray() 1160s return cp.array(val) 1160s elif issubclass(typ, CupyCSRMatrix): 1160s import cupy as cp 1160s import cupyx.scipy.sparse as cpsparse 1160s 1160s if isinstance(val, np.ndarray): 1160s return cpsparse.csr_matrix(cp.array(val)) 1160s else: 1160s return cpsparse.csr_matrix(val) 1160s elif issubclass(typ, CupyCSCMatrix): 1160s > import cupy as cp 1160s E ModuleNotFoundError: No module named 'cupy' 1160s 1160s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:1024: ModuleNotFoundError 1160s __________ test_view_of_view[cupy_csc-list_bool_subset-single_subset] __________ 1160s 1160s matrix_type = functools.partial(, typ=) 1160s subset_func = 1160s subset_func2 = 1160s 1160s def test_view_of_view(matrix_type, subset_func, subset_func2): 1160s > adata = gen_adata((30, 15), X_type=matrix_type) 1160s 1160s tests/test_views.py:531: 1160s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1160s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:346: in gen_adata 1160s X = X_type(random_state.binomial(100, 0.005, (M, N)).astype(X_dtype)) 1160s /usr/lib/python3.13/functools.py:934: in wrapper 1160s return dispatch(args[0].__class__)(*args, **kw) 1160s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1160s 1160s val = array([[0., 0., 1., 0., 0., 0., 0., 0., 0., 0., 1., 0., 0., 1., 0.], 1160s [0., 0., 0., 0., 0., 0., 0., 0., 1., 0., 0...3., 0., 1., 1., 1., 1., 0.], 1160s [0., 0., 1., 0., 0., 1., 1., 2., 0., 0., 0., 0., 0., 0., 2.]], 1160s dtype=float32) 1160s typ = 1160s 1160s @singledispatch 1160s def as_cupy(val, typ=None): 1160s """ 1160s Rough conversion function 1160s 1160s Will try to infer target type from input type if not specified. 1160s """ 1160s if typ is None: 1160s typ = resolve_cupy_type(val) 1160s 1160s if issubclass(typ, CupyArray): 1160s import cupy as cp 1160s 1160s if isinstance(val, CSMatrix): 1160s val = val.toarray() 1160s return cp.array(val) 1160s elif issubclass(typ, CupyCSRMatrix): 1160s import cupy as cp 1160s import cupyx.scipy.sparse as cpsparse 1160s 1160s if isinstance(val, np.ndarray): 1160s return cpsparse.csr_matrix(cp.array(val)) 1160s else: 1160s return cpsparse.csr_matrix(val) 1160s elif issubclass(typ, CupyCSCMatrix): 1160s > import cupy as cp 1160s E ModuleNotFoundError: No module named 'cupy' 1160s 1160s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:1024: ModuleNotFoundError 1160s ________ test_view_of_view[cupy_csc-list_bool_subset-array_int_subset] _________ 1160s 1160s matrix_type = functools.partial(, typ=) 1160s subset_func = 1160s subset_func2 = 1160s 1160s def test_view_of_view(matrix_type, subset_func, subset_func2): 1160s > adata = gen_adata((30, 15), X_type=matrix_type) 1160s 1160s tests/test_views.py:531: 1160s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1160s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:346: in gen_adata 1160s X = X_type(random_state.binomial(100, 0.005, (M, N)).astype(X_dtype)) 1160s /usr/lib/python3.13/functools.py:934: in wrapper 1160s return dispatch(args[0].__class__)(*args, **kw) 1160s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1160s 1160s val = array([[1., 1., 1., 0., 0., 0., 0., 0., 1., 0., 0., 1., 1., 1., 2.], 1160s [1., 1., 0., 1., 2., 2., 0., 3., 0., 0., 0...1., 0., 1., 0., 2., 0., 2.], 1160s [1., 2., 0., 0., 1., 0., 0., 0., 0., 2., 2., 0., 0., 0., 0.]], 1160s dtype=float32) 1160s typ = 1160s 1160s @singledispatch 1160s def as_cupy(val, typ=None): 1160s """ 1160s Rough conversion function 1160s 1160s Will try to infer target type from input type if not specified. 1160s """ 1160s if typ is None: 1160s typ = resolve_cupy_type(val) 1160s 1160s if issubclass(typ, CupyArray): 1160s import cupy as cp 1160s 1160s if isinstance(val, CSMatrix): 1160s val = val.toarray() 1160s return cp.array(val) 1160s elif issubclass(typ, CupyCSRMatrix): 1160s import cupy as cp 1160s import cupyx.scipy.sparse as cpsparse 1160s 1160s if isinstance(val, np.ndarray): 1160s return cpsparse.csr_matrix(cp.array(val)) 1160s else: 1160s return cpsparse.csr_matrix(val) 1160s elif issubclass(typ, CupyCSCMatrix): 1160s > import cupy as cp 1160s E ModuleNotFoundError: No module named 'cupy' 1160s 1160s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:1024: ModuleNotFoundError 1160s _________ test_view_of_view[cupy_csc-list_bool_subset-list_int_subset] _________ 1160s 1160s matrix_type = functools.partial(, typ=) 1160s subset_func = 1160s subset_func2 = 1160s 1160s def test_view_of_view(matrix_type, subset_func, subset_func2): 1160s > adata = gen_adata((30, 15), X_type=matrix_type) 1160s 1160s tests/test_views.py:531: 1160s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1160s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:346: in gen_adata 1160s X = X_type(random_state.binomial(100, 0.005, (M, N)).astype(X_dtype)) 1160s /usr/lib/python3.13/functools.py:934: in wrapper 1160s return dispatch(args[0].__class__)(*args, **kw) 1160s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1160s 1160s val = array([[0., 0., 0., 1., 0., 0., 0., 0., 1., 2., 0., 2., 1., 0., 0.], 1160s [1., 0., 0., 0., 0., 0., 0., 1., 1., 0., 0...1., 1., 1., 0., 1., 0., 0.], 1160s [0., 0., 0., 2., 0., 1., 1., 0., 1., 1., 1., 0., 0., 1., 0.]], 1160s dtype=float32) 1160s typ = 1160s 1160s @singledispatch 1160s def as_cupy(val, typ=None): 1160s """ 1160s Rough conversion function 1160s 1160s Will try to infer target type from input type if not specified. 1160s """ 1160s if typ is None: 1160s typ = resolve_cupy_type(val) 1160s 1160s if issubclass(typ, CupyArray): 1160s import cupy as cp 1160s 1160s if isinstance(val, CSMatrix): 1160s val = val.toarray() 1160s return cp.array(val) 1160s elif issubclass(typ, CupyCSRMatrix): 1160s import cupy as cp 1160s import cupyx.scipy.sparse as cpsparse 1160s 1160s if isinstance(val, np.ndarray): 1160s return cpsparse.csr_matrix(cp.array(val)) 1160s else: 1160s return cpsparse.csr_matrix(val) 1160s elif issubclass(typ, CupyCSCMatrix): 1160s > import cupy as cp 1160s E ModuleNotFoundError: No module named 'cupy' 1160s 1160s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:1024: ModuleNotFoundError 1160s ________ test_view_of_view[cupy_csc-list_bool_subset-array_bool_subset] ________ 1160s 1160s matrix_type = functools.partial(, typ=) 1160s subset_func = 1160s subset_func2 = 1160s 1160s def test_view_of_view(matrix_type, subset_func, subset_func2): 1160s > adata = gen_adata((30, 15), X_type=matrix_type) 1160s 1160s tests/test_views.py:531: 1160s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1160s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:346: in gen_adata 1160s X = X_type(random_state.binomial(100, 0.005, (M, N)).astype(X_dtype)) 1160s /usr/lib/python3.13/functools.py:934: in wrapper 1160s return dispatch(args[0].__class__)(*args, **kw) 1160s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1160s 1160s val = array([[0., 1., 1., 1., 0., 0., 0., 0., 0., 1., 1., 1., 0., 0., 1.], 1160s [1., 0., 0., 0., 0., 0., 0., 1., 2., 1., 2...0., 1., 0., 2., 1., 1., 3.], 1160s [1., 0., 0., 1., 0., 1., 0., 0., 0., 0., 2., 0., 2., 1., 0.]], 1160s dtype=float32) 1160s typ = 1160s 1160s @singledispatch 1160s def as_cupy(val, typ=None): 1160s """ 1160s Rough conversion function 1160s 1160s Will try to infer target type from input type if not specified. 1160s """ 1160s if typ is None: 1160s typ = resolve_cupy_type(val) 1160s 1160s if issubclass(typ, CupyArray): 1160s import cupy as cp 1160s 1160s if isinstance(val, CSMatrix): 1160s val = val.toarray() 1160s return cp.array(val) 1160s elif issubclass(typ, CupyCSRMatrix): 1160s import cupy as cp 1160s import cupyx.scipy.sparse as cpsparse 1160s 1160s if isinstance(val, np.ndarray): 1160s return cpsparse.csr_matrix(cp.array(val)) 1160s else: 1160s return cpsparse.csr_matrix(val) 1160s elif issubclass(typ, CupyCSCMatrix): 1160s > import cupy as cp 1160s E ModuleNotFoundError: No module named 'cupy' 1160s 1160s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:1024: ModuleNotFoundError 1160s ________ test_view_of_view[cupy_csc-list_bool_subset-list_bool_subset] _________ 1160s 1160s matrix_type = functools.partial(, typ=) 1160s subset_func = 1160s subset_func2 = 1160s 1160s def test_view_of_view(matrix_type, subset_func, subset_func2): 1160s > adata = gen_adata((30, 15), X_type=matrix_type) 1160s 1160s tests/test_views.py:531: 1160s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1160s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:346: in gen_adata 1160s X = X_type(random_state.binomial(100, 0.005, (M, N)).astype(X_dtype)) 1160s /usr/lib/python3.13/functools.py:934: in wrapper 1160s return dispatch(args[0].__class__)(*args, **kw) 1160s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1160s 1160s val = array([[1., 1., 1., 0., 1., 0., 1., 1., 0., 0., 1., 1., 1., 1., 1.], 1160s [0., 1., 0., 1., 0., 0., 2., 1., 1., 0., 1...0., 0., 1., 0., 0., 0., 0.], 1160s [2., 0., 0., 2., 1., 1., 1., 0., 2., 0., 1., 0., 0., 1., 0.]], 1160s dtype=float32) 1160s typ = 1160s 1160s @singledispatch 1160s def as_cupy(val, typ=None): 1160s """ 1160s Rough conversion function 1160s 1160s Will try to infer target type from input type if not specified. 1160s """ 1160s if typ is None: 1160s typ = resolve_cupy_type(val) 1160s 1160s if issubclass(typ, CupyArray): 1160s import cupy as cp 1160s 1160s if isinstance(val, CSMatrix): 1160s val = val.toarray() 1160s return cp.array(val) 1160s elif issubclass(typ, CupyCSRMatrix): 1160s import cupy as cp 1160s import cupyx.scipy.sparse as cpsparse 1160s 1160s if isinstance(val, np.ndarray): 1160s return cpsparse.csr_matrix(cp.array(val)) 1160s else: 1160s return cpsparse.csr_matrix(val) 1160s elif issubclass(typ, CupyCSCMatrix): 1160s > import cupy as cp 1160s E ModuleNotFoundError: No module named 'cupy' 1160s 1160s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:1024: ModuleNotFoundError 1160s _______ test_view_of_view[cupy_csc-list_bool_subset-matrix_bool_subset] ________ 1160s 1160s matrix_type = functools.partial(, typ=) 1160s subset_func = 1160s subset_func2 = 1160s 1160s def test_view_of_view(matrix_type, subset_func, subset_func2): 1160s > adata = gen_adata((30, 15), X_type=matrix_type) 1160s 1160s tests/test_views.py:531: 1160s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1160s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:346: in gen_adata 1160s X = X_type(random_state.binomial(100, 0.005, (M, N)).astype(X_dtype)) 1160s /usr/lib/python3.13/functools.py:934: in wrapper 1160s return dispatch(args[0].__class__)(*args, **kw) 1160s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1160s 1160s val = array([[1., 0., 0., 0., 0., 1., 0., 1., 0., 0., 1., 0., 1., 0., 1.], 1160s [0., 0., 1., 1., 2., 0., 0., 0., 1., 0., 1...0., 1., 0., 1., 0., 1., 0.], 1160s [1., 1., 0., 0., 3., 1., 0., 1., 2., 0., 0., 1., 0., 1., 0.]], 1160s dtype=float32) 1160s typ = 1160s 1160s @singledispatch 1160s def as_cupy(val, typ=None): 1160s """ 1160s Rough conversion function 1160s 1160s Will try to infer target type from input type if not specified. 1160s """ 1160s if typ is None: 1160s typ = resolve_cupy_type(val) 1160s 1160s if issubclass(typ, CupyArray): 1160s import cupy as cp 1160s 1160s if isinstance(val, CSMatrix): 1160s val = val.toarray() 1160s return cp.array(val) 1160s elif issubclass(typ, CupyCSRMatrix): 1160s import cupy as cp 1160s import cupyx.scipy.sparse as cpsparse 1160s 1160s if isinstance(val, np.ndarray): 1160s return cpsparse.csr_matrix(cp.array(val)) 1160s else: 1160s return cpsparse.csr_matrix(val) 1160s elif issubclass(typ, CupyCSCMatrix): 1160s > import cupy as cp 1160s E ModuleNotFoundError: No module named 'cupy' 1160s 1160s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:1024: ModuleNotFoundError 1160s ______ test_view_of_view[cupy_csc-list_bool_subset-spmatrix_bool_subset] _______ 1160s 1160s matrix_type = functools.partial(, typ=) 1160s subset_func = 1160s subset_func2 = 1160s 1160s def test_view_of_view(matrix_type, subset_func, subset_func2): 1160s > adata = gen_adata((30, 15), X_type=matrix_type) 1160s 1160s tests/test_views.py:531: 1160s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1160s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:346: in gen_adata 1160s X = X_type(random_state.binomial(100, 0.005, (M, N)).astype(X_dtype)) 1160s /usr/lib/python3.13/functools.py:934: in wrapper 1160s return dispatch(args[0].__class__)(*args, **kw) 1160s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1160s 1160s val = array([[0., 0., 0., 0., 1., 0., 0., 1., 0., 0., 3., 1., 1., 0., 1.], 1160s [0., 1., 1., 0., 1., 0., 2., 0., 0., 0., 1...1., 1., 0., 1., 0., 1., 1.], 1160s [0., 1., 1., 0., 0., 0., 0., 0., 0., 1., 1., 1., 0., 1., 0.]], 1160s dtype=float32) 1160s typ = 1160s 1160s @singledispatch 1160s def as_cupy(val, typ=None): 1160s """ 1160s Rough conversion function 1160s 1160s Will try to infer target type from input type if not specified. 1160s """ 1160s if typ is None: 1160s typ = resolve_cupy_type(val) 1160s 1160s if issubclass(typ, CupyArray): 1160s import cupy as cp 1160s 1160s if isinstance(val, CSMatrix): 1160s val = val.toarray() 1160s return cp.array(val) 1160s elif issubclass(typ, CupyCSRMatrix): 1160s import cupy as cp 1160s import cupyx.scipy.sparse as cpsparse 1160s 1160s if isinstance(val, np.ndarray): 1160s return cpsparse.csr_matrix(cp.array(val)) 1160s else: 1160s return cpsparse.csr_matrix(val) 1160s elif issubclass(typ, CupyCSCMatrix): 1160s > import cupy as cp 1160s E ModuleNotFoundError: No module named 'cupy' 1160s 1160s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:1024: ModuleNotFoundError 1160s _______ test_view_of_view[cupy_csc-list_bool_subset-sparray_bool_subset] _______ 1160s 1160s matrix_type = functools.partial(, typ=) 1160s subset_func = 1160s subset_func2 = 1160s 1160s def test_view_of_view(matrix_type, subset_func, subset_func2): 1160s > adata = gen_adata((30, 15), X_type=matrix_type) 1160s 1160s tests/test_views.py:531: 1160s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1160s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:346: in gen_adata 1160s X = X_type(random_state.binomial(100, 0.005, (M, N)).astype(X_dtype)) 1160s /usr/lib/python3.13/functools.py:934: in wrapper 1160s return dispatch(args[0].__class__)(*args, **kw) 1160s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1160s 1160s val = array([[0., 0., 1., 0., 2., 0., 0., 2., 0., 0., 0., 1., 1., 0., 0.], 1160s [0., 0., 0., 1., 1., 1., 0., 0., 0., 1., 0...1., 1., 0., 4., 2., 0., 0.], 1160s [0., 1., 0., 0., 0., 0., 2., 0., 1., 0., 0., 0., 0., 0., 0.]], 1160s dtype=float32) 1160s typ = 1160s 1160s @singledispatch 1160s def as_cupy(val, typ=None): 1160s """ 1160s Rough conversion function 1160s 1160s Will try to infer target type from input type if not specified. 1160s """ 1160s if typ is None: 1160s typ = resolve_cupy_type(val) 1160s 1160s if issubclass(typ, CupyArray): 1160s import cupy as cp 1160s 1160s if isinstance(val, CSMatrix): 1160s val = val.toarray() 1160s return cp.array(val) 1160s elif issubclass(typ, CupyCSRMatrix): 1160s import cupy as cp 1160s import cupyx.scipy.sparse as cpsparse 1160s 1160s if isinstance(val, np.ndarray): 1160s return cpsparse.csr_matrix(cp.array(val)) 1160s else: 1160s return cpsparse.csr_matrix(val) 1160s elif issubclass(typ, CupyCSCMatrix): 1160s > import cupy as cp 1160s E ModuleNotFoundError: No module named 'cupy' 1160s 1160s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:1024: ModuleNotFoundError 1160s _________ test_view_of_view[cupy_csc-matrix_bool_subset-array_subset] __________ 1160s 1160s matrix_type = functools.partial(, typ=) 1160s subset_func = 1160s subset_func2 = 1160s 1160s def test_view_of_view(matrix_type, subset_func, subset_func2): 1160s > adata = gen_adata((30, 15), X_type=matrix_type) 1160s 1160s tests/test_views.py:531: 1160s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1160s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:346: in gen_adata 1160s X = X_type(random_state.binomial(100, 0.005, (M, N)).astype(X_dtype)) 1160s /usr/lib/python3.13/functools.py:934: in wrapper 1160s return dispatch(args[0].__class__)(*args, **kw) 1160s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1160s 1160s val = array([[0., 1., 2., 1., 0., 0., 0., 0., 1., 1., 0., 0., 1., 2., 1.], 1160s [0., 1., 0., 0., 1., 0., 1., 0., 0., 0., 0...1., 1., 0., 2., 0., 2., 0.], 1160s [0., 0., 1., 0., 0., 0., 1., 2., 0., 0., 0., 1., 1., 1., 1.]], 1160s dtype=float32) 1160s typ = 1160s 1160s @singledispatch 1160s def as_cupy(val, typ=None): 1160s """ 1160s Rough conversion function 1160s 1160s Will try to infer target type from input type if not specified. 1160s """ 1160s if typ is None: 1160s typ = resolve_cupy_type(val) 1160s 1160s if issubclass(typ, CupyArray): 1160s import cupy as cp 1160s 1160s if isinstance(val, CSMatrix): 1160s val = val.toarray() 1160s return cp.array(val) 1160s elif issubclass(typ, CupyCSRMatrix): 1160s import cupy as cp 1160s import cupyx.scipy.sparse as cpsparse 1160s 1160s if isinstance(val, np.ndarray): 1160s return cpsparse.csr_matrix(cp.array(val)) 1160s else: 1160s return cpsparse.csr_matrix(val) 1160s elif issubclass(typ, CupyCSCMatrix): 1160s > import cupy as cp 1160s E ModuleNotFoundError: No module named 'cupy' 1160s 1160s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:1024: ModuleNotFoundError 1160s _________ test_view_of_view[cupy_csc-matrix_bool_subset-slice_subset] __________ 1160s 1160s matrix_type = functools.partial(, typ=) 1160s subset_func = 1160s subset_func2 = 1160s 1160s def test_view_of_view(matrix_type, subset_func, subset_func2): 1160s > adata = gen_adata((30, 15), X_type=matrix_type) 1160s 1160s tests/test_views.py:531: 1160s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1160s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:346: in gen_adata 1160s X = X_type(random_state.binomial(100, 0.005, (M, N)).astype(X_dtype)) 1160s /usr/lib/python3.13/functools.py:934: in wrapper 1160s return dispatch(args[0].__class__)(*args, **kw) 1160s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1160s 1160s val = array([[0., 0., 0., 0., 0., 0., 0., 2., 1., 1., 0., 1., 1., 0., 0.], 1160s [0., 1., 0., 0., 0., 1., 0., 0., 0., 0., 0...0., 2., 2., 0., 1., 0., 0.], 1160s [0., 2., 0., 0., 0., 1., 0., 0., 0., 0., 1., 3., 0., 1., 1.]], 1160s dtype=float32) 1160s typ = 1160s 1160s @singledispatch 1160s def as_cupy(val, typ=None): 1160s """ 1160s Rough conversion function 1160s 1160s Will try to infer target type from input type if not specified. 1160s """ 1160s if typ is None: 1160s typ = resolve_cupy_type(val) 1160s 1160s if issubclass(typ, CupyArray): 1160s import cupy as cp 1160s 1160s if isinstance(val, CSMatrix): 1160s val = val.toarray() 1160s return cp.array(val) 1160s elif issubclass(typ, CupyCSRMatrix): 1160s import cupy as cp 1160s import cupyx.scipy.sparse as cpsparse 1160s 1160s if isinstance(val, np.ndarray): 1160s return cpsparse.csr_matrix(cp.array(val)) 1160s else: 1160s return cpsparse.csr_matrix(val) 1160s elif issubclass(typ, CupyCSCMatrix): 1160s > import cupy as cp 1160s E ModuleNotFoundError: No module named 'cupy' 1160s 1160s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:1024: ModuleNotFoundError 1160s _________ test_view_of_view[cupy_csc-matrix_bool_subset-single_subset] _________ 1160s 1160s matrix_type = functools.partial(, typ=) 1160s subset_func = 1160s subset_func2 = 1160s 1160s def test_view_of_view(matrix_type, subset_func, subset_func2): 1160s > adata = gen_adata((30, 15), X_type=matrix_type) 1160s 1160s tests/test_views.py:531: 1160s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1160s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:346: in gen_adata 1160s X = X_type(random_state.binomial(100, 0.005, (M, N)).astype(X_dtype)) 1160s /usr/lib/python3.13/functools.py:934: in wrapper 1160s return dispatch(args[0].__class__)(*args, **kw) 1160s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1160s 1160s val = array([[0., 0., 0., 2., 0., 1., 2., 0., 1., 0., 0., 0., 1., 1., 0.], 1160s [0., 2., 0., 0., 0., 0., 0., 0., 1., 0., 1...0., 0., 1., 0., 0., 0., 0.], 1160s [2., 0., 2., 0., 0., 0., 0., 1., 0., 3., 0., 0., 0., 0., 0.]], 1160s dtype=float32) 1160s typ = 1160s 1160s @singledispatch 1160s def as_cupy(val, typ=None): 1160s """ 1160s Rough conversion function 1160s 1160s Will try to infer target type from input type if not specified. 1160s """ 1160s if typ is None: 1160s typ = resolve_cupy_type(val) 1160s 1160s if issubclass(typ, CupyArray): 1160s import cupy as cp 1160s 1160s if isinstance(val, CSMatrix): 1160s val = val.toarray() 1160s return cp.array(val) 1160s elif issubclass(typ, CupyCSRMatrix): 1160s import cupy as cp 1160s import cupyx.scipy.sparse as cpsparse 1160s 1160s if isinstance(val, np.ndarray): 1160s return cpsparse.csr_matrix(cp.array(val)) 1160s else: 1160s return cpsparse.csr_matrix(val) 1160s elif issubclass(typ, CupyCSCMatrix): 1160s > import cupy as cp 1160s E ModuleNotFoundError: No module named 'cupy' 1160s 1160s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:1024: ModuleNotFoundError 1160s _______ test_view_of_view[cupy_csc-matrix_bool_subset-array_int_subset] ________ 1160s 1160s matrix_type = functools.partial(, typ=) 1160s subset_func = 1160s subset_func2 = 1160s 1160s def test_view_of_view(matrix_type, subset_func, subset_func2): 1160s > adata = gen_adata((30, 15), X_type=matrix_type) 1160s 1160s tests/test_views.py:531: 1160s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1160s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:346: in gen_adata 1160s X = X_type(random_state.binomial(100, 0.005, (M, N)).astype(X_dtype)) 1160s /usr/lib/python3.13/functools.py:934: in wrapper 1160s return dispatch(args[0].__class__)(*args, **kw) 1160s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1160s 1160s val = array([[0., 0., 0., 1., 1., 0., 2., 0., 0., 0., 0., 0., 1., 2., 0.], 1160s [1., 0., 1., 0., 1., 2., 0., 0., 1., 0., 1...3., 1., 0., 2., 0., 0., 0.], 1160s [0., 1., 2., 2., 0., 0., 0., 0., 0., 0., 1., 0., 0., 0., 1.]], 1160s dtype=float32) 1160s typ = 1160s 1160s @singledispatch 1160s def as_cupy(val, typ=None): 1160s """ 1160s Rough conversion function 1160s 1160s Will try to infer target type from input type if not specified. 1160s """ 1160s if typ is None: 1160s typ = resolve_cupy_type(val) 1160s 1160s if issubclass(typ, CupyArray): 1160s import cupy as cp 1160s 1160s if isinstance(val, CSMatrix): 1160s val = val.toarray() 1160s return cp.array(val) 1160s elif issubclass(typ, CupyCSRMatrix): 1160s import cupy as cp 1160s import cupyx.scipy.sparse as cpsparse 1160s 1160s if isinstance(val, np.ndarray): 1160s return cpsparse.csr_matrix(cp.array(val)) 1160s else: 1160s return cpsparse.csr_matrix(val) 1160s elif issubclass(typ, CupyCSCMatrix): 1160s > import cupy as cp 1160s E ModuleNotFoundError: No module named 'cupy' 1160s 1160s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:1024: ModuleNotFoundError 1160s ________ test_view_of_view[cupy_csc-matrix_bool_subset-list_int_subset] ________ 1160s 1160s matrix_type = functools.partial(, typ=) 1160s subset_func = 1160s subset_func2 = 1160s 1160s def test_view_of_view(matrix_type, subset_func, subset_func2): 1160s > adata = gen_adata((30, 15), X_type=matrix_type) 1160s 1160s tests/test_views.py:531: 1160s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1160s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:346: in gen_adata 1160s X = X_type(random_state.binomial(100, 0.005, (M, N)).astype(X_dtype)) 1160s /usr/lib/python3.13/functools.py:934: in wrapper 1160s return dispatch(args[0].__class__)(*args, **kw) 1160s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1160s 1160s val = array([[1., 0., 0., 0., 0., 0., 0., 0., 0., 1., 0., 1., 2., 1., 1.], 1160s [0., 0., 0., 1., 1., 1., 1., 1., 1., 0., 0...0., 1., 1., 1., 0., 0., 0.], 1160s [0., 2., 0., 2., 0., 0., 0., 1., 1., 0., 1., 0., 0., 0., 0.]], 1160s dtype=float32) 1160s typ = 1160s 1160s @singledispatch 1160s def as_cupy(val, typ=None): 1160s """ 1160s Rough conversion function 1160s 1160s Will try to infer target type from input type if not specified. 1160s """ 1160s if typ is None: 1160s typ = resolve_cupy_type(val) 1160s 1160s if issubclass(typ, CupyArray): 1160s import cupy as cp 1160s 1160s if isinstance(val, CSMatrix): 1160s val = val.toarray() 1160s return cp.array(val) 1160s elif issubclass(typ, CupyCSRMatrix): 1160s import cupy as cp 1160s import cupyx.scipy.sparse as cpsparse 1160s 1160s if isinstance(val, np.ndarray): 1160s return cpsparse.csr_matrix(cp.array(val)) 1160s else: 1160s return cpsparse.csr_matrix(val) 1160s elif issubclass(typ, CupyCSCMatrix): 1160s > import cupy as cp 1160s E ModuleNotFoundError: No module named 'cupy' 1160s 1160s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:1024: ModuleNotFoundError 1160s _______ test_view_of_view[cupy_csc-matrix_bool_subset-array_bool_subset] _______ 1160s 1160s matrix_type = functools.partial(, typ=) 1160s subset_func = 1160s subset_func2 = 1160s 1160s def test_view_of_view(matrix_type, subset_func, subset_func2): 1160s > adata = gen_adata((30, 15), X_type=matrix_type) 1160s 1160s tests/test_views.py:531: 1160s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1160s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:346: in gen_adata 1160s X = X_type(random_state.binomial(100, 0.005, (M, N)).astype(X_dtype)) 1160s /usr/lib/python3.13/functools.py:934: in wrapper 1160s return dispatch(args[0].__class__)(*args, **kw) 1160s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1160s 1160s val = array([[0., 1., 0., 1., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 1.], 1160s [0., 1., 0., 2., 0., 2., 1., 1., 0., 2., 1...1., 1., 1., 0., 1., 1., 1.], 1160s [0., 1., 1., 0., 2., 0., 0., 1., 0., 0., 0., 0., 2., 0., 0.]], 1160s dtype=float32) 1160s typ = 1160s 1160s @singledispatch 1160s def as_cupy(val, typ=None): 1160s """ 1160s Rough conversion function 1160s 1160s Will try to infer target type from input type if not specified. 1160s """ 1160s if typ is None: 1160s typ = resolve_cupy_type(val) 1160s 1160s if issubclass(typ, CupyArray): 1160s import cupy as cp 1160s 1160s if isinstance(val, CSMatrix): 1160s val = val.toarray() 1160s return cp.array(val) 1160s elif issubclass(typ, CupyCSRMatrix): 1160s import cupy as cp 1160s import cupyx.scipy.sparse as cpsparse 1160s 1160s if isinstance(val, np.ndarray): 1160s return cpsparse.csr_matrix(cp.array(val)) 1160s else: 1160s return cpsparse.csr_matrix(val) 1160s elif issubclass(typ, CupyCSCMatrix): 1160s > import cupy as cp 1160s E ModuleNotFoundError: No module named 'cupy' 1160s 1160s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:1024: ModuleNotFoundError 1160s _______ test_view_of_view[cupy_csc-matrix_bool_subset-list_bool_subset] ________ 1160s 1160s matrix_type = functools.partial(, typ=) 1160s subset_func = 1160s subset_func2 = 1160s 1160s def test_view_of_view(matrix_type, subset_func, subset_func2): 1160s > adata = gen_adata((30, 15), X_type=matrix_type) 1160s 1160s tests/test_views.py:531: 1160s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1160s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:346: in gen_adata 1160s X = X_type(random_state.binomial(100, 0.005, (M, N)).astype(X_dtype)) 1160s /usr/lib/python3.13/functools.py:934: in wrapper 1160s return dispatch(args[0].__class__)(*args, **kw) 1160s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1160s 1160s val = array([[0., 0., 0., 0., 0., 2., 1., 0., 0., 0., 0., 1., 0., 3., 1.], 1160s [2., 0., 0., 0., 0., 0., 0., 1., 0., 1., 0...1., 0., 1., 0., 0., 0., 0.], 1160s [0., 2., 1., 0., 1., 0., 1., 1., 0., 1., 0., 1., 0., 1., 1.]], 1160s dtype=float32) 1160s typ = 1160s 1160s @singledispatch 1160s def as_cupy(val, typ=None): 1160s """ 1160s Rough conversion function 1160s 1160s Will try to infer target type from input type if not specified. 1160s """ 1160s if typ is None: 1160s typ = resolve_cupy_type(val) 1160s 1160s if issubclass(typ, CupyArray): 1160s import cupy as cp 1160s 1160s if isinstance(val, CSMatrix): 1160s val = val.toarray() 1160s return cp.array(val) 1160s elif issubclass(typ, CupyCSRMatrix): 1160s import cupy as cp 1160s import cupyx.scipy.sparse as cpsparse 1160s 1160s if isinstance(val, np.ndarray): 1160s return cpsparse.csr_matrix(cp.array(val)) 1160s else: 1160s return cpsparse.csr_matrix(val) 1160s elif issubclass(typ, CupyCSCMatrix): 1160s > import cupy as cp 1160s E ModuleNotFoundError: No module named 'cupy' 1160s 1160s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:1024: ModuleNotFoundError 1160s ______ test_view_of_view[cupy_csc-matrix_bool_subset-matrix_bool_subset] _______ 1160s 1160s matrix_type = functools.partial(, typ=) 1160s subset_func = 1160s subset_func2 = 1160s 1160s def test_view_of_view(matrix_type, subset_func, subset_func2): 1160s > adata = gen_adata((30, 15), X_type=matrix_type) 1160s 1160s tests/test_views.py:531: 1160s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1160s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:346: in gen_adata 1160s X = X_type(random_state.binomial(100, 0.005, (M, N)).astype(X_dtype)) 1160s /usr/lib/python3.13/functools.py:934: in wrapper 1160s return dispatch(args[0].__class__)(*args, **kw) 1160s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1160s 1160s val = array([[0., 0., 0., 1., 0., 0., 1., 0., 0., 0., 0., 0., 0., 0., 0.], 1160s [0., 1., 1., 0., 0., 1., 1., 2., 0., 0., 0...0., 0., 0., 1., 0., 1., 0.], 1160s [1., 0., 0., 0., 0., 1., 0., 1., 2., 1., 1., 1., 2., 1., 0.]], 1160s dtype=float32) 1160s typ = 1160s 1160s @singledispatch 1160s def as_cupy(val, typ=None): 1160s """ 1160s Rough conversion function 1160s 1160s Will try to infer target type from input type if not specified. 1160s """ 1160s if typ is None: 1160s typ = resolve_cupy_type(val) 1160s 1160s if issubclass(typ, CupyArray): 1160s import cupy as cp 1160s 1160s if isinstance(val, CSMatrix): 1160s val = val.toarray() 1160s return cp.array(val) 1160s elif issubclass(typ, CupyCSRMatrix): 1160s import cupy as cp 1160s import cupyx.scipy.sparse as cpsparse 1160s 1160s if isinstance(val, np.ndarray): 1160s return cpsparse.csr_matrix(cp.array(val)) 1160s else: 1160s return cpsparse.csr_matrix(val) 1160s elif issubclass(typ, CupyCSCMatrix): 1160s > import cupy as cp 1160s E ModuleNotFoundError: No module named 'cupy' 1160s 1160s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:1024: ModuleNotFoundError 1160s _____ test_view_of_view[cupy_csc-matrix_bool_subset-spmatrix_bool_subset] ______ 1160s 1160s matrix_type = functools.partial(, typ=) 1160s subset_func = 1160s subset_func2 = 1160s 1160s def test_view_of_view(matrix_type, subset_func, subset_func2): 1160s > adata = gen_adata((30, 15), X_type=matrix_type) 1160s 1160s tests/test_views.py:531: 1160s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1160s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:346: in gen_adata 1160s X = X_type(random_state.binomial(100, 0.005, (M, N)).astype(X_dtype)) 1160s /usr/lib/python3.13/functools.py:934: in wrapper 1160s return dispatch(args[0].__class__)(*args, **kw) 1160s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1160s 1160s val = array([[0., 0., 0., 3., 1., 0., 1., 0., 0., 0., 0., 1., 1., 0., 0.], 1160s [0., 1., 0., 1., 0., 0., 1., 0., 1., 1., 1...0., 0., 0., 1., 1., 1., 0.], 1160s [0., 1., 0., 0., 1., 0., 0., 1., 0., 0., 0., 0., 0., 0., 0.]], 1160s dtype=float32) 1160s typ = 1160s 1160s @singledispatch 1160s def as_cupy(val, typ=None): 1160s """ 1160s Rough conversion function 1160s 1160s Will try to infer target type from input type if not specified. 1160s """ 1160s if typ is None: 1160s typ = resolve_cupy_type(val) 1160s 1160s if issubclass(typ, CupyArray): 1160s import cupy as cp 1160s 1160s if isinstance(val, CSMatrix): 1160s val = val.toarray() 1160s return cp.array(val) 1160s elif issubclass(typ, CupyCSRMatrix): 1160s import cupy as cp 1160s import cupyx.scipy.sparse as cpsparse 1160s 1160s if isinstance(val, np.ndarray): 1160s return cpsparse.csr_matrix(cp.array(val)) 1160s else: 1160s return cpsparse.csr_matrix(val) 1160s elif issubclass(typ, CupyCSCMatrix): 1160s > import cupy as cp 1160s E ModuleNotFoundError: No module named 'cupy' 1160s 1160s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:1024: ModuleNotFoundError 1160s ______ test_view_of_view[cupy_csc-matrix_bool_subset-sparray_bool_subset] ______ 1160s 1160s matrix_type = functools.partial(, typ=) 1160s subset_func = 1160s subset_func2 = 1160s 1160s def test_view_of_view(matrix_type, subset_func, subset_func2): 1160s > adata = gen_adata((30, 15), X_type=matrix_type) 1160s 1160s tests/test_views.py:531: 1160s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1160s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:346: in gen_adata 1160s X = X_type(random_state.binomial(100, 0.005, (M, N)).astype(X_dtype)) 1160s /usr/lib/python3.13/functools.py:934: in wrapper 1160s return dispatch(args[0].__class__)(*args, **kw) 1160s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1160s 1160s val = array([[0., 0., 1., 1., 0., 1., 2., 0., 0., 1., 0., 1., 1., 0., 0.], 1160s [0., 1., 1., 1., 0., 0., 1., 0., 1., 0., 0...0., 1., 1., 0., 0., 0., 0.], 1160s [0., 0., 0., 0., 3., 2., 0., 1., 1., 0., 0., 0., 1., 1., 0.]], 1160s dtype=float32) 1160s typ = 1160s 1160s @singledispatch 1160s def as_cupy(val, typ=None): 1160s """ 1160s Rough conversion function 1160s 1160s Will try to infer target type from input type if not specified. 1160s """ 1160s if typ is None: 1160s typ = resolve_cupy_type(val) 1160s 1160s if issubclass(typ, CupyArray): 1160s import cupy as cp 1160s 1160s if isinstance(val, CSMatrix): 1160s val = val.toarray() 1160s return cp.array(val) 1160s elif issubclass(typ, CupyCSRMatrix): 1160s import cupy as cp 1160s import cupyx.scipy.sparse as cpsparse 1160s 1160s if isinstance(val, np.ndarray): 1160s return cpsparse.csr_matrix(cp.array(val)) 1160s else: 1160s return cpsparse.csr_matrix(val) 1160s elif issubclass(typ, CupyCSCMatrix): 1160s > import cupy as cp 1160s E ModuleNotFoundError: No module named 'cupy' 1160s 1160s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:1024: ModuleNotFoundError 1160s ________ test_view_of_view[cupy_csc-spmatrix_bool_subset-array_subset] _________ 1160s 1160s matrix_type = functools.partial(, typ=) 1160s subset_func = 1160s subset_func2 = 1160s 1160s def test_view_of_view(matrix_type, subset_func, subset_func2): 1160s > adata = gen_adata((30, 15), X_type=matrix_type) 1160s 1160s tests/test_views.py:531: 1160s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1160s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:346: in gen_adata 1160s X = X_type(random_state.binomial(100, 0.005, (M, N)).astype(X_dtype)) 1160s /usr/lib/python3.13/functools.py:934: in wrapper 1160s return dispatch(args[0].__class__)(*args, **kw) 1160s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1160s 1160s val = array([[0., 0., 0., 0., 0., 0., 0., 0., 0., 1., 0., 0., 0., 1., 2.], 1160s [0., 1., 1., 0., 1., 1., 1., 1., 0., 0., 1...1., 0., 2., 0., 0., 0., 1.], 1160s [1., 0., 1., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0.]], 1160s dtype=float32) 1160s typ = 1160s 1160s @singledispatch 1160s def as_cupy(val, typ=None): 1160s """ 1160s Rough conversion function 1160s 1160s Will try to infer target type from input type if not specified. 1160s """ 1160s if typ is None: 1160s typ = resolve_cupy_type(val) 1160s 1160s if issubclass(typ, CupyArray): 1160s import cupy as cp 1160s 1160s if isinstance(val, CSMatrix): 1160s val = val.toarray() 1160s return cp.array(val) 1160s elif issubclass(typ, CupyCSRMatrix): 1160s import cupy as cp 1160s import cupyx.scipy.sparse as cpsparse 1160s 1160s if isinstance(val, np.ndarray): 1160s return cpsparse.csr_matrix(cp.array(val)) 1160s else: 1160s return cpsparse.csr_matrix(val) 1160s elif issubclass(typ, CupyCSCMatrix): 1160s > import cupy as cp 1160s E ModuleNotFoundError: No module named 'cupy' 1160s 1160s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:1024: ModuleNotFoundError 1160s ________ test_view_of_view[cupy_csc-spmatrix_bool_subset-slice_subset] _________ 1160s 1160s matrix_type = functools.partial(, typ=) 1160s subset_func = 1160s subset_func2 = 1160s 1160s def test_view_of_view(matrix_type, subset_func, subset_func2): 1160s > adata = gen_adata((30, 15), X_type=matrix_type) 1160s 1160s tests/test_views.py:531: 1160s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1160s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:346: in gen_adata 1160s X = X_type(random_state.binomial(100, 0.005, (M, N)).astype(X_dtype)) 1160s /usr/lib/python3.13/functools.py:934: in wrapper 1160s return dispatch(args[0].__class__)(*args, **kw) 1160s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1160s 1160s val = array([[1., 0., 0., 0., 0., 1., 1., 0., 0., 1., 0., 0., 2., 1., 0.], 1160s [1., 0., 0., 1., 2., 0., 1., 0., 0., 0., 0...0., 1., 0., 0., 0., 2., 0.], 1160s [1., 0., 0., 1., 0., 0., 1., 0., 0., 0., 0., 0., 1., 0., 0.]], 1160s dtype=float32) 1160s typ = 1160s 1160s @singledispatch 1160s def as_cupy(val, typ=None): 1160s """ 1160s Rough conversion function 1160s 1160s Will try to infer target type from input type if not specified. 1160s """ 1160s if typ is None: 1160s typ = resolve_cupy_type(val) 1160s 1160s if issubclass(typ, CupyArray): 1160s import cupy as cp 1160s 1160s if isinstance(val, CSMatrix): 1160s val = val.toarray() 1160s return cp.array(val) 1160s elif issubclass(typ, CupyCSRMatrix): 1160s import cupy as cp 1160s import cupyx.scipy.sparse as cpsparse 1160s 1160s if isinstance(val, np.ndarray): 1160s return cpsparse.csr_matrix(cp.array(val)) 1160s else: 1160s return cpsparse.csr_matrix(val) 1160s elif issubclass(typ, CupyCSCMatrix): 1160s > import cupy as cp 1160s E ModuleNotFoundError: No module named 'cupy' 1160s 1160s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:1024: ModuleNotFoundError 1160s ________ test_view_of_view[cupy_csc-spmatrix_bool_subset-single_subset] ________ 1160s 1160s matrix_type = functools.partial(, typ=) 1160s subset_func = 1160s subset_func2 = 1160s 1160s def test_view_of_view(matrix_type, subset_func, subset_func2): 1160s > adata = gen_adata((30, 15), X_type=matrix_type) 1160s 1160s tests/test_views.py:531: 1160s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1160s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:346: in gen_adata 1160s X = X_type(random_state.binomial(100, 0.005, (M, N)).astype(X_dtype)) 1160s /usr/lib/python3.13/functools.py:934: in wrapper 1160s return dispatch(args[0].__class__)(*args, **kw) 1160s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1160s 1160s val = array([[0., 0., 1., 0., 0., 0., 1., 0., 0., 1., 0., 0., 0., 0., 1.], 1160s [0., 1., 0., 2., 0., 1., 1., 0., 0., 3., 1...0., 0., 1., 0., 1., 0., 0.], 1160s [0., 0., 0., 0., 1., 0., 1., 1., 0., 0., 0., 0., 1., 0., 0.]], 1160s dtype=float32) 1160s typ = 1160s 1160s @singledispatch 1160s def as_cupy(val, typ=None): 1160s """ 1160s Rough conversion function 1160s 1160s Will try to infer target type from input type if not specified. 1160s """ 1160s if typ is None: 1160s typ = resolve_cupy_type(val) 1160s 1160s if issubclass(typ, CupyArray): 1160s import cupy as cp 1160s 1160s if isinstance(val, CSMatrix): 1160s val = val.toarray() 1160s return cp.array(val) 1160s elif issubclass(typ, CupyCSRMatrix): 1160s import cupy as cp 1160s import cupyx.scipy.sparse as cpsparse 1160s 1160s if isinstance(val, np.ndarray): 1160s return cpsparse.csr_matrix(cp.array(val)) 1160s else: 1160s return cpsparse.csr_matrix(val) 1160s elif issubclass(typ, CupyCSCMatrix): 1160s > import cupy as cp 1160s E ModuleNotFoundError: No module named 'cupy' 1160s 1160s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:1024: ModuleNotFoundError 1160s ______ test_view_of_view[cupy_csc-spmatrix_bool_subset-array_int_subset] _______ 1160s 1160s matrix_type = functools.partial(, typ=) 1160s subset_func = 1160s subset_func2 = 1160s 1160s def test_view_of_view(matrix_type, subset_func, subset_func2): 1160s > adata = gen_adata((30, 15), X_type=matrix_type) 1160s 1160s tests/test_views.py:531: 1160s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1160s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:346: in gen_adata 1160s X = X_type(random_state.binomial(100, 0.005, (M, N)).astype(X_dtype)) 1160s /usr/lib/python3.13/functools.py:934: in wrapper 1160s return dispatch(args[0].__class__)(*args, **kw) 1160s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1160s 1160s val = array([[0., 0., 0., 0., 1., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0.], 1160s [0., 0., 1., 1., 0., 0., 0., 0., 0., 0., 0...0., 0., 0., 0., 0., 0., 0.], 1160s [1., 1., 1., 0., 2., 1., 0., 0., 1., 1., 1., 0., 2., 0., 1.]], 1160s dtype=float32) 1160s typ = 1160s 1160s @singledispatch 1160s def as_cupy(val, typ=None): 1160s """ 1160s Rough conversion function 1160s 1160s Will try to infer target type from input type if not specified. 1160s """ 1160s if typ is None: 1160s typ = resolve_cupy_type(val) 1160s 1160s if issubclass(typ, CupyArray): 1160s import cupy as cp 1160s 1160s if isinstance(val, CSMatrix): 1160s val = val.toarray() 1160s return cp.array(val) 1160s elif issubclass(typ, CupyCSRMatrix): 1160s import cupy as cp 1160s import cupyx.scipy.sparse as cpsparse 1160s 1160s if isinstance(val, np.ndarray): 1160s return cpsparse.csr_matrix(cp.array(val)) 1160s else: 1160s return cpsparse.csr_matrix(val) 1160s elif issubclass(typ, CupyCSCMatrix): 1160s > import cupy as cp 1160s E ModuleNotFoundError: No module named 'cupy' 1160s 1160s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:1024: ModuleNotFoundError 1160s _______ test_view_of_view[cupy_csc-spmatrix_bool_subset-list_int_subset] _______ 1160s 1160s matrix_type = functools.partial(, typ=) 1160s subset_func = 1160s subset_func2 = 1160s 1160s def test_view_of_view(matrix_type, subset_func, subset_func2): 1160s > adata = gen_adata((30, 15), X_type=matrix_type) 1160s 1160s tests/test_views.py:531: 1160s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1160s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:346: in gen_adata 1160s X = X_type(random_state.binomial(100, 0.005, (M, N)).astype(X_dtype)) 1160s /usr/lib/python3.13/functools.py:934: in wrapper 1160s return dispatch(args[0].__class__)(*args, **kw) 1160s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1160s 1160s val = array([[0., 0., 0., 0., 0., 1., 0., 1., 0., 0., 0., 0., 0., 1., 0.], 1160s [0., 1., 2., 0., 3., 0., 1., 0., 0., 1., 0...1., 2., 0., 0., 0., 1., 0.], 1160s [2., 1., 0., 1., 1., 1., 0., 0., 0., 0., 0., 0., 1., 2., 0.]], 1160s dtype=float32) 1160s typ = 1160s 1160s @singledispatch 1160s def as_cupy(val, typ=None): 1160s """ 1160s Rough conversion function 1160s 1160s Will try to infer target type from input type if not specified. 1160s """ 1160s if typ is None: 1160s typ = resolve_cupy_type(val) 1160s 1160s if issubclass(typ, CupyArray): 1160s import cupy as cp 1160s 1160s if isinstance(val, CSMatrix): 1160s val = val.toarray() 1160s return cp.array(val) 1160s elif issubclass(typ, CupyCSRMatrix): 1160s import cupy as cp 1160s import cupyx.scipy.sparse as cpsparse 1160s 1160s if isinstance(val, np.ndarray): 1160s return cpsparse.csr_matrix(cp.array(val)) 1160s else: 1160s return cpsparse.csr_matrix(val) 1160s elif issubclass(typ, CupyCSCMatrix): 1160s > import cupy as cp 1160s E ModuleNotFoundError: No module named 'cupy' 1160s 1160s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:1024: ModuleNotFoundError 1160s ______ test_view_of_view[cupy_csc-spmatrix_bool_subset-array_bool_subset] ______ 1160s 1160s matrix_type = functools.partial(, typ=) 1160s subset_func = 1160s subset_func2 = 1160s 1160s def test_view_of_view(matrix_type, subset_func, subset_func2): 1160s > adata = gen_adata((30, 15), X_type=matrix_type) 1160s 1160s tests/test_views.py:531: 1160s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1160s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:346: in gen_adata 1160s X = X_type(random_state.binomial(100, 0.005, (M, N)).astype(X_dtype)) 1160s /usr/lib/python3.13/functools.py:934: in wrapper 1160s return dispatch(args[0].__class__)(*args, **kw) 1160s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1160s 1160s val = array([[2., 0., 0., 1., 0., 1., 1., 0., 0., 0., 0., 2., 0., 0., 1.], 1160s [0., 1., 0., 0., 2., 0., 0., 0., 2., 1., 0...0., 0., 1., 0., 1., 0., 0.], 1160s [0., 0., 0., 2., 1., 0., 1., 2., 0., 0., 0., 3., 0., 0., 0.]], 1160s dtype=float32) 1160s typ = 1160s 1160s @singledispatch 1160s def as_cupy(val, typ=None): 1160s """ 1160s Rough conversion function 1160s 1160s Will try to infer target type from input type if not specified. 1160s """ 1160s if typ is None: 1160s typ = resolve_cupy_type(val) 1160s 1160s if issubclass(typ, CupyArray): 1160s import cupy as cp 1160s 1160s if isinstance(val, CSMatrix): 1160s val = val.toarray() 1160s return cp.array(val) 1160s elif issubclass(typ, CupyCSRMatrix): 1160s import cupy as cp 1160s import cupyx.scipy.sparse as cpsparse 1160s 1160s if isinstance(val, np.ndarray): 1160s return cpsparse.csr_matrix(cp.array(val)) 1160s else: 1160s return cpsparse.csr_matrix(val) 1160s elif issubclass(typ, CupyCSCMatrix): 1160s > import cupy as cp 1160s E ModuleNotFoundError: No module named 'cupy' 1160s 1160s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:1024: ModuleNotFoundError 1160s ______ test_view_of_view[cupy_csc-spmatrix_bool_subset-list_bool_subset] _______ 1160s 1160s matrix_type = functools.partial(, typ=) 1160s subset_func = 1160s subset_func2 = 1160s 1160s def test_view_of_view(matrix_type, subset_func, subset_func2): 1160s > adata = gen_adata((30, 15), X_type=matrix_type) 1160s 1160s tests/test_views.py:531: 1160s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1160s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:346: in gen_adata 1160s X = X_type(random_state.binomial(100, 0.005, (M, N)).astype(X_dtype)) 1160s /usr/lib/python3.13/functools.py:934: in wrapper 1160s return dispatch(args[0].__class__)(*args, **kw) 1160s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1160s 1160s val = array([[1., 0., 0., 0., 0., 0., 1., 1., 0., 0., 0., 0., 1., 1., 1.], 1160s [0., 1., 0., 1., 0., 2., 0., 0., 1., 0., 0...1., 0., 0., 1., 0., 0., 0.], 1160s [0., 1., 1., 0., 0., 0., 0., 0., 1., 0., 0., 0., 2., 0., 0.]], 1160s dtype=float32) 1160s typ = 1160s 1160s @singledispatch 1160s def as_cupy(val, typ=None): 1160s """ 1160s Rough conversion function 1160s 1160s Will try to infer target type from input type if not specified. 1160s """ 1160s if typ is None: 1160s typ = resolve_cupy_type(val) 1160s 1160s if issubclass(typ, CupyArray): 1160s import cupy as cp 1160s 1160s if isinstance(val, CSMatrix): 1160s val = val.toarray() 1160s return cp.array(val) 1160s elif issubclass(typ, CupyCSRMatrix): 1160s import cupy as cp 1160s import cupyx.scipy.sparse as cpsparse 1160s 1160s if isinstance(val, np.ndarray): 1160s return cpsparse.csr_matrix(cp.array(val)) 1160s else: 1160s return cpsparse.csr_matrix(val) 1160s elif issubclass(typ, CupyCSCMatrix): 1160s > import cupy as cp 1160s E ModuleNotFoundError: No module named 'cupy' 1160s 1160s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:1024: ModuleNotFoundError 1160s _____ test_view_of_view[cupy_csc-spmatrix_bool_subset-matrix_bool_subset] ______ 1160s 1160s matrix_type = functools.partial(, typ=) 1160s subset_func = 1160s subset_func2 = 1160s 1160s def test_view_of_view(matrix_type, subset_func, subset_func2): 1160s > adata = gen_adata((30, 15), X_type=matrix_type) 1160s 1160s tests/test_views.py:531: 1160s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1160s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:346: in gen_adata 1160s X = X_type(random_state.binomial(100, 0.005, (M, N)).astype(X_dtype)) 1160s /usr/lib/python3.13/functools.py:934: in wrapper 1160s return dispatch(args[0].__class__)(*args, **kw) 1160s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1160s 1160s val = array([[1., 2., 2., 0., 1., 1., 0., 0., 2., 0., 0., 0., 0., 2., 3.], 1160s [0., 0., 0., 0., 2., 0., 0., 0., 0., 1., 1...0., 0., 0., 1., 1., 0., 2.], 1160s [1., 1., 1., 1., 1., 1., 0., 0., 0., 1., 0., 1., 0., 2., 2.]], 1160s dtype=float32) 1160s typ = 1160s 1160s @singledispatch 1160s def as_cupy(val, typ=None): 1160s """ 1160s Rough conversion function 1160s 1160s Will try to infer target type from input type if not specified. 1160s """ 1160s if typ is None: 1160s typ = resolve_cupy_type(val) 1160s 1160s if issubclass(typ, CupyArray): 1160s import cupy as cp 1160s 1160s if isinstance(val, CSMatrix): 1160s val = val.toarray() 1160s return cp.array(val) 1160s elif issubclass(typ, CupyCSRMatrix): 1160s import cupy as cp 1160s import cupyx.scipy.sparse as cpsparse 1160s 1160s if isinstance(val, np.ndarray): 1160s return cpsparse.csr_matrix(cp.array(val)) 1160s else: 1160s return cpsparse.csr_matrix(val) 1160s elif issubclass(typ, CupyCSCMatrix): 1160s > import cupy as cp 1160s E ModuleNotFoundError: No module named 'cupy' 1160s 1160s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:1024: ModuleNotFoundError 1160s ____ test_view_of_view[cupy_csc-spmatrix_bool_subset-spmatrix_bool_subset] _____ 1160s 1160s matrix_type = functools.partial(, typ=) 1160s subset_func = 1160s subset_func2 = 1160s 1160s def test_view_of_view(matrix_type, subset_func, subset_func2): 1160s > adata = gen_adata((30, 15), X_type=matrix_type) 1160s 1160s tests/test_views.py:531: 1160s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1160s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:346: in gen_adata 1160s X = X_type(random_state.binomial(100, 0.005, (M, N)).astype(X_dtype)) 1160s /usr/lib/python3.13/functools.py:934: in wrapper 1160s return dispatch(args[0].__class__)(*args, **kw) 1160s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1160s 1160s val = array([[1., 1., 1., 0., 1., 0., 1., 1., 1., 0., 3., 1., 0., 0., 1.], 1160s [1., 0., 2., 1., 1., 0., 1., 0., 0., 0., 0...0., 0., 0., 0., 0., 0., 0.], 1160s [0., 1., 0., 1., 0., 1., 0., 1., 0., 1., 2., 0., 0., 0., 0.]], 1160s dtype=float32) 1160s typ = 1160s 1160s @singledispatch 1160s def as_cupy(val, typ=None): 1160s """ 1160s Rough conversion function 1160s 1160s Will try to infer target type from input type if not specified. 1160s """ 1160s if typ is None: 1160s typ = resolve_cupy_type(val) 1160s 1160s if issubclass(typ, CupyArray): 1160s import cupy as cp 1160s 1160s if isinstance(val, CSMatrix): 1160s val = val.toarray() 1160s return cp.array(val) 1160s elif issubclass(typ, CupyCSRMatrix): 1160s import cupy as cp 1160s import cupyx.scipy.sparse as cpsparse 1160s 1160s if isinstance(val, np.ndarray): 1160s return cpsparse.csr_matrix(cp.array(val)) 1160s else: 1160s return cpsparse.csr_matrix(val) 1160s elif issubclass(typ, CupyCSCMatrix): 1160s > import cupy as cp 1160s E ModuleNotFoundError: No module named 'cupy' 1160s 1160s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:1024: ModuleNotFoundError 1160s _____ test_view_of_view[cupy_csc-spmatrix_bool_subset-sparray_bool_subset] _____ 1160s 1160s matrix_type = functools.partial(, typ=) 1160s subset_func = 1160s subset_func2 = 1160s 1160s def test_view_of_view(matrix_type, subset_func, subset_func2): 1160s > adata = gen_adata((30, 15), X_type=matrix_type) 1160s 1160s tests/test_views.py:531: 1160s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1160s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:346: in gen_adata 1160s X = X_type(random_state.binomial(100, 0.005, (M, N)).astype(X_dtype)) 1160s /usr/lib/python3.13/functools.py:934: in wrapper 1160s return dispatch(args[0].__class__)(*args, **kw) 1160s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1160s 1160s val = array([[1., 0., 0., 0., 0., 0., 0., 0., 0., 3., 0., 0., 1., 0., 2.], 1160s [0., 1., 2., 0., 0., 0., 0., 0., 0., 1., 0...0., 0., 0., 1., 0., 2., 0.], 1160s [0., 1., 1., 0., 0., 0., 0., 0., 0., 0., 1., 1., 2., 0., 0.]], 1160s dtype=float32) 1160s typ = 1160s 1160s @singledispatch 1160s def as_cupy(val, typ=None): 1160s """ 1160s Rough conversion function 1160s 1160s Will try to infer target type from input type if not specified. 1160s """ 1160s if typ is None: 1160s typ = resolve_cupy_type(val) 1160s 1160s if issubclass(typ, CupyArray): 1160s import cupy as cp 1160s 1160s if isinstance(val, CSMatrix): 1160s val = val.toarray() 1160s return cp.array(val) 1160s elif issubclass(typ, CupyCSRMatrix): 1160s import cupy as cp 1160s import cupyx.scipy.sparse as cpsparse 1160s 1160s if isinstance(val, np.ndarray): 1160s return cpsparse.csr_matrix(cp.array(val)) 1160s else: 1160s return cpsparse.csr_matrix(val) 1160s elif issubclass(typ, CupyCSCMatrix): 1160s > import cupy as cp 1160s E ModuleNotFoundError: No module named 'cupy' 1160s 1160s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:1024: ModuleNotFoundError 1160s _________ test_view_of_view[cupy_csc-sparray_bool_subset-array_subset] _________ 1160s 1160s matrix_type = functools.partial(, typ=) 1160s subset_func = 1160s subset_func2 = 1160s 1160s def test_view_of_view(matrix_type, subset_func, subset_func2): 1160s > adata = gen_adata((30, 15), X_type=matrix_type) 1160s 1160s tests/test_views.py:531: 1160s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1160s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:346: in gen_adata 1160s X = X_type(random_state.binomial(100, 0.005, (M, N)).astype(X_dtype)) 1160s /usr/lib/python3.13/functools.py:934: in wrapper 1160s return dispatch(args[0].__class__)(*args, **kw) 1160s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1160s 1160s val = array([[1., 1., 0., 1., 0., 0., 0., 0., 0., 0., 0., 2., 0., 0., 0.], 1160s [1., 1., 0., 1., 0., 1., 0., 0., 0., 1., 0...0., 0., 0., 1., 0., 0., 1.], 1160s [0., 1., 0., 0., 0., 0., 1., 0., 0., 1., 0., 0., 1., 0., 0.]], 1160s dtype=float32) 1160s typ = 1160s 1160s @singledispatch 1160s def as_cupy(val, typ=None): 1160s """ 1160s Rough conversion function 1160s 1160s Will try to infer target type from input type if not specified. 1160s """ 1160s if typ is None: 1160s typ = resolve_cupy_type(val) 1160s 1160s if issubclass(typ, CupyArray): 1160s import cupy as cp 1160s 1160s if isinstance(val, CSMatrix): 1160s val = val.toarray() 1160s return cp.array(val) 1160s elif issubclass(typ, CupyCSRMatrix): 1160s import cupy as cp 1160s import cupyx.scipy.sparse as cpsparse 1160s 1160s if isinstance(val, np.ndarray): 1160s return cpsparse.csr_matrix(cp.array(val)) 1160s else: 1160s return cpsparse.csr_matrix(val) 1160s elif issubclass(typ, CupyCSCMatrix): 1160s > import cupy as cp 1160s E ModuleNotFoundError: No module named 'cupy' 1160s 1160s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:1024: ModuleNotFoundError 1160s _________ test_view_of_view[cupy_csc-sparray_bool_subset-slice_subset] _________ 1160s 1160s matrix_type = functools.partial(, typ=) 1160s subset_func = 1160s subset_func2 = 1160s 1160s def test_view_of_view(matrix_type, subset_func, subset_func2): 1160s > adata = gen_adata((30, 15), X_type=matrix_type) 1160s 1160s tests/test_views.py:531: 1160s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1160s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:346: in gen_adata 1160s X = X_type(random_state.binomial(100, 0.005, (M, N)).astype(X_dtype)) 1160s /usr/lib/python3.13/functools.py:934: in wrapper 1160s return dispatch(args[0].__class__)(*args, **kw) 1160s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1160s 1160s val = array([[0., 1., 1., 0., 1., 0., 0., 0., 0., 1., 0., 0., 0., 1., 0.], 1160s [0., 1., 0., 0., 1., 0., 0., 0., 0., 0., 1...1., 0., 0., 1., 0., 0., 0.], 1160s [0., 1., 1., 0., 0., 1., 1., 0., 0., 1., 1., 0., 0., 0., 0.]], 1160s dtype=float32) 1160s typ = 1160s 1160s @singledispatch 1160s def as_cupy(val, typ=None): 1160s """ 1160s Rough conversion function 1160s 1160s Will try to infer target type from input type if not specified. 1160s """ 1160s if typ is None: 1160s typ = resolve_cupy_type(val) 1160s 1160s if issubclass(typ, CupyArray): 1160s import cupy as cp 1160s 1160s if isinstance(val, CSMatrix): 1160s val = val.toarray() 1160s return cp.array(val) 1160s elif issubclass(typ, CupyCSRMatrix): 1160s import cupy as cp 1160s import cupyx.scipy.sparse as cpsparse 1160s 1160s if isinstance(val, np.ndarray): 1160s return cpsparse.csr_matrix(cp.array(val)) 1160s else: 1160s return cpsparse.csr_matrix(val) 1160s elif issubclass(typ, CupyCSCMatrix): 1160s > import cupy as cp 1160s E ModuleNotFoundError: No module named 'cupy' 1160s 1160s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:1024: ModuleNotFoundError 1160s ________ test_view_of_view[cupy_csc-sparray_bool_subset-single_subset] _________ 1160s 1160s matrix_type = functools.partial(, typ=) 1160s subset_func = 1160s subset_func2 = 1160s 1160s def test_view_of_view(matrix_type, subset_func, subset_func2): 1160s > adata = gen_adata((30, 15), X_type=matrix_type) 1160s 1160s tests/test_views.py:531: 1160s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1160s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:346: in gen_adata 1160s X = X_type(random_state.binomial(100, 0.005, (M, N)).astype(X_dtype)) 1160s /usr/lib/python3.13/functools.py:934: in wrapper 1160s return dispatch(args[0].__class__)(*args, **kw) 1160s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1160s 1160s val = array([[1., 0., 1., 0., 3., 1., 2., 0., 0., 1., 0., 3., 1., 0., 0.], 1160s [0., 1., 0., 0., 0., 0., 0., 1., 1., 1., 0...1., 0., 2., 2., 0., 0., 0.], 1160s [1., 2., 0., 0., 2., 0., 0., 1., 1., 0., 0., 0., 0., 0., 0.]], 1160s dtype=float32) 1160s typ = 1160s 1160s @singledispatch 1160s def as_cupy(val, typ=None): 1160s """ 1160s Rough conversion function 1160s 1160s Will try to infer target type from input type if not specified. 1160s """ 1160s if typ is None: 1160s typ = resolve_cupy_type(val) 1160s 1160s if issubclass(typ, CupyArray): 1160s import cupy as cp 1160s 1160s if isinstance(val, CSMatrix): 1160s val = val.toarray() 1160s return cp.array(val) 1160s elif issubclass(typ, CupyCSRMatrix): 1160s import cupy as cp 1160s import cupyx.scipy.sparse as cpsparse 1160s 1160s if isinstance(val, np.ndarray): 1160s return cpsparse.csr_matrix(cp.array(val)) 1160s else: 1160s return cpsparse.csr_matrix(val) 1160s elif issubclass(typ, CupyCSCMatrix): 1160s > import cupy as cp 1160s E ModuleNotFoundError: No module named 'cupy' 1160s 1160s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:1024: ModuleNotFoundError 1160s _______ test_view_of_view[cupy_csc-sparray_bool_subset-array_int_subset] _______ 1160s 1160s matrix_type = functools.partial(, typ=) 1160s subset_func = 1160s subset_func2 = 1160s 1160s def test_view_of_view(matrix_type, subset_func, subset_func2): 1160s > adata = gen_adata((30, 15), X_type=matrix_type) 1160s 1160s tests/test_views.py:531: 1160s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1160s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:346: in gen_adata 1160s X = X_type(random_state.binomial(100, 0.005, (M, N)).astype(X_dtype)) 1160s /usr/lib/python3.13/functools.py:934: in wrapper 1160s return dispatch(args[0].__class__)(*args, **kw) 1160s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1160s 1160s val = array([[0., 0., 1., 0., 0., 1., 1., 1., 1., 0., 0., 0., 1., 0., 1.], 1160s [1., 0., 0., 0., 0., 1., 2., 1., 0., 0., 0...0., 0., 1., 2., 0., 1., 0.], 1160s [0., 1., 0., 0., 0., 1., 1., 1., 0., 0., 0., 1., 1., 2., 1.]], 1160s dtype=float32) 1160s typ = 1160s 1160s @singledispatch 1160s def as_cupy(val, typ=None): 1160s """ 1160s Rough conversion function 1160s 1160s Will try to infer target type from input type if not specified. 1160s """ 1160s if typ is None: 1160s typ = resolve_cupy_type(val) 1160s 1160s if issubclass(typ, CupyArray): 1160s import cupy as cp 1160s 1160s if isinstance(val, CSMatrix): 1160s val = val.toarray() 1160s return cp.array(val) 1160s elif issubclass(typ, CupyCSRMatrix): 1160s import cupy as cp 1160s import cupyx.scipy.sparse as cpsparse 1160s 1160s if isinstance(val, np.ndarray): 1160s return cpsparse.csr_matrix(cp.array(val)) 1160s else: 1160s return cpsparse.csr_matrix(val) 1160s elif issubclass(typ, CupyCSCMatrix): 1160s > import cupy as cp 1160s E ModuleNotFoundError: No module named 'cupy' 1160s 1160s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:1024: ModuleNotFoundError 1160s _______ test_view_of_view[cupy_csc-sparray_bool_subset-list_int_subset] ________ 1160s 1160s matrix_type = functools.partial(, typ=) 1160s subset_func = 1160s subset_func2 = 1160s 1160s def test_view_of_view(matrix_type, subset_func, subset_func2): 1160s > adata = gen_adata((30, 15), X_type=matrix_type) 1160s 1160s tests/test_views.py:531: 1160s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1160s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:346: in gen_adata 1160s X = X_type(random_state.binomial(100, 0.005, (M, N)).astype(X_dtype)) 1160s /usr/lib/python3.13/functools.py:934: in wrapper 1160s return dispatch(args[0].__class__)(*args, **kw) 1160s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1160s 1160s val = array([[0., 2., 0., 0., 1., 0., 0., 0., 1., 1., 0., 1., 1., 1., 1.], 1160s [0., 1., 0., 1., 0., 0., 1., 0., 0., 1., 0...0., 1., 0., 3., 0., 0., 1.], 1160s [0., 1., 0., 1., 1., 2., 1., 0., 0., 0., 1., 0., 0., 1., 1.]], 1160s dtype=float32) 1160s typ = 1160s 1160s @singledispatch 1160s def as_cupy(val, typ=None): 1160s """ 1160s Rough conversion function 1160s 1160s Will try to infer target type from input type if not specified. 1160s """ 1160s if typ is None: 1160s typ = resolve_cupy_type(val) 1160s 1160s if issubclass(typ, CupyArray): 1160s import cupy as cp 1160s 1160s if isinstance(val, CSMatrix): 1160s val = val.toarray() 1160s return cp.array(val) 1160s elif issubclass(typ, CupyCSRMatrix): 1160s import cupy as cp 1160s import cupyx.scipy.sparse as cpsparse 1160s 1160s if isinstance(val, np.ndarray): 1160s return cpsparse.csr_matrix(cp.array(val)) 1160s else: 1160s return cpsparse.csr_matrix(val) 1160s elif issubclass(typ, CupyCSCMatrix): 1160s > import cupy as cp 1160s E ModuleNotFoundError: No module named 'cupy' 1160s 1160s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:1024: ModuleNotFoundError 1160s ______ test_view_of_view[cupy_csc-sparray_bool_subset-array_bool_subset] _______ 1160s 1160s matrix_type = functools.partial(, typ=) 1160s subset_func = 1160s subset_func2 = 1160s 1160s def test_view_of_view(matrix_type, subset_func, subset_func2): 1160s > adata = gen_adata((30, 15), X_type=matrix_type) 1160s 1160s tests/test_views.py:531: 1160s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1160s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:346: in gen_adata 1160s X = X_type(random_state.binomial(100, 0.005, (M, N)).astype(X_dtype)) 1160s /usr/lib/python3.13/functools.py:934: in wrapper 1160s return dispatch(args[0].__class__)(*args, **kw) 1160s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1160s 1160s val = array([[0., 1., 0., 0., 2., 2., 1., 2., 0., 0., 0., 0., 0., 1., 0.], 1160s [1., 0., 0., 0., 0., 0., 1., 1., 1., 0., 1...0., 0., 0., 1., 0., 2., 0.], 1160s [0., 0., 1., 1., 1., 2., 0., 0., 0., 1., 0., 0., 1., 1., 0.]], 1160s dtype=float32) 1160s typ = 1160s 1160s @singledispatch 1160s def as_cupy(val, typ=None): 1160s """ 1160s Rough conversion function 1160s 1160s Will try to infer target type from input type if not specified. 1160s """ 1160s if typ is None: 1160s typ = resolve_cupy_type(val) 1160s 1160s if issubclass(typ, CupyArray): 1160s import cupy as cp 1160s 1160s if isinstance(val, CSMatrix): 1160s val = val.toarray() 1160s return cp.array(val) 1160s elif issubclass(typ, CupyCSRMatrix): 1160s import cupy as cp 1160s import cupyx.scipy.sparse as cpsparse 1160s 1160s if isinstance(val, np.ndarray): 1160s return cpsparse.csr_matrix(cp.array(val)) 1160s else: 1160s return cpsparse.csr_matrix(val) 1160s elif issubclass(typ, CupyCSCMatrix): 1160s > import cupy as cp 1160s E ModuleNotFoundError: No module named 'cupy' 1160s 1160s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:1024: ModuleNotFoundError 1160s _______ test_view_of_view[cupy_csc-sparray_bool_subset-list_bool_subset] _______ 1160s 1160s matrix_type = functools.partial(, typ=) 1160s subset_func = 1160s subset_func2 = 1160s 1160s def test_view_of_view(matrix_type, subset_func, subset_func2): 1160s > adata = gen_adata((30, 15), X_type=matrix_type) 1160s 1160s tests/test_views.py:531: 1160s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1160s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:346: in gen_adata 1160s X = X_type(random_state.binomial(100, 0.005, (M, N)).astype(X_dtype)) 1160s /usr/lib/python3.13/functools.py:934: in wrapper 1160s return dispatch(args[0].__class__)(*args, **kw) 1160s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1160s 1160s val = array([[0., 0., 0., 1., 0., 1., 1., 1., 0., 2., 1., 1., 1., 0., 1.], 1160s [1., 0., 1., 0., 0., 0., 0., 0., 0., 0., 0...0., 0., 0., 1., 1., 0., 0.], 1160s [0., 1., 0., 1., 0., 1., 0., 0., 0., 0., 1., 2., 0., 0., 0.]], 1160s dtype=float32) 1160s typ = 1160s 1160s @singledispatch 1160s def as_cupy(val, typ=None): 1160s """ 1160s Rough conversion function 1160s 1160s Will try to infer target type from input type if not specified. 1160s """ 1160s if typ is None: 1160s typ = resolve_cupy_type(val) 1160s 1160s if issubclass(typ, CupyArray): 1160s import cupy as cp 1160s 1160s if isinstance(val, CSMatrix): 1160s val = val.toarray() 1160s return cp.array(val) 1160s elif issubclass(typ, CupyCSRMatrix): 1160s import cupy as cp 1160s import cupyx.scipy.sparse as cpsparse 1160s 1160s if isinstance(val, np.ndarray): 1160s return cpsparse.csr_matrix(cp.array(val)) 1160s else: 1160s return cpsparse.csr_matrix(val) 1160s elif issubclass(typ, CupyCSCMatrix): 1160s > import cupy as cp 1160s E ModuleNotFoundError: No module named 'cupy' 1160s 1160s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:1024: ModuleNotFoundError 1160s ______ test_view_of_view[cupy_csc-sparray_bool_subset-matrix_bool_subset] ______ 1160s 1160s matrix_type = functools.partial(, typ=) 1160s subset_func = 1160s subset_func2 = 1160s 1160s def test_view_of_view(matrix_type, subset_func, subset_func2): 1160s > adata = gen_adata((30, 15), X_type=matrix_type) 1160s 1160s tests/test_views.py:531: 1160s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1160s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:346: in gen_adata 1160s X = X_type(random_state.binomial(100, 0.005, (M, N)).astype(X_dtype)) 1160s /usr/lib/python3.13/functools.py:934: in wrapper 1160s return dispatch(args[0].__class__)(*args, **kw) 1160s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1160s 1160s val = array([[0., 0., 1., 1., 1., 0., 0., 0., 0., 1., 0., 1., 1., 0., 0.], 1160s [1., 1., 1., 0., 1., 0., 2., 2., 0., 0., 0...1., 1., 1., 1., 0., 1., 0.], 1160s [2., 1., 1., 0., 0., 0., 1., 1., 2., 0., 0., 1., 0., 0., 0.]], 1160s dtype=float32) 1160s typ = 1160s 1160s @singledispatch 1160s def as_cupy(val, typ=None): 1160s """ 1160s Rough conversion function 1160s 1160s Will try to infer target type from input type if not specified. 1160s """ 1160s if typ is None: 1160s typ = resolve_cupy_type(val) 1160s 1160s if issubclass(typ, CupyArray): 1160s import cupy as cp 1160s 1160s if isinstance(val, CSMatrix): 1160s val = val.toarray() 1160s return cp.array(val) 1160s elif issubclass(typ, CupyCSRMatrix): 1160s import cupy as cp 1160s import cupyx.scipy.sparse as cpsparse 1160s 1160s if isinstance(val, np.ndarray): 1160s return cpsparse.csr_matrix(cp.array(val)) 1160s else: 1160s return cpsparse.csr_matrix(val) 1160s elif issubclass(typ, CupyCSCMatrix): 1160s > import cupy as cp 1160s E ModuleNotFoundError: No module named 'cupy' 1160s 1160s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:1024: ModuleNotFoundError 1160s _____ test_view_of_view[cupy_csc-sparray_bool_subset-spmatrix_bool_subset] _____ 1160s 1160s matrix_type = functools.partial(, typ=) 1160s subset_func = 1160s subset_func2 = 1160s 1160s def test_view_of_view(matrix_type, subset_func, subset_func2): 1160s > adata = gen_adata((30, 15), X_type=matrix_type) 1160s 1160s tests/test_views.py:531: 1160s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1160s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:346: in gen_adata 1160s X = X_type(random_state.binomial(100, 0.005, (M, N)).astype(X_dtype)) 1160s /usr/lib/python3.13/functools.py:934: in wrapper 1160s return dispatch(args[0].__class__)(*args, **kw) 1160s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1160s 1160s val = array([[0., 2., 1., 0., 0., 0., 1., 0., 0., 2., 0., 0., 0., 0., 0.], 1160s [1., 1., 1., 0., 0., 0., 2., 0., 0., 0., 0...1., 0., 0., 0., 0., 2., 2.], 1160s [0., 1., 0., 0., 0., 1., 0., 0., 0., 0., 1., 1., 1., 0., 0.]], 1160s dtype=float32) 1160s typ = 1160s 1160s @singledispatch 1160s def as_cupy(val, typ=None): 1160s """ 1160s Rough conversion function 1160s 1160s Will try to infer target type from input type if not specified. 1160s """ 1160s if typ is None: 1160s typ = resolve_cupy_type(val) 1160s 1160s if issubclass(typ, CupyArray): 1160s import cupy as cp 1160s 1160s if isinstance(val, CSMatrix): 1160s val = val.toarray() 1160s return cp.array(val) 1160s elif issubclass(typ, CupyCSRMatrix): 1160s import cupy as cp 1160s import cupyx.scipy.sparse as cpsparse 1160s 1160s if isinstance(val, np.ndarray): 1160s return cpsparse.csr_matrix(cp.array(val)) 1160s else: 1160s return cpsparse.csr_matrix(val) 1160s elif issubclass(typ, CupyCSCMatrix): 1160s > import cupy as cp 1160s E ModuleNotFoundError: No module named 'cupy' 1160s 1160s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:1024: ModuleNotFoundError 1160s _____ test_view_of_view[cupy_csc-sparray_bool_subset-sparray_bool_subset] ______ 1160s 1160s matrix_type = functools.partial(, typ=) 1160s subset_func = 1160s subset_func2 = 1160s 1160s def test_view_of_view(matrix_type, subset_func, subset_func2): 1160s > adata = gen_adata((30, 15), X_type=matrix_type) 1160s 1160s tests/test_views.py:531: 1160s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1160s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:346: in gen_adata 1160s X = X_type(random_state.binomial(100, 0.005, (M, N)).astype(X_dtype)) 1160s /usr/lib/python3.13/functools.py:934: in wrapper 1160s return dispatch(args[0].__class__)(*args, **kw) 1160s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1160s 1160s val = array([[1., 1., 1., 0., 2., 3., 3., 1., 1., 0., 0., 1., 2., 1., 0.], 1160s [0., 0., 0., 0., 0., 0., 2., 0., 0., 1., 1...0., 0., 0., 0., 1., 1., 1.], 1160s [0., 2., 1., 1., 0., 0., 0., 0., 0., 1., 1., 1., 2., 0., 1.]], 1160s dtype=float32) 1160s typ = 1160s 1160s @singledispatch 1160s def as_cupy(val, typ=None): 1160s """ 1160s Rough conversion function 1160s 1160s Will try to infer target type from input type if not specified. 1160s """ 1160s if typ is None: 1160s typ = resolve_cupy_type(val) 1160s 1160s if issubclass(typ, CupyArray): 1160s import cupy as cp 1160s 1160s if isinstance(val, CSMatrix): 1160s val = val.toarray() 1160s return cp.array(val) 1160s elif issubclass(typ, CupyCSRMatrix): 1160s import cupy as cp 1160s import cupyx.scipy.sparse as cpsparse 1160s 1160s if isinstance(val, np.ndarray): 1160s return cpsparse.csr_matrix(cp.array(val)) 1160s else: 1160s return cpsparse.csr_matrix(val) 1160s elif issubclass(typ, CupyCSCMatrix): 1160s > import cupy as cp 1160s E ModuleNotFoundError: No module named 'cupy' 1160s 1160s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:1024: ModuleNotFoundError 1160s _________________ test_view_different_type_indices[cupy_array] _________________ 1160s 1160s matrix_type = functools.partial(, typ=) 1160s 1160s def test_view_different_type_indices(matrix_type): 1160s > orig = gen_adata((30, 30), X_type=matrix_type) 1160s 1160s tests/test_views.py:584: 1160s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1160s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:346: in gen_adata 1160s X = X_type(random_state.binomial(100, 0.005, (M, N)).astype(X_dtype)) 1160s /usr/lib/python3.13/functools.py:934: in wrapper 1160s return dispatch(args[0].__class__)(*args, **kw) 1160s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1160s 1160s val = array([[0., 1., 0., 0., 0., 0., 0., 2., 1., 0., 0., 0., 1., 1., 0., 1., 1160s 0., 0., 1., 0., 0., 1., 1., 1., 1., 1.... 1., 1., 0., 0., 2., 2., 2., 1., 1160s 0., 0., 1., 0., 0., 0., 1., 1., 0., 0., 2., 1., 1., 0.]], 1160s dtype=float32) 1160s typ = 1160s 1160s @singledispatch 1160s def as_cupy(val, typ=None): 1160s """ 1160s Rough conversion function 1160s 1160s Will try to infer target type from input type if not specified. 1160s """ 1160s if typ is None: 1160s typ = resolve_cupy_type(val) 1160s 1160s if issubclass(typ, CupyArray): 1160s > import cupy as cp 1160s E ModuleNotFoundError: No module named 'cupy' 1160s 1160s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:1010: ModuleNotFoundError 1160s __________________ test_view_different_type_indices[cupy_csr] __________________ 1160s 1160s matrix_type = functools.partial(, typ=) 1160s 1160s def test_view_different_type_indices(matrix_type): 1160s > orig = gen_adata((30, 30), X_type=matrix_type) 1160s 1160s tests/test_views.py:584: 1160s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1160s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:346: in gen_adata 1160s X = X_type(random_state.binomial(100, 0.005, (M, N)).astype(X_dtype)) 1160s /usr/lib/python3.13/functools.py:934: in wrapper 1160s return dispatch(args[0].__class__)(*args, **kw) 1160s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1160s 1160s val = array([[2., 0., 0., 0., 1., 0., 2., 2., 0., 1., 1., 0., 0., 2., 0., 0., 1160s 3., 0., 2., 1., 1., 1., 2., 1., 1., 1.... 1., 2., 0., 1., 2., 2., 0., 0., 1160s 1., 1., 0., 0., 0., 0., 4., 0., 0., 0., 1., 0., 0., 0.]], 1160s dtype=float32) 1160s typ = 1160s 1160s @singledispatch 1160s def as_cupy(val, typ=None): 1160s """ 1160s Rough conversion function 1160s 1160s Will try to infer target type from input type if not specified. 1160s """ 1160s if typ is None: 1160s typ = resolve_cupy_type(val) 1160s 1160s if issubclass(typ, CupyArray): 1160s import cupy as cp 1160s 1160s if isinstance(val, CSMatrix): 1160s val = val.toarray() 1160s return cp.array(val) 1160s elif issubclass(typ, CupyCSRMatrix): 1160s > import cupy as cp 1160s E ModuleNotFoundError: No module named 'cupy' 1160s 1160s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:1016: ModuleNotFoundError 1160s __________________ test_view_different_type_indices[cupy_csc] __________________ 1160s 1160s matrix_type = functools.partial(, typ=) 1160s 1160s def test_view_different_type_indices(matrix_type): 1160s > orig = gen_adata((30, 30), X_type=matrix_type) 1160s 1160s tests/test_views.py:584: 1160s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1160s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:346: in gen_adata 1160s X = X_type(random_state.binomial(100, 0.005, (M, N)).astype(X_dtype)) 1160s /usr/lib/python3.13/functools.py:934: in wrapper 1160s return dispatch(args[0].__class__)(*args, **kw) 1160s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1160s 1160s val = array([[0., 0., 1., 0., 0., 1., 0., 0., 1., 0., 1., 0., 1., 0., 0., 1., 1160s 1., 1., 1., 1., 1., 0., 1., 0., 1., 1.... 0., 0., 0., 0., 1., 0., 0., 1., 1160s 0., 1., 1., 1., 1., 0., 0., 0., 0., 0., 0., 0., 0., 1.]], 1160s dtype=float32) 1160s typ = 1160s 1160s @singledispatch 1160s def as_cupy(val, typ=None): 1160s """ 1160s Rough conversion function 1160s 1160s Will try to infer target type from input type if not specified. 1160s """ 1160s if typ is None: 1160s typ = resolve_cupy_type(val) 1160s 1160s if issubclass(typ, CupyArray): 1160s import cupy as cp 1160s 1160s if isinstance(val, CSMatrix): 1160s val = val.toarray() 1160s return cp.array(val) 1160s elif issubclass(typ, CupyCSRMatrix): 1160s import cupy as cp 1160s import cupyx.scipy.sparse as cpsparse 1160s 1160s if isinstance(val, np.ndarray): 1160s return cpsparse.csr_matrix(cp.array(val)) 1160s else: 1160s return cpsparse.csr_matrix(val) 1160s elif issubclass(typ, CupyCSCMatrix): 1160s > import cupy as cp 1160s E ModuleNotFoundError: No module named 'cupy' 1160s 1160s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:1024: ModuleNotFoundError 1160s ___________________ test_ellipsis_index[cupy_array-ellipsis] ___________________ 1160s 1160s ellipsis_index = Ellipsis 1160s equivalent_ellipsis_index = (slice(None, None, None), slice(None, None, None)) 1160s matrix_type = functools.partial(, typ=) 1160s 1160s def test_ellipsis_index( 1160s ellipsis_index: tuple[EllipsisType | slice, ...] | EllipsisType, 1160s equivalent_ellipsis_index: tuple[slice, slice], 1160s matrix_type, 1160s ): 1160s > adata = gen_adata((10, 10), X_type=matrix_type, **GEN_ADATA_DASK_ARGS) 1160s 1160s tests/test_views.py:797: 1160s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1160s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:346: in gen_adata 1160s X = X_type(random_state.binomial(100, 0.005, (M, N)).astype(X_dtype)) 1160s /usr/lib/python3.13/functools.py:934: in wrapper 1160s return dispatch(args[0].__class__)(*args, **kw) 1160s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1160s 1160s val = array([[2., 0., 1., 0., 0., 2., 0., 0., 0., 0.], 1160s [0., 0., 1., 1., 0., 1., 0., 0., 0., 0.], 1160s [0., 0., 1., ... 2.], 1160s [1., 0., 0., 0., 0., 0., 1., 0., 0., 0.], 1160s [0., 1., 0., 0., 1., 1., 0., 0., 1., 0.]], dtype=float32) 1160s typ = 1160s 1160s @singledispatch 1160s def as_cupy(val, typ=None): 1160s """ 1160s Rough conversion function 1160s 1160s Will try to infer target type from input type if not specified. 1160s """ 1160s if typ is None: 1160s typ = resolve_cupy_type(val) 1160s 1160s if issubclass(typ, CupyArray): 1160s > import cupy as cp 1160s E ModuleNotFoundError: No module named 'cupy' 1160s 1160s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:1010: ModuleNotFoundError 1160s ________________ test_ellipsis_index[cupy_array-ellipsis_tuple] ________________ 1160s 1160s ellipsis_index = (Ellipsis,) 1160s equivalent_ellipsis_index = (slice(None, None, None), slice(None, None, None)) 1160s matrix_type = functools.partial(, typ=) 1160s 1160s def test_ellipsis_index( 1160s ellipsis_index: tuple[EllipsisType | slice, ...] | EllipsisType, 1160s equivalent_ellipsis_index: tuple[slice, slice], 1160s matrix_type, 1160s ): 1160s > adata = gen_adata((10, 10), X_type=matrix_type, **GEN_ADATA_DASK_ARGS) 1160s 1160s tests/test_views.py:797: 1160s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1160s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:346: in gen_adata 1160s X = X_type(random_state.binomial(100, 0.005, (M, N)).astype(X_dtype)) 1160s /usr/lib/python3.13/functools.py:934: in wrapper 1160s return dispatch(args[0].__class__)(*args, **kw) 1160s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1160s 1160s val = array([[0., 0., 1., 1., 1., 0., 1., 0., 0., 1.], 1160s [0., 0., 0., 1., 1., 1., 1., 0., 0., 0.], 1160s [0., 1., 0., ... 1.], 1160s [0., 1., 0., 3., 0., 0., 1., 0., 0., 0.], 1160s [0., 1., 0., 0., 0., 0., 1., 0., 1., 0.]], dtype=float32) 1160s typ = 1160s 1160s @singledispatch 1160s def as_cupy(val, typ=None): 1160s """ 1160s Rough conversion function 1160s 1160s Will try to infer target type from input type if not specified. 1160s """ 1160s if typ is None: 1160s typ = resolve_cupy_type(val) 1160s 1160s if issubclass(typ, CupyArray): 1160s > import cupy as cp 1160s E ModuleNotFoundError: No module named 'cupy' 1160s 1160s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:1010: ModuleNotFoundError 1160s _________________ test_ellipsis_index[cupy_array-obs-ellipsis] _________________ 1160s 1160s ellipsis_index = (Ellipsis, slice(0, 10, None)) 1160s equivalent_ellipsis_index = (slice(None, None, None), slice(0, 10, None)) 1160s matrix_type = functools.partial(, typ=) 1160s 1160s def test_ellipsis_index( 1160s ellipsis_index: tuple[EllipsisType | slice, ...] | EllipsisType, 1160s equivalent_ellipsis_index: tuple[slice, slice], 1160s matrix_type, 1160s ): 1160s > adata = gen_adata((10, 10), X_type=matrix_type, **GEN_ADATA_DASK_ARGS) 1160s 1160s tests/test_views.py:797: 1160s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1160s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:346: in gen_adata 1160s X = X_type(random_state.binomial(100, 0.005, (M, N)).astype(X_dtype)) 1160s /usr/lib/python3.13/functools.py:934: in wrapper 1160s return dispatch(args[0].__class__)(*args, **kw) 1160s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1160s 1160s val = array([[0., 0., 1., 0., 1., 0., 1., 1., 1., 0.], 1160s [1., 1., 0., 0., 0., 0., 0., 0., 0., 0.], 1160s [0., 0., 0., ... 0.], 1160s [0., 0., 1., 2., 0., 0., 0., 1., 1., 0.], 1160s [0., 0., 2., 0., 1., 0., 0., 0., 1., 0.]], dtype=float32) 1160s typ = 1160s 1160s @singledispatch 1160s def as_cupy(val, typ=None): 1160s """ 1160s Rough conversion function 1160s 1160s Will try to infer target type from input type if not specified. 1160s """ 1160s if typ is None: 1160s typ = resolve_cupy_type(val) 1160s 1160s if issubclass(typ, CupyArray): 1160s > import cupy as cp 1160s E ModuleNotFoundError: No module named 'cupy' 1160s 1160s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:1010: ModuleNotFoundError 1160s _________________ test_ellipsis_index[cupy_array-var-ellipsis] _________________ 1160s 1160s ellipsis_index = (slice(0, 10, None), Ellipsis) 1160s equivalent_ellipsis_index = (slice(0, 10, None), slice(None, None, None)) 1160s matrix_type = functools.partial(, typ=) 1160s 1160s def test_ellipsis_index( 1160s ellipsis_index: tuple[EllipsisType | slice, ...] | EllipsisType, 1160s equivalent_ellipsis_index: tuple[slice, slice], 1160s matrix_type, 1160s ): 1160s > adata = gen_adata((10, 10), X_type=matrix_type, **GEN_ADATA_DASK_ARGS) 1160s 1160s tests/test_views.py:797: 1160s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1160s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:346: in gen_adata 1160s X = X_type(random_state.binomial(100, 0.005, (M, N)).astype(X_dtype)) 1160s /usr/lib/python3.13/functools.py:934: in wrapper 1160s return dispatch(args[0].__class__)(*args, **kw) 1160s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1160s 1160s val = array([[0., 0., 0., 0., 1., 1., 0., 0., 1., 0.], 1160s [1., 0., 0., 0., 2., 1., 2., 0., 1., 0.], 1160s [1., 1., 0., ... 0.], 1160s [0., 2., 0., 1., 0., 1., 2., 2., 0., 0.], 1160s [0., 0., 1., 2., 1., 1., 1., 0., 0., 0.]], dtype=float32) 1160s typ = 1160s 1160s @singledispatch 1160s def as_cupy(val, typ=None): 1160s """ 1160s Rough conversion function 1160s 1160s Will try to infer target type from input type if not specified. 1160s """ 1160s if typ is None: 1160s typ = resolve_cupy_type(val) 1160s 1160s if issubclass(typ, CupyArray): 1160s > import cupy as cp 1160s E ModuleNotFoundError: No module named 'cupy' 1160s 1160s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:1010: ModuleNotFoundError 1160s _______________ test_ellipsis_index[cupy_array-obs-var-ellipsis] _______________ 1160s 1160s ellipsis_index = (slice(0, 10, None), slice(0, 10, None), Ellipsis) 1160s equivalent_ellipsis_index = (slice(0, 10, None), slice(0, 10, None)) 1160s matrix_type = functools.partial(, typ=) 1160s 1160s def test_ellipsis_index( 1160s ellipsis_index: tuple[EllipsisType | slice, ...] | EllipsisType, 1160s equivalent_ellipsis_index: tuple[slice, slice], 1160s matrix_type, 1160s ): 1160s > adata = gen_adata((10, 10), X_type=matrix_type, **GEN_ADATA_DASK_ARGS) 1160s 1160s tests/test_views.py:797: 1160s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1160s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:346: in gen_adata 1160s X = X_type(random_state.binomial(100, 0.005, (M, N)).astype(X_dtype)) 1160s /usr/lib/python3.13/functools.py:934: in wrapper 1160s return dispatch(args[0].__class__)(*args, **kw) 1160s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1160s 1160s val = array([[0., 0., 0., 0., 1., 0., 0., 0., 0., 1.], 1160s [0., 2., 0., 2., 1., 0., 0., 1., 0., 0.], 1160s [0., 0., 1., ... 0.], 1160s [1., 2., 1., 0., 1., 1., 2., 1., 0., 0.], 1160s [1., 0., 0., 0., 0., 0., 0., 0., 0., 0.]], dtype=float32) 1160s typ = 1160s 1160s @singledispatch 1160s def as_cupy(val, typ=None): 1160s """ 1160s Rough conversion function 1160s 1160s Will try to infer target type from input type if not specified. 1160s """ 1160s if typ is None: 1160s typ = resolve_cupy_type(val) 1160s 1160s if issubclass(typ, CupyArray): 1160s > import cupy as cp 1160s E ModuleNotFoundError: No module named 'cupy' 1160s 1160s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:1010: ModuleNotFoundError 1160s _______________ test_ellipsis_index[cupy_array-ellipsis-obs-var] _______________ 1160s 1160s ellipsis_index = (Ellipsis, slice(0, 10, None), slice(0, 10, None)) 1160s equivalent_ellipsis_index = (slice(0, 10, None), slice(0, 10, None)) 1160s matrix_type = functools.partial(, typ=) 1160s 1160s def test_ellipsis_index( 1160s ellipsis_index: tuple[EllipsisType | slice, ...] | EllipsisType, 1160s equivalent_ellipsis_index: tuple[slice, slice], 1160s matrix_type, 1160s ): 1160s > adata = gen_adata((10, 10), X_type=matrix_type, **GEN_ADATA_DASK_ARGS) 1160s 1160s tests/test_views.py:797: 1160s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1160s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:346: in gen_adata 1160s X = X_type(random_state.binomial(100, 0.005, (M, N)).astype(X_dtype)) 1160s /usr/lib/python3.13/functools.py:934: in wrapper 1160s return dispatch(args[0].__class__)(*args, **kw) 1160s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1160s 1160s val = array([[1., 1., 1., 0., 0., 1., 1., 2., 0., 0.], 1160s [1., 0., 0., 0., 0., 0., 0., 1., 0., 0.], 1160s [0., 2., 1., ... 0.], 1160s [1., 0., 0., 2., 1., 3., 1., 1., 0., 1.], 1160s [0., 0., 0., 1., 0., 1., 0., 0., 0., 0.]], dtype=float32) 1160s typ = 1160s 1160s @singledispatch 1160s def as_cupy(val, typ=None): 1160s """ 1160s Rough conversion function 1160s 1160s Will try to infer target type from input type if not specified. 1160s """ 1160s if typ is None: 1160s typ = resolve_cupy_type(val) 1160s 1160s if issubclass(typ, CupyArray): 1160s > import cupy as cp 1160s E ModuleNotFoundError: No module named 'cupy' 1160s 1160s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:1010: ModuleNotFoundError 1160s _______________ test_ellipsis_index[cupy_array-obs-ellipsis-var] _______________ 1160s 1160s ellipsis_index = (slice(0, 10, None), Ellipsis, slice(0, 10, None)) 1160s equivalent_ellipsis_index = (slice(0, 10, None), slice(0, 10, None)) 1160s matrix_type = functools.partial(, typ=) 1160s 1160s def test_ellipsis_index( 1160s ellipsis_index: tuple[EllipsisType | slice, ...] | EllipsisType, 1160s equivalent_ellipsis_index: tuple[slice, slice], 1160s matrix_type, 1160s ): 1160s > adata = gen_adata((10, 10), X_type=matrix_type, **GEN_ADATA_DASK_ARGS) 1160s 1160s tests/test_views.py:797: 1160s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1160s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:346: in gen_adata 1160s X = X_type(random_state.binomial(100, 0.005, (M, N)).astype(X_dtype)) 1160s /usr/lib/python3.13/functools.py:934: in wrapper 1160s return dispatch(args[0].__class__)(*args, **kw) 1160s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1160s 1160s val = array([[0., 0., 2., 2., 0., 0., 1., 1., 0., 1.], 1160s [0., 0., 0., 0., 0., 0., 1., 1., 1., 2.], 1160s [0., 1., 0., ... 1.], 1160s [0., 0., 0., 0., 0., 1., 1., 0., 0., 0.], 1160s [1., 2., 0., 0., 2., 0., 1., 0., 0., 0.]], dtype=float32) 1160s typ = 1160s 1160s @singledispatch 1160s def as_cupy(val, typ=None): 1160s """ 1160s Rough conversion function 1160s 1160s Will try to infer target type from input type if not specified. 1160s """ 1160s if typ is None: 1160s typ = resolve_cupy_type(val) 1160s 1160s if issubclass(typ, CupyArray): 1160s > import cupy as cp 1160s E ModuleNotFoundError: No module named 'cupy' 1160s 1160s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:1010: ModuleNotFoundError 1160s ____________________ test_ellipsis_index[cupy_csr-ellipsis] ____________________ 1160s 1160s ellipsis_index = Ellipsis 1160s equivalent_ellipsis_index = (slice(None, None, None), slice(None, None, None)) 1160s matrix_type = functools.partial(, typ=) 1160s 1160s def test_ellipsis_index( 1160s ellipsis_index: tuple[EllipsisType | slice, ...] | EllipsisType, 1160s equivalent_ellipsis_index: tuple[slice, slice], 1160s matrix_type, 1160s ): 1160s > adata = gen_adata((10, 10), X_type=matrix_type, **GEN_ADATA_DASK_ARGS) 1160s 1160s tests/test_views.py:797: 1160s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1160s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:346: in gen_adata 1160s X = X_type(random_state.binomial(100, 0.005, (M, N)).astype(X_dtype)) 1160s /usr/lib/python3.13/functools.py:934: in wrapper 1160s return dispatch(args[0].__class__)(*args, **kw) 1160s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1160s 1160s val = array([[1., 0., 1., 0., 1., 3., 1., 1., 1., 0.], 1160s [0., 1., 0., 1., 0., 1., 0., 2., 0., 1.], 1160s [0., 2., 1., ... 0.], 1160s [0., 0., 0., 1., 0., 1., 1., 0., 1., 1.], 1160s [0., 0., 0., 0., 1., 0., 2., 0., 2., 1.]], dtype=float32) 1160s typ = 1160s 1160s @singledispatch 1160s def as_cupy(val, typ=None): 1160s """ 1160s Rough conversion function 1160s 1160s Will try to infer target type from input type if not specified. 1160s """ 1160s if typ is None: 1160s typ = resolve_cupy_type(val) 1160s 1160s if issubclass(typ, CupyArray): 1160s import cupy as cp 1160s 1160s if isinstance(val, CSMatrix): 1160s val = val.toarray() 1160s return cp.array(val) 1160s elif issubclass(typ, CupyCSRMatrix): 1160s > import cupy as cp 1160s E ModuleNotFoundError: No module named 'cupy' 1160s 1160s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:1016: ModuleNotFoundError 1160s _________________ test_ellipsis_index[cupy_csr-ellipsis_tuple] _________________ 1160s 1160s ellipsis_index = (Ellipsis,) 1160s equivalent_ellipsis_index = (slice(None, None, None), slice(None, None, None)) 1160s matrix_type = functools.partial(, typ=) 1160s 1160s def test_ellipsis_index( 1160s ellipsis_index: tuple[EllipsisType | slice, ...] | EllipsisType, 1160s equivalent_ellipsis_index: tuple[slice, slice], 1160s matrix_type, 1160s ): 1160s > adata = gen_adata((10, 10), X_type=matrix_type, **GEN_ADATA_DASK_ARGS) 1160s 1160s tests/test_views.py:797: 1160s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1160s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:346: in gen_adata 1160s X = X_type(random_state.binomial(100, 0.005, (M, N)).astype(X_dtype)) 1160s /usr/lib/python3.13/functools.py:934: in wrapper 1160s return dispatch(args[0].__class__)(*args, **kw) 1160s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1160s 1160s val = array([[1., 0., 0., 0., 1., 2., 0., 1., 0., 0.], 1160s [1., 0., 1., 1., 1., 0., 0., 1., 0., 1.], 1160s [1., 1., 0., ... 1.], 1160s [0., 1., 2., 0., 2., 0., 1., 0., 1., 0.], 1160s [2., 1., 0., 1., 0., 0., 0., 0., 1., 0.]], dtype=float32) 1160s typ = 1160s 1160s @singledispatch 1160s def as_cupy(val, typ=None): 1160s """ 1160s Rough conversion function 1160s 1160s Will try to infer target type from input type if not specified. 1160s """ 1160s if typ is None: 1160s typ = resolve_cupy_type(val) 1160s 1160s if issubclass(typ, CupyArray): 1160s import cupy as cp 1160s 1160s if isinstance(val, CSMatrix): 1160s val = val.toarray() 1160s return cp.array(val) 1160s elif issubclass(typ, CupyCSRMatrix): 1160s > import cupy as cp 1160s E ModuleNotFoundError: No module named 'cupy' 1160s 1160s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:1016: ModuleNotFoundError 1160s __________________ test_ellipsis_index[cupy_csr-obs-ellipsis] __________________ 1160s 1160s ellipsis_index = (Ellipsis, slice(0, 10, None)) 1160s equivalent_ellipsis_index = (slice(None, None, None), slice(0, 10, None)) 1160s matrix_type = functools.partial(, typ=) 1160s 1160s def test_ellipsis_index( 1160s ellipsis_index: tuple[EllipsisType | slice, ...] | EllipsisType, 1160s equivalent_ellipsis_index: tuple[slice, slice], 1160s matrix_type, 1160s ): 1160s > adata = gen_adata((10, 10), X_type=matrix_type, **GEN_ADATA_DASK_ARGS) 1160s 1160s tests/test_views.py:797: 1160s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1160s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:346: in gen_adata 1160s X = X_type(random_state.binomial(100, 0.005, (M, N)).astype(X_dtype)) 1160s /usr/lib/python3.13/functools.py:934: in wrapper 1160s return dispatch(args[0].__class__)(*args, **kw) 1160s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1160s 1160s val = array([[0., 1., 0., 0., 1., 1., 0., 0., 0., 0.], 1160s [1., 0., 0., 1., 0., 0., 0., 0., 0., 1.], 1160s [0., 0., 0., ... 0.], 1160s [0., 0., 0., 0., 0., 0., 0., 0., 0., 1.], 1160s [0., 2., 0., 2., 3., 1., 0., 0., 0., 0.]], dtype=float32) 1160s typ = 1160s 1160s @singledispatch 1160s def as_cupy(val, typ=None): 1160s """ 1160s Rough conversion function 1160s 1160s Will try to infer target type from input type if not specified. 1160s """ 1160s if typ is None: 1160s typ = resolve_cupy_type(val) 1160s 1160s if issubclass(typ, CupyArray): 1160s import cupy as cp 1160s 1160s if isinstance(val, CSMatrix): 1160s val = val.toarray() 1160s return cp.array(val) 1160s elif issubclass(typ, CupyCSRMatrix): 1160s > import cupy as cp 1160s E ModuleNotFoundError: No module named 'cupy' 1160s 1160s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:1016: ModuleNotFoundError 1160s __________________ test_ellipsis_index[cupy_csr-var-ellipsis] __________________ 1160s 1160s ellipsis_index = (slice(0, 10, None), Ellipsis) 1160s equivalent_ellipsis_index = (slice(0, 10, None), slice(None, None, None)) 1160s matrix_type = functools.partial(, typ=) 1160s 1160s def test_ellipsis_index( 1160s ellipsis_index: tuple[EllipsisType | slice, ...] | EllipsisType, 1160s equivalent_ellipsis_index: tuple[slice, slice], 1160s matrix_type, 1160s ): 1160s > adata = gen_adata((10, 10), X_type=matrix_type, **GEN_ADATA_DASK_ARGS) 1160s 1160s tests/test_views.py:797: 1160s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1160s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:346: in gen_adata 1160s X = X_type(random_state.binomial(100, 0.005, (M, N)).astype(X_dtype)) 1160s /usr/lib/python3.13/functools.py:934: in wrapper 1160s return dispatch(args[0].__class__)(*args, **kw) 1160s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1160s 1160s val = array([[0., 3., 1., 0., 0., 0., 0., 1., 2., 0.], 1160s [2., 0., 1., 0., 1., 0., 0., 1., 0., 1.], 1160s [0., 0., 0., ... 0.], 1160s [0., 0., 0., 1., 0., 1., 0., 1., 1., 0.], 1160s [0., 1., 0., 0., 1., 0., 2., 0., 0., 0.]], dtype=float32) 1160s typ = 1160s 1160s @singledispatch 1160s def as_cupy(val, typ=None): 1160s """ 1160s Rough conversion function 1160s 1160s Will try to infer target type from input type if not specified. 1160s """ 1160s if typ is None: 1160s typ = resolve_cupy_type(val) 1160s 1160s if issubclass(typ, CupyArray): 1160s import cupy as cp 1160s 1160s if isinstance(val, CSMatrix): 1160s val = val.toarray() 1160s return cp.array(val) 1160s elif issubclass(typ, CupyCSRMatrix): 1160s > import cupy as cp 1160s E ModuleNotFoundError: No module named 'cupy' 1160s 1160s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:1016: ModuleNotFoundError 1160s ________________ test_ellipsis_index[cupy_csr-obs-var-ellipsis] ________________ 1160s 1160s ellipsis_index = (slice(0, 10, None), slice(0, 10, None), Ellipsis) 1160s equivalent_ellipsis_index = (slice(0, 10, None), slice(0, 10, None)) 1160s matrix_type = functools.partial(, typ=) 1160s 1160s def test_ellipsis_index( 1160s ellipsis_index: tuple[EllipsisType | slice, ...] | EllipsisType, 1160s equivalent_ellipsis_index: tuple[slice, slice], 1160s matrix_type, 1160s ): 1160s > adata = gen_adata((10, 10), X_type=matrix_type, **GEN_ADATA_DASK_ARGS) 1160s 1160s tests/test_views.py:797: 1160s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1160s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:346: in gen_adata 1160s X = X_type(random_state.binomial(100, 0.005, (M, N)).astype(X_dtype)) 1160s /usr/lib/python3.13/functools.py:934: in wrapper 1160s return dispatch(args[0].__class__)(*args, **kw) 1160s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1160s 1160s val = array([[1., 0., 0., 0., 0., 2., 0., 1., 0., 0.], 1160s [1., 1., 1., 0., 1., 1., 0., 0., 0., 0.], 1160s [0., 0., 3., ... 0.], 1160s [0., 1., 1., 1., 0., 0., 1., 0., 0., 0.], 1160s [0., 0., 0., 0., 1., 1., 1., 0., 0., 0.]], dtype=float32) 1160s typ = 1160s 1160s @singledispatch 1160s def as_cupy(val, typ=None): 1160s """ 1160s Rough conversion function 1160s 1160s Will try to infer target type from input type if not specified. 1160s """ 1160s if typ is None: 1160s typ = resolve_cupy_type(val) 1160s 1160s if issubclass(typ, CupyArray): 1160s import cupy as cp 1160s 1160s if isinstance(val, CSMatrix): 1160s val = val.toarray() 1160s return cp.array(val) 1160s elif issubclass(typ, CupyCSRMatrix): 1160s > import cupy as cp 1160s E ModuleNotFoundError: No module named 'cupy' 1160s 1160s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:1016: ModuleNotFoundError 1160s ________________ test_ellipsis_index[cupy_csr-ellipsis-obs-var] ________________ 1160s 1160s ellipsis_index = (Ellipsis, slice(0, 10, None), slice(0, 10, None)) 1160s equivalent_ellipsis_index = (slice(0, 10, None), slice(0, 10, None)) 1160s matrix_type = functools.partial(, typ=) 1160s 1160s def test_ellipsis_index( 1160s ellipsis_index: tuple[EllipsisType | slice, ...] | EllipsisType, 1160s equivalent_ellipsis_index: tuple[slice, slice], 1160s matrix_type, 1160s ): 1160s > adata = gen_adata((10, 10), X_type=matrix_type, **GEN_ADATA_DASK_ARGS) 1160s 1160s tests/test_views.py:797: 1160s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1160s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:346: in gen_adata 1160s X = X_type(random_state.binomial(100, 0.005, (M, N)).astype(X_dtype)) 1160s /usr/lib/python3.13/functools.py:934: in wrapper 1160s return dispatch(args[0].__class__)(*args, **kw) 1160s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1160s 1160s val = array([[1., 0., 1., 0., 2., 0., 1., 0., 0., 0.], 1160s [0., 1., 1., 0., 1., 0., 2., 0., 0., 1.], 1160s [0., 1., 0., ... 0.], 1160s [0., 0., 0., 0., 1., 0., 0., 1., 1., 0.], 1160s [0., 0., 0., 0., 0., 0., 0., 1., 2., 0.]], dtype=float32) 1160s typ = 1160s 1160s @singledispatch 1160s def as_cupy(val, typ=None): 1160s """ 1160s Rough conversion function 1160s 1160s Will try to infer target type from input type if not specified. 1160s """ 1160s if typ is None: 1160s typ = resolve_cupy_type(val) 1160s 1160s if issubclass(typ, CupyArray): 1160s import cupy as cp 1160s 1160s if isinstance(val, CSMatrix): 1160s val = val.toarray() 1160s return cp.array(val) 1160s elif issubclass(typ, CupyCSRMatrix): 1160s > import cupy as cp 1160s E ModuleNotFoundError: No module named 'cupy' 1160s 1160s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:1016: ModuleNotFoundError 1160s ________________ test_ellipsis_index[cupy_csr-obs-ellipsis-var] ________________ 1160s 1160s ellipsis_index = (slice(0, 10, None), Ellipsis, slice(0, 10, None)) 1160s equivalent_ellipsis_index = (slice(0, 10, None), slice(0, 10, None)) 1160s matrix_type = functools.partial(, typ=) 1160s 1160s def test_ellipsis_index( 1160s ellipsis_index: tuple[EllipsisType | slice, ...] | EllipsisType, 1160s equivalent_ellipsis_index: tuple[slice, slice], 1160s matrix_type, 1160s ): 1160s > adata = gen_adata((10, 10), X_type=matrix_type, **GEN_ADATA_DASK_ARGS) 1160s 1160s tests/test_views.py:797: 1160s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1160s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:346: in gen_adata 1160s X = X_type(random_state.binomial(100, 0.005, (M, N)).astype(X_dtype)) 1160s /usr/lib/python3.13/functools.py:934: in wrapper 1160s return dispatch(args[0].__class__)(*args, **kw) 1160s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1160s 1160s val = array([[1., 0., 1., 0., 1., 0., 0., 1., 0., 0.], 1160s [0., 0., 0., 0., 0., 0., 0., 1., 2., 0.], 1160s [1., 0., 0., ... 1.], 1160s [0., 0., 1., 1., 1., 0., 0., 1., 1., 0.], 1160s [0., 0., 0., 1., 0., 0., 0., 0., 1., 1.]], dtype=float32) 1160s typ = 1160s 1160s @singledispatch 1160s def as_cupy(val, typ=None): 1160s """ 1160s Rough conversion function 1160s 1160s Will try to infer target type from input type if not specified. 1160s """ 1160s if typ is None: 1160s typ = resolve_cupy_type(val) 1160s 1160s if issubclass(typ, CupyArray): 1160s import cupy as cp 1160s 1160s if isinstance(val, CSMatrix): 1160s val = val.toarray() 1160s return cp.array(val) 1160s elif issubclass(typ, CupyCSRMatrix): 1160s > import cupy as cp 1160s E ModuleNotFoundError: No module named 'cupy' 1160s 1160s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:1016: ModuleNotFoundError 1160s ____________________ test_ellipsis_index[cupy_csc-ellipsis] ____________________ 1160s 1160s ellipsis_index = Ellipsis 1160s equivalent_ellipsis_index = (slice(None, None, None), slice(None, None, None)) 1160s matrix_type = functools.partial(, typ=) 1160s 1160s def test_ellipsis_index( 1160s ellipsis_index: tuple[EllipsisType | slice, ...] | EllipsisType, 1160s equivalent_ellipsis_index: tuple[slice, slice], 1160s matrix_type, 1160s ): 1160s > adata = gen_adata((10, 10), X_type=matrix_type, **GEN_ADATA_DASK_ARGS) 1160s 1160s tests/test_views.py:797: 1160s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1160s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:346: in gen_adata 1160s X = X_type(random_state.binomial(100, 0.005, (M, N)).astype(X_dtype)) 1160s /usr/lib/python3.13/functools.py:934: in wrapper 1160s return dispatch(args[0].__class__)(*args, **kw) 1160s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1160s 1160s val = array([[0., 0., 0., 0., 0., 1., 0., 0., 0., 0.], 1160s [1., 0., 1., 0., 0., 0., 0., 1., 0., 0.], 1160s [1., 1., 0., ... 0.], 1160s [2., 0., 0., 1., 0., 0., 2., 0., 1., 0.], 1160s [1., 0., 1., 0., 0., 0., 1., 0., 0., 0.]], dtype=float32) 1160s typ = 1160s 1160s @singledispatch 1160s def as_cupy(val, typ=None): 1160s """ 1160s Rough conversion function 1160s 1160s Will try to infer target type from input type if not specified. 1160s """ 1160s if typ is None: 1160s typ = resolve_cupy_type(val) 1160s 1160s if issubclass(typ, CupyArray): 1160s import cupy as cp 1160s 1160s if isinstance(val, CSMatrix): 1160s val = val.toarray() 1160s return cp.array(val) 1160s elif issubclass(typ, CupyCSRMatrix): 1160s import cupy as cp 1160s import cupyx.scipy.sparse as cpsparse 1160s 1160s if isinstance(val, np.ndarray): 1160s return cpsparse.csr_matrix(cp.array(val)) 1160s else: 1160s return cpsparse.csr_matrix(val) 1160s elif issubclass(typ, CupyCSCMatrix): 1160s > import cupy as cp 1160s E ModuleNotFoundError: No module named 'cupy' 1160s 1160s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:1024: ModuleNotFoundError 1160s _________________ test_ellipsis_index[cupy_csc-ellipsis_tuple] _________________ 1160s 1160s ellipsis_index = (Ellipsis,) 1160s equivalent_ellipsis_index = (slice(None, None, None), slice(None, None, None)) 1160s matrix_type = functools.partial(, typ=) 1160s 1160s def test_ellipsis_index( 1160s ellipsis_index: tuple[EllipsisType | slice, ...] | EllipsisType, 1160s equivalent_ellipsis_index: tuple[slice, slice], 1160s matrix_type, 1160s ): 1160s > adata = gen_adata((10, 10), X_type=matrix_type, **GEN_ADATA_DASK_ARGS) 1160s 1160s tests/test_views.py:797: 1160s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1160s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:346: in gen_adata 1160s X = X_type(random_state.binomial(100, 0.005, (M, N)).astype(X_dtype)) 1160s /usr/lib/python3.13/functools.py:934: in wrapper 1160s return dispatch(args[0].__class__)(*args, **kw) 1160s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1160s 1160s val = array([[0., 1., 1., 0., 0., 0., 1., 0., 0., 0.], 1160s [0., 0., 0., 0., 0., 0., 1., 1., 0., 0.], 1160s [0., 2., 0., ... 0.], 1160s [0., 0., 0., 1., 0., 0., 1., 1., 0., 1.], 1160s [0., 1., 3., 0., 0., 0., 0., 0., 0., 1.]], dtype=float32) 1160s typ = 1160s 1160s @singledispatch 1160s def as_cupy(val, typ=None): 1160s """ 1160s Rough conversion function 1160s 1160s Will try to infer target type from input type if not specified. 1160s """ 1160s if typ is None: 1160s typ = resolve_cupy_type(val) 1160s 1160s if issubclass(typ, CupyArray): 1160s import cupy as cp 1160s 1160s if isinstance(val, CSMatrix): 1160s val = val.toarray() 1160s return cp.array(val) 1160s elif issubclass(typ, CupyCSRMatrix): 1160s import cupy as cp 1160s import cupyx.scipy.sparse as cpsparse 1160s 1160s if isinstance(val, np.ndarray): 1160s return cpsparse.csr_matrix(cp.array(val)) 1160s else: 1160s return cpsparse.csr_matrix(val) 1160s elif issubclass(typ, CupyCSCMatrix): 1160s > import cupy as cp 1160s E ModuleNotFoundError: No module named 'cupy' 1160s 1160s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:1024: ModuleNotFoundError 1160s __________________ test_ellipsis_index[cupy_csc-obs-ellipsis] __________________ 1160s 1160s ellipsis_index = (Ellipsis, slice(0, 10, None)) 1160s equivalent_ellipsis_index = (slice(None, None, None), slice(0, 10, None)) 1160s matrix_type = functools.partial(, typ=) 1160s 1160s def test_ellipsis_index( 1160s ellipsis_index: tuple[EllipsisType | slice, ...] | EllipsisType, 1160s equivalent_ellipsis_index: tuple[slice, slice], 1160s matrix_type, 1160s ): 1160s > adata = gen_adata((10, 10), X_type=matrix_type, **GEN_ADATA_DASK_ARGS) 1160s 1160s tests/test_views.py:797: 1160s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1160s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:346: in gen_adata 1160s X = X_type(random_state.binomial(100, 0.005, (M, N)).astype(X_dtype)) 1160s /usr/lib/python3.13/functools.py:934: in wrapper 1160s return dispatch(args[0].__class__)(*args, **kw) 1160s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1160s 1160s val = array([[1., 1., 0., 0., 0., 0., 0., 0., 0., 0.], 1160s [2., 0., 1., 2., 1., 0., 0., 1., 1., 1.], 1160s [0., 2., 0., ... 1.], 1160s [1., 0., 0., 0., 1., 0., 1., 0., 1., 0.], 1160s [0., 1., 1., 1., 1., 2., 0., 0., 0., 2.]], dtype=float32) 1160s typ = 1160s 1160s @singledispatch 1160s def as_cupy(val, typ=None): 1160s """ 1160s Rough conversion function 1160s 1160s Will try to infer target type from input type if not specified. 1160s """ 1160s if typ is None: 1160s typ = resolve_cupy_type(val) 1160s 1160s if issubclass(typ, CupyArray): 1160s import cupy as cp 1160s 1160s if isinstance(val, CSMatrix): 1160s val = val.toarray() 1160s return cp.array(val) 1160s elif issubclass(typ, CupyCSRMatrix): 1160s import cupy as cp 1160s import cupyx.scipy.sparse as cpsparse 1160s 1160s if isinstance(val, np.ndarray): 1160s return cpsparse.csr_matrix(cp.array(val)) 1160s else: 1160s return cpsparse.csr_matrix(val) 1160s elif issubclass(typ, CupyCSCMatrix): 1160s > import cupy as cp 1160s E ModuleNotFoundError: No module named 'cupy' 1160s 1160s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:1024: ModuleNotFoundError 1160s __________________ test_ellipsis_index[cupy_csc-var-ellipsis] __________________ 1160s 1160s ellipsis_index = (slice(0, 10, None), Ellipsis) 1160s equivalent_ellipsis_index = (slice(0, 10, None), slice(None, None, None)) 1160s matrix_type = functools.partial(, typ=) 1160s 1160s def test_ellipsis_index( 1160s ellipsis_index: tuple[EllipsisType | slice, ...] | EllipsisType, 1160s equivalent_ellipsis_index: tuple[slice, slice], 1160s matrix_type, 1160s ): 1160s > adata = gen_adata((10, 10), X_type=matrix_type, **GEN_ADATA_DASK_ARGS) 1160s 1160s tests/test_views.py:797: 1160s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1160s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:346: in gen_adata 1160s X = X_type(random_state.binomial(100, 0.005, (M, N)).astype(X_dtype)) 1160s /usr/lib/python3.13/functools.py:934: in wrapper 1160s return dispatch(args[0].__class__)(*args, **kw) 1160s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1160s 1160s val = array([[0., 1., 0., 1., 2., 0., 1., 1., 1., 0.], 1160s [0., 0., 0., 0., 0., 1., 0., 2., 2., 0.], 1160s [0., 0., 0., ... 0.], 1160s [0., 1., 1., 1., 0., 2., 0., 0., 1., 1.], 1160s [0., 0., 0., 0., 1., 1., 0., 0., 1., 1.]], dtype=float32) 1160s typ = 1160s 1160s @singledispatch 1160s def as_cupy(val, typ=None): 1160s """ 1160s Rough conversion function 1160s 1160s Will try to infer target type from input type if not specified. 1160s """ 1160s if typ is None: 1160s typ = resolve_cupy_type(val) 1160s 1160s if issubclass(typ, CupyArray): 1160s import cupy as cp 1160s 1160s if isinstance(val, CSMatrix): 1160s val = val.toarray() 1160s return cp.array(val) 1160s elif issubclass(typ, CupyCSRMatrix): 1160s import cupy as cp 1160s import cupyx.scipy.sparse as cpsparse 1160s 1160s if isinstance(val, np.ndarray): 1160s return cpsparse.csr_matrix(cp.array(val)) 1160s else: 1160s return cpsparse.csr_matrix(val) 1160s elif issubclass(typ, CupyCSCMatrix): 1160s > import cupy as cp 1160s E ModuleNotFoundError: No module named 'cupy' 1160s 1160s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:1024: ModuleNotFoundError 1160s ________________ test_ellipsis_index[cupy_csc-obs-var-ellipsis] ________________ 1160s 1160s ellipsis_index = (slice(0, 10, None), slice(0, 10, None), Ellipsis) 1160s equivalent_ellipsis_index = (slice(0, 10, None), slice(0, 10, None)) 1160s matrix_type = functools.partial(, typ=) 1160s 1160s def test_ellipsis_index( 1160s ellipsis_index: tuple[EllipsisType | slice, ...] | EllipsisType, 1160s equivalent_ellipsis_index: tuple[slice, slice], 1160s matrix_type, 1160s ): 1160s > adata = gen_adata((10, 10), X_type=matrix_type, **GEN_ADATA_DASK_ARGS) 1160s 1160s tests/test_views.py:797: 1160s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1160s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:346: in gen_adata 1160s X = X_type(random_state.binomial(100, 0.005, (M, N)).astype(X_dtype)) 1160s /usr/lib/python3.13/functools.py:934: in wrapper 1160s return dispatch(args[0].__class__)(*args, **kw) 1160s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1160s 1160s val = array([[0., 1., 1., 1., 1., 0., 1., 2., 0., 1.], 1160s [2., 0., 2., 0., 0., 0., 0., 0., 0., 1.], 1160s [0., 1., 0., ... 0.], 1160s [0., 1., 0., 0., 0., 0., 0., 0., 0., 0.], 1160s [0., 0., 3., 0., 5., 0., 0., 0., 0., 2.]], dtype=float32) 1160s typ = 1160s 1160s @singledispatch 1160s def as_cupy(val, typ=None): 1160s """ 1160s Rough conversion function 1160s 1160s Will try to infer target type from input type if not specified. 1160s """ 1160s if typ is None: 1160s typ = resolve_cupy_type(val) 1160s 1160s if issubclass(typ, CupyArray): 1160s import cupy as cp 1160s 1160s if isinstance(val, CSMatrix): 1160s val = val.toarray() 1160s return cp.array(val) 1160s elif issubclass(typ, CupyCSRMatrix): 1160s import cupy as cp 1160s import cupyx.scipy.sparse as cpsparse 1160s 1160s if isinstance(val, np.ndarray): 1160s return cpsparse.csr_matrix(cp.array(val)) 1160s else: 1160s return cpsparse.csr_matrix(val) 1160s elif issubclass(typ, CupyCSCMatrix): 1160s > import cupy as cp 1160s E ModuleNotFoundError: No module named 'cupy' 1160s 1160s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:1024: ModuleNotFoundError 1160s ________________ test_ellipsis_index[cupy_csc-ellipsis-obs-var] ________________ 1160s 1160s ellipsis_index = (Ellipsis, slice(0, 10, None), slice(0, 10, None)) 1160s equivalent_ellipsis_index = (slice(0, 10, None), slice(0, 10, None)) 1160s matrix_type = functools.partial(, typ=) 1160s 1160s def test_ellipsis_index( 1160s ellipsis_index: tuple[EllipsisType | slice, ...] | EllipsisType, 1160s equivalent_ellipsis_index: tuple[slice, slice], 1160s matrix_type, 1160s ): 1160s > adata = gen_adata((10, 10), X_type=matrix_type, **GEN_ADATA_DASK_ARGS) 1160s 1160s tests/test_views.py:797: 1160s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1160s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:346: in gen_adata 1160s X = X_type(random_state.binomial(100, 0.005, (M, N)).astype(X_dtype)) 1160s /usr/lib/python3.13/functools.py:934: in wrapper 1160s return dispatch(args[0].__class__)(*args, **kw) 1160s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1160s 1160s val = array([[0., 0., 0., 0., 1., 0., 0., 2., 0., 1.], 1160s [0., 0., 1., 1., 0., 0., 0., 0., 0., 0.], 1160s [1., 0., 0., ... 0.], 1160s [0., 1., 1., 0., 0., 0., 0., 0., 0., 2.], 1160s [0., 1., 0., 0., 0., 1., 0., 1., 0., 0.]], dtype=float32) 1160s typ = 1160s 1160s @singledispatch 1160s def as_cupy(val, typ=None): 1160s """ 1160s Rough conversion function 1160s 1160s Will try to infer target type from input type if not specified. 1160s """ 1160s if typ is None: 1160s typ = resolve_cupy_type(val) 1160s 1160s if issubclass(typ, CupyArray): 1160s import cupy as cp 1160s 1160s if isinstance(val, CSMatrix): 1160s val = val.toarray() 1160s return cp.array(val) 1160s elif issubclass(typ, CupyCSRMatrix): 1160s import cupy as cp 1160s import cupyx.scipy.sparse as cpsparse 1160s 1160s if isinstance(val, np.ndarray): 1160s return cpsparse.csr_matrix(cp.array(val)) 1160s else: 1160s return cpsparse.csr_matrix(val) 1160s elif issubclass(typ, CupyCSCMatrix): 1160s > import cupy as cp 1160s E ModuleNotFoundError: No module named 'cupy' 1160s 1160s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:1024: ModuleNotFoundError 1160s ________________ test_ellipsis_index[cupy_csc-obs-ellipsis-var] ________________ 1160s 1160s ellipsis_index = (slice(0, 10, None), Ellipsis, slice(0, 10, None)) 1160s equivalent_ellipsis_index = (slice(0, 10, None), slice(0, 10, None)) 1160s matrix_type = functools.partial(, typ=) 1160s 1160s def test_ellipsis_index( 1160s ellipsis_index: tuple[EllipsisType | slice, ...] | EllipsisType, 1160s equivalent_ellipsis_index: tuple[slice, slice], 1160s matrix_type, 1160s ): 1160s > adata = gen_adata((10, 10), X_type=matrix_type, **GEN_ADATA_DASK_ARGS) 1160s 1160s tests/test_views.py:797: 1160s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1160s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:346: in gen_adata 1160s X = X_type(random_state.binomial(100, 0.005, (M, N)).astype(X_dtype)) 1160s /usr/lib/python3.13/functools.py:934: in wrapper 1160s return dispatch(args[0].__class__)(*args, **kw) 1160s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1160s 1160s val = array([[2., 0., 0., 1., 0., 1., 0., 1., 0., 0.], 1160s [1., 1., 1., 0., 0., 0., 0., 1., 0., 0.], 1160s [0., 2., 1., ... 0.], 1160s [2., 1., 0., 0., 1., 0., 0., 1., 0., 0.], 1160s [0., 0., 1., 0., 1., 0., 1., 0., 0., 0.]], dtype=float32) 1160s typ = 1160s 1160s @singledispatch 1160s def as_cupy(val, typ=None): 1160s """ 1160s Rough conversion function 1160s 1160s Will try to infer target type from input type if not specified. 1160s """ 1160s if typ is None: 1160s typ = resolve_cupy_type(val) 1160s 1160s if issubclass(typ, CupyArray): 1160s import cupy as cp 1160s 1160s if isinstance(val, CSMatrix): 1160s val = val.toarray() 1160s return cp.array(val) 1160s elif issubclass(typ, CupyCSRMatrix): 1160s import cupy as cp 1160s import cupyx.scipy.sparse as cpsparse 1160s 1160s if isinstance(val, np.ndarray): 1160s return cpsparse.csr_matrix(cp.array(val)) 1160s else: 1160s return cpsparse.csr_matrix(val) 1160s elif issubclass(typ, CupyCSCMatrix): 1160s > import cupy as cp 1160s E ModuleNotFoundError: No module named 'cupy' 1160s 1160s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:1024: ModuleNotFoundError 1160s =============================== warnings summary =============================== 1160s tests/test_concatenate.py:1623 1160s /tmp/autopkgtest.zqx9Nf/autopkgtest_tmp/tests/test_concatenate.py:1623: PytestUnknownMarkWarning: Unknown pytest.mark.gpu - is this a typo? You can register custom marks to avoid this warning - for details, see https://docs.pytest.org/en/stable/how-to/mark.html 1160s @pytest.mark.gpu 1160s 1160s tests/test_dask.py:284 1160s /tmp/autopkgtest.zqx9Nf/autopkgtest_tmp/tests/test_dask.py:284: PytestUnknownMarkWarning: Unknown pytest.mark.gpu - is this a typo? You can register custom marks to avoid this warning - for details, see https://docs.pytest.org/en/stable/how-to/mark.html 1160s marks=pytest.mark.gpu, 1160s 1160s tests/test_helpers.py:287 1160s /tmp/autopkgtest.zqx9Nf/autopkgtest_tmp/tests/test_helpers.py:287: PytestUnknownMarkWarning: Unknown pytest.mark.gpu - is this a typo? You can register custom marks to avoid this warning - for details, see https://docs.pytest.org/en/stable/how-to/mark.html 1160s as_dense_cupy_dask_array, CupyArray, id="cupy_dense", marks=pytest.mark.gpu 1160s 1160s tests/test_helpers.py:294 1160s /tmp/autopkgtest.zqx9Nf/autopkgtest_tmp/tests/test_helpers.py:294: PytestUnknownMarkWarning: Unknown pytest.mark.gpu - is this a typo? You can register custom marks to avoid this warning - for details, see https://docs.pytest.org/en/stable/how-to/mark.html 1160s marks=pytest.mark.gpu, 1160s 1160s tests/test_helpers.py:320 1160s /tmp/autopkgtest.zqx9Nf/autopkgtest_tmp/tests/test_helpers.py:320: PytestUnknownMarkWarning: Unknown pytest.mark.gpu - is this a typo? You can register custom marks to avoid this warning - for details, see https://docs.pytest.org/en/stable/how-to/mark.html 1160s @pytest.mark.gpu 1160s 1160s tests/test_io_elementwise.py:247 1160s /tmp/autopkgtest.zqx9Nf/autopkgtest_tmp/tests/test_io_elementwise.py:247: PytestUnknownMarkWarning: Unknown pytest.mark.gpu - is this a typo? You can register custom marks to avoid this warning - for details, see https://docs.pytest.org/en/stable/how-to/mark.html 1160s @pytest.mark.gpu 1160s 1160s ../../../usr/lib/python3/dist-packages/anndata/utils.py:354: 1 warning 1160s tests/lazy/test_concat.py: 385 warnings 1160s tests/lazy/test_read.py: 68 warnings 1160s tests/test_backed_hdf5.py: 300 warnings 1160s tests/test_base.py: 3 warnings 1160s tests/test_concatenate.py: 59 warnings 1160s tests/test_helpers.py: 4 warnings 1160s tests/test_inplace_subset.py: 140 warnings 1160s tests/test_io_conversion.py: 17 warnings 1160s tests/test_io_dispatched.py: 5 warnings 1160s tests/test_io_elementwise.py: 26 warnings 1160s tests/test_io_warnings.py: 1 warning 1160s tests/test_raw.py: 1 warning 1160s tests/test_readwrite.py: 22 warnings 1160s tests/test_transpose.py: 13 warnings 1160s tests/test_views.py: 708 warnings 1160s tests/test_x.py: 8 warnings 1160s /usr/lib/python3/dist-packages/anndata/utils.py:354: ExperimentalFeatureWarning: Support for Awkward Arrays is currently experimental. Behavior may change in the future. Please report any issues you may encounter! 1160s warnings.warn(msg, category, stacklevel=stacklevel) 1160s 1160s tests/lazy/test_concat.py: 1118 warnings 1160s tests/test_concatenate.py: 442 warnings 1160s tests/test_concatenate_disk.py: 104 warnings 1160s tests/test_utils.py: 1 warning 1160s /usr/lib/python3/dist-packages/anndata/_core/anndata.py:1773: UserWarning: Observation names are not unique. To make them unique, call `.obs_names_make_unique`. 1160s utils.warn_names_duplicates("obs") 1160s 1160s tests/lazy/test_concat.py: 161 warnings 1160s tests/test_concatenate.py: 21 warnings 1160s /usr/lib/python3/dist-packages/anndata/utils.py:354: ExperimentalFeatureWarning: Outer joins on awkward.Arrays will have different return values in the future. For details, and to offer input, please see: 1160s 1160s https://github.com/scverse/anndata/issues/898 1160s warnings.warn(msg, category, stacklevel=stacklevel) 1160s 1160s tests/test_backed_dense.py::test_assign_x_subset[h5ad] 1160s tests/test_backed_dense.py::test_assign_x_subset[zarr2] 1160s tests/test_backed_dense.py::test_assign_x_subset[zarr3] 1160s /tmp/autopkgtest.zqx9Nf/autopkgtest_tmp/tests/test_backed_dense.py:84: ImplicitModificationWarning: Modifying `X` on a view results in data being overridden 1160s view.X = np.zeros((4, 2)) 1160s 1160s tests/test_backed_sparse.py: 1386 warnings 1160s tests/test_dask.py: 106 warnings 1160s tests/test_io_backwards_compat.py: 7 warnings 1160s tests/test_io_elementwise.py: 232 warnings 1160s tests/test_io_partial.py: 7 warnings 1160s tests/test_io_utils.py: 1 warning 1160s tests/test_readwrite.py: 464 warnings 1160s tests/test_x.py: 37 warnings 1160s /usr/lib/python3/dist-packages/zarr/codecs/vlen_utf8.py:44: UserWarning: The codec `vlen-utf8` is currently not part in the Zarr format 3 specification. It may not be supported by other zarr implementations and may change in the future. 1160s return cls(**configuration_parsed) 1160s 1160s tests/test_backed_sparse.py: 345 warnings 1160s tests/test_dask.py: 35 warnings 1160s tests/test_io_backwards_compat.py: 3 warnings 1160s tests/test_io_elementwise.py: 121 warnings 1160s tests/test_io_partial.py: 2 warnings 1160s tests/test_io_utils.py: 1 warning 1160s tests/test_readwrite.py: 152 warnings 1160s tests/test_x.py: 13 warnings 1160s /usr/lib/python3/dist-packages/zarr/core/array.py:3989: UserWarning: The dtype `StringDType()` is currently not part in the Zarr format 3 specification. It may not be supported by other zarr implementations and may change in the future. 1160s meta = AsyncArray._create_metadata_v3( 1160s 1160s tests/test_backed_sparse.py: 345 warnings 1160s tests/test_dask.py: 15 warnings 1160s tests/test_io_backwards_compat.py: 1 warning 1160s tests/test_io_partial.py: 2 warnings 1160s tests/test_readwrite.py: 21 warnings 1160s tests/test_x.py: 1 warning 1160s /usr/lib/python3/dist-packages/zarr/api/asynchronous.py:203: UserWarning: Consolidated metadata is currently not part in the Zarr format 3 specification. It may not be supported by other zarr implementations and may change in the future. 1160s warnings.warn( 1160s 1160s tests/test_base.py: 5 warnings 1160s tests/test_readwrite.py: 18 warnings 1160s tests/test_views.py: 1 warning 1160s /usr/lib/python3/dist-packages/anndata/_core/aligned_df.py:83: ImplicitModificationWarning: Transforming to str index. 1160s warnings.warn("Transforming to str index.", ImplicitModificationWarning) 1160s 1160s tests/test_concatenate.py::test_concatenate_obsm_outer[nan] 1160s tests/test_concatenate.py::test_concatenate_obsm_outer[3.141592653589793] 1160s tests/test_concatenate.py::test_concatenate_fill_value[nan] 1160s tests/test_concatenate.py::test_concatenate_fill_value[3.141592653589793] 1160s tests/test_concatenate.py::test_transposed_concat[sparse_dask_array-obs-outer-None] 1160s tests/test_concatenate.py::test_transposed_concat[sparse_dask_array-obs-outer-same] 1160s tests/test_concatenate.py::test_transposed_concat[sparse_dask_array-obs-outer-unique] 1160s tests/test_concatenate.py::test_transposed_concat[sparse_dask_array-obs-outer-first] 1160s tests/test_concatenate.py::test_transposed_concat[sparse_dask_array-obs-outer-only] 1160s /usr/lib/python3/dist-packages/scipy/sparse/_index.py:210: SparseEfficiencyWarning: Changing the sparsity structure of a csc_matrix is expensive. lil and dok are more efficient. 1160s self._set_arrayXarray(i, j, x) 1160s 1160s tests/test_concatenate.py: 268 warnings 1160s tests/test_concatenate_disk.py: 96 warnings 1160s tests/test_utils.py: 1 warning 1160s /usr/lib/python3/dist-packages/anndata/_core/anndata.py:1775: UserWarning: Variable names are not unique. To make them unique, call `.var_names_make_unique`. 1160s utils.warn_names_duplicates("var") 1160s 1160s tests/test_concatenate.py: 11 warnings 1160s /usr/lib/python3/dist-packages/scipy/sparse/_index.py:210: SparseEfficiencyWarning: Changing the sparsity structure of a csr_matrix is expensive. lil and dok are more efficient. 1160s self._set_arrayXarray(i, j, x) 1160s 1160s tests/test_concatenate.py::test_concatenate_fill_value[nan] 1160s tests/test_concatenate.py::test_concatenate_fill_value[3.141592653589793] 1160s /usr/lib/python3/dist-packages/scipy/sparse/_index.py:210: SparseEfficiencyWarning: Changing the sparsity structure of a csc_array is expensive. lil and dok are more efficient. 1160s self._set_arrayXarray(i, j, x) 1160s 1160s tests/test_concatenate.py: 8 warnings 1160s tests/test_views.py: 6 warnings 1160s /usr/lib/python3/dist-packages/scipy/sparse/_index.py:168: SparseEfficiencyWarning: Changing the sparsity structure of a csr_matrix is expensive. lil and dok are more efficient. 1160s self._set_intXint(row, col, x.flat[0]) 1160s 1160s tests/test_io_dispatched.py::test_io_dispatched_keys 1160s /usr/lib/python3/dist-packages/anndata/_io/specs/registry.py:285: OldFormatWarning: Element '/' was written without encoding metadata. 1160s return self.callback(read_func, elem.name, elem, iospec=iospec) 1160s 1160s tests/test_io_elementwise.py::test_read_iospec_not_found[zarr2-encoding-type-floob] 1160s tests/test_io_elementwise.py::test_read_iospec_not_found[zarr2-encoding-version-10000.0] 1160s tests/test_io_elementwise.py::test_read_iospec_not_found[zarr3-encoding-type-floob] 1160s tests/test_io_elementwise.py::test_read_iospec_not_found[zarr3-encoding-version-10000.0] 1160s tests/test_io_utils.py::test_only_child_key_reported_on_failure[zarr] 1160s /usr/lib/python3/dist-packages/anndata/_io/utils.py:215: OldFormatWarning: Element '/' was written without encoding metadata. 1160s return func(*args, **kwargs) 1160s 1160s tests/test_views.py::test_views 1160s /tmp/autopkgtest.zqx9Nf/autopkgtest_tmp/tests/test_views.py:114: ImplicitModificationWarning: Modifying `X` on a view results in data being overridden 1160s adata[:2, 0].X = [0, 0] 1160s 1160s tests/test_views.py::test_modify_view_component[scipy_csc_matrix-layers] 1160s tests/test_views.py::test_modify_view_component[scipy_csc_matrix-obsm] 1160s tests/test_views.py::test_modify_view_component[scipy_csc_matrix-varm] 1160s /usr/lib/python3/dist-packages/scipy/sparse/_index.py:168: SparseEfficiencyWarning: Changing the sparsity structure of a csc_matrix is expensive. lil and dok are more efficient. 1160s self._set_intXint(row, col, x.flat[0]) 1160s 1160s tests/test_views.py::test_modify_view_component[scipy_csr_array-layers] 1160s tests/test_views.py::test_modify_view_component[scipy_csr_array-obsm] 1160s tests/test_views.py::test_modify_view_component[scipy_csr_array-varm] 1160s /usr/lib/python3/dist-packages/scipy/sparse/_index.py:168: SparseEfficiencyWarning: Changing the sparsity structure of a csr_array is expensive. lil and dok are more efficient. 1160s self._set_intXint(row, col, x.flat[0]) 1160s 1160s tests/test_views.py::test_modify_view_component[scipy_csc_array-layers] 1160s tests/test_views.py::test_modify_view_component[scipy_csc_array-obsm] 1160s tests/test_views.py::test_modify_view_component[scipy_csc_array-varm] 1160s /usr/lib/python3/dist-packages/scipy/sparse/_index.py:168: SparseEfficiencyWarning: Changing the sparsity structure of a csc_array is expensive. lil and dok are more efficient. 1160s self._set_intXint(row, col, x.flat[0]) 1160s 1160s tests/test_views.py: 70 warnings 1160s /tmp/autopkgtest.zqx9Nf/autopkgtest_tmp/tests/test_views.py:375: ImplicitModificationWarning: Modifying `X` on a view results in data being overridden 1160s adata_subset.X = 1 1160s 1160s tests/test_views.py::test_view_of_view_modification 1160s /tmp/autopkgtest.zqx9Nf/autopkgtest_tmp/tests/test_views.py:559: ImplicitModificationWarning: Modifying `X` on a view results in data being overridden 1160s adata[0, :][:, 5:].X = np.ones(5) 1160s 1160s tests/test_views.py::test_view_of_view_modification 1160s /tmp/autopkgtest.zqx9Nf/autopkgtest_tmp/tests/test_views.py:561: ImplicitModificationWarning: Modifying `X` on a view results in data being overridden 1160s adata[[1, 2], :][:, [1, 2]].X = np.ones((2, 2)) 1160s 1160s tests/test_views.py::test_view_of_view_modification 1160s /tmp/autopkgtest.zqx9Nf/autopkgtest_tmp/tests/test_views.py:565: ImplicitModificationWarning: Modifying `X` on a view results in data being overridden 1160s adata[0, :][:, 5:].X = np.ones(5) * 2 1160s 1160s tests/test_views.py::test_view_of_view_modification 1160s /tmp/autopkgtest.zqx9Nf/autopkgtest_tmp/tests/test_views.py:567: ImplicitModificationWarning: Modifying `X` on a view results in data being overridden 1160s adata[[1, 2], :][:, [1, 2]].X = np.ones((2, 2)) * 2 1160s 1160s tests/test_x.py::test_repeat_indices_view 1160s /tmp/autopkgtest.zqx9Nf/autopkgtest_tmp/tests/test_x.py:48: ImplicitModificationWarning: Modifying `X` on a view results in data being overridden 1160s subset.X = mat 1160s 1160s tests/test_x.py: 21 warnings 1160s /tmp/autopkgtest.zqx9Nf/autopkgtest_tmp/tests/test_x.py:61: ImplicitModificationWarning: Modifying `X` on a view results in data being overridden 1160s view.X = to_assign 1160s 1160s tests/test_x.py::test_setter_view[csr-csr] 1160s tests/test_x.py::test_setter_view[csc-csr] 1160s tests/test_x.py::test_setter_view[csr_array-csr] 1160s tests/test_x.py::test_setter_view[csc_array-csr] 1160s tests/test_x.py::test_setter_view[ndarray-csr] 1160s /usr/lib/python3/dist-packages/scipy/sparse/_index.py:201: SparseEfficiencyWarning: Changing the sparsity structure of a csr_matrix is expensive. lil and dok are more efficient. 1160s self._set_arrayXarray_sparse(i, j, x) 1160s 1160s tests/test_x.py::test_setter_view[csr-csc] 1160s tests/test_x.py::test_setter_view[csc-csc] 1160s tests/test_x.py::test_setter_view[csr_array-csc] 1160s tests/test_x.py::test_setter_view[csc_array-csc] 1160s tests/test_x.py::test_setter_view[ndarray-csc] 1160s /usr/lib/python3/dist-packages/scipy/sparse/_index.py:201: SparseEfficiencyWarning: Changing the sparsity structure of a csc_matrix is expensive. lil and dok are more efficient. 1160s self._set_arrayXarray_sparse(i, j, x) 1160s 1160s tests/test_x.py::test_setter_view[csr-csr_array] 1160s tests/test_x.py::test_setter_view[csc-csr_array] 1160s tests/test_x.py::test_setter_view[csr_array-csr_array] 1160s tests/test_x.py::test_setter_view[csc_array-csr_array] 1160s tests/test_x.py::test_setter_view[ndarray-csr_array] 1160s /usr/lib/python3/dist-packages/scipy/sparse/_index.py:201: SparseEfficiencyWarning: Changing the sparsity structure of a csr_array is expensive. lil and dok are more efficient. 1160s self._set_arrayXarray_sparse(i, j, x) 1160s 1160s tests/test_x.py::test_setter_view[csr-csc_array] 1160s tests/test_x.py::test_setter_view[csc-csc_array] 1160s tests/test_x.py::test_setter_view[csr_array-csc_array] 1160s tests/test_x.py::test_setter_view[csc_array-csc_array] 1160s tests/test_x.py::test_setter_view[ndarray-csc_array] 1160s /usr/lib/python3/dist-packages/scipy/sparse/_index.py:201: SparseEfficiencyWarning: Changing the sparsity structure of a csc_array is expensive. lil and dok are more efficient. 1160s self._set_arrayXarray_sparse(i, j, x) 1160s 1160s -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html 1160s =========================== short test summary info ============================ 1160s FAILED tests/test_concatenate.py::test_concatenate_roundtrip[inner-cupy_array-concat_func0-False] 1160s FAILED tests/test_concatenate.py::test_concatenate_roundtrip[inner-cupy_array--True] 1160s FAILED tests/test_concatenate.py::test_concatenate_roundtrip[inner-cupy_csr-concat_func0-False] 1160s FAILED tests/test_concatenate.py::test_concatenate_roundtrip[inner-cupy_csr--True] 1160s FAILED tests/test_concatenate.py::test_concatenate_roundtrip[inner-cupy_csc-concat_func0-False] 1160s FAILED tests/test_concatenate.py::test_concatenate_roundtrip[inner-cupy_csc--True] 1160s FAILED tests/test_concatenate.py::test_concatenate_roundtrip[outer-cupy_array-concat_func0-False] 1160s FAILED tests/test_concatenate.py::test_concatenate_roundtrip[outer-cupy_array--True] 1160s FAILED tests/test_concatenate.py::test_concatenate_roundtrip[outer-cupy_csr-concat_func0-False] 1160s FAILED tests/test_concatenate.py::test_concatenate_roundtrip[outer-cupy_csr--True] 1160s FAILED tests/test_concatenate.py::test_concatenate_roundtrip[outer-cupy_csc-concat_func0-False] 1160s FAILED tests/test_concatenate.py::test_concatenate_roundtrip[outer-cupy_csc--True] 1160s FAILED tests/test_concatenate.py::test_concatenate_layers[cupy_array-inner] 1160s FAILED tests/test_concatenate.py::test_concatenate_layers[cupy_array-outer] 1160s FAILED tests/test_concatenate.py::test_concatenate_layers[cupy_csr-inner] - M... 1160s FAILED tests/test_concatenate.py::test_concatenate_layers[cupy_csr-outer] - M... 1160s FAILED tests/test_concatenate.py::test_concatenate_layers[cupy_csc-inner] - M... 1160s FAILED tests/test_concatenate.py::test_concatenate_layers[cupy_csc-outer] - M... 1160s FAILED tests/test_concatenate.py::test_concatenate_layers_misaligned[cupy_array-inner] 1160s FAILED tests/test_concatenate.py::test_concatenate_layers_misaligned[cupy_array-outer] 1160s FAILED tests/test_concatenate.py::test_concatenate_layers_misaligned[cupy_csr-inner] 1160s FAILED tests/test_concatenate.py::test_concatenate_layers_misaligned[cupy_csr-outer] 1160s FAILED tests/test_concatenate.py::test_concatenate_layers_misaligned[cupy_csc-inner] 1160s FAILED tests/test_concatenate.py::test_concatenate_layers_misaligned[cupy_csc-outer] 1160s FAILED tests/test_concatenate.py::test_concatenate_layers_outer[cupy_array-0] 1160s FAILED tests/test_concatenate.py::test_concatenate_layers_outer[cupy_array-nan] 1160s FAILED tests/test_concatenate.py::test_concatenate_layers_outer[cupy_array-3.141592653589793] 1160s FAILED tests/test_concatenate.py::test_concatenate_layers_outer[cupy_csr-0] 1160s FAILED tests/test_concatenate.py::test_concatenate_layers_outer[cupy_csr-nan] 1160s FAILED tests/test_concatenate.py::test_concatenate_layers_outer[cupy_csr-3.141592653589793] 1160s FAILED tests/test_concatenate.py::test_concatenate_layers_outer[cupy_csc-0] 1160s FAILED tests/test_concatenate.py::test_concatenate_layers_outer[cupy_csc-nan] 1160s FAILED tests/test_concatenate.py::test_concatenate_layers_outer[cupy_csc-3.141592653589793] 1160s FAILED tests/test_concatenate.py::test_pairwise_concat[obs-cupy_array] - Modu... 1160s FAILED tests/test_concatenate.py::test_pairwise_concat[obs-cupy_csr] - Module... 1160s FAILED tests/test_concatenate.py::test_pairwise_concat[obs-cupy_csc] - Module... 1160s FAILED tests/test_concatenate.py::test_pairwise_concat[var-cupy_array] - Modu... 1160s FAILED tests/test_concatenate.py::test_pairwise_concat[var-cupy_csr] - Module... 1160s FAILED tests/test_concatenate.py::test_pairwise_concat[var-cupy_csc] - Module... 1160s FAILED tests/test_concatenate.py::test_nan_merge[obs-inner-cupy_array] - Modu... 1160s FAILED tests/test_concatenate.py::test_nan_merge[obs-inner-cupy_csr] - Module... 1160s FAILED tests/test_concatenate.py::test_nan_merge[obs-inner-cupy_csc] - Module... 1160s FAILED tests/test_concatenate.py::test_nan_merge[obs-outer-cupy_array] - Modu... 1160s FAILED tests/test_concatenate.py::test_nan_merge[obs-outer-cupy_csr] - Module... 1160s FAILED tests/test_concatenate.py::test_nan_merge[obs-outer-cupy_csc] - Module... 1160s FAILED tests/test_concatenate.py::test_nan_merge[var-inner-cupy_array] - Modu... 1160s FAILED tests/test_concatenate.py::test_nan_merge[var-inner-cupy_csr] - Module... 1160s FAILED tests/test_concatenate.py::test_nan_merge[var-inner-cupy_csc] - Module... 1160s FAILED tests/test_concatenate.py::test_nan_merge[var-outer-cupy_array] - Modu... 1160s FAILED tests/test_concatenate.py::test_nan_merge[var-outer-cupy_csr] - Module... 1160s FAILED tests/test_concatenate.py::test_nan_merge[var-outer-cupy_csc] - Module... 1160s FAILED tests/test_concatenate.py::test_transposed_concat[cupy_array-obs-inner-None] 1160s FAILED tests/test_concatenate.py::test_transposed_concat[cupy_array-obs-inner-same] 1160s FAILED tests/test_concatenate.py::test_transposed_concat[cupy_array-obs-inner-unique] 1160s FAILED tests/test_concatenate.py::test_transposed_concat[cupy_array-obs-inner-first] 1160s FAILED tests/test_concatenate.py::test_transposed_concat[cupy_array-obs-inner-only] 1160s FAILED tests/test_concatenate.py::test_transposed_concat[cupy_array-obs-outer-None] 1160s FAILED tests/test_concatenate.py::test_transposed_concat[cupy_array-obs-outer-same] 1160s FAILED tests/test_concatenate.py::test_transposed_concat[cupy_array-obs-outer-unique] 1160s FAILED tests/test_concatenate.py::test_transposed_concat[cupy_array-obs-outer-first] 1160s FAILED tests/test_concatenate.py::test_transposed_concat[cupy_array-obs-outer-only] 1160s FAILED tests/test_concatenate.py::test_transposed_concat[cupy_array-var-inner-None] 1160s FAILED tests/test_concatenate.py::test_transposed_concat[cupy_array-var-inner-same] 1160s FAILED tests/test_concatenate.py::test_transposed_concat[cupy_array-var-inner-unique] 1160s FAILED tests/test_concatenate.py::test_transposed_concat[cupy_array-var-inner-first] 1160s FAILED tests/test_concatenate.py::test_transposed_concat[cupy_array-var-inner-only] 1160s FAILED tests/test_concatenate.py::test_transposed_concat[cupy_array-var-outer-None] 1160s FAILED tests/test_concatenate.py::test_transposed_concat[cupy_array-var-outer-same] 1160s FAILED tests/test_concatenate.py::test_transposed_concat[cupy_array-var-outer-unique] 1160s FAILED tests/test_concatenate.py::test_transposed_concat[cupy_array-var-outer-first] 1160s FAILED tests/test_concatenate.py::test_transposed_concat[cupy_array-var-outer-only] 1160s FAILED tests/test_concatenate.py::test_transposed_concat[cupy_csr-obs-inner-None] 1160s FAILED tests/test_concatenate.py::test_transposed_concat[cupy_csr-obs-inner-same] 1160s FAILED tests/test_concatenate.py::test_transposed_concat[cupy_csr-obs-inner-unique] 1160s FAILED tests/test_concatenate.py::test_transposed_concat[cupy_csr-obs-inner-first] 1160s FAILED tests/test_concatenate.py::test_transposed_concat[cupy_csr-obs-inner-only] 1160s FAILED tests/test_concatenate.py::test_transposed_concat[cupy_csr-obs-outer-None] 1160s FAILED tests/test_concatenate.py::test_transposed_concat[cupy_csr-obs-outer-same] 1160s FAILED tests/test_concatenate.py::test_transposed_concat[cupy_csr-obs-outer-unique] 1160s FAILED tests/test_concatenate.py::test_transposed_concat[cupy_csr-obs-outer-first] 1160s FAILED tests/test_concatenate.py::test_transposed_concat[cupy_csr-obs-outer-only] 1160s FAILED tests/test_concatenate.py::test_transposed_concat[cupy_csr-var-inner-None] 1160s FAILED tests/test_concatenate.py::test_transposed_concat[cupy_csr-var-inner-same] 1160s FAILED tests/test_concatenate.py::test_transposed_concat[cupy_csr-var-inner-unique] 1160s FAILED tests/test_concatenate.py::test_transposed_concat[cupy_csr-var-inner-first] 1160s FAILED tests/test_concatenate.py::test_transposed_concat[cupy_csr-var-inner-only] 1160s FAILED tests/test_concatenate.py::test_transposed_concat[cupy_csr-var-outer-None] 1160s FAILED tests/test_concatenate.py::test_transposed_concat[cupy_csr-var-outer-same] 1160s FAILED tests/test_concatenate.py::test_transposed_concat[cupy_csr-var-outer-unique] 1160s FAILED tests/test_concatenate.py::test_transposed_concat[cupy_csr-var-outer-first] 1160s FAILED tests/test_concatenate.py::test_transposed_concat[cupy_csr-var-outer-only] 1160s FAILED tests/test_concatenate.py::test_transposed_concat[cupy_csc-obs-inner-None] 1160s FAILED tests/test_concatenate.py::test_transposed_concat[cupy_csc-obs-inner-same] 1160s FAILED tests/test_concatenate.py::test_transposed_concat[cupy_csc-obs-inner-unique] 1160s FAILED tests/test_concatenate.py::test_transposed_concat[cupy_csc-obs-inner-first] 1160s FAILED tests/test_concatenate.py::test_transposed_concat[cupy_csc-obs-inner-only] 1160s FAILED tests/test_concatenate.py::test_transposed_concat[cupy_csc-obs-outer-None] 1160s FAILED tests/test_concatenate.py::test_transposed_concat[cupy_csc-obs-outer-same] 1160s FAILED tests/test_concatenate.py::test_transposed_concat[cupy_csc-obs-outer-unique] 1160s FAILED tests/test_concatenate.py::test_transposed_concat[cupy_csc-obs-outer-first] 1160s FAILED tests/test_concatenate.py::test_transposed_concat[cupy_csc-obs-outer-only] 1160s FAILED tests/test_concatenate.py::test_transposed_concat[cupy_csc-var-inner-None] 1160s FAILED tests/test_concatenate.py::test_transposed_concat[cupy_csc-var-inner-same] 1160s FAILED tests/test_concatenate.py::test_transposed_concat[cupy_csc-var-inner-unique] 1160s FAILED tests/test_concatenate.py::test_transposed_concat[cupy_csc-var-inner-first] 1160s FAILED tests/test_concatenate.py::test_transposed_concat[cupy_csc-var-inner-only] 1160s FAILED tests/test_concatenate.py::test_transposed_concat[cupy_csc-var-outer-None] 1160s FAILED tests/test_concatenate.py::test_transposed_concat[cupy_csc-var-outer-same] 1160s FAILED tests/test_concatenate.py::test_transposed_concat[cupy_csc-var-outer-unique] 1160s FAILED tests/test_concatenate.py::test_transposed_concat[cupy_csc-var-outer-first] 1160s FAILED tests/test_concatenate.py::test_transposed_concat[cupy_csc-var-outer-only] 1160s FAILED tests/test_concatenate.py::test_concat_different_types_dask[None-cupy_array] 1160s FAILED tests/test_concatenate.py::test_concat_different_types_dask[None-cupy_csr] 1160s FAILED tests/test_concatenate.py::test_concat_different_types_dask[None-cupy_csc] 1160s FAILED tests/test_concatenate.py::test_concat_different_types_dask[same-cupy_array] 1160s FAILED tests/test_concatenate.py::test_concat_different_types_dask[same-cupy_csr] 1160s FAILED tests/test_concatenate.py::test_concat_different_types_dask[same-cupy_csc] 1160s FAILED tests/test_concatenate.py::test_concat_different_types_dask[unique-cupy_array] 1160s FAILED tests/test_concatenate.py::test_concat_different_types_dask[unique-cupy_csr] 1160s FAILED tests/test_concatenate.py::test_concat_different_types_dask[unique-cupy_csc] 1160s FAILED tests/test_concatenate.py::test_concat_different_types_dask[first-cupy_array] 1160s FAILED tests/test_concatenate.py::test_concat_different_types_dask[first-cupy_csr] 1160s FAILED tests/test_concatenate.py::test_concat_different_types_dask[first-cupy_csc] 1160s FAILED tests/test_concatenate.py::test_concat_different_types_dask[only-cupy_array] 1160s FAILED tests/test_concatenate.py::test_concat_different_types_dask[only-cupy_csr] 1160s FAILED tests/test_concatenate.py::test_concat_different_types_dask[only-cupy_csc] 1160s FAILED tests/test_concatenate.py::test_concat_on_var_outer_join[cupy_array] 1160s FAILED tests/test_concatenate.py::test_concat_on_var_outer_join[cupy_csr] - M... 1160s FAILED tests/test_concatenate.py::test_concat_on_var_outer_join[cupy_csc] - M... 1160s FAILED tests/test_dask.py::test_dask_to_memory_unbacked[cupy_dense_dask_array] 1160s FAILED tests/test_helpers.py::test_as_dask_functions[cupy_dense-np_array] - M... 1160s FAILED tests/test_helpers.py::test_as_dask_functions[cupy_dense-scipy_csr_matrix] 1160s FAILED tests/test_helpers.py::test_as_dask_functions[cupy_dense-scipy_csc_matrix] 1160s FAILED tests/test_helpers.py::test_as_dask_functions[cupy_dense-scipy_csr_array] 1160s FAILED tests/test_helpers.py::test_as_dask_functions[cupy_dense-scipy_csc_array] 1160s FAILED tests/test_helpers.py::test_as_dask_functions[cupy_dense-dense_dask_array] 1160s FAILED tests/test_helpers.py::test_as_dask_functions[cupy_dense-sparse_dask_array] 1160s FAILED tests/test_helpers.py::test_as_dask_functions[cupy_dense-cupy_array] 1160s FAILED tests/test_helpers.py::test_as_dask_functions[cupy_dense-cupy_csr] - M... 1160s FAILED tests/test_helpers.py::test_as_dask_functions[cupy_dense-cupy_csc] - M... 1160s FAILED tests/test_helpers.py::test_as_dask_functions[numpy_dense-cupy_array] 1160s FAILED tests/test_helpers.py::test_as_dask_functions[numpy_dense-cupy_csr] - ... 1160s FAILED tests/test_helpers.py::test_as_dask_functions[numpy_dense-cupy_csc] - ... 1160s FAILED tests/test_helpers.py::test_as_dask_functions[cupy_csr-np_array] - Key... 1160s FAILED tests/test_helpers.py::test_as_dask_functions[cupy_csr-scipy_csr_matrix] 1160s FAILED tests/test_helpers.py::test_as_dask_functions[cupy_csr-scipy_csc_matrix] 1160s FAILED tests/test_helpers.py::test_as_dask_functions[cupy_csr-scipy_csr_array] 1160s FAILED tests/test_helpers.py::test_as_dask_functions[cupy_csr-scipy_csc_array] 1160s FAILED tests/test_helpers.py::test_as_dask_functions[cupy_csr-dense_dask_array] 1160s FAILED tests/test_helpers.py::test_as_dask_functions[cupy_csr-sparse_dask_array] 1160s FAILED tests/test_helpers.py::test_as_dask_functions[cupy_csr-cupy_array] - M... 1160s FAILED tests/test_helpers.py::test_as_dask_functions[cupy_csr-cupy_csr] - Mod... 1160s FAILED tests/test_helpers.py::test_as_dask_functions[cupy_csr-cupy_csc] - Mod... 1160s FAILED tests/test_helpers.py::test_as_cupy_dask[dense_dask_array] - ModuleNot... 1160s FAILED tests/test_helpers.py::test_as_cupy_dask[sparse_dask_array] - ModuleNo... 1160s FAILED tests/test_io_elementwise.py::test_io_spec_cupy[h5ad-False-value0-array] 1160s FAILED tests/test_io_elementwise.py::test_io_spec_cupy[h5ad-False-value1-array] 1160s FAILED tests/test_io_elementwise.py::test_io_spec_cupy[h5ad-False-value2-csr_matrix] 1160s FAILED tests/test_io_elementwise.py::test_io_spec_cupy[h5ad-False-value3-csc_matrix] 1160s FAILED tests/test_io_elementwise.py::test_io_spec_cupy[h5ad-True-value0-array] 1160s FAILED tests/test_io_elementwise.py::test_io_spec_cupy[h5ad-True-value1-array] 1160s FAILED tests/test_io_elementwise.py::test_io_spec_cupy[h5ad-True-value2-csr_matrix] 1160s FAILED tests/test_io_elementwise.py::test_io_spec_cupy[h5ad-True-value3-csc_matrix] 1160s FAILED tests/test_io_elementwise.py::test_io_spec_cupy[zarr2-False-value0-array] 1160s FAILED tests/test_io_elementwise.py::test_io_spec_cupy[zarr2-False-value1-array] 1160s FAILED tests/test_io_elementwise.py::test_io_spec_cupy[zarr2-False-value2-csr_matrix] 1160s FAILED tests/test_io_elementwise.py::test_io_spec_cupy[zarr2-False-value3-csc_matrix] 1160s FAILED tests/test_io_elementwise.py::test_io_spec_cupy[zarr2-True-value0-array] 1160s FAILED tests/test_io_elementwise.py::test_io_spec_cupy[zarr2-True-value1-array] 1160s FAILED tests/test_io_elementwise.py::test_io_spec_cupy[zarr2-True-value2-csr_matrix] 1160s FAILED tests/test_io_elementwise.py::test_io_spec_cupy[zarr2-True-value3-csc_matrix] 1160s FAILED tests/test_io_elementwise.py::test_io_spec_cupy[zarr3-False-value0-array] 1160s FAILED tests/test_io_elementwise.py::test_io_spec_cupy[zarr3-False-value1-array] 1160s FAILED tests/test_io_elementwise.py::test_io_spec_cupy[zarr3-False-value2-csr_matrix] 1160s FAILED tests/test_io_elementwise.py::test_io_spec_cupy[zarr3-False-value3-csc_matrix] 1160s FAILED tests/test_io_elementwise.py::test_io_spec_cupy[zarr3-True-value0-array] 1160s FAILED tests/test_io_elementwise.py::test_io_spec_cupy[zarr3-True-value1-array] 1160s FAILED tests/test_io_elementwise.py::test_io_spec_cupy[zarr3-True-value2-csr_matrix] 1160s FAILED tests/test_io_elementwise.py::test_io_spec_cupy[zarr3-True-value3-csc_matrix] 1160s FAILED tests/test_readwrite.py::test_readwrite_kitchensink[dataset_kwargs0-csr_matrix-h5ad] 1160s FAILED tests/test_readwrite.py::test_readwrite_kitchensink[dataset_kwargs0-csr_matrix-zarr] 1160s FAILED tests/test_readwrite.py::test_readwrite_kitchensink[dataset_kwargs0-csr_array-h5ad] 1160s FAILED tests/test_readwrite.py::test_readwrite_kitchensink[dataset_kwargs0-csr_array-zarr] 1160s FAILED tests/test_readwrite.py::test_readwrite_kitchensink[dataset_kwargs1-csr_matrix-h5ad] 1160s FAILED tests/test_readwrite.py::test_readwrite_kitchensink[dataset_kwargs1-csr_matrix-zarr] 1160s FAILED tests/test_readwrite.py::test_readwrite_kitchensink[dataset_kwargs1-csr_array-h5ad] 1160s FAILED tests/test_readwrite.py::test_readwrite_kitchensink[dataset_kwargs1-csr_array-zarr] 1160s FAILED tests/test_readwrite.py::test_read_write_maintain_obsmvarm_dtypes - As... 1160s FAILED tests/test_readwrite.py::test_maintain_layers - AssertionError: assert... 1160s FAILED tests/test_views.py::test_modify_view_component[cupy_array-layers] - M... 1160s FAILED tests/test_views.py::test_modify_view_component[cupy_array-obsm] - Mod... 1160s FAILED tests/test_views.py::test_modify_view_component[cupy_array-varm] - Mod... 1160s FAILED tests/test_views.py::test_modify_view_component[cupy_csr-layers] - Mod... 1160s FAILED tests/test_views.py::test_modify_view_component[cupy_csr-obsm] - Modul... 1160s FAILED tests/test_views.py::test_modify_view_component[cupy_csr-varm] - Modul... 1160s FAILED tests/test_views.py::test_modify_view_component[cupy_csc-layers] - Mod... 1160s FAILED tests/test_views.py::test_modify_view_component[cupy_csc-obsm] - Modul... 1160s FAILED tests/test_views.py::test_modify_view_component[cupy_csc-varm] - Modul... 1160s FAILED tests/test_views.py::test_set_scalar_subset_X[cupy_array-array_subset] 1160s FAILED tests/test_views.py::test_set_scalar_subset_X[cupy_array-slice_subset] 1160s FAILED tests/test_views.py::test_set_scalar_subset_X[cupy_array-single_subset] 1160s FAILED tests/test_views.py::test_set_scalar_subset_X[cupy_array-array_int_subset] 1160s FAILED tests/test_views.py::test_set_scalar_subset_X[cupy_array-list_int_subset] 1160s FAILED tests/test_views.py::test_set_scalar_subset_X[cupy_array-array_bool_subset] 1160s FAILED tests/test_views.py::test_set_scalar_subset_X[cupy_array-list_bool_subset] 1160s FAILED tests/test_views.py::test_set_scalar_subset_X[cupy_array-matrix_bool_subset] 1160s FAILED tests/test_views.py::test_set_scalar_subset_X[cupy_array-spmatrix_bool_subset] 1160s FAILED tests/test_views.py::test_set_scalar_subset_X[cupy_array-sparray_bool_subset] 1160s FAILED tests/test_views.py::test_set_scalar_subset_X[cupy_csr-array_subset] 1160s FAILED tests/test_views.py::test_set_scalar_subset_X[cupy_csr-slice_subset] 1160s FAILED tests/test_views.py::test_set_scalar_subset_X[cupy_csr-single_subset] 1160s FAILED tests/test_views.py::test_set_scalar_subset_X[cupy_csr-array_int_subset] 1160s FAILED tests/test_views.py::test_set_scalar_subset_X[cupy_csr-list_int_subset] 1160s FAILED tests/test_views.py::test_set_scalar_subset_X[cupy_csr-array_bool_subset] 1160s FAILED tests/test_views.py::test_set_scalar_subset_X[cupy_csr-list_bool_subset] 1160s FAILED tests/test_views.py::test_set_scalar_subset_X[cupy_csr-matrix_bool_subset] 1160s FAILED tests/test_views.py::test_set_scalar_subset_X[cupy_csr-spmatrix_bool_subset] 1160s FAILED tests/test_views.py::test_set_scalar_subset_X[cupy_csr-sparray_bool_subset] 1160s FAILED tests/test_views.py::test_set_scalar_subset_X[cupy_csc-array_subset] 1160s FAILED tests/test_views.py::test_set_scalar_subset_X[cupy_csc-slice_subset] 1160s FAILED tests/test_views.py::test_set_scalar_subset_X[cupy_csc-single_subset] 1160s FAILED tests/test_views.py::test_set_scalar_subset_X[cupy_csc-array_int_subset] 1160s FAILED tests/test_views.py::test_set_scalar_subset_X[cupy_csc-list_int_subset] 1160s FAILED tests/test_views.py::test_set_scalar_subset_X[cupy_csc-array_bool_subset] 1160s FAILED tests/test_views.py::test_set_scalar_subset_X[cupy_csc-list_bool_subset] 1160s FAILED tests/test_views.py::test_set_scalar_subset_X[cupy_csc-matrix_bool_subset] 1160s FAILED tests/test_views.py::test_set_scalar_subset_X[cupy_csc-spmatrix_bool_subset] 1160s FAILED tests/test_views.py::test_set_scalar_subset_X[cupy_csc-sparray_bool_subset] 1160s FAILED tests/test_views.py::test_view_of_view[cupy_array-array_subset-array_subset] 1160s FAILED tests/test_views.py::test_view_of_view[cupy_array-array_subset-slice_subset] 1160s FAILED tests/test_views.py::test_view_of_view[cupy_array-array_subset-single_subset] 1160s FAILED tests/test_views.py::test_view_of_view[cupy_array-array_subset-array_int_subset] 1160s FAILED tests/test_views.py::test_view_of_view[cupy_array-array_subset-list_int_subset] 1160s FAILED tests/test_views.py::test_view_of_view[cupy_array-array_subset-array_bool_subset] 1160s FAILED tests/test_views.py::test_view_of_view[cupy_array-array_subset-list_bool_subset] 1160s FAILED tests/test_views.py::test_view_of_view[cupy_array-array_subset-matrix_bool_subset] 1160s FAILED tests/test_views.py::test_view_of_view[cupy_array-array_subset-spmatrix_bool_subset] 1160s FAILED tests/test_views.py::test_view_of_view[cupy_array-array_subset-sparray_bool_subset] 1160s FAILED tests/test_views.py::test_view_of_view[cupy_array-slice_subset-array_subset] 1160s FAILED tests/test_views.py::test_view_of_view[cupy_array-slice_subset-slice_subset] 1160s FAILED tests/test_views.py::test_view_of_view[cupy_array-slice_subset-single_subset] 1160s FAILED tests/test_views.py::test_view_of_view[cupy_array-slice_subset-array_int_subset] 1160s FAILED tests/test_views.py::test_view_of_view[cupy_array-slice_subset-list_int_subset] 1160s FAILED tests/test_views.py::test_view_of_view[cupy_array-slice_subset-array_bool_subset] 1160s FAILED tests/test_views.py::test_view_of_view[cupy_array-slice_subset-list_bool_subset] 1160s FAILED tests/test_views.py::test_view_of_view[cupy_array-slice_subset-matrix_bool_subset] 1160s FAILED tests/test_views.py::test_view_of_view[cupy_array-slice_subset-spmatrix_bool_subset] 1160s FAILED tests/test_views.py::test_view_of_view[cupy_array-slice_subset-sparray_bool_subset] 1160s FAILED tests/test_views.py::test_view_of_view[cupy_array-single_subset-array_subset] 1160s FAILED tests/test_views.py::test_view_of_view[cupy_array-single_subset-slice_subset] 1160s FAILED tests/test_views.py::test_view_of_view[cupy_array-single_subset-single_subset] 1160s FAILED tests/test_views.py::test_view_of_view[cupy_array-single_subset-array_int_subset] 1160s FAILED tests/test_views.py::test_view_of_view[cupy_array-single_subset-list_int_subset] 1160s FAILED tests/test_views.py::test_view_of_view[cupy_array-single_subset-array_bool_subset] 1160s FAILED tests/test_views.py::test_view_of_view[cupy_array-single_subset-list_bool_subset] 1160s FAILED tests/test_views.py::test_view_of_view[cupy_array-single_subset-matrix_bool_subset] 1160s FAILED tests/test_views.py::test_view_of_view[cupy_array-single_subset-spmatrix_bool_subset] 1160s FAILED tests/test_views.py::test_view_of_view[cupy_array-single_subset-sparray_bool_subset] 1160s FAILED tests/test_views.py::test_view_of_view[cupy_array-array_int_subset-array_subset] 1160s FAILED tests/test_views.py::test_view_of_view[cupy_array-array_int_subset-slice_subset] 1160s FAILED tests/test_views.py::test_view_of_view[cupy_array-array_int_subset-single_subset] 1160s FAILED tests/test_views.py::test_view_of_view[cupy_array-array_int_subset-array_int_subset] 1160s FAILED tests/test_views.py::test_view_of_view[cupy_array-array_int_subset-list_int_subset] 1160s FAILED tests/test_views.py::test_view_of_view[cupy_array-array_int_subset-array_bool_subset] 1160s FAILED tests/test_views.py::test_view_of_view[cupy_array-array_int_subset-list_bool_subset] 1160s FAILED tests/test_views.py::test_view_of_view[cupy_array-array_int_subset-matrix_bool_subset] 1160s FAILED tests/test_views.py::test_view_of_view[cupy_array-array_int_subset-spmatrix_bool_subset] 1160s FAILED tests/test_views.py::test_view_of_view[cupy_array-array_int_subset-sparray_bool_subset] 1160s FAILED tests/test_views.py::test_view_of_view[cupy_array-list_int_subset-array_subset] 1160s FAILED tests/test_views.py::test_view_of_view[cupy_array-list_int_subset-slice_subset] 1160s FAILED tests/test_views.py::test_view_of_view[cupy_array-list_int_subset-single_subset] 1160s FAILED tests/test_views.py::test_view_of_view[cupy_array-list_int_subset-array_int_subset] 1160s FAILED tests/test_views.py::test_view_of_view[cupy_array-list_int_subset-list_int_subset] 1160s FAILED tests/test_views.py::test_view_of_view[cupy_array-list_int_subset-array_bool_subset] 1160s FAILED tests/test_views.py::test_view_of_view[cupy_array-list_int_subset-list_bool_subset] 1160s FAILED tests/test_views.py::test_view_of_view[cupy_array-list_int_subset-matrix_bool_subset] 1160s FAILED tests/test_views.py::test_view_of_view[cupy_array-list_int_subset-spmatrix_bool_subset] 1160s FAILED tests/test_views.py::test_view_of_view[cupy_array-list_int_subset-sparray_bool_subset] 1160s FAILED tests/test_views.py::test_view_of_view[cupy_array-array_bool_subset-array_subset] 1160s FAILED tests/test_views.py::test_view_of_view[cupy_array-array_bool_subset-slice_subset] 1160s FAILED tests/test_views.py::test_view_of_view[cupy_array-array_bool_subset-single_subset] 1160s FAILED tests/test_views.py::test_view_of_view[cupy_array-array_bool_subset-array_int_subset] 1160s FAILED tests/test_views.py::test_view_of_view[cupy_array-array_bool_subset-list_int_subset] 1160s FAILED tests/test_views.py::test_view_of_view[cupy_array-array_bool_subset-array_bool_subset] 1160s FAILED tests/test_views.py::test_view_of_view[cupy_array-array_bool_subset-list_bool_subset] 1160s FAILED tests/test_views.py::test_view_of_view[cupy_array-array_bool_subset-matrix_bool_subset] 1160s FAILED tests/test_views.py::test_view_of_view[cupy_array-array_bool_subset-spmatrix_bool_subset] 1160s FAILED tests/test_views.py::test_view_of_view[cupy_array-array_bool_subset-sparray_bool_subset] 1160s FAILED tests/test_views.py::test_view_of_view[cupy_array-list_bool_subset-array_subset] 1160s FAILED tests/test_views.py::test_view_of_view[cupy_array-list_bool_subset-slice_subset] 1160s FAILED tests/test_views.py::test_view_of_view[cupy_array-list_bool_subset-single_subset] 1160s FAILED tests/test_views.py::test_view_of_view[cupy_array-list_bool_subset-array_int_subset] 1160s FAILED tests/test_views.py::test_view_of_view[cupy_array-list_bool_subset-list_int_subset] 1160s FAILED tests/test_views.py::test_view_of_view[cupy_array-list_bool_subset-array_bool_subset] 1160s FAILED tests/test_views.py::test_view_of_view[cupy_array-list_bool_subset-list_bool_subset] 1160s FAILED tests/test_views.py::test_view_of_view[cupy_array-list_bool_subset-matrix_bool_subset] 1160s FAILED tests/test_views.py::test_view_of_view[cupy_array-list_bool_subset-spmatrix_bool_subset] 1160s FAILED tests/test_views.py::test_view_of_view[cupy_array-list_bool_subset-sparray_bool_subset] 1160s FAILED tests/test_views.py::test_view_of_view[cupy_array-matrix_bool_subset-array_subset] 1160s FAILED tests/test_views.py::test_view_of_view[cupy_array-matrix_bool_subset-slice_subset] 1160s FAILED tests/test_views.py::test_view_of_view[cupy_array-matrix_bool_subset-single_subset] 1160s FAILED tests/test_views.py::test_view_of_view[cupy_array-matrix_bool_subset-array_int_subset] 1160s FAILED tests/test_views.py::test_view_of_view[cupy_array-matrix_bool_subset-list_int_subset] 1160s FAILED tests/test_views.py::test_view_of_view[cupy_array-matrix_bool_subset-array_bool_subset] 1160s FAILED tests/test_views.py::test_view_of_view[cupy_array-matrix_bool_subset-list_bool_subset] 1160s FAILED tests/test_views.py::test_view_of_view[cupy_array-matrix_bool_subset-matrix_bool_subset] 1160s FAILED tests/test_views.py::test_view_of_view[cupy_array-matrix_bool_subset-spmatrix_bool_subset] 1160s FAILED tests/test_views.py::test_view_of_view[cupy_array-matrix_bool_subset-sparray_bool_subset] 1160s FAILED tests/test_views.py::test_view_of_view[cupy_array-spmatrix_bool_subset-array_subset] 1160s FAILED tests/test_views.py::test_view_of_view[cupy_array-spmatrix_bool_subset-slice_subset] 1160s FAILED tests/test_views.py::test_view_of_view[cupy_array-spmatrix_bool_subset-single_subset] 1160s FAILED tests/test_views.py::test_view_of_view[cupy_array-spmatrix_bool_subset-array_int_subset] 1160s FAILED tests/test_views.py::test_view_of_view[cupy_array-spmatrix_bool_subset-list_int_subset] 1160s FAILED tests/test_views.py::test_view_of_view[cupy_array-spmatrix_bool_subset-array_bool_subset] 1160s FAILED tests/test_views.py::test_view_of_view[cupy_array-spmatrix_bool_subset-list_bool_subset] 1160s FAILED tests/test_views.py::test_view_of_view[cupy_array-spmatrix_bool_subset-matrix_bool_subset] 1160s FAILED tests/test_views.py::test_view_of_view[cupy_array-spmatrix_bool_subset-spmatrix_bool_subset] 1160s FAILED tests/test_views.py::test_view_of_view[cupy_array-spmatrix_bool_subset-sparray_bool_subset] 1160s FAILED tests/test_views.py::test_view_of_view[cupy_array-sparray_bool_subset-array_subset] 1160s FAILED tests/test_views.py::test_view_of_view[cupy_array-sparray_bool_subset-slice_subset] 1160s FAILED tests/test_views.py::test_view_of_view[cupy_array-sparray_bool_subset-single_subset] 1160s FAILED tests/test_views.py::test_view_of_view[cupy_array-sparray_bool_subset-array_int_subset] 1160s FAILED tests/test_views.py::test_view_of_view[cupy_array-sparray_bool_subset-list_int_subset] 1160s FAILED tests/test_views.py::test_view_of_view[cupy_array-sparray_bool_subset-array_bool_subset] 1160s FAILED tests/test_views.py::test_view_of_view[cupy_array-sparray_bool_subset-list_bool_subset] 1160s FAILED tests/test_views.py::test_view_of_view[cupy_array-sparray_bool_subset-matrix_bool_subset] 1160s FAILED tests/test_views.py::test_view_of_view[cupy_array-sparray_bool_subset-spmatrix_bool_subset] 1160s FAILED tests/test_views.py::test_view_of_view[cupy_array-sparray_bool_subset-sparray_bool_subset] 1160s FAILED tests/test_views.py::test_view_of_view[cupy_csr-array_subset-array_subset] 1160s FAILED tests/test_views.py::test_view_of_view[cupy_csr-array_subset-slice_subset] 1160s FAILED tests/test_views.py::test_view_of_view[cupy_csr-array_subset-single_subset] 1160s FAILED tests/test_views.py::test_view_of_view[cupy_csr-array_subset-array_int_subset] 1160s FAILED tests/test_views.py::test_view_of_view[cupy_csr-array_subset-list_int_subset] 1160s FAILED tests/test_views.py::test_view_of_view[cupy_csr-array_subset-array_bool_subset] 1160s FAILED tests/test_views.py::test_view_of_view[cupy_csr-array_subset-list_bool_subset] 1160s FAILED tests/test_views.py::test_view_of_view[cupy_csr-array_subset-matrix_bool_subset] 1160s FAILED tests/test_views.py::test_view_of_view[cupy_csr-array_subset-spmatrix_bool_subset] 1160s FAILED tests/test_views.py::test_view_of_view[cupy_csr-array_subset-sparray_bool_subset] 1160s FAILED tests/test_views.py::test_view_of_view[cupy_csr-slice_subset-array_subset] 1160s FAILED tests/test_views.py::test_view_of_view[cupy_csr-slice_subset-slice_subset] 1160s FAILED tests/test_views.py::test_view_of_view[cupy_csr-slice_subset-single_subset] 1160s FAILED tests/test_views.py::test_view_of_view[cupy_csr-slice_subset-array_int_subset] 1160s FAILED tests/test_views.py::test_view_of_view[cupy_csr-slice_subset-list_int_subset] 1160s FAILED tests/test_views.py::test_view_of_view[cupy_csr-slice_subset-array_bool_subset] 1160s FAILED tests/test_views.py::test_view_of_view[cupy_csr-slice_subset-list_bool_subset] 1160s FAILED tests/test_views.py::test_view_of_view[cupy_csr-slice_subset-matrix_bool_subset] 1160s FAILED tests/test_views.py::test_view_of_view[cupy_csr-slice_subset-spmatrix_bool_subset] 1160s FAILED tests/test_views.py::test_view_of_view[cupy_csr-slice_subset-sparray_bool_subset] 1160s FAILED tests/test_views.py::test_view_of_view[cupy_csr-single_subset-array_subset] 1160s FAILED tests/test_views.py::test_view_of_view[cupy_csr-single_subset-slice_subset] 1160s FAILED tests/test_views.py::test_view_of_view[cupy_csr-single_subset-single_subset] 1160s FAILED tests/test_views.py::test_view_of_view[cupy_csr-single_subset-array_int_subset] 1160s FAILED tests/test_views.py::test_view_of_view[cupy_csr-single_subset-list_int_subset] 1160s FAILED tests/test_views.py::test_view_of_view[cupy_csr-single_subset-array_bool_subset] 1160s FAILED tests/test_views.py::test_view_of_view[cupy_csr-single_subset-list_bool_subset] 1160s FAILED tests/test_views.py::test_view_of_view[cupy_csr-single_subset-matrix_bool_subset] 1160s FAILED tests/test_views.py::test_view_of_view[cupy_csr-single_subset-spmatrix_bool_subset] 1160s FAILED tests/test_views.py::test_view_of_view[cupy_csr-single_subset-sparray_bool_subset] 1160s FAILED tests/test_views.py::test_view_of_view[cupy_csr-array_int_subset-array_subset] 1160s FAILED tests/test_views.py::test_view_of_view[cupy_csr-array_int_subset-slice_subset] 1160s FAILED tests/test_views.py::test_view_of_view[cupy_csr-array_int_subset-single_subset] 1160s FAILED tests/test_views.py::test_view_of_view[cupy_csr-array_int_subset-array_int_subset] 1160s FAILED tests/test_views.py::test_view_of_view[cupy_csr-array_int_subset-list_int_subset] 1160s FAILED tests/test_views.py::test_view_of_view[cupy_csr-array_int_subset-array_bool_subset] 1160s FAILED tests/test_views.py::test_view_of_view[cupy_csr-array_int_subset-list_bool_subset] 1160s FAILED tests/test_views.py::test_view_of_view[cupy_csr-array_int_subset-matrix_bool_subset] 1160s FAILED tests/test_views.py::test_view_of_view[cupy_csr-array_int_subset-spmatrix_bool_subset] 1160s FAILED tests/test_views.py::test_view_of_view[cupy_csr-array_int_subset-sparray_bool_subset] 1160s FAILED tests/test_views.py::test_view_of_view[cupy_csr-list_int_subset-array_subset] 1160s FAILED tests/test_views.py::test_view_of_view[cupy_csr-list_int_subset-slice_subset] 1160s FAILED tests/test_views.py::test_view_of_view[cupy_csr-list_int_subset-single_subset] 1160s FAILED tests/test_views.py::test_view_of_view[cupy_csr-list_int_subset-array_int_subset] 1160s FAILED tests/test_views.py::test_view_of_view[cupy_csr-list_int_subset-list_int_subset] 1160s FAILED tests/test_views.py::test_view_of_view[cupy_csr-list_int_subset-array_bool_subset] 1160s FAILED tests/test_views.py::test_view_of_view[cupy_csr-list_int_subset-list_bool_subset] 1160s FAILED tests/test_views.py::test_view_of_view[cupy_csr-list_int_subset-matrix_bool_subset] 1160s FAILED tests/test_views.py::test_view_of_view[cupy_csr-list_int_subset-spmatrix_bool_subset] 1160s FAILED tests/test_views.py::test_view_of_view[cupy_csr-list_int_subset-sparray_bool_subset] 1160s FAILED tests/test_views.py::test_view_of_view[cupy_csr-array_bool_subset-array_subset] 1160s FAILED tests/test_views.py::test_view_of_view[cupy_csr-array_bool_subset-slice_subset] 1160s FAILED tests/test_views.py::test_view_of_view[cupy_csr-array_bool_subset-single_subset] 1160s FAILED tests/test_views.py::test_view_of_view[cupy_csr-array_bool_subset-array_int_subset] 1160s FAILED tests/test_views.py::test_view_of_view[cupy_csr-array_bool_subset-list_int_subset] 1160s FAILED tests/test_views.py::test_view_of_view[cupy_csr-array_bool_subset-array_bool_subset] 1160s FAILED tests/test_views.py::test_view_of_view[cupy_csr-array_bool_subset-list_bool_subset] 1160s FAILED tests/test_views.py::test_view_of_view[cupy_csr-array_bool_subset-matrix_bool_subset] 1160s FAILED tests/test_views.py::test_view_of_view[cupy_csr-array_bool_subset-spmatrix_bool_subset] 1160s FAILED tests/test_views.py::test_view_of_view[cupy_csr-array_bool_subset-sparray_bool_subset] 1160s FAILED tests/test_views.py::test_view_of_view[cupy_csr-list_bool_subset-array_subset] 1160s FAILED tests/test_views.py::test_view_of_view[cupy_csr-list_bool_subset-slice_subset] 1160s FAILED tests/test_views.py::test_view_of_view[cupy_csr-list_bool_subset-single_subset] 1160s FAILED tests/test_views.py::test_view_of_view[cupy_csr-list_bool_subset-array_int_subset] 1160s FAILED tests/test_views.py::test_view_of_view[cupy_csr-list_bool_subset-list_int_subset] 1160s FAILED tests/test_views.py::test_view_of_view[cupy_csr-list_bool_subset-array_bool_subset] 1160s FAILED tests/test_views.py::test_view_of_view[cupy_csr-list_bool_subset-list_bool_subset] 1160s FAILED tests/test_views.py::test_view_of_view[cupy_csr-list_bool_subset-matrix_bool_subset] 1160s FAILED tests/test_views.py::test_view_of_view[cupy_csr-list_bool_subset-spmatrix_bool_subset] 1160s FAILED tests/test_views.py::test_view_of_view[cupy_csr-list_bool_subset-sparray_bool_subset] 1160s FAILED tests/test_views.py::test_view_of_view[cupy_csr-matrix_bool_subset-array_subset] 1160s FAILED tests/test_views.py::test_view_of_view[cupy_csr-matrix_bool_subset-slice_subset] 1160s FAILED tests/test_views.py::test_view_of_view[cupy_csr-matrix_bool_subset-single_subset] 1160s FAILED tests/test_views.py::test_view_of_view[cupy_csr-matrix_bool_subset-array_int_subset] 1160s FAILED tests/test_views.py::test_view_of_view[cupy_csr-matrix_bool_subset-list_int_subset] 1160s FAILED tests/test_views.py::test_view_of_view[cupy_csr-matrix_bool_subset-array_bool_subset] 1160s FAILED tests/test_views.py::test_view_of_view[cupy_csr-matrix_bool_subset-list_bool_subset] 1160s FAILED tests/test_views.py::test_view_of_view[cupy_csr-matrix_bool_subset-matrix_bool_subset] 1160s FAILED tests/test_views.py::test_view_of_view[cupy_csr-matrix_bool_subset-spmatrix_bool_subset] 1160s FAILED tests/test_views.py::test_view_of_view[cupy_csr-matrix_bool_subset-sparray_bool_subset] 1160s FAILED tests/test_views.py::test_view_of_view[cupy_csr-spmatrix_bool_subset-array_subset] 1160s FAILED tests/test_views.py::test_view_of_view[cupy_csr-spmatrix_bool_subset-slice_subset] 1160s FAILED tests/test_views.py::test_view_of_view[cupy_csr-spmatrix_bool_subset-single_subset] 1160s FAILED tests/test_views.py::test_view_of_view[cupy_csr-spmatrix_bool_subset-array_int_subset] 1160s FAILED tests/test_views.py::test_view_of_view[cupy_csr-spmatrix_bool_subset-list_int_subset] 1160s FAILED tests/test_views.py::test_view_of_view[cupy_csr-spmatrix_bool_subset-array_bool_subset] 1160s FAILED tests/test_views.py::test_view_of_view[cupy_csr-spmatrix_bool_subset-list_bool_subset] 1160s FAILED tests/test_views.py::test_view_of_view[cupy_csr-spmatrix_bool_subset-matrix_bool_subset] 1160s FAILED tests/test_views.py::test_view_of_view[cupy_csr-spmatrix_bool_subset-spmatrix_bool_subset] 1160s FAILED tests/test_views.py::test_view_of_view[cupy_csr-spmatrix_bool_subset-sparray_bool_subset] 1160s FAILED tests/test_views.py::test_view_of_view[cupy_csr-sparray_bool_subset-array_subset] 1160s FAILED tests/test_views.py::test_view_of_view[cupy_csr-sparray_bool_subset-slice_subset] 1160s FAILED tests/test_views.py::test_view_of_view[cupy_csr-sparray_bool_subset-single_subset] 1160s FAILED tests/test_views.py::test_view_of_view[cupy_csr-sparray_bool_subset-array_int_subset] 1160s FAILED tests/test_views.py::test_view_of_view[cupy_csr-sparray_bool_subset-list_int_subset] 1160s FAILED tests/test_views.py::test_view_of_view[cupy_csr-sparray_bool_subset-array_bool_subset] 1160s FAILED tests/test_views.py::test_view_of_view[cupy_csr-sparray_bool_subset-list_bool_subset] 1160s FAILED tests/test_views.py::test_view_of_view[cupy_csr-sparray_bool_subset-matrix_bool_subset] 1160s FAILED tests/test_views.py::test_view_of_view[cupy_csr-sparray_bool_subset-spmatrix_bool_subset] 1160s FAILED tests/test_views.py::test_view_of_view[cupy_csr-sparray_bool_subset-sparray_bool_subset] 1160s FAILED tests/test_views.py::test_view_of_view[cupy_csc-array_subset-array_subset] 1160s FAILED tests/test_views.py::test_view_of_view[cupy_csc-array_subset-slice_subset] 1160s FAILED tests/test_views.py::test_view_of_view[cupy_csc-array_subset-single_subset] 1160s FAILED tests/test_views.py::test_view_of_view[cupy_csc-array_subset-array_int_subset] 1160s FAILED tests/test_views.py::test_view_of_view[cupy_csc-array_subset-list_int_subset] 1160s FAILED tests/test_views.py::test_view_of_view[cupy_csc-array_subset-array_bool_subset] 1160s FAILED tests/test_views.py::test_view_of_view[cupy_csc-array_subset-list_bool_subset] 1160s FAILED tests/test_views.py::test_view_of_view[cupy_csc-array_subset-matrix_bool_subset] 1160s FAILED tests/test_views.py::test_view_of_view[cupy_csc-array_subset-spmatrix_bool_subset] 1160s FAILED tests/test_views.py::test_view_of_view[cupy_csc-array_subset-sparray_bool_subset] 1160s FAILED tests/test_views.py::test_view_of_view[cupy_csc-slice_subset-array_subset] 1160s FAILED tests/test_views.py::test_view_of_view[cupy_csc-slice_subset-slice_subset] 1160s FAILED tests/test_views.py::test_view_of_view[cupy_csc-slice_subset-single_subset] 1160s FAILED tests/test_views.py::test_view_of_view[cupy_csc-slice_subset-array_int_subset] 1160s FAILED tests/test_views.py::test_view_of_view[cupy_csc-slice_subset-list_int_subset] 1160s FAILED tests/test_views.py::test_view_of_view[cupy_csc-slice_subset-array_bool_subset] 1160s FAILED tests/test_views.py::test_view_of_view[cupy_csc-slice_subset-list_bool_subset] 1160s FAILED tests/test_views.py::test_view_of_view[cupy_csc-slice_subset-matrix_bool_subset] 1160s FAILED tests/test_views.py::test_view_of_view[cupy_csc-slice_subset-spmatrix_bool_subset] 1160s FAILED tests/test_views.py::test_view_of_view[cupy_csc-slice_subset-sparray_bool_subset] 1160s FAILED tests/test_views.py::test_view_of_view[cupy_csc-single_subset-array_subset] 1160s FAILED tests/test_views.py::test_view_of_view[cupy_csc-single_subset-slice_subset] 1160s FAILED tests/test_views.py::test_view_of_view[cupy_csc-single_subset-single_subset] 1160s FAILED tests/test_views.py::test_view_of_view[cupy_csc-single_subset-array_int_subset] 1160s FAILED tests/test_views.py::test_view_of_view[cupy_csc-single_subset-list_int_subset] 1160s FAILED tests/test_views.py::test_view_of_view[cupy_csc-single_subset-array_bool_subset] 1160s FAILED tests/test_views.py::test_view_of_view[cupy_csc-single_subset-list_bool_subset] 1160s FAILED tests/test_views.py::test_view_of_view[cupy_csc-single_subset-matrix_bool_subset] 1160s FAILED tests/test_views.py::test_view_of_view[cupy_csc-single_subset-spmatrix_bool_subset] 1160s FAILED tests/test_views.py::test_view_of_view[cupy_csc-single_subset-sparray_bool_subset] 1160s FAILED tests/test_views.py::test_view_of_view[cupy_csc-array_int_subset-array_subset] 1160s FAILED tests/test_views.py::test_view_of_view[cupy_csc-array_int_subset-slice_subset] 1160s FAILED tests/test_views.py::test_view_of_view[cupy_csc-array_int_subset-single_subset] 1160s FAILED tests/test_views.py::test_view_of_view[cupy_csc-array_int_subset-array_int_subset] 1160s FAILED tests/test_views.py::test_view_of_view[cupy_csc-array_int_subset-list_int_subset] 1160s FAILED tests/test_views.py::test_view_of_view[cupy_csc-array_int_subset-array_bool_subset] 1160s FAILED tests/test_views.py::test_view_of_view[cupy_csc-array_int_subset-list_bool_subset] 1160s FAILED tests/test_views.py::test_view_of_view[cupy_csc-array_int_subset-matrix_bool_subset] 1160s FAILED tests/test_views.py::test_view_of_view[cupy_csc-array_int_subset-spmatrix_bool_subset] 1160s FAILED tests/test_views.py::test_view_of_view[cupy_csc-array_int_subset-sparray_bool_subset] 1160s FAILED tests/test_views.py::test_view_of_view[cupy_csc-list_int_subset-array_subset] 1160s FAILED tests/test_views.py::test_view_of_view[cupy_csc-list_int_subset-slice_subset] 1160s FAILED tests/test_views.py::test_view_of_view[cupy_csc-list_int_subset-single_subset] 1160s FAILED tests/test_views.py::test_view_of_view[cupy_csc-list_int_subset-array_int_subset] 1160s FAILED tests/test_views.py::test_view_of_view[cupy_csc-list_int_subset-list_int_subset] 1160s FAILED tests/test_views.py::test_view_of_view[cupy_csc-list_int_subset-array_bool_subset] 1160s FAILED tests/test_views.py::test_view_of_view[cupy_csc-list_int_subset-list_bool_subset] 1160s FAILED tests/test_views.py::test_view_of_view[cupy_csc-list_int_subset-matrix_bool_subset] 1160s FAILED tests/test_views.py::test_view_of_view[cupy_csc-list_int_subset-spmatrix_bool_subset] 1160s FAILED tests/test_views.py::test_view_of_view[cupy_csc-list_int_subset-sparray_bool_subset] 1160s FAILED tests/test_views.py::test_view_of_view[cupy_csc-array_bool_subset-array_subset] 1160s FAILED tests/test_views.py::test_view_of_view[cupy_csc-array_bool_subset-slice_subset] 1160s FAILED tests/test_views.py::test_view_of_view[cupy_csc-array_bool_subset-single_subset] 1160s FAILED tests/test_views.py::test_view_of_view[cupy_csc-array_bool_subset-array_int_subset] 1160s FAILED tests/test_views.py::test_view_of_view[cupy_csc-array_bool_subset-list_int_subset] 1160s FAILED tests/test_views.py::test_view_of_view[cupy_csc-array_bool_subset-array_bool_subset] 1160s FAILED tests/test_views.py::test_view_of_view[cupy_csc-array_bool_subset-list_bool_subset] 1160s FAILED tests/test_views.py::test_view_of_view[cupy_csc-array_bool_subset-matrix_bool_subset] 1160s FAILED tests/test_views.py::test_view_of_view[cupy_csc-array_bool_subset-spmatrix_bool_subset] 1160s FAILED tests/test_views.py::test_view_of_view[cupy_csc-array_bool_subset-sparray_bool_subset] 1160s FAILED tests/test_views.py::test_view_of_view[cupy_csc-list_bool_subset-array_subset] 1160s FAILED tests/test_views.py::test_view_of_view[cupy_csc-list_bool_subset-slice_subset] 1160s FAILED tests/test_views.py::test_view_of_view[cupy_csc-list_bool_subset-single_subset] 1160s FAILED tests/test_views.py::test_view_of_view[cupy_csc-list_bool_subset-array_int_subset] 1160s FAILED tests/test_views.py::test_view_of_view[cupy_csc-list_bool_subset-list_int_subset] 1160s FAILED tests/test_views.py::test_view_of_view[cupy_csc-list_bool_subset-array_bool_subset] 1160s FAILED tests/test_views.py::test_view_of_view[cupy_csc-list_bool_subset-list_bool_subset] 1160s FAILED tests/test_views.py::test_view_of_view[cupy_csc-list_bool_subset-matrix_bool_subset] 1160s FAILED tests/test_views.py::test_view_of_view[cupy_csc-list_bool_subset-spmatrix_bool_subset] 1160s FAILED tests/test_views.py::test_view_of_view[cupy_csc-list_bool_subset-sparray_bool_subset] 1160s FAILED tests/test_views.py::test_view_of_view[cupy_csc-matrix_bool_subset-array_subset] 1160s FAILED tests/test_views.py::test_view_of_view[cupy_csc-matrix_bool_subset-slice_subset] 1160s FAILED tests/test_views.py::test_view_of_view[cupy_csc-matrix_bool_subset-single_subset] 1160s FAILED tests/test_views.py::test_view_of_view[cupy_csc-matrix_bool_subset-array_int_subset] 1160s FAILED tests/test_views.py::test_view_of_view[cupy_csc-matrix_bool_subset-list_int_subset] 1160s FAILED tests/test_views.py::test_view_of_view[cupy_csc-matrix_bool_subset-array_bool_subset] 1160s FAILED tests/test_views.py::test_view_of_view[cupy_csc-matrix_bool_subset-list_bool_subset] 1160s FAILED tests/test_views.py::test_view_of_view[cupy_csc-matrix_bool_subset-matrix_bool_subset] 1160s FAILED tests/test_views.py::test_view_of_view[cupy_csc-matrix_bool_subset-spmatrix_bool_subset] 1160s FAILED tests/test_views.py::test_view_of_view[cupy_csc-matrix_bool_subset-sparray_bool_subset] 1160s FAILED tests/test_views.py::test_view_of_view[cupy_csc-spmatrix_bool_subset-array_subset] 1160s FAILED tests/test_views.py::test_view_of_view[cupy_csc-spmatrix_bool_subset-slice_subset] 1160s FAILED tests/test_views.py::test_view_of_view[cupy_csc-spmatrix_bool_subset-single_subset] 1160s FAILED tests/test_views.py::test_view_of_view[cupy_csc-spmatrix_bool_subset-array_int_subset] 1160s FAILED tests/test_views.py::test_view_of_view[cupy_csc-spmatrix_bool_subset-list_int_subset] 1160s FAILED tests/test_views.py::test_view_of_view[cupy_csc-spmatrix_bool_subset-array_bool_subset] 1160s FAILED tests/test_views.py::test_view_of_view[cupy_csc-spmatrix_bool_subset-list_bool_subset] 1160s FAILED tests/test_views.py::test_view_of_view[cupy_csc-spmatrix_bool_subset-matrix_bool_subset] 1160s FAILED tests/test_views.py::test_view_of_view[cupy_csc-spmatrix_bool_subset-spmatrix_bool_subset] 1160s FAILED tests/test_views.py::test_view_of_view[cupy_csc-spmatrix_bool_subset-sparray_bool_subset] 1160s FAILED tests/test_views.py::test_view_of_view[cupy_csc-sparray_bool_subset-array_subset] 1160s FAILED tests/test_views.py::test_view_of_view[cupy_csc-sparray_bool_subset-slice_subset] 1160s FAILED tests/test_views.py::test_view_of_view[cupy_csc-sparray_bool_subset-single_subset] 1160s FAILED tests/test_views.py::test_view_of_view[cupy_csc-sparray_bool_subset-array_int_subset] 1160s FAILED tests/test_views.py::test_view_of_view[cupy_csc-sparray_bool_subset-list_int_subset] 1160s FAILED tests/test_views.py::test_view_of_view[cupy_csc-sparray_bool_subset-array_bool_subset] 1160s FAILED tests/test_views.py::test_view_of_view[cupy_csc-sparray_bool_subset-list_bool_subset] 1160s FAILED tests/test_views.py::test_view_of_view[cupy_csc-sparray_bool_subset-matrix_bool_subset] 1160s FAILED tests/test_views.py::test_view_of_view[cupy_csc-sparray_bool_subset-spmatrix_bool_subset] 1160s FAILED tests/test_views.py::test_view_of_view[cupy_csc-sparray_bool_subset-sparray_bool_subset] 1160s FAILED tests/test_views.py::test_view_different_type_indices[cupy_array] - Mo... 1160s FAILED tests/test_views.py::test_view_different_type_indices[cupy_csr] - Modu... 1160s FAILED tests/test_views.py::test_view_different_type_indices[cupy_csc] - Modu... 1160s FAILED tests/test_views.py::test_ellipsis_index[cupy_array-ellipsis] - Module... 1160s FAILED tests/test_views.py::test_ellipsis_index[cupy_array-ellipsis_tuple] - ... 1160s FAILED tests/test_views.py::test_ellipsis_index[cupy_array-obs-ellipsis] - Mo... 1160s FAILED tests/test_views.py::test_ellipsis_index[cupy_array-var-ellipsis] - Mo... 1160s FAILED tests/test_views.py::test_ellipsis_index[cupy_array-obs-var-ellipsis] 1160s FAILED tests/test_views.py::test_ellipsis_index[cupy_array-ellipsis-obs-var] 1160s FAILED tests/test_views.py::test_ellipsis_index[cupy_array-obs-ellipsis-var] 1160s FAILED tests/test_views.py::test_ellipsis_index[cupy_csr-ellipsis] - ModuleNo... 1160s FAILED tests/test_views.py::test_ellipsis_index[cupy_csr-ellipsis_tuple] - Mo... 1160s FAILED tests/test_views.py::test_ellipsis_index[cupy_csr-obs-ellipsis] - Modu... 1160s FAILED tests/test_views.py::test_ellipsis_index[cupy_csr-var-ellipsis] - Modu... 1160s FAILED tests/test_views.py::test_ellipsis_index[cupy_csr-obs-var-ellipsis] - ... 1160s FAILED tests/test_views.py::test_ellipsis_index[cupy_csr-ellipsis-obs-var] - ... 1160s FAILED tests/test_views.py::test_ellipsis_index[cupy_csr-obs-ellipsis-var] - ... 1160s FAILED tests/test_views.py::test_ellipsis_index[cupy_csc-ellipsis] - ModuleNo... 1160s FAILED tests/test_views.py::test_ellipsis_index[cupy_csc-ellipsis_tuple] - Mo... 1160s FAILED tests/test_views.py::test_ellipsis_index[cupy_csc-obs-ellipsis] - Modu... 1160s FAILED tests/test_views.py::test_ellipsis_index[cupy_csc-var-ellipsis] - Modu... 1160s FAILED tests/test_views.py::test_ellipsis_index[cupy_csc-obs-var-ellipsis] - ... 1160s FAILED tests/test_views.py::test_ellipsis_index[cupy_csc-ellipsis-obs-var] - ... 1160s FAILED tests/test_views.py::test_ellipsis_index[cupy_csc-obs-ellipsis-var] - ... 1160s = 552 failed, 5242 passed, 92 skipped, 143 xfailed, 7471 warnings in 1044.80s (0:17:24) = 1162s autopkgtest [17:11:11]: test run-unit-test: -----------------------] 1162s run-unit-test FAIL non-zero exit status 1 1162s autopkgtest [17:11:11]: test run-unit-test: - - - - - - - - - - results - - - - - - - - - - 1163s autopkgtest [17:11:12]: @@@@@@@@@@@@@@@@@@@@ summary 1163s run-unit-test FAIL non-zero exit status 1