0s autopkgtest [17:23:39]: starting date and time: 2025-07-03 17:23:39+0000 0s autopkgtest [17:23:39]: git checkout: 508d4a25 a-v-ssh wait_for_ssh: demote "ssh connection failed" to a debug message 0s autopkgtest [17:23:39]: host juju-7f2275-prod-proposed-migration-environment-20; command line: /home/ubuntu/autopkgtest/runner/autopkgtest --output-dir /tmp/autopkgtest-work.a3ddg6_c/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 --security-groups autopkgtest-juju-7f2275-prod-proposed-migration-environment-20@bos03-arm64-19.secgroup --name adt-questing-arm64-python-anndata-20250703-154234-juju-7f2275-prod-proposed-migration-environment-20-b01279c8-5f96-4761-ab71-a260683b5167 --image adt/ubuntu-questing-arm64-server --keyname testbed-juju-7f2275-prod-proposed-migration-environment-20 --net-id=net_prod-proposed-migration -e TERM=linux --mirror=http://ftpmaster.internal/ubuntu/ 3s Creating nova instance adt-questing-arm64-python-anndata-20250703-154234-juju-7f2275-prod-proposed-migration-environment-20-b01279c8-5f96-4761-ab71-a260683b5167 from image adt/ubuntu-questing-arm64-server-20250703.img (UUID 2878e2cd-70b7-495c-9067-26496533bf92)... 58s autopkgtest [17:24:37]: testbed dpkg architecture: arm64 58s autopkgtest [17:24:37]: testbed apt version: 3.1.2 58s autopkgtest [17:24:37]: @@@@@@@@@@@@@@@@@@@@ test bed setup 59s autopkgtest [17:24:38]: testbed release detected to be: None 59s autopkgtest [17:24:38]: updating testbed package index (apt update) 60s Get:1 http://ftpmaster.internal/ubuntu questing-proposed InRelease [249 kB] 60s Hit:2 http://ftpmaster.internal/ubuntu questing InRelease 60s Hit:3 http://ftpmaster.internal/ubuntu questing-updates InRelease 60s Hit:4 http://ftpmaster.internal/ubuntu questing-security InRelease 60s Get:5 http://ftpmaster.internal/ubuntu questing-proposed/universe Sources [357 kB] 61s Get:6 http://ftpmaster.internal/ubuntu questing-proposed/main Sources [27.4 kB] 61s Get:7 http://ftpmaster.internal/ubuntu questing-proposed/multiverse Sources [16.8 kB] 61s Get:8 http://ftpmaster.internal/ubuntu questing-proposed/main arm64 Packages [32.4 kB] 61s Get:9 http://ftpmaster.internal/ubuntu questing-proposed/universe arm64 Packages [250 kB] 61s Get:10 http://ftpmaster.internal/ubuntu questing-proposed/multiverse arm64 Packages [15.7 kB] 61s Fetched 949 kB in 1s (697 kB/s) 62s Reading package lists... 62s autopkgtest [17:24:41]: upgrading testbed (apt dist-upgrade and autopurge) 62s Reading package lists... 63s Building dependency tree... 63s Reading state information... 63s Calculating upgrade... 63s The following packages will be upgraded: 63s libdrm-amdgpu1 libdrm-common libdrm2 libpython3.13 libpython3.13-minimal 63s libpython3.13-stdlib python3.13 python3.13-gdbm python3.13-minimal 64s 9 upgraded, 0 newly installed, 0 to remove and 0 not upgraded. 64s Need to get 8332 kB of archives. 64s After this operation, 68.6 kB of additional disk space will be used. 64s Get:1 http://ftpmaster.internal/ubuntu questing/main arm64 python3.13 arm64 3.13.5-2 [745 kB] 64s Get:2 http://ftpmaster.internal/ubuntu questing/main arm64 python3.13-minimal arm64 3.13.5-2 [2278 kB] 65s Get:3 http://ftpmaster.internal/ubuntu questing/main arm64 libpython3.13 arm64 3.13.5-2 [2282 kB] 65s Get:4 http://ftpmaster.internal/ubuntu questing/main arm64 libpython3.13-stdlib arm64 3.13.5-2 [2041 kB] 66s Get:5 http://ftpmaster.internal/ubuntu questing/main arm64 libpython3.13-minimal arm64 3.13.5-2 [881 kB] 66s Get:6 http://ftpmaster.internal/ubuntu questing/main arm64 libdrm-common all 2.4.125-1 [9012 B] 66s Get:7 http://ftpmaster.internal/ubuntu questing/main arm64 libdrm2 arm64 2.4.125-1 [42.7 kB] 66s Get:8 http://ftpmaster.internal/ubuntu questing/main arm64 libdrm-amdgpu1 arm64 2.4.125-1 [21.6 kB] 66s Get:9 http://ftpmaster.internal/ubuntu questing/main arm64 python3.13-gdbm arm64 3.13.5-2 [31.8 kB] 66s Fetched 8332 kB in 2s (3339 kB/s) 67s (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 ... 127317 files and directories currently installed.) 67s Preparing to unpack .../0-python3.13_3.13.5-2_arm64.deb ... 67s Unpacking python3.13 (3.13.5-2) over (3.13.5-1) ... 67s Preparing to unpack .../1-python3.13-minimal_3.13.5-2_arm64.deb ... 67s Unpacking python3.13-minimal (3.13.5-2) over (3.13.5-1) ... 67s Preparing to unpack .../2-libpython3.13_3.13.5-2_arm64.deb ... 67s Unpacking libpython3.13:arm64 (3.13.5-2) over (3.13.5-1) ... 67s Preparing to unpack .../3-libpython3.13-stdlib_3.13.5-2_arm64.deb ... 67s Unpacking libpython3.13-stdlib:arm64 (3.13.5-2) over (3.13.5-1) ... 67s Preparing to unpack .../4-libpython3.13-minimal_3.13.5-2_arm64.deb ... 67s Unpacking libpython3.13-minimal:arm64 (3.13.5-2) over (3.13.5-1) ... 67s Preparing to unpack .../5-libdrm-common_2.4.125-1_all.deb ... 67s Unpacking libdrm-common (2.4.125-1) over (2.4.124-2) ... 67s Preparing to unpack .../6-libdrm2_2.4.125-1_arm64.deb ... 67s Unpacking libdrm2:arm64 (2.4.125-1) over (2.4.124-2) ... 67s Preparing to unpack .../7-libdrm-amdgpu1_2.4.125-1_arm64.deb ... 67s Unpacking libdrm-amdgpu1:arm64 (2.4.125-1) over (2.4.124-2) ... 67s Preparing to unpack .../8-python3.13-gdbm_3.13.5-2_arm64.deb ... 67s Unpacking python3.13-gdbm (3.13.5-2) over (3.13.5-1) ... 67s Setting up libpython3.13-minimal:arm64 (3.13.5-2) ... 67s Setting up python3.13-minimal (3.13.5-2) ... 68s Setting up libdrm-common (2.4.125-1) ... 68s Setting up libpython3.13-stdlib:arm64 (3.13.5-2) ... 68s Setting up python3.13-gdbm (3.13.5-2) ... 68s Setting up libpython3.13:arm64 (3.13.5-2) ... 68s Setting up python3.13 (3.13.5-2) ... 69s Setting up libdrm2:arm64 (2.4.125-1) ... 69s Setting up libdrm-amdgpu1:arm64 (2.4.125-1) ... 69s Processing triggers for systemd (257.6-1ubuntu1) ... 69s Processing triggers for man-db (2.13.1-1) ... 70s Processing triggers for libc-bin (2.41-6ubuntu2) ... 70s Reading package lists... 70s Building dependency tree... 70s Reading state information... 71s Solving dependencies... 71s 0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded. 73s autopkgtest [17:24:52]: testbed running kernel: Linux 6.15.0-3-generic #3-Ubuntu SMP PREEMPT_DYNAMIC Wed Jun 4 08:41:23 UTC 2025 74s autopkgtest [17:24:53]: @@@@@@@@@@@@@@@@@@@@ apt-source python-anndata 75s Get:1 http://ftpmaster.internal/ubuntu questing-proposed/universe python-anndata 0.12.0~rc1-1 (dsc) [3137 B] 75s Get:2 http://ftpmaster.internal/ubuntu questing-proposed/universe python-anndata 0.12.0~rc1-1 (tar) [575 kB] 75s Get:3 http://ftpmaster.internal/ubuntu questing-proposed/universe python-anndata 0.12.0~rc1-1 (diff) [6956 B] 76s gpgv: Signature made Wed Jul 2 21:48:07 2025 UTC 76s gpgv: using RSA key 8F6DE104377F3B11E741748731F3144544A1741A 76s gpgv: issuer "tchet@debian.org" 76s gpgv: Can't check signature: No public key 76s dpkg-source: warning: cannot verify inline signature for ./python-anndata_0.12.0~rc1-1.dsc: no acceptable signature found 76s autopkgtest [17:24:55]: testing package python-anndata version 0.12.0~rc1-1 76s autopkgtest [17:24:55]: build not needed 77s autopkgtest [17:24:56]: test run-unit-test: preparing testbed 77s Reading package lists... 77s Building dependency tree... 77s Reading state information... 77s Solving dependencies... 78s The following NEW packages will be installed: 78s blt diffstat docutils-common fontconfig-config fonts-dejavu-core 78s fonts-dejavu-mono fonts-lyx gettext libaec0 libblas3 libblosc1 libdeflate0 78s libfontconfig1 libgfortran5 libgomp1 libgraphite2-3 libharfbuzz0b 78s libhdf5-310 libhdf5-hl-310 libhwloc15 libimagequant0 libjbig0 libjpeg-turbo8 78s libjpeg8 libjs-jquery libjs-jquery-hotkeys libjs-jquery-isonscreen 78s libjs-jquery-metadata libjs-jquery-tablesorter 78s libjs-jquery-throttle-debounce libjs-jquery-ui libjs-sphinxdoc 78s libjs-underscore libjson-perl liblapack3 liblcms2-2 liblerc4 libllvm19 78s liblzf1 libopenjp2-7 libpfm4 libqhull-r8.0 libraqm0 libsharpyuv0 78s libsnappy1v5 libsz2 libtbb12 libtbbbind-2-5 libtbbmalloc2 libtcl8.6 libtiff6 78s libtk8.6 libwebp7 libwebpdemux2 libwebpmux3 libxft2 libxrender1 libxslt1.1 78s libxss1 llvm-19 llvm-19-linker-tools llvm-19-runtime 78s node-fortawesome-fontawesome-free python-matplotlib-data 78s python3-accessible-pygments python3-alabaster python3-all python3-anndata 78s python3-array-api-compat python3-awkward python3-boltons python3-brotli 78s python3-bs4 python3-click python3-cloudpickle python3-contourpy 78s python3-coverage python3-crc32c python3-cycler python3-dask python3-dateutil 78s python3-decorator python3-defusedxml python3-distributed python3-docutils 78s python3-donfig python3-et-xmlfile python3-execnet python3-filelock 78s python3-fonttools python3-fs python3-fsspec python3-h5py python3-h5py-serial 78s python3-imagesize python3-iniconfig python3-joblib python3-kiwisolver 78s python3-llvmlite python3-locket python3-lxml python3-lz4 python3-matplotlib 78s python3-mpmath python3-msgpack python3-natsort python3-numba 78s python3-numcodecs python3-numpy python3-numpy-dev python3-openpyxl 78s python3-packaging python3-pandas python3-pandas-lib python3-partd 78s python3-pil python3-pil.imagetk python3-platformdirs python3-pluggy 78s python3-psutil python3-pydata-sphinx-theme python3-pytest python3-pytest-cov 78s python3-pytest-mock python3-pytest-xdist python3-pytz python3-roman 78s python3-scipy python3-sklearn python3-sklearn-lib python3-snowballstemmer 78s python3-sortedcontainers python3-soupsieve python3-sphinx 78s python3-sphinx-copybutton python3-sympy python3-tblib python3-threadpoolctl 78s python3-tk python3-toolz python3-tornado python3-ufolib2 python3-xarray 78s python3-xlrd python3-zarr python3-zict python3.13-tk quilt sgml-base 78s sphinx-common tk8.6-blt2.5 unicode-data x11-common xml-core 78s 0 upgraded, 154 newly installed, 0 to remove and 0 not upgraded. 78s Need to get 150 MB of archives. 78s After this operation, 704 MB of additional disk space will be used. 78s Get:1 http://ftpmaster.internal/ubuntu questing/main arm64 python3-numpy-dev arm64 1:2.2.4+ds-1ubuntu1 [146 kB] 78s Get:2 http://ftpmaster.internal/ubuntu questing/main arm64 libblas3 arm64 3.12.1-2build1 [160 kB] 78s Get:3 http://ftpmaster.internal/ubuntu questing/main arm64 libgfortran5 arm64 15.1.0-8ubuntu1 [451 kB] 78s Get:4 http://ftpmaster.internal/ubuntu questing/main arm64 liblapack3 arm64 3.12.1-2build1 [2308 kB] 79s Get:5 http://ftpmaster.internal/ubuntu questing/main arm64 python3-numpy arm64 1:2.2.4+ds-1ubuntu1 [3986 kB] 79s Get:6 http://ftpmaster.internal/ubuntu questing/main arm64 libtcl8.6 arm64 8.6.16+dfsg-1 [987 kB] 79s Get:7 http://ftpmaster.internal/ubuntu questing/main arm64 fonts-dejavu-mono all 2.37-8 [502 kB] 79s Get:8 http://ftpmaster.internal/ubuntu questing/main arm64 fonts-dejavu-core all 2.37-8 [835 kB] 79s Get:9 http://ftpmaster.internal/ubuntu questing/main arm64 fontconfig-config arm64 2.15.0-2.2ubuntu1 [37.9 kB] 79s Get:10 http://ftpmaster.internal/ubuntu questing/main arm64 libfontconfig1 arm64 2.15.0-2.2ubuntu1 [144 kB] 79s Get:11 http://ftpmaster.internal/ubuntu questing/main arm64 libxrender1 arm64 1:0.9.12-1 [19.5 kB] 79s Get:12 http://ftpmaster.internal/ubuntu questing/main arm64 libxft2 arm64 2.3.6-1build1 [44.1 kB] 79s Get:13 http://ftpmaster.internal/ubuntu questing/main arm64 x11-common all 1:7.7+24ubuntu1 [22.4 kB] 79s Get:14 http://ftpmaster.internal/ubuntu questing/main arm64 libxss1 arm64 1:1.2.3-1build3 [7244 B] 79s Get:15 http://ftpmaster.internal/ubuntu questing/main arm64 libtk8.6 arm64 8.6.16-1 [776 kB] 79s Get:16 http://ftpmaster.internal/ubuntu questing/main arm64 tk8.6-blt2.5 arm64 2.5.3+dfsg-8 [624 kB] 80s Get:17 http://ftpmaster.internal/ubuntu questing/main arm64 blt arm64 2.5.3+dfsg-8 [4824 B] 80s Get:18 http://ftpmaster.internal/ubuntu questing/main arm64 diffstat arm64 1.68-0ubuntu1 [29.2 kB] 80s Get:19 http://ftpmaster.internal/ubuntu questing/main arm64 sgml-base all 1.31+nmu1 [11.0 kB] 80s Get:20 http://ftpmaster.internal/ubuntu questing/main arm64 xml-core all 0.19 [20.3 kB] 80s Get:21 http://ftpmaster.internal/ubuntu questing/main arm64 docutils-common all 0.21.2+dfsg-2 [131 kB] 80s Get:22 http://ftpmaster.internal/ubuntu questing/universe arm64 fonts-lyx all 2.4.3-1 [171 kB] 80s Get:23 http://ftpmaster.internal/ubuntu questing/main arm64 libgomp1 arm64 15.1.0-8ubuntu1 [147 kB] 80s Get:24 http://ftpmaster.internal/ubuntu questing/main arm64 gettext arm64 0.23.1-2build1 [1456 kB] 80s Get:25 http://ftpmaster.internal/ubuntu questing/universe arm64 libaec0 arm64 1.1.3-1 [22.0 kB] 80s Get:26 http://ftpmaster.internal/ubuntu questing/main arm64 libsnappy1v5 arm64 1.2.2-1 [30.5 kB] 80s Get:27 http://ftpmaster.internal/ubuntu questing/universe arm64 libblosc1 arm64 1.21.5+ds-1build1 [25.7 kB] 80s Get:28 http://ftpmaster.internal/ubuntu questing/main arm64 libdeflate0 arm64 1.23-2 [46.4 kB] 80s Get:29 http://ftpmaster.internal/ubuntu questing/main arm64 libgraphite2-3 arm64 1.3.14-2ubuntu1 [70.6 kB] 80s Get:30 http://ftpmaster.internal/ubuntu questing/main arm64 libharfbuzz0b arm64 10.2.0-1 [490 kB] 80s Get:31 http://ftpmaster.internal/ubuntu questing/universe arm64 libsz2 arm64 1.1.3-1 [5254 B] 80s Get:32 http://ftpmaster.internal/ubuntu questing/universe arm64 libhdf5-310 arm64 1.14.5+repack-3build1 [1331 kB] 80s Get:33 http://ftpmaster.internal/ubuntu questing/universe arm64 libhdf5-hl-310 arm64 1.14.5+repack-3build1 [59.8 kB] 80s Get:34 http://ftpmaster.internal/ubuntu questing/universe arm64 libhwloc15 arm64 2.12.0-4build1 [162 kB] 80s Get:35 http://ftpmaster.internal/ubuntu questing/main arm64 libimagequant0 arm64 2.18.0-1build1 [37.1 kB] 80s Get:36 http://ftpmaster.internal/ubuntu questing/main arm64 libjpeg-turbo8 arm64 2.1.5-3ubuntu2 [165 kB] 80s Get:37 http://ftpmaster.internal/ubuntu questing/main arm64 libjpeg8 arm64 8c-2ubuntu11 [2148 B] 80s Get:38 http://ftpmaster.internal/ubuntu questing/main arm64 libjs-jquery all 3.6.1+dfsg+~3.5.14-1 [328 kB] 80s Get:39 http://ftpmaster.internal/ubuntu questing/universe arm64 libjs-jquery-metadata all 12-4 [6582 B] 80s Get:40 http://ftpmaster.internal/ubuntu questing/universe arm64 libjs-jquery-tablesorter all 1:2.31.3+dfsg1-4 [192 kB] 80s Get:41 http://ftpmaster.internal/ubuntu questing/universe arm64 libjs-jquery-throttle-debounce all 1.1+dfsg.1-2 [12.5 kB] 80s Get:42 http://ftpmaster.internal/ubuntu questing/universe arm64 libjs-jquery-ui all 1.13.2+dfsg-1 [252 kB] 80s Get:43 http://ftpmaster.internal/ubuntu questing/main arm64 libjs-underscore all 1.13.4~dfsg+~1.11.4-3 [118 kB] 80s Get:44 http://ftpmaster.internal/ubuntu questing/main arm64 libjs-sphinxdoc all 8.2.3-1ubuntu2 [28.0 kB] 80s Get:45 http://ftpmaster.internal/ubuntu questing/main arm64 libjson-perl all 4.10000-1 [81.9 kB] 80s Get:46 http://ftpmaster.internal/ubuntu questing/main arm64 liblcms2-2 arm64 2.16-2 [170 kB] 80s Get:47 http://ftpmaster.internal/ubuntu questing/main arm64 liblerc4 arm64 4.0.0+ds-5ubuntu1 [167 kB] 80s Get:48 http://ftpmaster.internal/ubuntu questing/main arm64 libllvm19 arm64 1:19.1.7-5ubuntu2 [27.3 MB] 81s Get:49 http://ftpmaster.internal/ubuntu questing/universe arm64 liblzf1 arm64 3.6-4 [7426 B] 81s Get:50 http://ftpmaster.internal/ubuntu questing/universe arm64 libqhull-r8.0 arm64 2020.2-6build1 [189 kB] 81s Get:51 http://ftpmaster.internal/ubuntu questing/main arm64 libraqm0 arm64 0.10.2-1 [14.9 kB] 81s Get:52 http://ftpmaster.internal/ubuntu questing/main arm64 libsharpyuv0 arm64 1.5.0-0.1 [16.9 kB] 81s Get:53 http://ftpmaster.internal/ubuntu questing/universe arm64 libtbbbind-2-5 arm64 2022.1.0-1 [14.3 kB] 81s Get:54 http://ftpmaster.internal/ubuntu questing/universe arm64 libtbbmalloc2 arm64 2022.1.0-1 [39.0 kB] 81s Get:55 http://ftpmaster.internal/ubuntu questing/universe arm64 libtbb12 arm64 2022.1.0-1 [72.1 kB] 81s Get:56 http://ftpmaster.internal/ubuntu questing/main arm64 libjbig0 arm64 2.1-6.1ubuntu2 [29.3 kB] 81s Get:57 http://ftpmaster.internal/ubuntu questing/main arm64 libwebp7 arm64 1.5.0-0.1 [194 kB] 81s Get:58 http://ftpmaster.internal/ubuntu questing/main arm64 libtiff6 arm64 4.7.0-3ubuntu1 [197 kB] 81s Get:59 http://ftpmaster.internal/ubuntu questing/main arm64 libwebpdemux2 arm64 1.5.0-0.1 [12.5 kB] 81s Get:60 http://ftpmaster.internal/ubuntu questing/main arm64 libwebpmux3 arm64 1.5.0-0.1 [25.4 kB] 81s Get:61 http://ftpmaster.internal/ubuntu questing/main arm64 libxslt1.1 arm64 1.1.43-0exp1 [161 kB] 81s Get:62 http://ftpmaster.internal/ubuntu questing/universe arm64 llvm-19-runtime arm64 1:19.1.7-5ubuntu2 [532 kB] 81s Get:63 http://ftpmaster.internal/ubuntu questing/universe arm64 llvm-19-linker-tools arm64 1:19.1.7-5ubuntu2 [1229 kB] 81s Get:64 http://ftpmaster.internal/ubuntu questing/universe arm64 libpfm4 arm64 4.13.0+git99-gc5587f9-1 [82.5 kB] 81s Get:65 http://ftpmaster.internal/ubuntu questing/universe arm64 llvm-19 arm64 1:19.1.7-5ubuntu2 [17.0 MB] 82s Get:66 http://ftpmaster.internal/ubuntu questing/universe arm64 node-fortawesome-fontawesome-free all 6.7.2+ds1-1 [1653 kB] 82s Get:67 http://ftpmaster.internal/ubuntu questing/universe arm64 python-matplotlib-data all 3.10.1+dfsg1-4 [2930 kB] 83s Get:68 http://ftpmaster.internal/ubuntu questing/universe arm64 python3-accessible-pygments all 0.0.5-2 [790 kB] 83s Get:69 http://ftpmaster.internal/ubuntu questing/main arm64 python3-all arm64 3.13.4-1 [880 B] 83s Get:70 http://ftpmaster.internal/ubuntu questing/universe arm64 python3-array-api-compat all 1.11.2-1 [33.4 kB] 83s Get:71 http://ftpmaster.internal/ubuntu questing/universe arm64 python3-h5py-serial arm64 3.13.0-1ubuntu1 [1123 kB] 83s Get:72 http://ftpmaster.internal/ubuntu questing/universe arm64 python3-h5py all 3.13.0-1ubuntu1 [8230 B] 83s Get:73 http://ftpmaster.internal/ubuntu questing/universe arm64 python3-natsort all 8.0.2-2 [33.8 kB] 83s Get:74 http://ftpmaster.internal/ubuntu questing/main arm64 python3-packaging all 25.0-1 [52.8 kB] 83s Get:75 http://ftpmaster.internal/ubuntu questing/main arm64 python3-dateutil all 2.9.0-4 [80.3 kB] 83s Get:76 http://ftpmaster.internal/ubuntu questing/main arm64 python3-pytz all 2025.2-3 [163 kB] 83s Get:77 http://ftpmaster.internal/ubuntu questing/universe arm64 python3-pandas-lib arm64 2.2.3+dfsg-9 [4579 kB] 83s Get:78 http://ftpmaster.internal/ubuntu questing/universe arm64 python3-pandas all 2.2.3+dfsg-9 [3112 kB] 83s Get:79 http://ftpmaster.internal/ubuntu questing/main arm64 python3-decorator all 5.2.1-2 [28.1 kB] 83s Get:80 http://ftpmaster.internal/ubuntu questing/universe arm64 python3-scipy arm64 1.15.3-1 [15.8 MB] 84s Get:81 http://ftpmaster.internal/ubuntu questing/universe arm64 python3-crc32c arm64 2.7.1-1 [23.7 kB] 84s Get:82 http://ftpmaster.internal/ubuntu questing/main arm64 python3-defusedxml all 0.7.1-3 [42.2 kB] 84s Get:83 http://ftpmaster.internal/ubuntu questing/main arm64 sphinx-common all 8.2.3-1ubuntu2 [656 kB] 84s Get:84 http://ftpmaster.internal/ubuntu questing/main arm64 python3-alabaster all 0.7.16-0.1 [18.5 kB] 84s Get:85 http://ftpmaster.internal/ubuntu questing/main arm64 python3-roman all 5.0-1 [10.3 kB] 84s Get:86 http://ftpmaster.internal/ubuntu questing/main arm64 python3-docutils all 0.21.2+dfsg-2 [409 kB] 84s Get:87 http://ftpmaster.internal/ubuntu questing/main arm64 python3-imagesize all 1.4.1-1 [6844 B] 84s Get:88 http://ftpmaster.internal/ubuntu questing/main arm64 python3-snowballstemmer all 2.2.0-4build1 [59.8 kB] 84s Get:89 http://ftpmaster.internal/ubuntu questing/main arm64 python3-sphinx all 8.2.3-1ubuntu2 [482 kB] 84s Get:90 http://ftpmaster.internal/ubuntu questing/universe arm64 python3-sphinx-copybutton all 0.5.2-2 [16.6 kB] 84s Get:91 http://ftpmaster.internal/ubuntu questing/main arm64 python3-soupsieve all 2.7-1 [33.5 kB] 84s Get:92 http://ftpmaster.internal/ubuntu questing/main arm64 python3-bs4 all 4.13.4-3 [137 kB] 84s Get:93 http://ftpmaster.internal/ubuntu questing/universe arm64 python3-pydata-sphinx-theme all 0.16.1+dfsg-3 [959 kB] 84s Get:94 http://ftpmaster.internal/ubuntu questing/universe arm64 python3-donfig all 0.8.1+dfsg-3 [17.3 kB] 84s Get:95 http://ftpmaster.internal/ubuntu questing/universe arm64 python3-numcodecs arm64 0.16.0+ds-1 [396 kB] 84s Get:96 http://ftpmaster.internal/ubuntu questing/universe arm64 python3-zarr all 3.0.6-2 [2009 kB] 84s Get:97 http://ftpmaster.internal/ubuntu questing-proposed/universe arm64 python3-anndata all 0.12.0~rc1-1 [117 kB] 84s Get:98 http://ftpmaster.internal/ubuntu questing/universe arm64 python3-fsspec all 2025.3.0-1 [216 kB] 84s Get:99 http://ftpmaster.internal/ubuntu questing/universe arm64 python3-awkward arm64 2.6.5-1build1 [839 kB] 84s Get:100 http://ftpmaster.internal/ubuntu questing/universe arm64 python3-boltons all 25.0.0-1 [134 kB] 84s Get:101 http://ftpmaster.internal/ubuntu questing/universe arm64 python3-brotli arm64 1.1.0-2build4 [342 kB] 84s Get:102 http://ftpmaster.internal/ubuntu questing/main arm64 python3-click all 8.2.0+0.really.8.1.8-1 [80.0 kB] 84s Get:103 http://ftpmaster.internal/ubuntu questing/universe arm64 python3-cloudpickle all 3.1.1-1 [22.4 kB] 84s Get:104 http://ftpmaster.internal/ubuntu questing/universe arm64 python3-contourpy arm64 1.3.1-1build1 [182 kB] 84s Get:105 http://ftpmaster.internal/ubuntu questing/universe arm64 python3-coverage arm64 7.8.2+dfsg1-1 [157 kB] 85s Get:106 http://ftpmaster.internal/ubuntu questing/universe arm64 python3-cycler all 0.12.1-1 [9716 B] 85s Get:107 http://ftpmaster.internal/ubuntu questing/universe arm64 python3-toolz all 1.0.0-2 [45.0 kB] 85s Get:108 http://ftpmaster.internal/ubuntu questing/universe arm64 python3-locket all 1.0.0-2 [5872 B] 85s Get:109 http://ftpmaster.internal/ubuntu questing/universe arm64 python3-partd all 1.4.2-1 [15.7 kB] 85s Get:110 http://ftpmaster.internal/ubuntu questing/universe arm64 python3-dask all 2024.12.1+dfsg-2 [875 kB] 85s Get:111 http://ftpmaster.internal/ubuntu questing/main arm64 python3-msgpack arm64 1.0.3-3build4 [82.7 kB] 85s Get:112 http://ftpmaster.internal/ubuntu questing/main arm64 python3-psutil arm64 5.9.8-2build3 [196 kB] 85s Get:113 http://ftpmaster.internal/ubuntu questing/main arm64 python3-sortedcontainers all 2.4.0-2 [27.6 kB] 85s Get:114 http://ftpmaster.internal/ubuntu questing/universe arm64 python3-tblib all 3.1.0-1 [13.0 kB] 85s Get:115 http://ftpmaster.internal/ubuntu questing/main arm64 python3-tornado arm64 6.4.2-3 [299 kB] 85s Get:116 http://ftpmaster.internal/ubuntu questing/universe arm64 python3-zict all 3.0.0-2ubuntu1 [30.4 kB] 85s Get:117 http://ftpmaster.internal/ubuntu questing/universe arm64 python3-distributed all 2024.12.1+ds-1 [1019 kB] 85s Get:118 http://ftpmaster.internal/ubuntu questing/universe arm64 python3-et-xmlfile all 2.0.0-1 [79.4 kB] 85s Get:119 http://ftpmaster.internal/ubuntu questing/universe arm64 python3-execnet all 2.1.1-1 [33.4 kB] 85s Get:120 http://ftpmaster.internal/ubuntu questing/universe arm64 python3-filelock all 3.18.0-1 [13.0 kB] 85s Get:121 http://ftpmaster.internal/ubuntu questing/main arm64 python3-platformdirs all 4.3.7-1 [16.9 kB] 85s Get:122 http://ftpmaster.internal/ubuntu questing/universe arm64 python3-fs all 2.4.16-7 [90.8 kB] 85s Get:123 http://ftpmaster.internal/ubuntu questing/main arm64 python3-lxml arm64 5.4.0-1build1 [1297 kB] 85s Get:124 http://ftpmaster.internal/ubuntu questing/universe arm64 python3-lz4 arm64 4.4.0+dfsg-2 [27.1 kB] 85s Get:125 http://ftpmaster.internal/ubuntu questing/universe arm64 python3-mpmath all 1.3.0-1 [425 kB] 86s Get:126 http://ftpmaster.internal/ubuntu questing/universe arm64 python3-sympy all 1.13.3-5 [4229 kB] 86s Get:127 http://ftpmaster.internal/ubuntu questing/universe arm64 python3-ufolib2 all 0.17.1+dfsg1-1 [33.5 kB] 86s Get:128 http://ftpmaster.internal/ubuntu questing/universe arm64 unicode-data all 15.1.0-1 [8878 kB] 87s Get:129 http://ftpmaster.internal/ubuntu questing/universe arm64 python3-fonttools arm64 4.55.3-2build1 [1466 kB] 87s Get:130 http://ftpmaster.internal/ubuntu questing/universe arm64 python3-iniconfig all 1.1.1-2 [6024 B] 87s Get:131 http://ftpmaster.internal/ubuntu questing/universe arm64 python3-joblib all 1.4.2-4 [205 kB] 87s Get:132 http://ftpmaster.internal/ubuntu questing/universe arm64 python3-kiwisolver arm64 1.4.7-3build1 [50.7 kB] 87s Get:133 http://ftpmaster.internal/ubuntu questing/universe arm64 python3-llvmlite arm64 0.44.0-1 [203 kB] 87s Get:134 http://ftpmaster.internal/ubuntu questing/main arm64 libopenjp2-7 arm64 2.5.3-2 [183 kB] 87s Get:135 http://ftpmaster.internal/ubuntu questing/main arm64 python3-pil arm64 11.1.0-5build1 [463 kB] 87s Get:136 http://ftpmaster.internal/ubuntu questing/main arm64 python3.13-tk arm64 3.13.5-2 [106 kB] 87s Get:137 http://ftpmaster.internal/ubuntu questing/main arm64 python3-tk arm64 3.13.4-1 [9884 B] 87s Get:138 http://ftpmaster.internal/ubuntu questing/universe arm64 python3-pil.imagetk arm64 11.1.0-5build1 [9892 B] 87s Get:139 http://ftpmaster.internal/ubuntu questing/universe arm64 python3-matplotlib arm64 3.10.1+dfsg1-4 [18.0 MB] 90s Get:140 http://ftpmaster.internal/ubuntu questing/universe arm64 python3-numba arm64 0.61.2+dfsg-1 [1814 kB] 90s Get:141 http://ftpmaster.internal/ubuntu questing/universe arm64 python3-openpyxl all 3.1.5+dfsg-2 [152 kB] 90s Get:142 http://ftpmaster.internal/ubuntu questing/universe arm64 python3-pluggy all 1.5.0-1 [21.0 kB] 90s Get:143 http://ftpmaster.internal/ubuntu questing/universe arm64 python3-pytest all 8.3.5-2 [252 kB] 91s Get:144 http://ftpmaster.internal/ubuntu questing/universe arm64 libjs-jquery-hotkeys all 0.2.0-1 [13.3 kB] 91s Get:145 http://ftpmaster.internal/ubuntu questing/universe arm64 libjs-jquery-isonscreen all 1.2.0-1.1 [3244 B] 91s Get:146 http://ftpmaster.internal/ubuntu questing/universe arm64 python3-pytest-cov all 5.0.0-1 [21.3 kB] 91s Get:147 http://ftpmaster.internal/ubuntu questing/universe arm64 python3-pytest-mock all 3.14.0-3 [11.8 kB] 91s Get:148 http://ftpmaster.internal/ubuntu questing/universe arm64 python3-pytest-xdist all 3.6.1-1 [33.8 kB] 91s Get:149 http://ftpmaster.internal/ubuntu questing/universe arm64 python3-threadpoolctl all 3.1.0-1 [21.3 kB] 91s Get:150 http://ftpmaster.internal/ubuntu questing/universe arm64 python3-sklearn-lib arm64 1.4.2+dfsg-8 [4109 kB] 91s Get:151 http://ftpmaster.internal/ubuntu questing/universe arm64 python3-sklearn all 1.4.2+dfsg-8 [2258 kB] 92s Get:152 http://ftpmaster.internal/ubuntu questing/universe arm64 python3-xarray all 2025.03.1-8 [831 kB] 92s Get:153 http://ftpmaster.internal/ubuntu questing/universe arm64 python3-xlrd all 2.0.1-2 [83.1 kB] 92s Get:154 http://ftpmaster.internal/ubuntu questing/universe arm64 quilt all 0.68-1 [439 kB] 92s Fetched 150 MB in 14s (10.5 MB/s) 92s Selecting previously unselected package python3-numpy-dev:arm64. 93s (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 ... 127317 files and directories currently installed.) 93s Preparing to unpack .../000-python3-numpy-dev_1%3a2.2.4+ds-1ubuntu1_arm64.deb ... 93s Unpacking python3-numpy-dev:arm64 (1:2.2.4+ds-1ubuntu1) ... 93s Selecting previously unselected package libblas3:arm64. 93s Preparing to unpack .../001-libblas3_3.12.1-2build1_arm64.deb ... 93s Unpacking libblas3:arm64 (3.12.1-2build1) ... 93s Selecting previously unselected package libgfortran5:arm64. 93s Preparing to unpack .../002-libgfortran5_15.1.0-8ubuntu1_arm64.deb ... 93s Unpacking libgfortran5:arm64 (15.1.0-8ubuntu1) ... 93s Selecting previously unselected package liblapack3:arm64. 93s Preparing to unpack .../003-liblapack3_3.12.1-2build1_arm64.deb ... 93s Unpacking liblapack3:arm64 (3.12.1-2build1) ... 93s Selecting previously unselected package python3-numpy. 93s Preparing to unpack .../004-python3-numpy_1%3a2.2.4+ds-1ubuntu1_arm64.deb ... 93s Unpacking python3-numpy (1:2.2.4+ds-1ubuntu1) ... 93s Selecting previously unselected package libtcl8.6:arm64. 93s Preparing to unpack .../005-libtcl8.6_8.6.16+dfsg-1_arm64.deb ... 93s Unpacking libtcl8.6:arm64 (8.6.16+dfsg-1) ... 93s Selecting previously unselected package fonts-dejavu-mono. 93s Preparing to unpack .../006-fonts-dejavu-mono_2.37-8_all.deb ... 93s Unpacking fonts-dejavu-mono (2.37-8) ... 93s Selecting previously unselected package fonts-dejavu-core. 93s Preparing to unpack .../007-fonts-dejavu-core_2.37-8_all.deb ... 93s Unpacking fonts-dejavu-core (2.37-8) ... 93s Selecting previously unselected package fontconfig-config. 93s Preparing to unpack .../008-fontconfig-config_2.15.0-2.2ubuntu1_arm64.deb ... 93s Unpacking fontconfig-config (2.15.0-2.2ubuntu1) ... 93s Selecting previously unselected package libfontconfig1:arm64. 93s Preparing to unpack .../009-libfontconfig1_2.15.0-2.2ubuntu1_arm64.deb ... 93s Unpacking libfontconfig1:arm64 (2.15.0-2.2ubuntu1) ... 93s Selecting previously unselected package libxrender1:arm64. 94s Preparing to unpack .../010-libxrender1_1%3a0.9.12-1_arm64.deb ... 94s Unpacking libxrender1:arm64 (1:0.9.12-1) ... 94s Selecting previously unselected package libxft2:arm64. 94s Preparing to unpack .../011-libxft2_2.3.6-1build1_arm64.deb ... 94s Unpacking libxft2:arm64 (2.3.6-1build1) ... 94s Selecting previously unselected package x11-common. 94s Preparing to unpack .../012-x11-common_1%3a7.7+24ubuntu1_all.deb ... 94s Unpacking x11-common (1:7.7+24ubuntu1) ... 94s Selecting previously unselected package libxss1:arm64. 94s Preparing to unpack .../013-libxss1_1%3a1.2.3-1build3_arm64.deb ... 94s Unpacking libxss1:arm64 (1:1.2.3-1build3) ... 94s Selecting previously unselected package libtk8.6:arm64. 94s Preparing to unpack .../014-libtk8.6_8.6.16-1_arm64.deb ... 94s Unpacking libtk8.6:arm64 (8.6.16-1) ... 94s Selecting previously unselected package tk8.6-blt2.5. 94s Preparing to unpack .../015-tk8.6-blt2.5_2.5.3+dfsg-8_arm64.deb ... 94s Unpacking tk8.6-blt2.5 (2.5.3+dfsg-8) ... 94s Selecting previously unselected package blt. 94s Preparing to unpack .../016-blt_2.5.3+dfsg-8_arm64.deb ... 94s Unpacking blt (2.5.3+dfsg-8) ... 94s Selecting previously unselected package diffstat. 94s Preparing to unpack .../017-diffstat_1.68-0ubuntu1_arm64.deb ... 94s Unpacking diffstat (1.68-0ubuntu1) ... 94s Selecting previously unselected package sgml-base. 94s Preparing to unpack .../018-sgml-base_1.31+nmu1_all.deb ... 94s Unpacking sgml-base (1.31+nmu1) ... 94s Selecting previously unselected package xml-core. 94s Preparing to unpack .../019-xml-core_0.19_all.deb ... 94s Unpacking xml-core (0.19) ... 94s Selecting previously unselected package docutils-common. 94s Preparing to unpack .../020-docutils-common_0.21.2+dfsg-2_all.deb ... 94s Unpacking docutils-common (0.21.2+dfsg-2) ... 94s Selecting previously unselected package fonts-lyx. 94s Preparing to unpack .../021-fonts-lyx_2.4.3-1_all.deb ... 94s Unpacking fonts-lyx (2.4.3-1) ... 94s Selecting previously unselected package libgomp1:arm64. 94s Preparing to unpack .../022-libgomp1_15.1.0-8ubuntu1_arm64.deb ... 94s Unpacking libgomp1:arm64 (15.1.0-8ubuntu1) ... 94s Selecting previously unselected package gettext. 94s Preparing to unpack .../023-gettext_0.23.1-2build1_arm64.deb ... 94s Unpacking gettext (0.23.1-2build1) ... 94s Selecting previously unselected package libaec0:arm64. 94s Preparing to unpack .../024-libaec0_1.1.3-1_arm64.deb ... 94s Unpacking libaec0:arm64 (1.1.3-1) ... 94s Selecting previously unselected package libsnappy1v5:arm64. 94s Preparing to unpack .../025-libsnappy1v5_1.2.2-1_arm64.deb ... 94s Unpacking libsnappy1v5:arm64 (1.2.2-1) ... 94s Selecting previously unselected package libblosc1:arm64. 94s Preparing to unpack .../026-libblosc1_1.21.5+ds-1build1_arm64.deb ... 94s Unpacking libblosc1:arm64 (1.21.5+ds-1build1) ... 94s Selecting previously unselected package libdeflate0:arm64. 94s Preparing to unpack .../027-libdeflate0_1.23-2_arm64.deb ... 94s Unpacking libdeflate0:arm64 (1.23-2) ... 94s Selecting previously unselected package libgraphite2-3:arm64. 94s Preparing to unpack .../028-libgraphite2-3_1.3.14-2ubuntu1_arm64.deb ... 94s Unpacking libgraphite2-3:arm64 (1.3.14-2ubuntu1) ... 95s Selecting previously unselected package libharfbuzz0b:arm64. 95s Preparing to unpack .../029-libharfbuzz0b_10.2.0-1_arm64.deb ... 95s Unpacking libharfbuzz0b:arm64 (10.2.0-1) ... 95s Selecting previously unselected package libsz2:arm64. 95s Preparing to unpack .../030-libsz2_1.1.3-1_arm64.deb ... 95s Unpacking libsz2:arm64 (1.1.3-1) ... 95s Selecting previously unselected package libhdf5-310:arm64. 95s Preparing to unpack .../031-libhdf5-310_1.14.5+repack-3build1_arm64.deb ... 95s Unpacking libhdf5-310:arm64 (1.14.5+repack-3build1) ... 95s Selecting previously unselected package libhdf5-hl-310:arm64. 95s Preparing to unpack .../032-libhdf5-hl-310_1.14.5+repack-3build1_arm64.deb ... 95s Unpacking libhdf5-hl-310:arm64 (1.14.5+repack-3build1) ... 95s Selecting previously unselected package libhwloc15:arm64. 95s Preparing to unpack .../033-libhwloc15_2.12.0-4build1_arm64.deb ... 95s Unpacking libhwloc15:arm64 (2.12.0-4build1) ... 95s Selecting previously unselected package libimagequant0:arm64. 95s Preparing to unpack .../034-libimagequant0_2.18.0-1build1_arm64.deb ... 95s Unpacking libimagequant0:arm64 (2.18.0-1build1) ... 95s Selecting previously unselected package libjpeg-turbo8:arm64. 95s Preparing to unpack .../035-libjpeg-turbo8_2.1.5-3ubuntu2_arm64.deb ... 95s Unpacking libjpeg-turbo8:arm64 (2.1.5-3ubuntu2) ... 95s Selecting previously unselected package libjpeg8:arm64. 95s Preparing to unpack .../036-libjpeg8_8c-2ubuntu11_arm64.deb ... 95s Unpacking libjpeg8:arm64 (8c-2ubuntu11) ... 95s Selecting previously unselected package libjs-jquery. 95s Preparing to unpack .../037-libjs-jquery_3.6.1+dfsg+~3.5.14-1_all.deb ... 95s Unpacking libjs-jquery (3.6.1+dfsg+~3.5.14-1) ... 95s Selecting previously unselected package libjs-jquery-metadata. 95s Preparing to unpack .../038-libjs-jquery-metadata_12-4_all.deb ... 95s Unpacking libjs-jquery-metadata (12-4) ... 95s Selecting previously unselected package libjs-jquery-tablesorter. 95s Preparing to unpack .../039-libjs-jquery-tablesorter_1%3a2.31.3+dfsg1-4_all.deb ... 95s Unpacking libjs-jquery-tablesorter (1:2.31.3+dfsg1-4) ... 95s Selecting previously unselected package libjs-jquery-throttle-debounce. 95s Preparing to unpack .../040-libjs-jquery-throttle-debounce_1.1+dfsg.1-2_all.deb ... 95s Unpacking libjs-jquery-throttle-debounce (1.1+dfsg.1-2) ... 95s Selecting previously unselected package libjs-jquery-ui. 95s Preparing to unpack .../041-libjs-jquery-ui_1.13.2+dfsg-1_all.deb ... 95s Unpacking libjs-jquery-ui (1.13.2+dfsg-1) ... 95s Selecting previously unselected package libjs-underscore. 95s Preparing to unpack .../042-libjs-underscore_1.13.4~dfsg+~1.11.4-3_all.deb ... 95s Unpacking libjs-underscore (1.13.4~dfsg+~1.11.4-3) ... 95s Selecting previously unselected package libjs-sphinxdoc. 95s Preparing to unpack .../043-libjs-sphinxdoc_8.2.3-1ubuntu2_all.deb ... 95s Unpacking libjs-sphinxdoc (8.2.3-1ubuntu2) ... 95s Selecting previously unselected package libjson-perl. 95s Preparing to unpack .../044-libjson-perl_4.10000-1_all.deb ... 95s Unpacking libjson-perl (4.10000-1) ... 95s Selecting previously unselected package liblcms2-2:arm64. 95s Preparing to unpack .../045-liblcms2-2_2.16-2_arm64.deb ... 95s Unpacking liblcms2-2:arm64 (2.16-2) ... 95s Selecting previously unselected package liblerc4:arm64. 95s Preparing to unpack .../046-liblerc4_4.0.0+ds-5ubuntu1_arm64.deb ... 95s Unpacking liblerc4:arm64 (4.0.0+ds-5ubuntu1) ... 95s Selecting previously unselected package libllvm19. 95s Preparing to unpack .../047-libllvm19_1%3a19.1.7-5ubuntu2_arm64.deb ... 95s Unpacking libllvm19 (1:19.1.7-5ubuntu2) ... 96s Selecting previously unselected package liblzf1:arm64. 96s Preparing to unpack .../048-liblzf1_3.6-4_arm64.deb ... 96s Unpacking liblzf1:arm64 (3.6-4) ... 96s Selecting previously unselected package libqhull-r8.0:arm64. 96s Preparing to unpack .../049-libqhull-r8.0_2020.2-6build1_arm64.deb ... 96s Unpacking libqhull-r8.0:arm64 (2020.2-6build1) ... 96s Selecting previously unselected package libraqm0:arm64. 96s Preparing to unpack .../050-libraqm0_0.10.2-1_arm64.deb ... 96s Unpacking libraqm0:arm64 (0.10.2-1) ... 96s Selecting previously unselected package libsharpyuv0:arm64. 96s Preparing to unpack .../051-libsharpyuv0_1.5.0-0.1_arm64.deb ... 96s Unpacking libsharpyuv0:arm64 (1.5.0-0.1) ... 96s Selecting previously unselected package libtbbbind-2-5:arm64. 96s Preparing to unpack .../052-libtbbbind-2-5_2022.1.0-1_arm64.deb ... 96s Unpacking libtbbbind-2-5:arm64 (2022.1.0-1) ... 96s Selecting previously unselected package libtbbmalloc2:arm64. 96s Preparing to unpack .../053-libtbbmalloc2_2022.1.0-1_arm64.deb ... 96s Unpacking libtbbmalloc2:arm64 (2022.1.0-1) ... 96s Selecting previously unselected package libtbb12:arm64. 96s Preparing to unpack .../054-libtbb12_2022.1.0-1_arm64.deb ... 96s Unpacking libtbb12:arm64 (2022.1.0-1) ... 96s Selecting previously unselected package libjbig0:arm64. 96s Preparing to unpack .../055-libjbig0_2.1-6.1ubuntu2_arm64.deb ... 96s Unpacking libjbig0:arm64 (2.1-6.1ubuntu2) ... 96s Selecting previously unselected package libwebp7:arm64. 96s Preparing to unpack .../056-libwebp7_1.5.0-0.1_arm64.deb ... 96s Unpacking libwebp7:arm64 (1.5.0-0.1) ... 96s Selecting previously unselected package libtiff6:arm64. 97s Preparing to unpack .../057-libtiff6_4.7.0-3ubuntu1_arm64.deb ... 97s Unpacking libtiff6:arm64 (4.7.0-3ubuntu1) ... 97s Selecting previously unselected package libwebpdemux2:arm64. 97s Preparing to unpack .../058-libwebpdemux2_1.5.0-0.1_arm64.deb ... 97s Unpacking libwebpdemux2:arm64 (1.5.0-0.1) ... 97s Selecting previously unselected package libwebpmux3:arm64. 97s Preparing to unpack .../059-libwebpmux3_1.5.0-0.1_arm64.deb ... 97s Unpacking libwebpmux3:arm64 (1.5.0-0.1) ... 97s Selecting previously unselected package libxslt1.1:arm64. 97s Preparing to unpack .../060-libxslt1.1_1.1.43-0exp1_arm64.deb ... 97s Unpacking libxslt1.1:arm64 (1.1.43-0exp1) ... 97s Selecting previously unselected package llvm-19-runtime. 97s Preparing to unpack .../061-llvm-19-runtime_1%3a19.1.7-5ubuntu2_arm64.deb ... 97s Unpacking llvm-19-runtime (1:19.1.7-5ubuntu2) ... 97s Selecting previously unselected package llvm-19-linker-tools. 97s Preparing to unpack .../062-llvm-19-linker-tools_1%3a19.1.7-5ubuntu2_arm64.deb ... 97s Unpacking llvm-19-linker-tools (1:19.1.7-5ubuntu2) ... 97s Selecting previously unselected package libpfm4:arm64. 97s Preparing to unpack .../063-libpfm4_4.13.0+git99-gc5587f9-1_arm64.deb ... 97s Unpacking libpfm4:arm64 (4.13.0+git99-gc5587f9-1) ... 97s Selecting previously unselected package llvm-19. 97s Preparing to unpack .../064-llvm-19_1%3a19.1.7-5ubuntu2_arm64.deb ... 97s Unpacking llvm-19 (1:19.1.7-5ubuntu2) ... 97s Selecting previously unselected package node-fortawesome-fontawesome-free. 97s Preparing to unpack .../065-node-fortawesome-fontawesome-free_6.7.2+ds1-1_all.deb ... 97s Unpacking node-fortawesome-fontawesome-free (6.7.2+ds1-1) ... 97s Selecting previously unselected package python-matplotlib-data. 98s Preparing to unpack .../066-python-matplotlib-data_3.10.1+dfsg1-4_all.deb ... 98s Unpacking python-matplotlib-data (3.10.1+dfsg1-4) ... 98s Selecting previously unselected package python3-accessible-pygments. 98s Preparing to unpack .../067-python3-accessible-pygments_0.0.5-2_all.deb ... 98s Unpacking python3-accessible-pygments (0.0.5-2) ... 98s Selecting previously unselected package python3-all. 98s Preparing to unpack .../068-python3-all_3.13.4-1_arm64.deb ... 98s Unpacking python3-all (3.13.4-1) ... 98s Selecting previously unselected package python3-array-api-compat. 98s Preparing to unpack .../069-python3-array-api-compat_1.11.2-1_all.deb ... 98s Unpacking python3-array-api-compat (1.11.2-1) ... 98s Selecting previously unselected package python3-h5py-serial. 98s Preparing to unpack .../070-python3-h5py-serial_3.13.0-1ubuntu1_arm64.deb ... 98s Unpacking python3-h5py-serial (3.13.0-1ubuntu1) ... 98s Selecting previously unselected package python3-h5py. 98s Preparing to unpack .../071-python3-h5py_3.13.0-1ubuntu1_all.deb ... 98s Unpacking python3-h5py (3.13.0-1ubuntu1) ... 98s Selecting previously unselected package python3-natsort. 98s Preparing to unpack .../072-python3-natsort_8.0.2-2_all.deb ... 98s Unpacking python3-natsort (8.0.2-2) ... 98s Selecting previously unselected package python3-packaging. 98s Preparing to unpack .../073-python3-packaging_25.0-1_all.deb ... 98s Unpacking python3-packaging (25.0-1) ... 98s Selecting previously unselected package python3-dateutil. 98s Preparing to unpack .../074-python3-dateutil_2.9.0-4_all.deb ... 98s Unpacking python3-dateutil (2.9.0-4) ... 98s Selecting previously unselected package python3-pytz. 98s Preparing to unpack .../075-python3-pytz_2025.2-3_all.deb ... 98s Unpacking python3-pytz (2025.2-3) ... 98s Selecting previously unselected package python3-pandas-lib:arm64. 98s Preparing to unpack .../076-python3-pandas-lib_2.2.3+dfsg-9_arm64.deb ... 98s Unpacking python3-pandas-lib:arm64 (2.2.3+dfsg-9) ... 98s Selecting previously unselected package python3-pandas. 98s Preparing to unpack .../077-python3-pandas_2.2.3+dfsg-9_all.deb ... 98s Unpacking python3-pandas (2.2.3+dfsg-9) ... 98s Selecting previously unselected package python3-decorator. 98s Preparing to unpack .../078-python3-decorator_5.2.1-2_all.deb ... 98s Unpacking python3-decorator (5.2.1-2) ... 98s Selecting previously unselected package python3-scipy. 99s Preparing to unpack .../079-python3-scipy_1.15.3-1_arm64.deb ... 99s Unpacking python3-scipy (1.15.3-1) ... 99s Selecting previously unselected package python3-crc32c. 99s Preparing to unpack .../080-python3-crc32c_2.7.1-1_arm64.deb ... 99s Unpacking python3-crc32c (2.7.1-1) ... 99s Selecting previously unselected package python3-defusedxml. 99s Preparing to unpack .../081-python3-defusedxml_0.7.1-3_all.deb ... 99s Unpacking python3-defusedxml (0.7.1-3) ... 99s Selecting previously unselected package sphinx-common. 99s Preparing to unpack .../082-sphinx-common_8.2.3-1ubuntu2_all.deb ... 99s Unpacking sphinx-common (8.2.3-1ubuntu2) ... 99s Selecting previously unselected package python3-alabaster. 99s Preparing to unpack .../083-python3-alabaster_0.7.16-0.1_all.deb ... 99s Unpacking python3-alabaster (0.7.16-0.1) ... 99s Selecting previously unselected package python3-roman. 99s Preparing to unpack .../084-python3-roman_5.0-1_all.deb ... 99s Unpacking python3-roman (5.0-1) ... 99s Selecting previously unselected package python3-docutils. 99s Preparing to unpack .../085-python3-docutils_0.21.2+dfsg-2_all.deb ... 99s Unpacking python3-docutils (0.21.2+dfsg-2) ... 99s Selecting previously unselected package python3-imagesize. 99s Preparing to unpack .../086-python3-imagesize_1.4.1-1_all.deb ... 99s Unpacking python3-imagesize (1.4.1-1) ... 99s Selecting previously unselected package python3-snowballstemmer. 99s Preparing to unpack .../087-python3-snowballstemmer_2.2.0-4build1_all.deb ... 99s Unpacking python3-snowballstemmer (2.2.0-4build1) ... 99s Selecting previously unselected package python3-sphinx. 99s Preparing to unpack .../088-python3-sphinx_8.2.3-1ubuntu2_all.deb ... 99s Unpacking python3-sphinx (8.2.3-1ubuntu2) ... 99s Selecting previously unselected package python3-sphinx-copybutton. 99s Preparing to unpack .../089-python3-sphinx-copybutton_0.5.2-2_all.deb ... 99s Unpacking python3-sphinx-copybutton (0.5.2-2) ... 100s Selecting previously unselected package python3-soupsieve. 100s Preparing to unpack .../090-python3-soupsieve_2.7-1_all.deb ... 100s Unpacking python3-soupsieve (2.7-1) ... 100s Selecting previously unselected package python3-bs4. 100s Preparing to unpack .../091-python3-bs4_4.13.4-3_all.deb ... 100s Unpacking python3-bs4 (4.13.4-3) ... 100s Selecting previously unselected package python3-pydata-sphinx-theme. 100s Preparing to unpack .../092-python3-pydata-sphinx-theme_0.16.1+dfsg-3_all.deb ... 100s Unpacking python3-pydata-sphinx-theme (0.16.1+dfsg-3) ... 100s Selecting previously unselected package python3-donfig. 100s Preparing to unpack .../093-python3-donfig_0.8.1+dfsg-3_all.deb ... 100s Unpacking python3-donfig (0.8.1+dfsg-3) ... 100s Selecting previously unselected package python3-numcodecs. 100s Preparing to unpack .../094-python3-numcodecs_0.16.0+ds-1_arm64.deb ... 100s Unpacking python3-numcodecs (0.16.0+ds-1) ... 100s Selecting previously unselected package python3-zarr. 100s Preparing to unpack .../095-python3-zarr_3.0.6-2_all.deb ... 100s Unpacking python3-zarr (3.0.6-2) ... 100s Selecting previously unselected package python3-anndata. 100s Preparing to unpack .../096-python3-anndata_0.12.0~rc1-1_all.deb ... 100s Unpacking python3-anndata (0.12.0~rc1-1) ... 100s Selecting previously unselected package python3-fsspec. 100s Preparing to unpack .../097-python3-fsspec_2025.3.0-1_all.deb ... 100s Unpacking python3-fsspec (2025.3.0-1) ... 100s Selecting previously unselected package python3-awkward. 100s Preparing to unpack .../098-python3-awkward_2.6.5-1build1_arm64.deb ... 100s Unpacking python3-awkward (2.6.5-1build1) ... 100s Selecting previously unselected package python3-boltons. 100s Preparing to unpack .../099-python3-boltons_25.0.0-1_all.deb ... 100s Unpacking python3-boltons (25.0.0-1) ... 100s Selecting previously unselected package python3-brotli. 100s Preparing to unpack .../100-python3-brotli_1.1.0-2build4_arm64.deb ... 100s Unpacking python3-brotli (1.1.0-2build4) ... 100s Selecting previously unselected package python3-click. 100s Preparing to unpack .../101-python3-click_8.2.0+0.really.8.1.8-1_all.deb ... 100s Unpacking python3-click (8.2.0+0.really.8.1.8-1) ... 100s Selecting previously unselected package python3-cloudpickle. 100s Preparing to unpack .../102-python3-cloudpickle_3.1.1-1_all.deb ... 100s Unpacking python3-cloudpickle (3.1.1-1) ... 100s Selecting previously unselected package python3-contourpy. 100s Preparing to unpack .../103-python3-contourpy_1.3.1-1build1_arm64.deb ... 100s Unpacking python3-contourpy (1.3.1-1build1) ... 100s Selecting previously unselected package python3-coverage. 100s Preparing to unpack .../104-python3-coverage_7.8.2+dfsg1-1_arm64.deb ... 100s Unpacking python3-coverage (7.8.2+dfsg1-1) ... 100s Selecting previously unselected package python3-cycler. 100s Preparing to unpack .../105-python3-cycler_0.12.1-1_all.deb ... 100s Unpacking python3-cycler (0.12.1-1) ... 100s Selecting previously unselected package python3-toolz. 100s Preparing to unpack .../106-python3-toolz_1.0.0-2_all.deb ... 100s Unpacking python3-toolz (1.0.0-2) ... 100s Selecting previously unselected package python3-locket. 101s Preparing to unpack .../107-python3-locket_1.0.0-2_all.deb ... 101s Unpacking python3-locket (1.0.0-2) ... 101s Selecting previously unselected package python3-partd. 101s Preparing to unpack .../108-python3-partd_1.4.2-1_all.deb ... 101s Unpacking python3-partd (1.4.2-1) ... 101s Selecting previously unselected package python3-dask. 101s Preparing to unpack .../109-python3-dask_2024.12.1+dfsg-2_all.deb ... 101s Unpacking python3-dask (2024.12.1+dfsg-2) ... 101s Selecting previously unselected package python3-msgpack. 101s Preparing to unpack .../110-python3-msgpack_1.0.3-3build4_arm64.deb ... 101s Unpacking python3-msgpack (1.0.3-3build4) ... 101s Selecting previously unselected package python3-psutil. 101s Preparing to unpack .../111-python3-psutil_5.9.8-2build3_arm64.deb ... 101s Unpacking python3-psutil (5.9.8-2build3) ... 101s Selecting previously unselected package python3-sortedcontainers. 101s Preparing to unpack .../112-python3-sortedcontainers_2.4.0-2_all.deb ... 101s Unpacking python3-sortedcontainers (2.4.0-2) ... 101s Selecting previously unselected package python3-tblib. 101s Preparing to unpack .../113-python3-tblib_3.1.0-1_all.deb ... 101s Unpacking python3-tblib (3.1.0-1) ... 101s Selecting previously unselected package python3-tornado. 101s Preparing to unpack .../114-python3-tornado_6.4.2-3_arm64.deb ... 101s Unpacking python3-tornado (6.4.2-3) ... 101s Selecting previously unselected package python3-zict. 101s Preparing to unpack .../115-python3-zict_3.0.0-2ubuntu1_all.deb ... 101s Unpacking python3-zict (3.0.0-2ubuntu1) ... 101s Selecting previously unselected package python3-distributed. 101s Preparing to unpack .../116-python3-distributed_2024.12.1+ds-1_all.deb ... 101s Unpacking python3-distributed (2024.12.1+ds-1) ... 101s Selecting previously unselected package python3-et-xmlfile. 101s Preparing to unpack .../117-python3-et-xmlfile_2.0.0-1_all.deb ... 101s Unpacking python3-et-xmlfile (2.0.0-1) ... 101s Selecting previously unselected package python3-execnet. 101s Preparing to unpack .../118-python3-execnet_2.1.1-1_all.deb ... 101s Unpacking python3-execnet (2.1.1-1) ... 101s Selecting previously unselected package python3-filelock. 101s Preparing to unpack .../119-python3-filelock_3.18.0-1_all.deb ... 101s Unpacking python3-filelock (3.18.0-1) ... 101s Selecting previously unselected package python3-platformdirs. 101s Preparing to unpack .../120-python3-platformdirs_4.3.7-1_all.deb ... 101s Unpacking python3-platformdirs (4.3.7-1) ... 101s Selecting previously unselected package python3-fs. 101s Preparing to unpack .../121-python3-fs_2.4.16-7_all.deb ... 101s Unpacking python3-fs (2.4.16-7) ... 101s Selecting previously unselected package python3-lxml:arm64. 101s Preparing to unpack .../122-python3-lxml_5.4.0-1build1_arm64.deb ... 101s Unpacking python3-lxml:arm64 (5.4.0-1build1) ... 101s Selecting previously unselected package python3-lz4. 101s Preparing to unpack .../123-python3-lz4_4.4.0+dfsg-2_arm64.deb ... 101s Unpacking python3-lz4 (4.4.0+dfsg-2) ... 101s Selecting previously unselected package python3-mpmath. 101s Preparing to unpack .../124-python3-mpmath_1.3.0-1_all.deb ... 101s Unpacking python3-mpmath (1.3.0-1) ... 101s Selecting previously unselected package python3-sympy. 102s Preparing to unpack .../125-python3-sympy_1.13.3-5_all.deb ... 102s Unpacking python3-sympy (1.13.3-5) ... 102s Selecting previously unselected package python3-ufolib2. 102s Preparing to unpack .../126-python3-ufolib2_0.17.1+dfsg1-1_all.deb ... 102s Unpacking python3-ufolib2 (0.17.1+dfsg1-1) ... 102s Selecting previously unselected package unicode-data. 102s Preparing to unpack .../127-unicode-data_15.1.0-1_all.deb ... 102s Unpacking unicode-data (15.1.0-1) ... 102s Selecting previously unselected package python3-fonttools. 102s Preparing to unpack .../128-python3-fonttools_4.55.3-2build1_arm64.deb ... 102s Unpacking python3-fonttools (4.55.3-2build1) ... 102s Selecting previously unselected package python3-iniconfig. 102s Preparing to unpack .../129-python3-iniconfig_1.1.1-2_all.deb ... 102s Unpacking python3-iniconfig (1.1.1-2) ... 102s Selecting previously unselected package python3-joblib. 102s Preparing to unpack .../130-python3-joblib_1.4.2-4_all.deb ... 102s Unpacking python3-joblib (1.4.2-4) ... 102s Selecting previously unselected package python3-kiwisolver. 102s Preparing to unpack .../131-python3-kiwisolver_1.4.7-3build1_arm64.deb ... 102s Unpacking python3-kiwisolver (1.4.7-3build1) ... 102s Selecting previously unselected package python3-llvmlite. 102s Preparing to unpack .../132-python3-llvmlite_0.44.0-1_arm64.deb ... 102s Unpacking python3-llvmlite (0.44.0-1) ... 102s Selecting previously unselected package libopenjp2-7:arm64. 102s Preparing to unpack .../133-libopenjp2-7_2.5.3-2_arm64.deb ... 102s Unpacking libopenjp2-7:arm64 (2.5.3-2) ... 102s Selecting previously unselected package python3-pil:arm64. 102s Preparing to unpack .../134-python3-pil_11.1.0-5build1_arm64.deb ... 102s Unpacking python3-pil:arm64 (11.1.0-5build1) ... 103s Selecting previously unselected package python3.13-tk. 103s Preparing to unpack .../135-python3.13-tk_3.13.5-2_arm64.deb ... 103s Unpacking python3.13-tk (3.13.5-2) ... 103s Selecting previously unselected package python3-tk:arm64. 103s Preparing to unpack .../136-python3-tk_3.13.4-1_arm64.deb ... 103s Unpacking python3-tk:arm64 (3.13.4-1) ... 103s Selecting previously unselected package python3-pil.imagetk:arm64. 103s Preparing to unpack .../137-python3-pil.imagetk_11.1.0-5build1_arm64.deb ... 103s Unpacking python3-pil.imagetk:arm64 (11.1.0-5build1) ... 103s Selecting previously unselected package python3-matplotlib. 103s Preparing to unpack .../138-python3-matplotlib_3.10.1+dfsg1-4_arm64.deb ... 103s Unpacking python3-matplotlib (3.10.1+dfsg1-4) ... 103s Selecting previously unselected package python3-numba. 103s Preparing to unpack .../139-python3-numba_0.61.2+dfsg-1_arm64.deb ... 103s Unpacking python3-numba (0.61.2+dfsg-1) ... 103s Selecting previously unselected package python3-openpyxl. 103s Preparing to unpack .../140-python3-openpyxl_3.1.5+dfsg-2_all.deb ... 103s Unpacking python3-openpyxl (3.1.5+dfsg-2) ... 103s Selecting previously unselected package python3-pluggy. 103s Preparing to unpack .../141-python3-pluggy_1.5.0-1_all.deb ... 103s Unpacking python3-pluggy (1.5.0-1) ... 103s Selecting previously unselected package python3-pytest. 103s Preparing to unpack .../142-python3-pytest_8.3.5-2_all.deb ... 103s Unpacking python3-pytest (8.3.5-2) ... 103s Selecting previously unselected package libjs-jquery-hotkeys. 103s Preparing to unpack .../143-libjs-jquery-hotkeys_0.2.0-1_all.deb ... 103s Unpacking libjs-jquery-hotkeys (0.2.0-1) ... 103s Selecting previously unselected package libjs-jquery-isonscreen. 103s Preparing to unpack .../144-libjs-jquery-isonscreen_1.2.0-1.1_all.deb ... 103s Unpacking libjs-jquery-isonscreen (1.2.0-1.1) ... 103s Selecting previously unselected package python3-pytest-cov. 103s Preparing to unpack .../145-python3-pytest-cov_5.0.0-1_all.deb ... 103s Unpacking python3-pytest-cov (5.0.0-1) ... 103s Selecting previously unselected package python3-pytest-mock. 103s Preparing to unpack .../146-python3-pytest-mock_3.14.0-3_all.deb ... 103s Unpacking python3-pytest-mock (3.14.0-3) ... 104s Selecting previously unselected package python3-pytest-xdist. 104s Preparing to unpack .../147-python3-pytest-xdist_3.6.1-1_all.deb ... 104s Unpacking python3-pytest-xdist (3.6.1-1) ... 104s Selecting previously unselected package python3-threadpoolctl. 104s Preparing to unpack .../148-python3-threadpoolctl_3.1.0-1_all.deb ... 104s Unpacking python3-threadpoolctl (3.1.0-1) ... 104s Selecting previously unselected package python3-sklearn-lib:arm64. 104s Preparing to unpack .../149-python3-sklearn-lib_1.4.2+dfsg-8_arm64.deb ... 104s Unpacking python3-sklearn-lib:arm64 (1.4.2+dfsg-8) ... 104s Selecting previously unselected package python3-sklearn. 104s Preparing to unpack .../150-python3-sklearn_1.4.2+dfsg-8_all.deb ... 104s Unpacking python3-sklearn (1.4.2+dfsg-8) ... 104s Selecting previously unselected package python3-xarray. 104s Preparing to unpack .../151-python3-xarray_2025.03.1-8_all.deb ... 104s Unpacking python3-xarray (2025.03.1-8) ... 104s Selecting previously unselected package python3-xlrd. 104s Preparing to unpack .../152-python3-xlrd_2.0.1-2_all.deb ... 104s Unpacking python3-xlrd (2.0.1-2) ... 104s Selecting previously unselected package quilt. 104s Preparing to unpack .../153-quilt_0.68-1_all.deb ... 104s Unpacking quilt (0.68-1) ... 104s Setting up libgraphite2-3:arm64 (1.3.14-2ubuntu1) ... 104s Setting up liblcms2-2:arm64 (2.16-2) ... 104s Setting up python3-iniconfig (1.1.1-2) ... 104s Setting up libtbbmalloc2:arm64 (2022.1.0-1) ... 104s Setting up libllvm19 (1:19.1.7-5ubuntu2) ... 104s Setting up python3-tornado (6.4.2-3) ... 105s Setting up libsharpyuv0:arm64 (1.5.0-0.1) ... 105s Setting up python3-filelock (3.18.0-1) ... 105s Setting up liblerc4:arm64 (4.0.0+ds-5ubuntu1) ... 105s Setting up python3-tblib (3.1.0-1) ... 105s Setting up libxrender1:arm64 (1:0.9.12-1) ... 105s Setting up python3-joblib (1.4.2-4) ... 105s Setting up python3-lz4 (4.4.0+dfsg-2) ... 105s Setting up python3-boltons (25.0.0-1) ... 105s Setting up python3-defusedxml (0.7.1-3) ... 106s Setting up python3-alabaster (0.7.16-0.1) ... 106s Setting up fonts-lyx (2.4.3-1) ... 106s Setting up python3-fsspec (2025.3.0-1) ... 106s Setting up python3-threadpoolctl (3.1.0-1) ... 106s Setting up x11-common (1:7.7+24ubuntu1) ... 106s Setting up libdeflate0:arm64 (1.23-2) ... 106s Setting up python3-array-api-compat (1.11.2-1) ... 107s Setting up libqhull-r8.0:arm64 (2020.2-6build1) ... 107s Setting up python3-all (3.13.4-1) ... 107s Setting up python3-coverage (7.8.2+dfsg1-1) ... 107s Setting up python3-pytz (2025.2-3) ... 107s Setting up python3-sortedcontainers (2.4.0-2) ... 107s Setting up node-fortawesome-fontawesome-free (6.7.2+ds1-1) ... 107s Setting up libjs-jquery-throttle-debounce (1.1+dfsg.1-2) ... 107s Setting up libgomp1:arm64 (15.1.0-8ubuntu1) ... 107s Setting up python3-click (8.2.0+0.really.8.1.8-1) ... 107s Setting up libjbig0:arm64 (2.1-6.1ubuntu2) ... 107s Setting up libaec0:arm64 (1.1.3-1) ... 107s Setting up python3-platformdirs (4.3.7-1) ... 107s Setting up python3-psutil (5.9.8-2build3) ... 108s Setting up python3-natsort (8.0.2-2) ... 108s Setting up python3-cloudpickle (3.1.1-1) ... 108s Setting up libsnappy1v5:arm64 (1.2.2-1) ... 108s Setting up python3-fs (2.4.16-7) ... 108s Setting up unicode-data (15.1.0-1) ... 108s Setting up python3-roman (5.0-1) ... 108s Setting up python3-decorator (5.2.1-2) ... 108s Setting up libblas3:arm64 (3.12.1-2build1) ... 108s update-alternatives: using /usr/lib/aarch64-linux-gnu/blas/libblas.so.3 to provide /usr/lib/aarch64-linux-gnu/libblas.so.3 (libblas.so.3-aarch64-linux-gnu) in auto mode 108s Setting up python3-packaging (25.0-1) ... 108s Setting up libpfm4:arm64 (4.13.0+git99-gc5587f9-1) ... 108s Setting up python3-accessible-pygments (0.0.5-2) ... 109s Setting up python3-snowballstemmer (2.2.0-4build1) ... 109s Setting up python3-brotli (1.1.0-2build4) ... 109s Setting up liblzf1:arm64 (3.6-4) ... 109s Setting up python3-cycler (0.12.1-1) ... 109s Setting up diffstat (1.68-0ubuntu1) ... 109s Setting up libimagequant0:arm64 (2.18.0-1build1) ... 109s Setting up fonts-dejavu-mono (2.37-8) ... 109s Setting up python3-kiwisolver (1.4.7-3build1) ... 109s Setting up libhwloc15:arm64 (2.12.0-4build1) ... 109s Setting up python3-numpy-dev:arm64 (1:2.2.4+ds-1ubuntu1) ... 109s Setting up libtcl8.6:arm64 (8.6.16+dfsg-1) ... 109s Setting up fonts-dejavu-core (2.37-8) ... 109s Setting up libjpeg-turbo8:arm64 (2.1.5-3ubuntu2) ... 109s Setting up python3-crc32c (2.7.1-1) ... 109s Setting up libgfortran5:arm64 (15.1.0-8ubuntu1) ... 109s Setting up python3-pluggy (1.5.0-1) ... 109s Setting up libwebp7:arm64 (1.5.0-0.1) ... 109s Setting up libjson-perl (4.10000-1) ... 109s Setting up libxslt1.1:arm64 (1.1.43-0exp1) ... 109s Setting up libblosc1:arm64 (1.21.5+ds-1build1) ... 109s Setting up python3-et-xmlfile (2.0.0-1) ... 110s Setting up python3-xlrd (2.0.1-2) ... 110s Setting up libopenjp2-7:arm64 (2.5.3-2) ... 110s Setting up python3-toolz (1.0.0-2) ... 110s Setting up libharfbuzz0b:arm64 (10.2.0-1) ... 110s Setting up python3-dateutil (2.9.0-4) ... 110s Setting up sgml-base (1.31+nmu1) ... 110s Setting up python3-msgpack (1.0.3-3build4) ... 110s Setting up llvm-19-linker-tools (1:19.1.7-5ubuntu2) ... 110s Setting up python3-donfig (0.8.1+dfsg-3) ... 110s Setting up libxss1:arm64 (1:1.2.3-1build3) ... 110s Setting up libjs-jquery (3.6.1+dfsg+~3.5.14-1) ... 110s Setting up python3-mpmath (1.3.0-1) ... 111s Setting up libjs-jquery-hotkeys (0.2.0-1) ... 111s Setting up llvm-19-runtime (1:19.1.7-5ubuntu2) ... 111s Setting up python3-execnet (2.1.1-1) ... 111s Setting up python3-zict (3.0.0-2ubuntu1) ... 111s Setting up python-matplotlib-data (3.10.1+dfsg1-4) ... 111s Setting up libwebpmux3:arm64 (1.5.0-0.1) ... 111s Setting up python3-locket (1.0.0-2) ... 111s Setting up python3-soupsieve (2.7-1) ... 111s Setting up libsz2:arm64 (1.1.3-1) ... 111s Setting up libjs-underscore (1.13.4~dfsg+~1.11.4-3) ... 111s Setting up python3-imagesize (1.4.1-1) ... 111s Setting up libjpeg8:arm64 (8c-2ubuntu11) ... 111s Setting up python3-partd (1.4.2-1) ... 112s Setting up python3-sympy (1.13.3-5) ... 118s Setting up liblapack3:arm64 (3.12.1-2build1) ... 118s update-alternatives: using /usr/lib/aarch64-linux-gnu/lapack/liblapack.so.3 to provide /usr/lib/aarch64-linux-gnu/liblapack.so.3 (liblapack.so.3-aarch64-linux-gnu) in auto mode 118s Setting up gettext (0.23.1-2build1) ... 118s Setting up fontconfig-config (2.15.0-2.2ubuntu1) ... 118s Setting up python3-pytest (8.3.5-2) ... 118s Setting up libwebpdemux2:arm64 (1.5.0-0.1) ... 118s Setting up python3-dask (2024.12.1+dfsg-2) ... 119s Setting up quilt (0.68-1) ... 119s Setting up python3-bs4 (4.13.4-3) ... 120s Setting up libtbbbind-2-5:arm64 (2022.1.0-1) ... 120s Setting up python3-distributed (2024.12.1+ds-1) ... 121s Setting up libjs-jquery-ui (1.13.2+dfsg-1) ... 121s Setting up libjs-jquery-metadata (12-4) ... 121s Setting up libraqm0:arm64 (0.10.2-1) ... 121s Setting up libjs-jquery-isonscreen (1.2.0-1.1) ... 121s Setting up python3-numpy (1:2.2.4+ds-1ubuntu1) ... 123s Setting up libjs-sphinxdoc (8.2.3-1ubuntu2) ... 123s Setting up libjs-jquery-tablesorter (1:2.31.3+dfsg1-4) ... 123s Setting up libhdf5-310:arm64 (1.14.5+repack-3build1) ... 123s Setting up python3-pytest-mock (3.14.0-3) ... 123s Setting up python3-lxml:arm64 (5.4.0-1build1) ... 123s Setting up libtiff6:arm64 (4.7.0-3ubuntu1) ... 123s Setting up xml-core (0.19) ... 123s Setting up python3-awkward (2.6.5-1build1) ... 124s Setting up python3-contourpy (1.3.1-1build1) ... 124s Setting up llvm-19 (1:19.1.7-5ubuntu2) ... 124s Setting up libfontconfig1:arm64 (2.15.0-2.2ubuntu1) ... 124s Setting up libhdf5-hl-310:arm64 (1.14.5+repack-3build1) ... 124s Setting up libxft2:arm64 (2.3.6-1build1) ... 124s Setting up python3-scipy (1.15.3-1) ... 128s Setting up python3-pytest-xdist (3.6.1-1) ... 128s Setting up libtk8.6:arm64 (8.6.16-1) ... 128s Setting up python3-pandas-lib:arm64 (2.2.3+dfsg-9) ... 128s Setting up python3-sklearn-lib:arm64 (1.4.2+dfsg-8) ... 128s Setting up python3-h5py-serial (3.13.0-1ubuntu1) ... 128s Setting up python3-pytest-cov (5.0.0-1) ... 128s Setting up libtbb12:arm64 (2022.1.0-1) ... 128s Setting up python3.13-tk (3.13.5-2) ... 128s Setting up python3-pil:arm64 (11.1.0-5build1) ... 129s Setting up python3-llvmlite (0.44.0-1) ... 129s Setting up python3-pandas (2.2.3+dfsg-9) ... 133s Setting up python3-openpyxl (3.1.5+dfsg-2) ... 134s Setting up sphinx-common (8.2.3-1ubuntu2) ... 134s Setting up python3-h5py (3.13.0-1ubuntu1) ... 134s Setting up python3-sklearn (1.4.2+dfsg-8) ... 136s Setting up tk8.6-blt2.5 (2.5.3+dfsg-8) ... 136s Setting up blt (2.5.3+dfsg-8) ... 136s Setting up python3-xarray (2025.03.1-8) ... 137s Setting up python3-tk:arm64 (3.13.4-1) ... 137s Setting up python3-numba (0.61.2+dfsg-1) ... 137s update-alternatives: using /usr/share/python3-numba/numba to provide /usr/bin/numba (numba) in auto mode 139s Setting up python3-pil.imagetk:arm64 (11.1.0-5build1) ... 140s Setting up python3-fonttools (4.55.3-2build1) ... 140s Setting up python3-ufolib2 (0.17.1+dfsg1-1) ... 141s Setting up python3-matplotlib (3.10.1+dfsg1-4) ... 142s Processing triggers for libc-bin (2.41-6ubuntu2) ... 142s Processing triggers for systemd (257.6-1ubuntu1) ... 142s Processing triggers for man-db (2.13.1-1) ... 143s Processing triggers for install-info (7.1.1-1) ... 143s Processing triggers for sgml-base (1.31+nmu1) ... 143s Setting up docutils-common (0.21.2+dfsg-2) ... 143s Processing triggers for sgml-base (1.31+nmu1) ... 143s Setting up python3-docutils (0.21.2+dfsg-2) ... 144s Setting up python3-sphinx (8.2.3-1ubuntu2) ... 145s Setting up python3-sphinx-copybutton (0.5.2-2) ... 145s Setting up python3-pydata-sphinx-theme (0.16.1+dfsg-3) ... 145s Setting up python3-numcodecs (0.16.0+ds-1) ... 145s Setting up python3-zarr (3.0.6-2) ... 145s Setting up python3-anndata (0.12.0~rc1-1) ... 146s autopkgtest [17:26:05]: test run-unit-test: [----------------------- 147s ++ pwd 147s + CUR_DIR=/tmp/autopkgtest.Wv14x9/build.cmw/src 147s + QUILT_PATCHES=debian/patches 147s + quilt push -a 147s File series fully applied, ends at patch debian/patches/skip_awkward.patch 147s + true 147s + '[' /tmp/autopkgtest.Wv14x9/autopkgtest_tmp = '' ']' 147s + cp -a tests/ /tmp/autopkgtest.Wv14x9/autopkgtest_tmp/ 147s + echo 147s + cd /tmp/autopkgtest.Wv14x9/autopkgtest_tmp 147s ++ py3versions --supported 147s + for py in $(py3versions --supported) 147s + echo 'Testing with python3.13:' 147s + python3.13 -m pytest 147s Testing with python3.13: 151s ============================= test session starts ============================== 151s platform linux -- Python 3.13.5, pytest-8.3.5, pluggy-1.5.0 151s rootdir: /tmp/autopkgtest.Wv14x9/autopkgtest_tmp 151s plugins: mock-3.14.0, xdist-3.6.1, typeguard-4.4.2, cov-5.0.0 151s collected 6026 items / 3 skipped 151s 175s tests/lazy/test_concat.py .............................................. [ 0%] 214s ................................................. [ 1%] 217s tests/lazy/test_read.py .... [ 1%] 239s tests/lazy/test_concat.py ........................ [ 2%] 242s tests/lazy/test_read.py .... [ 2%] 260s tests/lazy/test_concat.py ........................ [ 2%] 262s tests/lazy/test_read.py .... [ 2%] 279s tests/lazy/test_concat.py ........ssss........ssss [ 2%] 281s tests/lazy/test_read.py .... [ 3%] 299s tests/lazy/test_concat.py ........ssss........ssss [ 3%] 301s tests/lazy/test_read.py .... [ 3%] 319s tests/lazy/test_concat.py ........ssss........ssss [ 3%] 322s tests/lazy/test_read.py .... [ 3%] 340s tests/lazy/test_concat.py ........ssss........ssss [ 4%] 343s tests/lazy/test_read.py .... [ 4%] 362s tests/lazy/test_concat.py ........................ [ 4%] 365s tests/lazy/test_read.py .... [ 4%] 386s tests/lazy/test_concat.py ........................ [ 5%] 401s tests/lazy/test_read.py ................................... [ 5%] 418s tests/lazy/test_concat.py ........ssss........ssss [ 6%] 421s tests/lazy/test_read.py .... [ 6%] 441s tests/lazy/test_concat.py ........ssss........ssss [ 6%] 444s tests/lazy/test_read.py .... [ 6%] 463s tests/lazy/test_concat.py ........................ [ 7%] 466s tests/lazy/test_read.py .... [ 7%] 488s tests/lazy/test_concat.py ........................ [ 7%] 506s tests/lazy/test_read.py ................................... [ 8%] 528s tests/lazy/test_concat.py ........ssss........ssss [ 8%] 531s tests/lazy/test_read.py .... [ 8%] 552s tests/lazy/test_concat.py ........ssss........ssss [ 9%] 555s tests/lazy/test_read.py .... [ 9%] 574s tests/lazy/test_concat.py ........................ [ 9%] 599s tests/lazy/test_read.py ................................................ [ 10%] 609s .................. [ 10%] 633s tests/lazy/test_concat.py .............................................. [ 11%] 640s ........ [ 11%] 640s tests/lazy/test_write.py ................ [ 11%] 640s tests/test_anncollection.py ..... [ 11%] 640s tests/test_annot.py ...... [ 12%] 640s tests/test_backed_dense.py ........................... [ 12%] 652s tests/test_backed_hdf5.py ...........................x........x..x..x..x [ 13%] 700s ..x..x..x..............................................................x [ 14%] 743s ........x..x..x..x..x..x..x..x........x..x..x..x..x..x..x..x........x..x [ 15%] 792s ..x..x..x..x..x..x........x..x..x..x..x..x..x..x........x..x..x..x..x..x [ 16%] 839s ..x..x........x..x..x..x..x..x..x..x........x..x..x..x..x..x..x......... [ 18%] 840s . [ 18%] 855s tests/test_backed_sparse.py ............................................ [ 18%] 882s ........................................................................ [ 19%] 908s ........................................................................ [ 21%] 936s ........................................................................ [ 22%] 961s ........................................................................ [ 23%] 968s ........................................................................ [ 24%] 971s ........................................................................ [ 25%] 974s .................................................ss [ 26%] 975s tests/test_base.py ..................................................... [ 27%] 975s ......................... [ 28%] 983s tests/test_concatenate.py ...............FFFFFF..............FFFFFF..... [ 28%] 987s ..........FFFFFF......................FFFFFF.....................FFFFFFF [ 30%] 992s FF......................FFF.......FFF.......FFF.......FFF.......FFF..... [ 31%] 993s ..FFF................................................................... [ 32%] 994s ........................................................................ [ 33%] 996s ........................................................................ [ 34%] 1003s ........................................................................ [ 35%] 1014s ........................................................................ [ 37%] 1024s ............................FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF [ 38%] 1032s FFFFFFFFFFFFFFFF........................................................ [ 39%] 1035s .....x.x................FFF.......FFF.......FFF.......FFF.......FFF..... [ 40%] 1036s ...s.......FFF.......... [ 41%] 1274s tests/test_concatenate_disk.py ......................................... [ 41%] 1548s ............................................................... [ 42%] 1587s tests/test_dask.py ..................................................... [ 43%] 1594s ....................F... [ 44%] 1594s tests/test_deprecations.py .................... [ 44%] 1594s tests/test_extensions.py .................... [ 44%] 1594s tests/test_get_vector.py . [ 44%] 1597s tests/test_helpers.py .............................FFFFFFFFFF.......FFFF [ 45%] 1598s FFFFFFFFFFF [ 45%] 1601s tests/test_inplace_subset.py ........................................... [ 46%] 1606s ........................................................................ [ 47%] 1608s ......................... [ 48%] 1608s tests/test_io_backwards_compat.py ..... [ 48%] 1623s tests/test_io_conversion.py ................... [ 48%] 1640s tests/test_io_dispatched.py ..... [ 48%] 1643s tests/test_io_elementwise.py ........................................... [ 49%] 1651s ............................................FFFFFFFFFFFFFFFFFFFFFFFF.... [ 50%] 1826s ........................................................................ [ 51%] 1860s ........................................................................ [ 52%] 1870s ................. [ 53%] 1870s tests/test_io_partial.py ......sss [ 53%] 1871s tests/test_io_utils.py .......... [ 53%] 1871s tests/test_io_warnings.py s. [ 53%] 1871s tests/test_layers.py .......s... [ 53%] 1871s tests/test_obsmvarm.py ....... [ 53%] 1871s tests/test_obspvarp.py ......... [ 54%] 1872s tests/test_raw.py ......xx.... [ 54%] 1902s tests/test_readwrite.py ...............FFFF....FFFF......FF............. [ 55%] 1921s ...........sssssssss........x....................................sssssss [ 56%] 1951s .................................s [ 56%] 1951s tests/test_repr.py ......... [ 56%] 1951s tests/test_settings.py .................. [ 57%] 1952s tests/test_structured_arrays.py ... [ 57%] 1952s tests/test_transpose.py .............. [ 57%] 1952s tests/test_uns.py . [ 57%] 1952s tests/test_utils.py .. [ 57%] 1953s tests/test_views.py ........................FFFFFFFFF................... [ 58%] 1953s ........................................................................ [ 59%] 1954s ........................................................................ [ 60%] 1956s ....................................................FFFFFFFFFFFFFFFFFFFF [ 62%] 1960s FFFFFFFFFF.............................................................. [ 63%] 1964s ........................................................................ [ 64%] 1969s ........................................................................ [ 65%] 1974s ........................................................................ [ 66%] 1979s ........................................................................ [ 68%] 1984s ........................................................................ [ 69%] 1989s ........................................................................ [ 70%] 1994s ........................................................................ [ 71%] 1999s ........................................................................ [ 72%] 2004s ........................................................................ [ 73%] 2010s ........................................................................ [ 75%] 2015s ........................................................................ [ 76%] 2021s ........................................................................ [ 77%] 2031s ...............xxxxxxxxxx............................................... [ 78%] 2041s ...........................................xxxxxxxxxx................... [ 79%] 2053s .......................................................................x [ 81%] 2064s xxxxxxxxx............................................................... [ 82%] 2076s ...........................xxxxxxxxxx................................... [ 83%] 2087s .......................................................xxxxxxxxxx....... [ 84%] 2100s ........................................................................ [ 85%] 2113s ...........xxxxxxxxxx................................................... [ 87%] 2127s .......................................xxxxxxxxxx....................... [ 88%] 2140s ...............................................FFFFFFFFFFFFFFFFFFFFFFFFF [ 89%] 2147s FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF [ 90%] 2153s FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF [ 91%] 2160s FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF [ 93%] 2165s FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF............. [ 94%] 2168s ........................................................................ [ 95%] 2171s .......................FFF.............................................. [ 96%] 2176s .......................................................FFFFFFFFFFFFFFFFF [ 97%] 2176s FFFF...... [ 98%] 2178s tests/test_x.py ........................................................ [ 98%] 2183s ........................x....x....x....x...................... [100%] 2183s 2183s =================================== FAILURES =================================== 2183s _______ test_concatenate_roundtrip[inner-cupy_array-concat_func0-False] ________ 2183s 2183s join_type = 'inner' 2183s array_type = functools.partial(, typ=) 2183s concat_func = functools.partial(, merge='unique') 2183s backwards_compat = False 2183s 2183s @mark_legacy_concatenate 2183s @pytest.mark.parametrize( 2183s ("concat_func", "backwards_compat"), 2183s [ 2183s (partial(concat, merge="unique"), False), 2183s (lambda x, **kwargs: x[0].concatenate(x[1:], **kwargs), True), 2183s ], 2183s ) 2183s def test_concatenate_roundtrip(join_type, array_type, concat_func, backwards_compat): 2183s > adata = gen_adata((100, 10), X_type=array_type, **GEN_ADATA_DASK_ARGS) 2183s 2183s tests/test_concatenate.py:185: 2183s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 2183s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:346: in gen_adata 2183s X = X_type(random_state.binomial(100, 0.005, (M, N)).astype(X_dtype)) 2183s /usr/lib/python3.13/functools.py:934: in wrapper 2183s return dispatch(args[0].__class__)(*args, **kw) 2183s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 2183s 2183s val = array([[0., 0., 0., 0., 1., 0., 0., 0., 0., 0.], 2183s [1., 1., 1., 0., 1., 1., 1., 1., 1., 0.], 2183s [0., 1., 0., ... 0.], 2183s [1., 0., 1., 1., 0., 0., 0., 0., 1., 0.], 2183s [0., 0., 1., 1., 0., 0., 0., 0., 0., 0.]], dtype=float32) 2183s typ = 2183s 2183s @singledispatch 2183s def as_cupy(val, typ=None): 2183s """ 2183s Rough conversion function 2183s 2183s Will try to infer target type from input type if not specified. 2183s """ 2183s if typ is None: 2183s typ = resolve_cupy_type(val) 2183s 2183s if issubclass(typ, CupyArray): 2183s > import cupy as cp 2183s E ModuleNotFoundError: No module named 'cupy' 2183s 2183s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:1010: ModuleNotFoundError 2183s __________ test_concatenate_roundtrip[inner-cupy_array--True] __________ 2183s 2183s join_type = 'inner' 2183s array_type = functools.partial(, typ=) 2183s concat_func = at 0xf57c06c04860>, backwards_compat = True 2183s 2183s @mark_legacy_concatenate 2183s @pytest.mark.parametrize( 2183s ("concat_func", "backwards_compat"), 2183s [ 2183s (partial(concat, merge="unique"), False), 2183s (lambda x, **kwargs: x[0].concatenate(x[1:], **kwargs), True), 2183s ], 2183s ) 2183s def test_concatenate_roundtrip(join_type, array_type, concat_func, backwards_compat): 2183s > adata = gen_adata((100, 10), X_type=array_type, **GEN_ADATA_DASK_ARGS) 2183s 2183s tests/test_concatenate.py:185: 2183s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 2183s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:346: in gen_adata 2183s X = X_type(random_state.binomial(100, 0.005, (M, N)).astype(X_dtype)) 2183s /usr/lib/python3.13/functools.py:934: in wrapper 2183s return dispatch(args[0].__class__)(*args, **kw) 2183s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 2183s 2183s val = array([[0., 1., 0., 0., 1., 0., 0., 0., 0., 0.], 2183s [0., 1., 0., 0., 0., 0., 0., 2., 0., 0.], 2183s [1., 1., 0., ... 1.], 2183s [0., 0., 0., 1., 1., 0., 1., 1., 0., 1.], 2183s [0., 0., 0., 1., 0., 4., 0., 0., 0., 1.]], dtype=float32) 2183s typ = 2183s 2183s @singledispatch 2183s def as_cupy(val, typ=None): 2183s """ 2183s Rough conversion function 2183s 2183s Will try to infer target type from input type if not specified. 2183s """ 2183s if typ is None: 2183s typ = resolve_cupy_type(val) 2183s 2183s if issubclass(typ, CupyArray): 2183s > import cupy as cp 2183s E ModuleNotFoundError: No module named 'cupy' 2183s 2183s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:1010: ModuleNotFoundError 2183s ________ test_concatenate_roundtrip[inner-cupy_csr-concat_func0-False] _________ 2183s 2183s join_type = 'inner' 2183s array_type = functools.partial(, typ=) 2183s concat_func = functools.partial(, merge='unique') 2183s backwards_compat = False 2183s 2183s @mark_legacy_concatenate 2183s @pytest.mark.parametrize( 2183s ("concat_func", "backwards_compat"), 2183s [ 2183s (partial(concat, merge="unique"), False), 2183s (lambda x, **kwargs: x[0].concatenate(x[1:], **kwargs), True), 2183s ], 2183s ) 2183s def test_concatenate_roundtrip(join_type, array_type, concat_func, backwards_compat): 2183s > adata = gen_adata((100, 10), X_type=array_type, **GEN_ADATA_DASK_ARGS) 2183s 2183s tests/test_concatenate.py:185: 2183s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 2183s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:346: in gen_adata 2183s X = X_type(random_state.binomial(100, 0.005, (M, N)).astype(X_dtype)) 2183s /usr/lib/python3.13/functools.py:934: in wrapper 2183s return dispatch(args[0].__class__)(*args, **kw) 2183s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 2183s 2183s val = array([[1., 1., 0., 0., 1., 0., 0., 1., 1., 0.], 2183s [1., 0., 0., 0., 1., 0., 0., 1., 0., 0.], 2183s [0., 0., 0., ... 0.], 2183s [1., 0., 0., 0., 0., 0., 0., 1., 0., 2.], 2183s [0., 1., 0., 0., 0., 0., 1., 0., 1., 2.]], dtype=float32) 2183s typ = 2183s 2183s @singledispatch 2183s def as_cupy(val, typ=None): 2183s """ 2183s Rough conversion function 2183s 2183s Will try to infer target type from input type if not specified. 2183s """ 2183s if typ is None: 2183s typ = resolve_cupy_type(val) 2183s 2183s if issubclass(typ, CupyArray): 2183s import cupy as cp 2183s 2183s if isinstance(val, CSMatrix): 2183s val = val.toarray() 2183s return cp.array(val) 2183s elif issubclass(typ, CupyCSRMatrix): 2183s > import cupy as cp 2183s E ModuleNotFoundError: No module named 'cupy' 2183s 2183s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:1016: ModuleNotFoundError 2183s ___________ test_concatenate_roundtrip[inner-cupy_csr--True] ___________ 2183s 2183s join_type = 'inner' 2183s array_type = functools.partial(, typ=) 2183s concat_func = at 0xf57c06c04860>, backwards_compat = True 2183s 2183s @mark_legacy_concatenate 2183s @pytest.mark.parametrize( 2183s ("concat_func", "backwards_compat"), 2183s [ 2183s (partial(concat, merge="unique"), False), 2183s (lambda x, **kwargs: x[0].concatenate(x[1:], **kwargs), True), 2183s ], 2183s ) 2183s def test_concatenate_roundtrip(join_type, array_type, concat_func, backwards_compat): 2183s > adata = gen_adata((100, 10), X_type=array_type, **GEN_ADATA_DASK_ARGS) 2183s 2183s tests/test_concatenate.py:185: 2183s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 2183s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:346: in gen_adata 2183s X = X_type(random_state.binomial(100, 0.005, (M, N)).astype(X_dtype)) 2183s /usr/lib/python3.13/functools.py:934: in wrapper 2183s return dispatch(args[0].__class__)(*args, **kw) 2183s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 2183s 2183s val = array([[0., 1., 2., 0., 0., 2., 0., 1., 2., 0.], 2183s [0., 0., 1., 0., 0., 0., 0., 0., 0., 1.], 2183s [1., 0., 1., ... 0.], 2183s [1., 0., 0., 1., 0., 1., 0., 2., 0., 0.], 2183s [0., 1., 0., 0., 1., 1., 0., 0., 0., 0.]], dtype=float32) 2183s typ = 2183s 2183s @singledispatch 2183s def as_cupy(val, typ=None): 2183s """ 2183s Rough conversion function 2183s 2183s Will try to infer target type from input type if not specified. 2183s """ 2183s if typ is None: 2183s typ = resolve_cupy_type(val) 2183s 2183s if issubclass(typ, CupyArray): 2183s import cupy as cp 2183s 2183s if isinstance(val, CSMatrix): 2183s val = val.toarray() 2183s return cp.array(val) 2183s elif issubclass(typ, CupyCSRMatrix): 2183s > import cupy as cp 2183s E ModuleNotFoundError: No module named 'cupy' 2183s 2183s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:1016: ModuleNotFoundError 2183s ________ test_concatenate_roundtrip[inner-cupy_csc-concat_func0-False] _________ 2183s 2183s join_type = 'inner' 2183s array_type = functools.partial(, typ=) 2183s concat_func = functools.partial(, merge='unique') 2183s backwards_compat = False 2183s 2183s @mark_legacy_concatenate 2183s @pytest.mark.parametrize( 2183s ("concat_func", "backwards_compat"), 2183s [ 2183s (partial(concat, merge="unique"), False), 2183s (lambda x, **kwargs: x[0].concatenate(x[1:], **kwargs), True), 2183s ], 2183s ) 2183s def test_concatenate_roundtrip(join_type, array_type, concat_func, backwards_compat): 2183s > adata = gen_adata((100, 10), X_type=array_type, **GEN_ADATA_DASK_ARGS) 2183s 2183s tests/test_concatenate.py:185: 2183s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 2183s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:346: in gen_adata 2183s X = X_type(random_state.binomial(100, 0.005, (M, N)).astype(X_dtype)) 2183s /usr/lib/python3.13/functools.py:934: in wrapper 2183s return dispatch(args[0].__class__)(*args, **kw) 2183s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 2183s 2183s val = array([[1., 0., 1., 0., 2., 1., 0., 0., 3., 0.], 2183s [1., 1., 0., 0., 0., 1., 1., 0., 1., 0.], 2183s [2., 0., 0., ... 0.], 2183s [1., 1., 0., 1., 1., 1., 0., 0., 0., 0.], 2183s [2., 0., 1., 1., 0., 0., 0., 0., 1., 1.]], dtype=float32) 2183s typ = 2183s 2183s @singledispatch 2183s def as_cupy(val, typ=None): 2183s """ 2183s Rough conversion function 2183s 2183s Will try to infer target type from input type if not specified. 2183s """ 2183s if typ is None: 2183s typ = resolve_cupy_type(val) 2183s 2183s if issubclass(typ, CupyArray): 2183s import cupy as cp 2183s 2183s if isinstance(val, CSMatrix): 2183s val = val.toarray() 2183s return cp.array(val) 2183s elif issubclass(typ, CupyCSRMatrix): 2183s import cupy as cp 2183s import cupyx.scipy.sparse as cpsparse 2183s 2183s if isinstance(val, np.ndarray): 2183s return cpsparse.csr_matrix(cp.array(val)) 2183s else: 2183s return cpsparse.csr_matrix(val) 2183s elif issubclass(typ, CupyCSCMatrix): 2183s > import cupy as cp 2183s E ModuleNotFoundError: No module named 'cupy' 2183s 2183s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:1024: ModuleNotFoundError 2183s ___________ test_concatenate_roundtrip[inner-cupy_csc--True] ___________ 2183s 2183s join_type = 'inner' 2183s array_type = functools.partial(, typ=) 2183s concat_func = at 0xf57c06c04860>, backwards_compat = True 2183s 2183s @mark_legacy_concatenate 2183s @pytest.mark.parametrize( 2183s ("concat_func", "backwards_compat"), 2183s [ 2183s (partial(concat, merge="unique"), False), 2183s (lambda x, **kwargs: x[0].concatenate(x[1:], **kwargs), True), 2183s ], 2183s ) 2183s def test_concatenate_roundtrip(join_type, array_type, concat_func, backwards_compat): 2183s > adata = gen_adata((100, 10), X_type=array_type, **GEN_ADATA_DASK_ARGS) 2183s 2183s tests/test_concatenate.py:185: 2183s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 2183s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:346: in gen_adata 2183s X = X_type(random_state.binomial(100, 0.005, (M, N)).astype(X_dtype)) 2183s /usr/lib/python3.13/functools.py:934: in wrapper 2183s return dispatch(args[0].__class__)(*args, **kw) 2183s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 2183s 2183s val = array([[2., 1., 0., 0., 1., 1., 0., 0., 1., 0.], 2183s [1., 0., 0., 0., 0., 0., 1., 0., 1., 0.], 2183s [2., 0., 0., ... 0.], 2183s [0., 1., 0., 1., 1., 0., 2., 0., 3., 2.], 2183s [1., 0., 0., 0., 0., 1., 0., 1., 0., 0.]], dtype=float32) 2183s typ = 2183s 2183s @singledispatch 2183s def as_cupy(val, typ=None): 2183s """ 2183s Rough conversion function 2183s 2183s Will try to infer target type from input type if not specified. 2183s """ 2183s if typ is None: 2183s typ = resolve_cupy_type(val) 2183s 2183s if issubclass(typ, CupyArray): 2183s import cupy as cp 2183s 2183s if isinstance(val, CSMatrix): 2183s val = val.toarray() 2183s return cp.array(val) 2183s elif issubclass(typ, CupyCSRMatrix): 2183s import cupy as cp 2183s import cupyx.scipy.sparse as cpsparse 2183s 2183s if isinstance(val, np.ndarray): 2183s return cpsparse.csr_matrix(cp.array(val)) 2183s else: 2183s return cpsparse.csr_matrix(val) 2183s elif issubclass(typ, CupyCSCMatrix): 2183s > import cupy as cp 2183s E ModuleNotFoundError: No module named 'cupy' 2183s 2183s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:1024: ModuleNotFoundError 2183s _______ test_concatenate_roundtrip[outer-cupy_array-concat_func0-False] ________ 2183s 2183s join_type = 'outer' 2183s array_type = functools.partial(, typ=) 2183s concat_func = functools.partial(, merge='unique') 2183s backwards_compat = False 2183s 2183s @mark_legacy_concatenate 2183s @pytest.mark.parametrize( 2183s ("concat_func", "backwards_compat"), 2183s [ 2183s (partial(concat, merge="unique"), False), 2183s (lambda x, **kwargs: x[0].concatenate(x[1:], **kwargs), True), 2183s ], 2183s ) 2183s def test_concatenate_roundtrip(join_type, array_type, concat_func, backwards_compat): 2183s > adata = gen_adata((100, 10), X_type=array_type, **GEN_ADATA_DASK_ARGS) 2183s 2183s tests/test_concatenate.py:185: 2183s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 2183s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:346: in gen_adata 2183s X = X_type(random_state.binomial(100, 0.005, (M, N)).astype(X_dtype)) 2183s /usr/lib/python3.13/functools.py:934: in wrapper 2183s return dispatch(args[0].__class__)(*args, **kw) 2183s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 2183s 2183s val = array([[1., 1., 1., 1., 2., 0., 0., 0., 1., 0.], 2183s [1., 1., 1., 0., 0., 0., 2., 2., 0., 0.], 2183s [0., 0., 0., ... 0.], 2183s [1., 1., 0., 2., 2., 0., 1., 0., 1., 0.], 2183s [1., 0., 0., 0., 0., 0., 0., 0., 0., 1.]], dtype=float32) 2183s typ = 2183s 2183s @singledispatch 2183s def as_cupy(val, typ=None): 2183s """ 2183s Rough conversion function 2183s 2183s Will try to infer target type from input type if not specified. 2183s """ 2183s if typ is None: 2183s typ = resolve_cupy_type(val) 2183s 2183s if issubclass(typ, CupyArray): 2183s > import cupy as cp 2183s E ModuleNotFoundError: No module named 'cupy' 2183s 2183s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:1010: ModuleNotFoundError 2183s __________ test_concatenate_roundtrip[outer-cupy_array--True] __________ 2183s 2183s join_type = 'outer' 2183s array_type = functools.partial(, typ=) 2183s concat_func = at 0xf57c06c04860>, backwards_compat = True 2183s 2183s @mark_legacy_concatenate 2183s @pytest.mark.parametrize( 2183s ("concat_func", "backwards_compat"), 2183s [ 2183s (partial(concat, merge="unique"), False), 2183s (lambda x, **kwargs: x[0].concatenate(x[1:], **kwargs), True), 2183s ], 2183s ) 2183s def test_concatenate_roundtrip(join_type, array_type, concat_func, backwards_compat): 2183s > adata = gen_adata((100, 10), X_type=array_type, **GEN_ADATA_DASK_ARGS) 2183s 2183s tests/test_concatenate.py:185: 2183s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 2183s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:346: in gen_adata 2183s X = X_type(random_state.binomial(100, 0.005, (M, N)).astype(X_dtype)) 2183s /usr/lib/python3.13/functools.py:934: in wrapper 2183s return dispatch(args[0].__class__)(*args, **kw) 2183s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 2183s 2183s val = array([[0., 2., 1., 0., 0., 0., 1., 0., 1., 0.], 2183s [0., 1., 0., 1., 0., 0., 1., 0., 1., 0.], 2183s [1., 1., 0., ... 0.], 2183s [1., 1., 0., 0., 1., 1., 0., 0., 1., 0.], 2183s [0., 0., 1., 2., 2., 1., 1., 0., 1., 0.]], dtype=float32) 2183s typ = 2183s 2183s @singledispatch 2183s def as_cupy(val, typ=None): 2183s """ 2183s Rough conversion function 2183s 2183s Will try to infer target type from input type if not specified. 2183s """ 2183s if typ is None: 2183s typ = resolve_cupy_type(val) 2183s 2183s if issubclass(typ, CupyArray): 2183s > import cupy as cp 2183s E ModuleNotFoundError: No module named 'cupy' 2183s 2183s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:1010: ModuleNotFoundError 2183s ________ test_concatenate_roundtrip[outer-cupy_csr-concat_func0-False] _________ 2183s 2183s join_type = 'outer' 2183s array_type = functools.partial(, typ=) 2183s concat_func = functools.partial(, merge='unique') 2183s backwards_compat = False 2183s 2183s @mark_legacy_concatenate 2183s @pytest.mark.parametrize( 2183s ("concat_func", "backwards_compat"), 2183s [ 2183s (partial(concat, merge="unique"), False), 2183s (lambda x, **kwargs: x[0].concatenate(x[1:], **kwargs), True), 2183s ], 2183s ) 2183s def test_concatenate_roundtrip(join_type, array_type, concat_func, backwards_compat): 2183s > adata = gen_adata((100, 10), X_type=array_type, **GEN_ADATA_DASK_ARGS) 2183s 2183s tests/test_concatenate.py:185: 2183s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 2183s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:346: in gen_adata 2183s X = X_type(random_state.binomial(100, 0.005, (M, N)).astype(X_dtype)) 2183s /usr/lib/python3.13/functools.py:934: in wrapper 2183s return dispatch(args[0].__class__)(*args, **kw) 2183s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 2183s 2183s val = array([[0., 1., 0., 0., 0., 1., 1., 1., 1., 0.], 2183s [1., 0., 1., 1., 1., 1., 0., 1., 0., 2.], 2183s [2., 0., 3., ... 0.], 2183s [0., 2., 2., 0., 1., 0., 1., 0., 3., 0.], 2183s [0., 0., 0., 0., 0., 0., 1., 0., 0., 1.]], dtype=float32) 2183s typ = 2183s 2183s @singledispatch 2183s def as_cupy(val, typ=None): 2183s """ 2183s Rough conversion function 2183s 2183s Will try to infer target type from input type if not specified. 2183s """ 2183s if typ is None: 2183s typ = resolve_cupy_type(val) 2183s 2183s if issubclass(typ, CupyArray): 2183s import cupy as cp 2183s 2183s if isinstance(val, CSMatrix): 2183s val = val.toarray() 2183s return cp.array(val) 2183s elif issubclass(typ, CupyCSRMatrix): 2183s > import cupy as cp 2183s E ModuleNotFoundError: No module named 'cupy' 2183s 2183s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:1016: ModuleNotFoundError 2183s ___________ test_concatenate_roundtrip[outer-cupy_csr--True] ___________ 2183s 2183s join_type = 'outer' 2183s array_type = functools.partial(, typ=) 2183s concat_func = at 0xf57c06c04860>, backwards_compat = True 2183s 2183s @mark_legacy_concatenate 2183s @pytest.mark.parametrize( 2183s ("concat_func", "backwards_compat"), 2183s [ 2183s (partial(concat, merge="unique"), False), 2183s (lambda x, **kwargs: x[0].concatenate(x[1:], **kwargs), True), 2183s ], 2183s ) 2183s def test_concatenate_roundtrip(join_type, array_type, concat_func, backwards_compat): 2183s > adata = gen_adata((100, 10), X_type=array_type, **GEN_ADATA_DASK_ARGS) 2183s 2183s tests/test_concatenate.py:185: 2183s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 2183s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:346: in gen_adata 2183s X = X_type(random_state.binomial(100, 0.005, (M, N)).astype(X_dtype)) 2183s /usr/lib/python3.13/functools.py:934: in wrapper 2183s return dispatch(args[0].__class__)(*args, **kw) 2183s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 2183s 2183s val = array([[1., 0., 0., 0., 0., 0., 0., 2., 1., 0.], 2183s [0., 0., 2., 0., 1., 1., 1., 0., 0., 0.], 2183s [1., 0., 2., ... 1.], 2183s [0., 0., 1., 1., 0., 1., 0., 0., 0., 2.], 2183s [0., 0., 0., 2., 0., 0., 2., 1., 1., 1.]], dtype=float32) 2183s typ = 2183s 2183s @singledispatch 2183s def as_cupy(val, typ=None): 2183s """ 2183s Rough conversion function 2183s 2183s Will try to infer target type from input type if not specified. 2183s """ 2183s if typ is None: 2183s typ = resolve_cupy_type(val) 2183s 2183s if issubclass(typ, CupyArray): 2183s import cupy as cp 2183s 2183s if isinstance(val, CSMatrix): 2183s val = val.toarray() 2183s return cp.array(val) 2183s elif issubclass(typ, CupyCSRMatrix): 2183s > import cupy as cp 2183s E ModuleNotFoundError: No module named 'cupy' 2183s 2183s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:1016: ModuleNotFoundError 2183s ________ test_concatenate_roundtrip[outer-cupy_csc-concat_func0-False] _________ 2183s 2183s join_type = 'outer' 2183s array_type = functools.partial(, typ=) 2183s concat_func = functools.partial(, merge='unique') 2183s backwards_compat = False 2183s 2183s @mark_legacy_concatenate 2183s @pytest.mark.parametrize( 2183s ("concat_func", "backwards_compat"), 2183s [ 2183s (partial(concat, merge="unique"), False), 2183s (lambda x, **kwargs: x[0].concatenate(x[1:], **kwargs), True), 2183s ], 2183s ) 2183s def test_concatenate_roundtrip(join_type, array_type, concat_func, backwards_compat): 2183s > adata = gen_adata((100, 10), X_type=array_type, **GEN_ADATA_DASK_ARGS) 2183s 2183s tests/test_concatenate.py:185: 2183s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 2183s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:346: in gen_adata 2183s X = X_type(random_state.binomial(100, 0.005, (M, N)).astype(X_dtype)) 2183s /usr/lib/python3.13/functools.py:934: in wrapper 2183s return dispatch(args[0].__class__)(*args, **kw) 2183s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 2183s 2183s val = array([[0., 0., 0., 1., 0., 0., 0., 0., 1., 1.], 2183s [0., 0., 0., 2., 0., 1., 1., 0., 0., 0.], 2183s [0., 1., 0., ... 0.], 2183s [0., 1., 1., 0., 0., 1., 0., 0., 1., 2.], 2183s [0., 0., 1., 0., 0., 0., 0., 0., 3., 1.]], dtype=float32) 2183s typ = 2183s 2183s @singledispatch 2183s def as_cupy(val, typ=None): 2183s """ 2183s Rough conversion function 2183s 2183s Will try to infer target type from input type if not specified. 2183s """ 2183s if typ is None: 2183s typ = resolve_cupy_type(val) 2183s 2183s if issubclass(typ, CupyArray): 2183s import cupy as cp 2183s 2183s if isinstance(val, CSMatrix): 2183s val = val.toarray() 2183s return cp.array(val) 2183s elif issubclass(typ, CupyCSRMatrix): 2183s import cupy as cp 2183s import cupyx.scipy.sparse as cpsparse 2183s 2183s if isinstance(val, np.ndarray): 2183s return cpsparse.csr_matrix(cp.array(val)) 2183s else: 2183s return cpsparse.csr_matrix(val) 2183s elif issubclass(typ, CupyCSCMatrix): 2183s > import cupy as cp 2183s E ModuleNotFoundError: No module named 'cupy' 2183s 2183s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:1024: ModuleNotFoundError 2183s ___________ test_concatenate_roundtrip[outer-cupy_csc--True] ___________ 2183s 2183s join_type = 'outer' 2183s array_type = functools.partial(, typ=) 2183s concat_func = at 0xf57c06c04860>, backwards_compat = True 2183s 2183s @mark_legacy_concatenate 2183s @pytest.mark.parametrize( 2183s ("concat_func", "backwards_compat"), 2183s [ 2183s (partial(concat, merge="unique"), False), 2183s (lambda x, **kwargs: x[0].concatenate(x[1:], **kwargs), True), 2183s ], 2183s ) 2183s def test_concatenate_roundtrip(join_type, array_type, concat_func, backwards_compat): 2183s > adata = gen_adata((100, 10), X_type=array_type, **GEN_ADATA_DASK_ARGS) 2183s 2183s tests/test_concatenate.py:185: 2183s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 2183s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:346: in gen_adata 2183s X = X_type(random_state.binomial(100, 0.005, (M, N)).astype(X_dtype)) 2183s /usr/lib/python3.13/functools.py:934: in wrapper 2183s return dispatch(args[0].__class__)(*args, **kw) 2183s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 2183s 2183s val = array([[1., 2., 4., 0., 2., 1., 0., 0., 0., 1.], 2183s [1., 0., 0., 1., 2., 0., 1., 0., 1., 1.], 2183s [0., 2., 1., ... 1.], 2183s [0., 1., 0., 0., 0., 0., 0., 0., 1., 0.], 2183s [0., 0., 1., 0., 1., 1., 1., 0., 0., 0.]], dtype=float32) 2183s typ = 2183s 2183s @singledispatch 2183s def as_cupy(val, typ=None): 2183s """ 2183s Rough conversion function 2183s 2183s Will try to infer target type from input type if not specified. 2183s """ 2183s if typ is None: 2183s typ = resolve_cupy_type(val) 2183s 2183s if issubclass(typ, CupyArray): 2183s import cupy as cp 2183s 2183s if isinstance(val, CSMatrix): 2183s val = val.toarray() 2183s return cp.array(val) 2183s elif issubclass(typ, CupyCSRMatrix): 2183s import cupy as cp 2183s import cupyx.scipy.sparse as cpsparse 2183s 2183s if isinstance(val, np.ndarray): 2183s return cpsparse.csr_matrix(cp.array(val)) 2183s else: 2183s return cpsparse.csr_matrix(val) 2183s elif issubclass(typ, CupyCSCMatrix): 2183s > import cupy as cp 2183s E ModuleNotFoundError: No module named 'cupy' 2183s 2183s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:1024: ModuleNotFoundError 2183s __________________ test_concatenate_layers[cupy_array-inner] ___________________ 2183s 2183s array_type = functools.partial(, typ=) 2183s join_type = 'inner' 2183s 2183s @mark_legacy_concatenate 2183s def test_concatenate_layers(array_type, join_type): 2183s adatas = [] 2183s for _ in range(5): 2183s > a = array_type(sparse.random(100, 200, format="csr")) 2183s 2183s tests/test_concatenate.py:291: 2183s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 2183s /usr/lib/python3.13/functools.py:934: in wrapper 2183s return dispatch(args[0].__class__)(*args, **kw) 2183s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 2183s 2183s val = 2183s typ = 2183s 2183s @singledispatch 2183s def as_cupy(val, typ=None): 2183s """ 2183s Rough conversion function 2183s 2183s Will try to infer target type from input type if not specified. 2183s """ 2183s if typ is None: 2183s typ = resolve_cupy_type(val) 2183s 2183s if issubclass(typ, CupyArray): 2183s > import cupy as cp 2183s E ModuleNotFoundError: No module named 'cupy' 2183s 2183s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:1010: ModuleNotFoundError 2183s __________________ test_concatenate_layers[cupy_array-outer] ___________________ 2183s 2183s array_type = functools.partial(, typ=) 2183s join_type = 'outer' 2183s 2183s @mark_legacy_concatenate 2183s def test_concatenate_layers(array_type, join_type): 2183s adatas = [] 2183s for _ in range(5): 2183s > a = array_type(sparse.random(100, 200, format="csr")) 2183s 2183s tests/test_concatenate.py:291: 2183s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 2183s /usr/lib/python3.13/functools.py:934: in wrapper 2183s return dispatch(args[0].__class__)(*args, **kw) 2183s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 2183s 2183s val = 2183s typ = 2183s 2183s @singledispatch 2183s def as_cupy(val, typ=None): 2183s """ 2183s Rough conversion function 2183s 2183s Will try to infer target type from input type if not specified. 2183s """ 2183s if typ is None: 2183s typ = resolve_cupy_type(val) 2183s 2183s if issubclass(typ, CupyArray): 2183s > import cupy as cp 2183s E ModuleNotFoundError: No module named 'cupy' 2183s 2183s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:1010: ModuleNotFoundError 2183s ___________________ test_concatenate_layers[cupy_csr-inner] ____________________ 2183s 2183s array_type = functools.partial(, typ=) 2183s join_type = 'inner' 2183s 2183s @mark_legacy_concatenate 2183s def test_concatenate_layers(array_type, join_type): 2183s adatas = [] 2183s for _ in range(5): 2183s > a = array_type(sparse.random(100, 200, format="csr")) 2183s 2183s tests/test_concatenate.py:291: 2183s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 2183s /usr/lib/python3.13/functools.py:934: in wrapper 2183s return dispatch(args[0].__class__)(*args, **kw) 2183s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 2183s 2183s val = 2183s typ = 2183s 2183s @singledispatch 2183s def as_cupy(val, typ=None): 2183s """ 2183s Rough conversion function 2183s 2183s Will try to infer target type from input type if not specified. 2183s """ 2183s if typ is None: 2183s typ = resolve_cupy_type(val) 2183s 2183s if issubclass(typ, CupyArray): 2183s import cupy as cp 2183s 2183s if isinstance(val, CSMatrix): 2183s val = val.toarray() 2183s return cp.array(val) 2183s elif issubclass(typ, CupyCSRMatrix): 2183s > import cupy as cp 2183s E ModuleNotFoundError: No module named 'cupy' 2183s 2183s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:1016: ModuleNotFoundError 2183s ___________________ test_concatenate_layers[cupy_csr-outer] ____________________ 2183s 2183s array_type = functools.partial(, typ=) 2183s join_type = 'outer' 2183s 2183s @mark_legacy_concatenate 2183s def test_concatenate_layers(array_type, join_type): 2183s adatas = [] 2183s for _ in range(5): 2183s > a = array_type(sparse.random(100, 200, format="csr")) 2183s 2183s tests/test_concatenate.py:291: 2183s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 2183s /usr/lib/python3.13/functools.py:934: in wrapper 2183s return dispatch(args[0].__class__)(*args, **kw) 2183s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 2183s 2183s val = 2183s typ = 2183s 2183s @singledispatch 2183s def as_cupy(val, typ=None): 2183s """ 2183s Rough conversion function 2183s 2183s Will try to infer target type from input type if not specified. 2183s """ 2183s if typ is None: 2183s typ = resolve_cupy_type(val) 2183s 2183s if issubclass(typ, CupyArray): 2183s import cupy as cp 2183s 2183s if isinstance(val, CSMatrix): 2183s val = val.toarray() 2183s return cp.array(val) 2183s elif issubclass(typ, CupyCSRMatrix): 2183s > import cupy as cp 2183s E ModuleNotFoundError: No module named 'cupy' 2183s 2183s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:1016: ModuleNotFoundError 2183s ___________________ test_concatenate_layers[cupy_csc-inner] ____________________ 2183s 2183s array_type = functools.partial(, typ=) 2183s join_type = 'inner' 2183s 2183s @mark_legacy_concatenate 2183s def test_concatenate_layers(array_type, join_type): 2183s adatas = [] 2183s for _ in range(5): 2183s > a = array_type(sparse.random(100, 200, format="csr")) 2183s 2183s tests/test_concatenate.py:291: 2183s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 2183s /usr/lib/python3.13/functools.py:934: in wrapper 2183s return dispatch(args[0].__class__)(*args, **kw) 2183s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 2183s 2183s val = 2183s typ = 2183s 2183s @singledispatch 2183s def as_cupy(val, typ=None): 2183s """ 2183s Rough conversion function 2183s 2183s Will try to infer target type from input type if not specified. 2183s """ 2183s if typ is None: 2183s typ = resolve_cupy_type(val) 2183s 2183s if issubclass(typ, CupyArray): 2183s import cupy as cp 2183s 2183s if isinstance(val, CSMatrix): 2183s val = val.toarray() 2183s return cp.array(val) 2183s elif issubclass(typ, CupyCSRMatrix): 2183s import cupy as cp 2183s import cupyx.scipy.sparse as cpsparse 2183s 2183s if isinstance(val, np.ndarray): 2183s return cpsparse.csr_matrix(cp.array(val)) 2183s else: 2183s return cpsparse.csr_matrix(val) 2183s elif issubclass(typ, CupyCSCMatrix): 2183s > import cupy as cp 2183s E ModuleNotFoundError: No module named 'cupy' 2183s 2183s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:1024: ModuleNotFoundError 2183s ___________________ test_concatenate_layers[cupy_csc-outer] ____________________ 2183s 2183s array_type = functools.partial(, typ=) 2183s join_type = 'outer' 2183s 2183s @mark_legacy_concatenate 2183s def test_concatenate_layers(array_type, join_type): 2183s adatas = [] 2183s for _ in range(5): 2183s > a = array_type(sparse.random(100, 200, format="csr")) 2183s 2183s tests/test_concatenate.py:291: 2183s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 2183s /usr/lib/python3.13/functools.py:934: in wrapper 2183s return dispatch(args[0].__class__)(*args, **kw) 2183s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 2183s 2183s val = 2183s typ = 2183s 2183s @singledispatch 2183s def as_cupy(val, typ=None): 2183s """ 2183s Rough conversion function 2183s 2183s Will try to infer target type from input type if not specified. 2183s """ 2183s if typ is None: 2183s typ = resolve_cupy_type(val) 2183s 2183s if issubclass(typ, CupyArray): 2183s import cupy as cp 2183s 2183s if isinstance(val, CSMatrix): 2183s val = val.toarray() 2183s return cp.array(val) 2183s elif issubclass(typ, CupyCSRMatrix): 2183s import cupy as cp 2183s import cupyx.scipy.sparse as cpsparse 2183s 2183s if isinstance(val, np.ndarray): 2183s return cpsparse.csr_matrix(cp.array(val)) 2183s else: 2183s return cpsparse.csr_matrix(val) 2183s elif issubclass(typ, CupyCSCMatrix): 2183s > import cupy as cp 2183s E ModuleNotFoundError: No module named 'cupy' 2183s 2183s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:1024: ModuleNotFoundError 2183s _____________ test_concatenate_layers_misaligned[cupy_array-inner] _____________ 2183s 2183s array_type = functools.partial(, typ=) 2183s join_type = 'inner' 2183s 2183s @mark_legacy_concatenate 2183s def test_concatenate_layers_misaligned(array_type, join_type): 2183s adatas = [] 2183s for _ in range(5): 2183s > a = array_type(sparse.random(100, 200, format="csr")) 2183s 2183s tests/test_concatenate.py:461: 2183s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 2183s /usr/lib/python3.13/functools.py:934: in wrapper 2183s return dispatch(args[0].__class__)(*args, **kw) 2183s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 2183s 2183s val = 2183s typ = 2183s 2183s @singledispatch 2183s def as_cupy(val, typ=None): 2183s """ 2183s Rough conversion function 2183s 2183s Will try to infer target type from input type if not specified. 2183s """ 2183s if typ is None: 2183s typ = resolve_cupy_type(val) 2183s 2183s if issubclass(typ, CupyArray): 2183s > import cupy as cp 2183s E ModuleNotFoundError: No module named 'cupy' 2183s 2183s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:1010: ModuleNotFoundError 2183s _____________ test_concatenate_layers_misaligned[cupy_array-outer] _____________ 2183s 2183s array_type = functools.partial(, typ=) 2183s join_type = 'outer' 2183s 2183s @mark_legacy_concatenate 2183s def test_concatenate_layers_misaligned(array_type, join_type): 2183s adatas = [] 2183s for _ in range(5): 2183s > a = array_type(sparse.random(100, 200, format="csr")) 2183s 2183s tests/test_concatenate.py:461: 2183s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 2183s /usr/lib/python3.13/functools.py:934: in wrapper 2183s return dispatch(args[0].__class__)(*args, **kw) 2183s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 2183s 2183s val = 2183s typ = 2183s 2183s @singledispatch 2183s def as_cupy(val, typ=None): 2183s """ 2183s Rough conversion function 2183s 2183s Will try to infer target type from input type if not specified. 2183s """ 2183s if typ is None: 2183s typ = resolve_cupy_type(val) 2183s 2183s if issubclass(typ, CupyArray): 2183s > import cupy as cp 2183s E ModuleNotFoundError: No module named 'cupy' 2183s 2183s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:1010: ModuleNotFoundError 2183s ______________ test_concatenate_layers_misaligned[cupy_csr-inner] ______________ 2183s 2183s array_type = functools.partial(, typ=) 2183s join_type = 'inner' 2183s 2183s @mark_legacy_concatenate 2183s def test_concatenate_layers_misaligned(array_type, join_type): 2183s adatas = [] 2183s for _ in range(5): 2183s > a = array_type(sparse.random(100, 200, format="csr")) 2183s 2183s tests/test_concatenate.py:461: 2183s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 2183s /usr/lib/python3.13/functools.py:934: in wrapper 2183s return dispatch(args[0].__class__)(*args, **kw) 2183s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 2183s 2183s val = 2183s typ = 2183s 2183s @singledispatch 2183s def as_cupy(val, typ=None): 2183s """ 2183s Rough conversion function 2183s 2183s Will try to infer target type from input type if not specified. 2183s """ 2183s if typ is None: 2183s typ = resolve_cupy_type(val) 2183s 2183s if issubclass(typ, CupyArray): 2183s import cupy as cp 2183s 2183s if isinstance(val, CSMatrix): 2183s val = val.toarray() 2183s return cp.array(val) 2183s elif issubclass(typ, CupyCSRMatrix): 2183s > import cupy as cp 2183s E ModuleNotFoundError: No module named 'cupy' 2183s 2183s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:1016: ModuleNotFoundError 2183s ______________ test_concatenate_layers_misaligned[cupy_csr-outer] ______________ 2183s 2183s array_type = functools.partial(, typ=) 2183s join_type = 'outer' 2183s 2183s @mark_legacy_concatenate 2183s def test_concatenate_layers_misaligned(array_type, join_type): 2183s adatas = [] 2183s for _ in range(5): 2183s > a = array_type(sparse.random(100, 200, format="csr")) 2183s 2183s tests/test_concatenate.py:461: 2183s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 2183s /usr/lib/python3.13/functools.py:934: in wrapper 2183s return dispatch(args[0].__class__)(*args, **kw) 2183s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 2183s 2183s val = 2183s typ = 2183s 2183s @singledispatch 2183s def as_cupy(val, typ=None): 2183s """ 2183s Rough conversion function 2183s 2183s Will try to infer target type from input type if not specified. 2183s """ 2183s if typ is None: 2183s typ = resolve_cupy_type(val) 2183s 2183s if issubclass(typ, CupyArray): 2183s import cupy as cp 2183s 2183s if isinstance(val, CSMatrix): 2183s val = val.toarray() 2183s return cp.array(val) 2183s elif issubclass(typ, CupyCSRMatrix): 2183s > import cupy as cp 2183s E ModuleNotFoundError: No module named 'cupy' 2183s 2183s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:1016: ModuleNotFoundError 2183s ______________ test_concatenate_layers_misaligned[cupy_csc-inner] ______________ 2183s 2183s array_type = functools.partial(, typ=) 2183s join_type = 'inner' 2183s 2183s @mark_legacy_concatenate 2183s def test_concatenate_layers_misaligned(array_type, join_type): 2183s adatas = [] 2183s for _ in range(5): 2183s > a = array_type(sparse.random(100, 200, format="csr")) 2183s 2183s tests/test_concatenate.py:461: 2183s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 2183s /usr/lib/python3.13/functools.py:934: in wrapper 2183s return dispatch(args[0].__class__)(*args, **kw) 2183s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 2183s 2183s val = 2183s typ = 2183s 2183s @singledispatch 2183s def as_cupy(val, typ=None): 2183s """ 2183s Rough conversion function 2183s 2183s Will try to infer target type from input type if not specified. 2183s """ 2183s if typ is None: 2183s typ = resolve_cupy_type(val) 2183s 2183s if issubclass(typ, CupyArray): 2183s import cupy as cp 2183s 2183s if isinstance(val, CSMatrix): 2183s val = val.toarray() 2183s return cp.array(val) 2183s elif issubclass(typ, CupyCSRMatrix): 2183s import cupy as cp 2183s import cupyx.scipy.sparse as cpsparse 2183s 2183s if isinstance(val, np.ndarray): 2183s return cpsparse.csr_matrix(cp.array(val)) 2183s else: 2183s return cpsparse.csr_matrix(val) 2183s elif issubclass(typ, CupyCSCMatrix): 2183s > import cupy as cp 2183s E ModuleNotFoundError: No module named 'cupy' 2183s 2183s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:1024: ModuleNotFoundError 2183s ______________ test_concatenate_layers_misaligned[cupy_csc-outer] ______________ 2183s 2183s array_type = functools.partial(, typ=) 2183s join_type = 'outer' 2183s 2183s @mark_legacy_concatenate 2183s def test_concatenate_layers_misaligned(array_type, join_type): 2183s adatas = [] 2183s for _ in range(5): 2183s > a = array_type(sparse.random(100, 200, format="csr")) 2183s 2183s tests/test_concatenate.py:461: 2183s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 2183s /usr/lib/python3.13/functools.py:934: in wrapper 2183s return dispatch(args[0].__class__)(*args, **kw) 2183s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 2183s 2183s val = 2183s typ = 2183s 2183s @singledispatch 2183s def as_cupy(val, typ=None): 2183s """ 2183s Rough conversion function 2183s 2183s Will try to infer target type from input type if not specified. 2183s """ 2183s if typ is None: 2183s typ = resolve_cupy_type(val) 2183s 2183s if issubclass(typ, CupyArray): 2183s import cupy as cp 2183s 2183s if isinstance(val, CSMatrix): 2183s val = val.toarray() 2183s return cp.array(val) 2183s elif issubclass(typ, CupyCSRMatrix): 2183s import cupy as cp 2183s import cupyx.scipy.sparse as cpsparse 2183s 2183s if isinstance(val, np.ndarray): 2183s return cpsparse.csr_matrix(cp.array(val)) 2183s else: 2183s return cpsparse.csr_matrix(val) 2183s elif issubclass(typ, CupyCSCMatrix): 2183s > import cupy as cp 2183s E ModuleNotFoundError: No module named 'cupy' 2183s 2183s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:1024: ModuleNotFoundError 2183s _________________ test_concatenate_layers_outer[cupy_array-0] __________________ 2183s 2183s array_type = functools.partial(, typ=) 2183s fill_val = 0 2183s 2183s @mark_legacy_concatenate 2183s def test_concatenate_layers_outer(array_type, fill_val): 2183s # Testing that issue #368 is fixed 2183s a = AnnData( 2183s X=np.ones((10, 20)), 2183s > layers={"a": array_type(sparse.random(10, 20, format="csr"))}, 2183s ) 2183s 2183s tests/test_concatenate.py:476: 2183s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 2183s /usr/lib/python3.13/functools.py:934: in wrapper 2183s return dispatch(args[0].__class__)(*args, **kw) 2183s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 2183s 2183s val = 2183s typ = 2183s 2183s @singledispatch 2183s def as_cupy(val, typ=None): 2183s """ 2183s Rough conversion function 2183s 2183s Will try to infer target type from input type if not specified. 2183s """ 2183s if typ is None: 2183s typ = resolve_cupy_type(val) 2183s 2183s if issubclass(typ, CupyArray): 2183s > import cupy as cp 2183s E ModuleNotFoundError: No module named 'cupy' 2183s 2183s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:1010: ModuleNotFoundError 2183s ________________ test_concatenate_layers_outer[cupy_array-nan] _________________ 2183s 2183s array_type = functools.partial(, typ=) 2183s fill_val = nan 2183s 2183s @mark_legacy_concatenate 2183s def test_concatenate_layers_outer(array_type, fill_val): 2183s # Testing that issue #368 is fixed 2183s a = AnnData( 2183s X=np.ones((10, 20)), 2183s > layers={"a": array_type(sparse.random(10, 20, format="csr"))}, 2183s ) 2183s 2183s tests/test_concatenate.py:476: 2183s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 2183s /usr/lib/python3.13/functools.py:934: in wrapper 2183s return dispatch(args[0].__class__)(*args, **kw) 2183s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 2183s 2183s val = 2183s typ = 2183s 2183s @singledispatch 2183s def as_cupy(val, typ=None): 2183s """ 2183s Rough conversion function 2183s 2183s Will try to infer target type from input type if not specified. 2183s """ 2183s if typ is None: 2183s typ = resolve_cupy_type(val) 2183s 2183s if issubclass(typ, CupyArray): 2183s > import cupy as cp 2183s E ModuleNotFoundError: No module named 'cupy' 2183s 2183s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:1010: ModuleNotFoundError 2183s _________ test_concatenate_layers_outer[cupy_array-3.141592653589793] __________ 2183s 2183s array_type = functools.partial(, typ=) 2183s fill_val = 3.141592653589793 2183s 2183s @mark_legacy_concatenate 2183s def test_concatenate_layers_outer(array_type, fill_val): 2183s # Testing that issue #368 is fixed 2183s a = AnnData( 2183s X=np.ones((10, 20)), 2183s > layers={"a": array_type(sparse.random(10, 20, format="csr"))}, 2183s ) 2183s 2183s tests/test_concatenate.py:476: 2183s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 2183s /usr/lib/python3.13/functools.py:934: in wrapper 2183s return dispatch(args[0].__class__)(*args, **kw) 2183s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 2183s 2183s val = 2183s typ = 2183s 2183s @singledispatch 2183s def as_cupy(val, typ=None): 2183s """ 2183s Rough conversion function 2183s 2183s Will try to infer target type from input type if not specified. 2183s """ 2183s if typ is None: 2183s typ = resolve_cupy_type(val) 2183s 2183s if issubclass(typ, CupyArray): 2183s > import cupy as cp 2183s E ModuleNotFoundError: No module named 'cupy' 2183s 2183s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:1010: ModuleNotFoundError 2183s __________________ test_concatenate_layers_outer[cupy_csr-0] ___________________ 2183s 2183s array_type = functools.partial(, typ=) 2183s fill_val = 0 2183s 2183s @mark_legacy_concatenate 2183s def test_concatenate_layers_outer(array_type, fill_val): 2183s # Testing that issue #368 is fixed 2183s a = AnnData( 2183s X=np.ones((10, 20)), 2183s > layers={"a": array_type(sparse.random(10, 20, format="csr"))}, 2183s ) 2183s 2183s tests/test_concatenate.py:476: 2183s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 2183s /usr/lib/python3.13/functools.py:934: in wrapper 2183s return dispatch(args[0].__class__)(*args, **kw) 2183s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 2183s 2183s val = 2183s typ = 2183s 2183s @singledispatch 2183s def as_cupy(val, typ=None): 2183s """ 2183s Rough conversion function 2183s 2183s Will try to infer target type from input type if not specified. 2183s """ 2183s if typ is None: 2183s typ = resolve_cupy_type(val) 2183s 2183s if issubclass(typ, CupyArray): 2183s import cupy as cp 2183s 2183s if isinstance(val, CSMatrix): 2183s val = val.toarray() 2183s return cp.array(val) 2183s elif issubclass(typ, CupyCSRMatrix): 2183s > import cupy as cp 2183s E ModuleNotFoundError: No module named 'cupy' 2183s 2183s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:1016: ModuleNotFoundError 2183s _________________ test_concatenate_layers_outer[cupy_csr-nan] __________________ 2183s 2183s array_type = functools.partial(, typ=) 2183s fill_val = nan 2183s 2183s @mark_legacy_concatenate 2183s def test_concatenate_layers_outer(array_type, fill_val): 2183s # Testing that issue #368 is fixed 2183s a = AnnData( 2183s X=np.ones((10, 20)), 2183s > layers={"a": array_type(sparse.random(10, 20, format="csr"))}, 2183s ) 2183s 2183s tests/test_concatenate.py:476: 2183s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 2183s /usr/lib/python3.13/functools.py:934: in wrapper 2183s return dispatch(args[0].__class__)(*args, **kw) 2183s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 2183s 2183s val = 2183s typ = 2183s 2183s @singledispatch 2183s def as_cupy(val, typ=None): 2183s """ 2183s Rough conversion function 2183s 2183s Will try to infer target type from input type if not specified. 2183s """ 2183s if typ is None: 2183s typ = resolve_cupy_type(val) 2183s 2183s if issubclass(typ, CupyArray): 2183s import cupy as cp 2183s 2183s if isinstance(val, CSMatrix): 2183s val = val.toarray() 2183s return cp.array(val) 2183s elif issubclass(typ, CupyCSRMatrix): 2183s > import cupy as cp 2183s E ModuleNotFoundError: No module named 'cupy' 2183s 2183s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:1016: ModuleNotFoundError 2183s __________ test_concatenate_layers_outer[cupy_csr-3.141592653589793] ___________ 2183s 2183s array_type = functools.partial(, typ=) 2183s fill_val = 3.141592653589793 2183s 2183s @mark_legacy_concatenate 2183s def test_concatenate_layers_outer(array_type, fill_val): 2183s # Testing that issue #368 is fixed 2183s a = AnnData( 2183s X=np.ones((10, 20)), 2183s > layers={"a": array_type(sparse.random(10, 20, format="csr"))}, 2183s ) 2183s 2183s tests/test_concatenate.py:476: 2183s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 2183s /usr/lib/python3.13/functools.py:934: in wrapper 2183s return dispatch(args[0].__class__)(*args, **kw) 2183s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 2183s 2183s val = 2183s typ = 2183s 2183s @singledispatch 2183s def as_cupy(val, typ=None): 2183s """ 2183s Rough conversion function 2183s 2183s Will try to infer target type from input type if not specified. 2183s """ 2183s if typ is None: 2183s typ = resolve_cupy_type(val) 2183s 2183s if issubclass(typ, CupyArray): 2183s import cupy as cp 2183s 2183s if isinstance(val, CSMatrix): 2183s val = val.toarray() 2183s return cp.array(val) 2183s elif issubclass(typ, CupyCSRMatrix): 2183s > import cupy as cp 2183s E ModuleNotFoundError: No module named 'cupy' 2183s 2183s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:1016: ModuleNotFoundError 2183s __________________ test_concatenate_layers_outer[cupy_csc-0] ___________________ 2183s 2183s array_type = functools.partial(, typ=) 2183s fill_val = 0 2183s 2183s @mark_legacy_concatenate 2183s def test_concatenate_layers_outer(array_type, fill_val): 2183s # Testing that issue #368 is fixed 2183s a = AnnData( 2183s X=np.ones((10, 20)), 2183s > layers={"a": array_type(sparse.random(10, 20, format="csr"))}, 2183s ) 2183s 2183s tests/test_concatenate.py:476: 2183s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 2183s /usr/lib/python3.13/functools.py:934: in wrapper 2183s return dispatch(args[0].__class__)(*args, **kw) 2183s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 2183s 2183s val = 2183s typ = 2183s 2183s @singledispatch 2183s def as_cupy(val, typ=None): 2183s """ 2183s Rough conversion function 2183s 2183s Will try to infer target type from input type if not specified. 2183s """ 2183s if typ is None: 2183s typ = resolve_cupy_type(val) 2183s 2183s if issubclass(typ, CupyArray): 2183s import cupy as cp 2183s 2183s if isinstance(val, CSMatrix): 2183s val = val.toarray() 2183s return cp.array(val) 2183s elif issubclass(typ, CupyCSRMatrix): 2183s import cupy as cp 2183s import cupyx.scipy.sparse as cpsparse 2183s 2183s if isinstance(val, np.ndarray): 2183s return cpsparse.csr_matrix(cp.array(val)) 2183s else: 2183s return cpsparse.csr_matrix(val) 2183s elif issubclass(typ, CupyCSCMatrix): 2183s > import cupy as cp 2183s E ModuleNotFoundError: No module named 'cupy' 2183s 2183s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:1024: ModuleNotFoundError 2183s _________________ test_concatenate_layers_outer[cupy_csc-nan] __________________ 2183s 2183s array_type = functools.partial(, typ=) 2183s fill_val = nan 2183s 2183s @mark_legacy_concatenate 2183s def test_concatenate_layers_outer(array_type, fill_val): 2183s # Testing that issue #368 is fixed 2183s a = AnnData( 2183s X=np.ones((10, 20)), 2183s > layers={"a": array_type(sparse.random(10, 20, format="csr"))}, 2183s ) 2183s 2183s tests/test_concatenate.py:476: 2183s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 2183s /usr/lib/python3.13/functools.py:934: in wrapper 2183s return dispatch(args[0].__class__)(*args, **kw) 2183s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 2183s 2183s val = 2183s typ = 2183s 2183s @singledispatch 2183s def as_cupy(val, typ=None): 2183s """ 2183s Rough conversion function 2183s 2183s Will try to infer target type from input type if not specified. 2183s """ 2183s if typ is None: 2183s typ = resolve_cupy_type(val) 2183s 2183s if issubclass(typ, CupyArray): 2183s import cupy as cp 2183s 2183s if isinstance(val, CSMatrix): 2183s val = val.toarray() 2183s return cp.array(val) 2183s elif issubclass(typ, CupyCSRMatrix): 2183s import cupy as cp 2183s import cupyx.scipy.sparse as cpsparse 2183s 2183s if isinstance(val, np.ndarray): 2183s return cpsparse.csr_matrix(cp.array(val)) 2183s else: 2183s return cpsparse.csr_matrix(val) 2183s elif issubclass(typ, CupyCSCMatrix): 2183s > import cupy as cp 2183s E ModuleNotFoundError: No module named 'cupy' 2183s 2183s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:1024: ModuleNotFoundError 2183s __________ test_concatenate_layers_outer[cupy_csc-3.141592653589793] ___________ 2183s 2183s array_type = functools.partial(, typ=) 2183s fill_val = 3.141592653589793 2183s 2183s @mark_legacy_concatenate 2183s def test_concatenate_layers_outer(array_type, fill_val): 2183s # Testing that issue #368 is fixed 2183s a = AnnData( 2183s X=np.ones((10, 20)), 2183s > layers={"a": array_type(sparse.random(10, 20, format="csr"))}, 2183s ) 2183s 2183s tests/test_concatenate.py:476: 2183s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 2183s /usr/lib/python3.13/functools.py:934: in wrapper 2183s return dispatch(args[0].__class__)(*args, **kw) 2183s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 2183s 2183s val = 2183s typ = 2183s 2183s @singledispatch 2183s def as_cupy(val, typ=None): 2183s """ 2183s Rough conversion function 2183s 2183s Will try to infer target type from input type if not specified. 2183s """ 2183s if typ is None: 2183s typ = resolve_cupy_type(val) 2183s 2183s if issubclass(typ, CupyArray): 2183s import cupy as cp 2183s 2183s if isinstance(val, CSMatrix): 2183s val = val.toarray() 2183s return cp.array(val) 2183s elif issubclass(typ, CupyCSRMatrix): 2183s import cupy as cp 2183s import cupyx.scipy.sparse as cpsparse 2183s 2183s if isinstance(val, np.ndarray): 2183s return cpsparse.csr_matrix(cp.array(val)) 2183s else: 2183s return cpsparse.csr_matrix(val) 2183s elif issubclass(typ, CupyCSCMatrix): 2183s > import cupy as cp 2183s E ModuleNotFoundError: No module named 'cupy' 2183s 2183s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:1024: ModuleNotFoundError 2183s _____________________ test_pairwise_concat[obs-cupy_array] _____________________ 2183s 2183s axis_name = 'obs' 2183s array_type = functools.partial(, typ=) 2183s 2183s def test_pairwise_concat(axis_name, array_type): 2183s axis, axis_name = merge._resolve_axis(axis_name) 2183s _, alt_axis_name = merge._resolve_axis(1 - axis) 2183s axis_sizes = [[100, 200, 50], [50, 50, 50]] 2183s if axis_name == "var": 2183s axis_sizes.reverse() 2183s Ms, Ns = axis_sizes 2183s axis_attr = f"{axis_name}p" 2183s alt_attr = f"{alt_axis_name}p" 2183s 2183s def gen_axis_array(m): 2183s return array_type(sparse.random(m, m, format="csr", density=0.1)) 2183s 2183s adatas = { 2183s k: AnnData( 2183s X=sparse.csr_matrix((m, n)), 2183s > obsp={"arr": gen_axis_array(m)}, 2183s varp={"arr": gen_axis_array(n)}, 2183s ) 2183s for k, m, n in zip("abc", Ms, Ns) 2183s } 2183s 2183s tests/test_concatenate.py:855: 2183s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 2183s tests/test_concatenate.py:850: in gen_axis_array 2183s return array_type(sparse.random(m, m, format="csr", density=0.1)) 2183s /usr/lib/python3.13/functools.py:934: in wrapper 2183s return dispatch(args[0].__class__)(*args, **kw) 2183s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 2183s 2183s val = 2183s typ = 2183s 2183s @singledispatch 2183s def as_cupy(val, typ=None): 2183s """ 2183s Rough conversion function 2183s 2183s Will try to infer target type from input type if not specified. 2183s """ 2183s if typ is None: 2183s typ = resolve_cupy_type(val) 2183s 2183s if issubclass(typ, CupyArray): 2183s > import cupy as cp 2183s E ModuleNotFoundError: No module named 'cupy' 2183s 2183s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:1010: ModuleNotFoundError 2183s ______________________ test_pairwise_concat[obs-cupy_csr] ______________________ 2183s 2183s axis_name = 'obs' 2183s array_type = functools.partial(, typ=) 2183s 2183s def test_pairwise_concat(axis_name, array_type): 2183s axis, axis_name = merge._resolve_axis(axis_name) 2183s _, alt_axis_name = merge._resolve_axis(1 - axis) 2183s axis_sizes = [[100, 200, 50], [50, 50, 50]] 2183s if axis_name == "var": 2183s axis_sizes.reverse() 2183s Ms, Ns = axis_sizes 2183s axis_attr = f"{axis_name}p" 2183s alt_attr = f"{alt_axis_name}p" 2183s 2183s def gen_axis_array(m): 2183s return array_type(sparse.random(m, m, format="csr", density=0.1)) 2183s 2183s adatas = { 2183s k: AnnData( 2183s X=sparse.csr_matrix((m, n)), 2183s > obsp={"arr": gen_axis_array(m)}, 2183s varp={"arr": gen_axis_array(n)}, 2183s ) 2183s for k, m, n in zip("abc", Ms, Ns) 2183s } 2183s 2183s tests/test_concatenate.py:855: 2183s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 2183s tests/test_concatenate.py:850: in gen_axis_array 2183s return array_type(sparse.random(m, m, format="csr", density=0.1)) 2183s /usr/lib/python3.13/functools.py:934: in wrapper 2183s return dispatch(args[0].__class__)(*args, **kw) 2183s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 2183s 2183s val = 2183s typ = 2183s 2183s @singledispatch 2183s def as_cupy(val, typ=None): 2183s """ 2183s Rough conversion function 2183s 2183s Will try to infer target type from input type if not specified. 2183s """ 2183s if typ is None: 2183s typ = resolve_cupy_type(val) 2183s 2183s if issubclass(typ, CupyArray): 2183s import cupy as cp 2183s 2183s if isinstance(val, CSMatrix): 2183s val = val.toarray() 2183s return cp.array(val) 2183s elif issubclass(typ, CupyCSRMatrix): 2183s > import cupy as cp 2183s E ModuleNotFoundError: No module named 'cupy' 2183s 2183s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:1016: ModuleNotFoundError 2183s ______________________ test_pairwise_concat[obs-cupy_csc] ______________________ 2183s 2183s axis_name = 'obs' 2183s array_type = functools.partial(, typ=) 2183s 2183s def test_pairwise_concat(axis_name, array_type): 2183s axis, axis_name = merge._resolve_axis(axis_name) 2183s _, alt_axis_name = merge._resolve_axis(1 - axis) 2183s axis_sizes = [[100, 200, 50], [50, 50, 50]] 2183s if axis_name == "var": 2183s axis_sizes.reverse() 2183s Ms, Ns = axis_sizes 2183s axis_attr = f"{axis_name}p" 2183s alt_attr = f"{alt_axis_name}p" 2183s 2183s def gen_axis_array(m): 2183s return array_type(sparse.random(m, m, format="csr", density=0.1)) 2183s 2183s adatas = { 2183s k: AnnData( 2183s X=sparse.csr_matrix((m, n)), 2183s > obsp={"arr": gen_axis_array(m)}, 2183s varp={"arr": gen_axis_array(n)}, 2183s ) 2183s for k, m, n in zip("abc", Ms, Ns) 2183s } 2183s 2183s tests/test_concatenate.py:855: 2183s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 2183s tests/test_concatenate.py:850: in gen_axis_array 2183s return array_type(sparse.random(m, m, format="csr", density=0.1)) 2183s /usr/lib/python3.13/functools.py:934: in wrapper 2183s return dispatch(args[0].__class__)(*args, **kw) 2183s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 2183s 2183s val = 2183s typ = 2183s 2183s @singledispatch 2183s def as_cupy(val, typ=None): 2183s """ 2183s Rough conversion function 2183s 2183s Will try to infer target type from input type if not specified. 2183s """ 2183s if typ is None: 2183s typ = resolve_cupy_type(val) 2183s 2183s if issubclass(typ, CupyArray): 2183s import cupy as cp 2183s 2183s if isinstance(val, CSMatrix): 2183s val = val.toarray() 2183s return cp.array(val) 2183s elif issubclass(typ, CupyCSRMatrix): 2183s import cupy as cp 2183s import cupyx.scipy.sparse as cpsparse 2183s 2183s if isinstance(val, np.ndarray): 2183s return cpsparse.csr_matrix(cp.array(val)) 2183s else: 2183s return cpsparse.csr_matrix(val) 2183s elif issubclass(typ, CupyCSCMatrix): 2183s > import cupy as cp 2183s E ModuleNotFoundError: No module named 'cupy' 2183s 2183s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:1024: ModuleNotFoundError 2183s _____________________ test_pairwise_concat[var-cupy_array] _____________________ 2183s 2183s axis_name = 'var' 2183s array_type = functools.partial(, typ=) 2183s 2183s def test_pairwise_concat(axis_name, array_type): 2183s axis, axis_name = merge._resolve_axis(axis_name) 2183s _, alt_axis_name = merge._resolve_axis(1 - axis) 2183s axis_sizes = [[100, 200, 50], [50, 50, 50]] 2183s if axis_name == "var": 2183s axis_sizes.reverse() 2183s Ms, Ns = axis_sizes 2183s axis_attr = f"{axis_name}p" 2183s alt_attr = f"{alt_axis_name}p" 2183s 2183s def gen_axis_array(m): 2183s return array_type(sparse.random(m, m, format="csr", density=0.1)) 2183s 2183s adatas = { 2183s k: AnnData( 2183s X=sparse.csr_matrix((m, n)), 2183s > obsp={"arr": gen_axis_array(m)}, 2183s varp={"arr": gen_axis_array(n)}, 2183s ) 2183s for k, m, n in zip("abc", Ms, Ns) 2183s } 2183s 2183s tests/test_concatenate.py:855: 2183s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 2183s tests/test_concatenate.py:850: in gen_axis_array 2183s return array_type(sparse.random(m, m, format="csr", density=0.1)) 2183s /usr/lib/python3.13/functools.py:934: in wrapper 2183s return dispatch(args[0].__class__)(*args, **kw) 2183s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 2183s 2183s val = 2183s typ = 2183s 2183s @singledispatch 2183s def as_cupy(val, typ=None): 2183s """ 2183s Rough conversion function 2183s 2183s Will try to infer target type from input type if not specified. 2183s """ 2183s if typ is None: 2183s typ = resolve_cupy_type(val) 2183s 2183s if issubclass(typ, CupyArray): 2183s > import cupy as cp 2183s E ModuleNotFoundError: No module named 'cupy' 2183s 2183s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:1010: ModuleNotFoundError 2183s ______________________ test_pairwise_concat[var-cupy_csr] ______________________ 2183s 2183s axis_name = 'var' 2183s array_type = functools.partial(, typ=) 2183s 2183s def test_pairwise_concat(axis_name, array_type): 2183s axis, axis_name = merge._resolve_axis(axis_name) 2183s _, alt_axis_name = merge._resolve_axis(1 - axis) 2183s axis_sizes = [[100, 200, 50], [50, 50, 50]] 2183s if axis_name == "var": 2183s axis_sizes.reverse() 2183s Ms, Ns = axis_sizes 2183s axis_attr = f"{axis_name}p" 2183s alt_attr = f"{alt_axis_name}p" 2183s 2183s def gen_axis_array(m): 2183s return array_type(sparse.random(m, m, format="csr", density=0.1)) 2183s 2183s adatas = { 2183s k: AnnData( 2183s X=sparse.csr_matrix((m, n)), 2183s > obsp={"arr": gen_axis_array(m)}, 2183s varp={"arr": gen_axis_array(n)}, 2183s ) 2183s for k, m, n in zip("abc", Ms, Ns) 2183s } 2183s 2183s tests/test_concatenate.py:855: 2183s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 2183s tests/test_concatenate.py:850: in gen_axis_array 2183s return array_type(sparse.random(m, m, format="csr", density=0.1)) 2183s /usr/lib/python3.13/functools.py:934: in wrapper 2183s return dispatch(args[0].__class__)(*args, **kw) 2183s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 2183s 2183s val = 2183s typ = 2183s 2183s @singledispatch 2183s def as_cupy(val, typ=None): 2183s """ 2183s Rough conversion function 2183s 2183s Will try to infer target type from input type if not specified. 2183s """ 2183s if typ is None: 2183s typ = resolve_cupy_type(val) 2183s 2183s if issubclass(typ, CupyArray): 2183s import cupy as cp 2183s 2183s if isinstance(val, CSMatrix): 2183s val = val.toarray() 2183s return cp.array(val) 2183s elif issubclass(typ, CupyCSRMatrix): 2183s > import cupy as cp 2183s E ModuleNotFoundError: No module named 'cupy' 2183s 2183s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:1016: ModuleNotFoundError 2183s ______________________ test_pairwise_concat[var-cupy_csc] ______________________ 2183s 2183s axis_name = 'var' 2183s array_type = functools.partial(, typ=) 2183s 2183s def test_pairwise_concat(axis_name, array_type): 2183s axis, axis_name = merge._resolve_axis(axis_name) 2183s _, alt_axis_name = merge._resolve_axis(1 - axis) 2183s axis_sizes = [[100, 200, 50], [50, 50, 50]] 2183s if axis_name == "var": 2183s axis_sizes.reverse() 2183s Ms, Ns = axis_sizes 2183s axis_attr = f"{axis_name}p" 2183s alt_attr = f"{alt_axis_name}p" 2183s 2183s def gen_axis_array(m): 2183s return array_type(sparse.random(m, m, format="csr", density=0.1)) 2183s 2183s adatas = { 2183s k: AnnData( 2183s X=sparse.csr_matrix((m, n)), 2183s > obsp={"arr": gen_axis_array(m)}, 2183s varp={"arr": gen_axis_array(n)}, 2183s ) 2183s for k, m, n in zip("abc", Ms, Ns) 2183s } 2183s 2183s tests/test_concatenate.py:855: 2183s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 2183s tests/test_concatenate.py:850: in gen_axis_array 2183s return array_type(sparse.random(m, m, format="csr", density=0.1)) 2183s /usr/lib/python3.13/functools.py:934: in wrapper 2183s return dispatch(args[0].__class__)(*args, **kw) 2183s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 2183s 2183s val = 2183s typ = 2183s 2183s @singledispatch 2183s def as_cupy(val, typ=None): 2183s """ 2183s Rough conversion function 2183s 2183s Will try to infer target type from input type if not specified. 2183s """ 2183s if typ is None: 2183s typ = resolve_cupy_type(val) 2183s 2183s if issubclass(typ, CupyArray): 2183s import cupy as cp 2183s 2183s if isinstance(val, CSMatrix): 2183s val = val.toarray() 2183s return cp.array(val) 2183s elif issubclass(typ, CupyCSRMatrix): 2183s import cupy as cp 2183s import cupyx.scipy.sparse as cpsparse 2183s 2183s if isinstance(val, np.ndarray): 2183s return cpsparse.csr_matrix(cp.array(val)) 2183s else: 2183s return cpsparse.csr_matrix(val) 2183s elif issubclass(typ, CupyCSCMatrix): 2183s > import cupy as cp 2183s E ModuleNotFoundError: No module named 'cupy' 2183s 2183s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:1024: ModuleNotFoundError 2183s _____________________ test_nan_merge[obs-inner-cupy_array] _____________________ 2183s 2183s axis_name = 'obs', join_type = 'inner' 2183s array_type = functools.partial(, typ=) 2183s 2183s def test_nan_merge(axis_name, join_type, array_type): 2183s axis, _ = merge._resolve_axis(axis_name) 2183s alt_axis, alt_axis_name = merge._resolve_axis(1 - axis) 2183s mapping_attr = f"{alt_axis_name}m" 2183s adata_shape = (20, 10) 2183s 2183s > arr = array_type( 2183s sparse.random(adata_shape[alt_axis], 10, density=0.1, format="csr") 2183s ) 2183s 2183s tests/test_concatenate.py:903: 2183s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 2183s /usr/lib/python3.13/functools.py:934: in wrapper 2183s return dispatch(args[0].__class__)(*args, **kw) 2183s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 2183s 2183s val = 2183s typ = 2183s 2183s @singledispatch 2183s def as_cupy(val, typ=None): 2183s """ 2183s Rough conversion function 2183s 2183s Will try to infer target type from input type if not specified. 2183s """ 2183s if typ is None: 2183s typ = resolve_cupy_type(val) 2183s 2183s if issubclass(typ, CupyArray): 2183s > import cupy as cp 2183s E ModuleNotFoundError: No module named 'cupy' 2183s 2183s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:1010: ModuleNotFoundError 2183s ______________________ test_nan_merge[obs-inner-cupy_csr] ______________________ 2183s 2183s axis_name = 'obs', join_type = 'inner' 2183s array_type = functools.partial(, typ=) 2183s 2183s def test_nan_merge(axis_name, join_type, array_type): 2183s axis, _ = merge._resolve_axis(axis_name) 2183s alt_axis, alt_axis_name = merge._resolve_axis(1 - axis) 2183s mapping_attr = f"{alt_axis_name}m" 2183s adata_shape = (20, 10) 2183s 2183s > arr = array_type( 2183s sparse.random(adata_shape[alt_axis], 10, density=0.1, format="csr") 2183s ) 2183s 2183s tests/test_concatenate.py:903: 2183s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 2183s /usr/lib/python3.13/functools.py:934: in wrapper 2183s return dispatch(args[0].__class__)(*args, **kw) 2183s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 2183s 2183s val = 2183s typ = 2183s 2183s @singledispatch 2183s def as_cupy(val, typ=None): 2183s """ 2183s Rough conversion function 2183s 2183s Will try to infer target type from input type if not specified. 2183s """ 2183s if typ is None: 2183s typ = resolve_cupy_type(val) 2183s 2183s if issubclass(typ, CupyArray): 2183s import cupy as cp 2183s 2183s if isinstance(val, CSMatrix): 2183s val = val.toarray() 2183s return cp.array(val) 2183s elif issubclass(typ, CupyCSRMatrix): 2183s > import cupy as cp 2183s E ModuleNotFoundError: No module named 'cupy' 2183s 2183s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:1016: ModuleNotFoundError 2183s ______________________ test_nan_merge[obs-inner-cupy_csc] ______________________ 2183s 2183s axis_name = 'obs', join_type = 'inner' 2183s array_type = functools.partial(, typ=) 2183s 2183s def test_nan_merge(axis_name, join_type, array_type): 2183s axis, _ = merge._resolve_axis(axis_name) 2183s alt_axis, alt_axis_name = merge._resolve_axis(1 - axis) 2183s mapping_attr = f"{alt_axis_name}m" 2183s adata_shape = (20, 10) 2183s 2183s > arr = array_type( 2183s sparse.random(adata_shape[alt_axis], 10, density=0.1, format="csr") 2183s ) 2183s 2183s tests/test_concatenate.py:903: 2183s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 2183s /usr/lib/python3.13/functools.py:934: in wrapper 2183s return dispatch(args[0].__class__)(*args, **kw) 2183s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 2183s 2183s val = 2183s typ = 2183s 2183s @singledispatch 2183s def as_cupy(val, typ=None): 2183s """ 2183s Rough conversion function 2183s 2183s Will try to infer target type from input type if not specified. 2183s """ 2183s if typ is None: 2183s typ = resolve_cupy_type(val) 2183s 2183s if issubclass(typ, CupyArray): 2183s import cupy as cp 2183s 2183s if isinstance(val, CSMatrix): 2183s val = val.toarray() 2183s return cp.array(val) 2183s elif issubclass(typ, CupyCSRMatrix): 2183s import cupy as cp 2183s import cupyx.scipy.sparse as cpsparse 2183s 2183s if isinstance(val, np.ndarray): 2183s return cpsparse.csr_matrix(cp.array(val)) 2183s else: 2183s return cpsparse.csr_matrix(val) 2183s elif issubclass(typ, CupyCSCMatrix): 2183s > import cupy as cp 2183s E ModuleNotFoundError: No module named 'cupy' 2183s 2183s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:1024: ModuleNotFoundError 2183s _____________________ test_nan_merge[obs-outer-cupy_array] _____________________ 2183s 2183s axis_name = 'obs', join_type = 'outer' 2183s array_type = functools.partial(, typ=) 2183s 2183s def test_nan_merge(axis_name, join_type, array_type): 2183s axis, _ = merge._resolve_axis(axis_name) 2183s alt_axis, alt_axis_name = merge._resolve_axis(1 - axis) 2183s mapping_attr = f"{alt_axis_name}m" 2183s adata_shape = (20, 10) 2183s 2183s > arr = array_type( 2183s sparse.random(adata_shape[alt_axis], 10, density=0.1, format="csr") 2183s ) 2183s 2183s tests/test_concatenate.py:903: 2183s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 2183s /usr/lib/python3.13/functools.py:934: in wrapper 2183s return dispatch(args[0].__class__)(*args, **kw) 2183s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 2183s 2183s val = 2183s typ = 2183s 2183s @singledispatch 2183s def as_cupy(val, typ=None): 2183s """ 2183s Rough conversion function 2183s 2183s Will try to infer target type from input type if not specified. 2183s """ 2183s if typ is None: 2183s typ = resolve_cupy_type(val) 2183s 2183s if issubclass(typ, CupyArray): 2183s > import cupy as cp 2183s E ModuleNotFoundError: No module named 'cupy' 2183s 2183s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:1010: ModuleNotFoundError 2183s ______________________ test_nan_merge[obs-outer-cupy_csr] ______________________ 2183s 2183s axis_name = 'obs', join_type = 'outer' 2183s array_type = functools.partial(, typ=) 2183s 2183s def test_nan_merge(axis_name, join_type, array_type): 2183s axis, _ = merge._resolve_axis(axis_name) 2183s alt_axis, alt_axis_name = merge._resolve_axis(1 - axis) 2183s mapping_attr = f"{alt_axis_name}m" 2183s adata_shape = (20, 10) 2183s 2183s > arr = array_type( 2183s sparse.random(adata_shape[alt_axis], 10, density=0.1, format="csr") 2183s ) 2183s 2183s tests/test_concatenate.py:903: 2183s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 2183s /usr/lib/python3.13/functools.py:934: in wrapper 2183s return dispatch(args[0].__class__)(*args, **kw) 2183s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 2183s 2183s val = 2183s typ = 2183s 2183s @singledispatch 2183s def as_cupy(val, typ=None): 2183s """ 2183s Rough conversion function 2183s 2183s Will try to infer target type from input type if not specified. 2183s """ 2183s if typ is None: 2183s typ = resolve_cupy_type(val) 2183s 2183s if issubclass(typ, CupyArray): 2183s import cupy as cp 2183s 2183s if isinstance(val, CSMatrix): 2183s val = val.toarray() 2183s return cp.array(val) 2183s elif issubclass(typ, CupyCSRMatrix): 2183s > import cupy as cp 2183s E ModuleNotFoundError: No module named 'cupy' 2183s 2183s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:1016: ModuleNotFoundError 2183s ______________________ test_nan_merge[obs-outer-cupy_csc] ______________________ 2183s 2183s axis_name = 'obs', join_type = 'outer' 2183s array_type = functools.partial(, typ=) 2183s 2183s def test_nan_merge(axis_name, join_type, array_type): 2183s axis, _ = merge._resolve_axis(axis_name) 2183s alt_axis, alt_axis_name = merge._resolve_axis(1 - axis) 2183s mapping_attr = f"{alt_axis_name}m" 2183s adata_shape = (20, 10) 2183s 2183s > arr = array_type( 2183s sparse.random(adata_shape[alt_axis], 10, density=0.1, format="csr") 2183s ) 2183s 2183s tests/test_concatenate.py:903: 2183s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 2183s /usr/lib/python3.13/functools.py:934: in wrapper 2183s return dispatch(args[0].__class__)(*args, **kw) 2184s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 2184s 2184s val = 2184s typ = 2184s 2184s @singledispatch 2184s def as_cupy(val, typ=None): 2184s """ 2184s Rough conversion function 2184s 2184s Will try to infer target type from input type if not specified. 2184s """ 2184s if typ is None: 2184s typ = resolve_cupy_type(val) 2184s 2184s if issubclass(typ, CupyArray): 2184s import cupy as cp 2184s 2184s if isinstance(val, CSMatrix): 2184s val = val.toarray() 2184s return cp.array(val) 2184s elif issubclass(typ, CupyCSRMatrix): 2184s import cupy as cp 2184s import cupyx.scipy.sparse as cpsparse 2184s 2184s if isinstance(val, np.ndarray): 2184s return cpsparse.csr_matrix(cp.array(val)) 2184s else: 2184s return cpsparse.csr_matrix(val) 2184s elif issubclass(typ, CupyCSCMatrix): 2184s > import cupy as cp 2184s E ModuleNotFoundError: No module named 'cupy' 2184s 2184s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:1024: ModuleNotFoundError 2184s _____________________ test_nan_merge[var-inner-cupy_array] _____________________ 2184s 2184s axis_name = 'var', join_type = 'inner' 2184s array_type = functools.partial(, typ=) 2184s 2184s def test_nan_merge(axis_name, join_type, array_type): 2184s axis, _ = merge._resolve_axis(axis_name) 2184s alt_axis, alt_axis_name = merge._resolve_axis(1 - axis) 2184s mapping_attr = f"{alt_axis_name}m" 2184s adata_shape = (20, 10) 2184s 2184s > arr = array_type( 2184s sparse.random(adata_shape[alt_axis], 10, density=0.1, format="csr") 2184s ) 2184s 2184s tests/test_concatenate.py:903: 2184s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 2184s /usr/lib/python3.13/functools.py:934: in wrapper 2184s return dispatch(args[0].__class__)(*args, **kw) 2184s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 2184s 2184s val = 2184s typ = 2184s 2184s @singledispatch 2184s def as_cupy(val, typ=None): 2184s """ 2184s Rough conversion function 2184s 2184s Will try to infer target type from input type if not specified. 2184s """ 2184s if typ is None: 2184s typ = resolve_cupy_type(val) 2184s 2184s if issubclass(typ, CupyArray): 2184s > import cupy as cp 2184s E ModuleNotFoundError: No module named 'cupy' 2184s 2184s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:1010: ModuleNotFoundError 2184s ______________________ test_nan_merge[var-inner-cupy_csr] ______________________ 2184s 2184s axis_name = 'var', join_type = 'inner' 2184s array_type = functools.partial(, typ=) 2184s 2184s def test_nan_merge(axis_name, join_type, array_type): 2184s axis, _ = merge._resolve_axis(axis_name) 2184s alt_axis, alt_axis_name = merge._resolve_axis(1 - axis) 2184s mapping_attr = f"{alt_axis_name}m" 2184s adata_shape = (20, 10) 2184s 2184s > arr = array_type( 2184s sparse.random(adata_shape[alt_axis], 10, density=0.1, format="csr") 2184s ) 2184s 2184s tests/test_concatenate.py:903: 2184s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 2184s /usr/lib/python3.13/functools.py:934: in wrapper 2184s return dispatch(args[0].__class__)(*args, **kw) 2184s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 2184s 2184s val = 2184s typ = 2184s 2184s @singledispatch 2184s def as_cupy(val, typ=None): 2184s """ 2184s Rough conversion function 2184s 2184s Will try to infer target type from input type if not specified. 2184s """ 2184s if typ is None: 2184s typ = resolve_cupy_type(val) 2184s 2184s if issubclass(typ, CupyArray): 2184s import cupy as cp 2184s 2184s if isinstance(val, CSMatrix): 2184s val = val.toarray() 2184s return cp.array(val) 2184s elif issubclass(typ, CupyCSRMatrix): 2184s > import cupy as cp 2184s E ModuleNotFoundError: No module named 'cupy' 2184s 2184s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:1016: ModuleNotFoundError 2184s ______________________ test_nan_merge[var-inner-cupy_csc] ______________________ 2184s 2184s axis_name = 'var', join_type = 'inner' 2184s array_type = functools.partial(, typ=) 2184s 2184s def test_nan_merge(axis_name, join_type, array_type): 2184s axis, _ = merge._resolve_axis(axis_name) 2184s alt_axis, alt_axis_name = merge._resolve_axis(1 - axis) 2184s mapping_attr = f"{alt_axis_name}m" 2184s adata_shape = (20, 10) 2184s 2184s > arr = array_type( 2184s sparse.random(adata_shape[alt_axis], 10, density=0.1, format="csr") 2184s ) 2184s 2184s tests/test_concatenate.py:903: 2184s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 2184s /usr/lib/python3.13/functools.py:934: in wrapper 2184s return dispatch(args[0].__class__)(*args, **kw) 2184s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 2184s 2184s val = 2184s typ = 2184s 2184s @singledispatch 2184s def as_cupy(val, typ=None): 2184s """ 2184s Rough conversion function 2184s 2184s Will try to infer target type from input type if not specified. 2184s """ 2184s if typ is None: 2184s typ = resolve_cupy_type(val) 2184s 2184s if issubclass(typ, CupyArray): 2184s import cupy as cp 2184s 2184s if isinstance(val, CSMatrix): 2184s val = val.toarray() 2184s return cp.array(val) 2184s elif issubclass(typ, CupyCSRMatrix): 2184s import cupy as cp 2184s import cupyx.scipy.sparse as cpsparse 2184s 2184s if isinstance(val, np.ndarray): 2184s return cpsparse.csr_matrix(cp.array(val)) 2184s else: 2184s return cpsparse.csr_matrix(val) 2184s elif issubclass(typ, CupyCSCMatrix): 2184s > import cupy as cp 2184s E ModuleNotFoundError: No module named 'cupy' 2184s 2184s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:1024: ModuleNotFoundError 2184s _____________________ test_nan_merge[var-outer-cupy_array] _____________________ 2184s 2184s axis_name = 'var', join_type = 'outer' 2184s array_type = functools.partial(, typ=) 2184s 2184s def test_nan_merge(axis_name, join_type, array_type): 2184s axis, _ = merge._resolve_axis(axis_name) 2184s alt_axis, alt_axis_name = merge._resolve_axis(1 - axis) 2184s mapping_attr = f"{alt_axis_name}m" 2184s adata_shape = (20, 10) 2184s 2184s > arr = array_type( 2184s sparse.random(adata_shape[alt_axis], 10, density=0.1, format="csr") 2184s ) 2184s 2184s tests/test_concatenate.py:903: 2184s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 2184s /usr/lib/python3.13/functools.py:934: in wrapper 2184s return dispatch(args[0].__class__)(*args, **kw) 2184s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 2184s 2184s val = 2184s typ = 2184s 2184s @singledispatch 2184s def as_cupy(val, typ=None): 2184s """ 2184s Rough conversion function 2184s 2184s Will try to infer target type from input type if not specified. 2184s """ 2184s if typ is None: 2184s typ = resolve_cupy_type(val) 2184s 2184s if issubclass(typ, CupyArray): 2184s > import cupy as cp 2184s E ModuleNotFoundError: No module named 'cupy' 2184s 2184s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:1010: ModuleNotFoundError 2184s ______________________ test_nan_merge[var-outer-cupy_csr] ______________________ 2184s 2184s axis_name = 'var', join_type = 'outer' 2184s array_type = functools.partial(, typ=) 2184s 2184s def test_nan_merge(axis_name, join_type, array_type): 2184s axis, _ = merge._resolve_axis(axis_name) 2184s alt_axis, alt_axis_name = merge._resolve_axis(1 - axis) 2184s mapping_attr = f"{alt_axis_name}m" 2184s adata_shape = (20, 10) 2184s 2184s > arr = array_type( 2184s sparse.random(adata_shape[alt_axis], 10, density=0.1, format="csr") 2184s ) 2184s 2184s tests/test_concatenate.py:903: 2184s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 2184s /usr/lib/python3.13/functools.py:934: in wrapper 2184s return dispatch(args[0].__class__)(*args, **kw) 2184s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 2184s 2184s val = 2184s typ = 2184s 2184s @singledispatch 2184s def as_cupy(val, typ=None): 2184s """ 2184s Rough conversion function 2184s 2184s Will try to infer target type from input type if not specified. 2184s """ 2184s if typ is None: 2184s typ = resolve_cupy_type(val) 2184s 2184s if issubclass(typ, CupyArray): 2184s import cupy as cp 2184s 2184s if isinstance(val, CSMatrix): 2184s val = val.toarray() 2184s return cp.array(val) 2184s elif issubclass(typ, CupyCSRMatrix): 2184s > import cupy as cp 2184s E ModuleNotFoundError: No module named 'cupy' 2184s 2184s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:1016: ModuleNotFoundError 2184s ______________________ test_nan_merge[var-outer-cupy_csc] ______________________ 2184s 2184s axis_name = 'var', join_type = 'outer' 2184s array_type = functools.partial(, typ=) 2184s 2184s def test_nan_merge(axis_name, join_type, array_type): 2184s axis, _ = merge._resolve_axis(axis_name) 2184s alt_axis, alt_axis_name = merge._resolve_axis(1 - axis) 2184s mapping_attr = f"{alt_axis_name}m" 2184s adata_shape = (20, 10) 2184s 2184s > arr = array_type( 2184s sparse.random(adata_shape[alt_axis], 10, density=0.1, format="csr") 2184s ) 2184s 2184s tests/test_concatenate.py:903: 2184s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 2184s /usr/lib/python3.13/functools.py:934: in wrapper 2184s return dispatch(args[0].__class__)(*args, **kw) 2184s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 2184s 2184s val = 2184s typ = 2184s 2184s @singledispatch 2184s def as_cupy(val, typ=None): 2184s """ 2184s Rough conversion function 2184s 2184s Will try to infer target type from input type if not specified. 2184s """ 2184s if typ is None: 2184s typ = resolve_cupy_type(val) 2184s 2184s if issubclass(typ, CupyArray): 2184s import cupy as cp 2184s 2184s if isinstance(val, CSMatrix): 2184s val = val.toarray() 2184s return cp.array(val) 2184s elif issubclass(typ, CupyCSRMatrix): 2184s import cupy as cp 2184s import cupyx.scipy.sparse as cpsparse 2184s 2184s if isinstance(val, np.ndarray): 2184s return cpsparse.csr_matrix(cp.array(val)) 2184s else: 2184s return cpsparse.csr_matrix(val) 2184s elif issubclass(typ, CupyCSCMatrix): 2184s > import cupy as cp 2184s E ModuleNotFoundError: No module named 'cupy' 2184s 2184s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:1024: ModuleNotFoundError 2184s ______________ test_transposed_concat[cupy_array-obs-inner-None] _______________ 2184s 2184s array_type = functools.partial(, typ=) 2184s axis_name = 'obs', join_type = 'inner', merge_strategy = None 2184s 2184s def test_transposed_concat(array_type, axis_name, join_type, merge_strategy): 2184s axis, axis_name = merge._resolve_axis(axis_name) 2184s alt_axis = 1 - axis 2184s > lhs = gen_adata((10, 10), X_type=array_type, **GEN_ADATA_DASK_ARGS) 2184s 2184s tests/test_concatenate.py:1167: 2184s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 2184s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:346: in gen_adata 2184s X = X_type(random_state.binomial(100, 0.005, (M, N)).astype(X_dtype)) 2184s /usr/lib/python3.13/functools.py:934: in wrapper 2184s return dispatch(args[0].__class__)(*args, **kw) 2184s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 2184s 2184s val = array([[0., 1., 0., 1., 0., 0., 1., 1., 1., 0.], 2184s [0., 0., 1., 1., 1., 1., 0., 2., 0., 1.], 2184s [0., 1., 0., ... 0.], 2184s [2., 0., 2., 1., 0., 0., 1., 0., 1., 1.], 2184s [1., 0., 0., 0., 0., 0., 1., 0., 0., 0.]], dtype=float32) 2184s typ = 2184s 2184s @singledispatch 2184s def as_cupy(val, typ=None): 2184s """ 2184s Rough conversion function 2184s 2184s Will try to infer target type from input type if not specified. 2184s """ 2184s if typ is None: 2184s typ = resolve_cupy_type(val) 2184s 2184s if issubclass(typ, CupyArray): 2184s > import cupy as cp 2184s E ModuleNotFoundError: No module named 'cupy' 2184s 2184s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:1010: ModuleNotFoundError 2184s ______________ test_transposed_concat[cupy_array-obs-inner-same] _______________ 2184s 2184s array_type = functools.partial(, typ=) 2184s axis_name = 'obs', join_type = 'inner', merge_strategy = 'same' 2184s 2184s def test_transposed_concat(array_type, axis_name, join_type, merge_strategy): 2184s axis, axis_name = merge._resolve_axis(axis_name) 2184s alt_axis = 1 - axis 2184s > lhs = gen_adata((10, 10), X_type=array_type, **GEN_ADATA_DASK_ARGS) 2184s 2184s tests/test_concatenate.py:1167: 2184s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 2184s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:346: in gen_adata 2184s X = X_type(random_state.binomial(100, 0.005, (M, N)).astype(X_dtype)) 2184s /usr/lib/python3.13/functools.py:934: in wrapper 2184s return dispatch(args[0].__class__)(*args, **kw) 2184s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 2184s 2184s val = array([[1., 1., 0., 0., 1., 1., 1., 0., 1., 0.], 2184s [0., 2., 1., 1., 0., 0., 0., 1., 0., 0.], 2184s [1., 0., 1., ... 2.], 2184s [2., 1., 1., 1., 0., 1., 0., 1., 1., 0.], 2184s [2., 1., 0., 0., 0., 0., 1., 1., 0., 0.]], dtype=float32) 2184s typ = 2184s 2184s @singledispatch 2184s def as_cupy(val, typ=None): 2184s """ 2184s Rough conversion function 2184s 2184s Will try to infer target type from input type if not specified. 2184s """ 2184s if typ is None: 2184s typ = resolve_cupy_type(val) 2184s 2184s if issubclass(typ, CupyArray): 2184s > import cupy as cp 2184s E ModuleNotFoundError: No module named 'cupy' 2184s 2184s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:1010: ModuleNotFoundError 2184s _____________ test_transposed_concat[cupy_array-obs-inner-unique] ______________ 2184s 2184s array_type = functools.partial(, typ=) 2184s axis_name = 'obs', join_type = 'inner', merge_strategy = 'unique' 2184s 2184s def test_transposed_concat(array_type, axis_name, join_type, merge_strategy): 2184s axis, axis_name = merge._resolve_axis(axis_name) 2184s alt_axis = 1 - axis 2184s > lhs = gen_adata((10, 10), X_type=array_type, **GEN_ADATA_DASK_ARGS) 2184s 2184s tests/test_concatenate.py:1167: 2184s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 2184s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:346: in gen_adata 2184s X = X_type(random_state.binomial(100, 0.005, (M, N)).astype(X_dtype)) 2184s /usr/lib/python3.13/functools.py:934: in wrapper 2184s return dispatch(args[0].__class__)(*args, **kw) 2184s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 2184s 2184s val = array([[0., 0., 0., 0., 1., 0., 0., 0., 0., 0.], 2184s [1., 0., 0., 1., 1., 1., 2., 0., 2., 0.], 2184s [1., 1., 1., ... 0.], 2184s [1., 1., 1., 0., 0., 0., 1., 1., 1., 0.], 2184s [2., 1., 0., 0., 0., 0., 1., 1., 0., 1.]], dtype=float32) 2184s typ = 2184s 2184s @singledispatch 2184s def as_cupy(val, typ=None): 2184s """ 2184s Rough conversion function 2184s 2184s Will try to infer target type from input type if not specified. 2184s """ 2184s if typ is None: 2184s typ = resolve_cupy_type(val) 2184s 2184s if issubclass(typ, CupyArray): 2184s > import cupy as cp 2184s E ModuleNotFoundError: No module named 'cupy' 2184s 2184s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:1010: ModuleNotFoundError 2184s ______________ test_transposed_concat[cupy_array-obs-inner-first] ______________ 2184s 2184s array_type = functools.partial(, typ=) 2184s axis_name = 'obs', join_type = 'inner', merge_strategy = 'first' 2184s 2184s def test_transposed_concat(array_type, axis_name, join_type, merge_strategy): 2184s axis, axis_name = merge._resolve_axis(axis_name) 2184s alt_axis = 1 - axis 2184s > lhs = gen_adata((10, 10), X_type=array_type, **GEN_ADATA_DASK_ARGS) 2184s 2184s tests/test_concatenate.py:1167: 2184s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 2184s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:346: in gen_adata 2184s X = X_type(random_state.binomial(100, 0.005, (M, N)).astype(X_dtype)) 2184s /usr/lib/python3.13/functools.py:934: in wrapper 2184s return dispatch(args[0].__class__)(*args, **kw) 2184s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 2184s 2184s val = array([[0., 0., 0., 1., 2., 0., 0., 1., 0., 0.], 2184s [1., 0., 0., 0., 0., 1., 0., 0., 0., 0.], 2184s [0., 1., 0., ... 0.], 2184s [0., 1., 0., 0., 0., 0., 0., 1., 1., 1.], 2184s [1., 0., 0., 0., 0., 0., 0., 0., 0., 1.]], dtype=float32) 2184s typ = 2184s 2184s @singledispatch 2184s def as_cupy(val, typ=None): 2184s """ 2184s Rough conversion function 2184s 2184s Will try to infer target type from input type if not specified. 2184s """ 2184s if typ is None: 2184s typ = resolve_cupy_type(val) 2184s 2184s if issubclass(typ, CupyArray): 2184s > import cupy as cp 2184s E ModuleNotFoundError: No module named 'cupy' 2184s 2184s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:1010: ModuleNotFoundError 2184s ______________ test_transposed_concat[cupy_array-obs-inner-only] _______________ 2184s 2184s array_type = functools.partial(, typ=) 2184s axis_name = 'obs', join_type = 'inner', merge_strategy = 'only' 2184s 2184s def test_transposed_concat(array_type, axis_name, join_type, merge_strategy): 2184s axis, axis_name = merge._resolve_axis(axis_name) 2184s alt_axis = 1 - axis 2184s > lhs = gen_adata((10, 10), X_type=array_type, **GEN_ADATA_DASK_ARGS) 2184s 2184s tests/test_concatenate.py:1167: 2184s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 2184s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:346: in gen_adata 2184s X = X_type(random_state.binomial(100, 0.005, (M, N)).astype(X_dtype)) 2184s /usr/lib/python3.13/functools.py:934: in wrapper 2184s return dispatch(args[0].__class__)(*args, **kw) 2184s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 2184s 2184s val = array([[1., 1., 0., 0., 0., 1., 1., 0., 0., 1.], 2184s [0., 2., 2., 0., 0., 0., 0., 1., 0., 0.], 2184s [0., 1., 1., ... 0.], 2184s [1., 0., 1., 0., 2., 1., 1., 0., 0., 1.], 2184s [0., 0., 0., 0., 0., 0., 0., 0., 1., 1.]], dtype=float32) 2184s typ = 2184s 2184s @singledispatch 2184s def as_cupy(val, typ=None): 2184s """ 2184s Rough conversion function 2184s 2184s Will try to infer target type from input type if not specified. 2184s """ 2184s if typ is None: 2184s typ = resolve_cupy_type(val) 2184s 2184s if issubclass(typ, CupyArray): 2184s > import cupy as cp 2184s E ModuleNotFoundError: No module named 'cupy' 2184s 2184s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:1010: ModuleNotFoundError 2184s ______________ test_transposed_concat[cupy_array-obs-outer-None] _______________ 2184s 2184s array_type = functools.partial(, typ=) 2184s axis_name = 'obs', join_type = 'outer', merge_strategy = None 2184s 2184s def test_transposed_concat(array_type, axis_name, join_type, merge_strategy): 2184s axis, axis_name = merge._resolve_axis(axis_name) 2184s alt_axis = 1 - axis 2184s > lhs = gen_adata((10, 10), X_type=array_type, **GEN_ADATA_DASK_ARGS) 2184s 2184s tests/test_concatenate.py:1167: 2184s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 2184s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:346: in gen_adata 2184s X = X_type(random_state.binomial(100, 0.005, (M, N)).astype(X_dtype)) 2184s /usr/lib/python3.13/functools.py:934: in wrapper 2184s return dispatch(args[0].__class__)(*args, **kw) 2184s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 2184s 2184s val = array([[0., 0., 0., 0., 0., 1., 0., 0., 1., 1.], 2184s [1., 0., 0., 2., 0., 1., 0., 0., 0., 1.], 2184s [1., 0., 0., ... 1.], 2184s [0., 0., 0., 0., 1., 0., 1., 1., 0., 1.], 2184s [0., 0., 2., 0., 0., 0., 0., 0., 0., 0.]], dtype=float32) 2184s typ = 2184s 2184s @singledispatch 2184s def as_cupy(val, typ=None): 2184s """ 2184s Rough conversion function 2184s 2184s Will try to infer target type from input type if not specified. 2184s """ 2184s if typ is None: 2184s typ = resolve_cupy_type(val) 2184s 2184s if issubclass(typ, CupyArray): 2184s > import cupy as cp 2184s E ModuleNotFoundError: No module named 'cupy' 2184s 2184s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:1010: ModuleNotFoundError 2184s ______________ test_transposed_concat[cupy_array-obs-outer-same] _______________ 2184s 2184s array_type = functools.partial(, typ=) 2184s axis_name = 'obs', join_type = 'outer', merge_strategy = 'same' 2184s 2184s def test_transposed_concat(array_type, axis_name, join_type, merge_strategy): 2184s axis, axis_name = merge._resolve_axis(axis_name) 2184s alt_axis = 1 - axis 2184s > lhs = gen_adata((10, 10), X_type=array_type, **GEN_ADATA_DASK_ARGS) 2184s 2184s tests/test_concatenate.py:1167: 2184s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 2184s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:346: in gen_adata 2184s X = X_type(random_state.binomial(100, 0.005, (M, N)).astype(X_dtype)) 2184s /usr/lib/python3.13/functools.py:934: in wrapper 2184s return dispatch(args[0].__class__)(*args, **kw) 2184s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 2184s 2184s val = array([[0., 0., 2., 1., 0., 1., 0., 0., 0., 1.], 2184s [0., 1., 2., 0., 1., 0., 1., 0., 0., 0.], 2184s [2., 2., 1., ... 1.], 2184s [1., 2., 1., 1., 0., 0., 1., 0., 0., 0.], 2184s [1., 0., 0., 1., 0., 3., 0., 1., 0., 0.]], dtype=float32) 2184s typ = 2184s 2184s @singledispatch 2184s def as_cupy(val, typ=None): 2184s """ 2184s Rough conversion function 2184s 2184s Will try to infer target type from input type if not specified. 2184s """ 2184s if typ is None: 2184s typ = resolve_cupy_type(val) 2184s 2184s if issubclass(typ, CupyArray): 2184s > import cupy as cp 2184s E ModuleNotFoundError: No module named 'cupy' 2184s 2184s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:1010: ModuleNotFoundError 2184s _____________ test_transposed_concat[cupy_array-obs-outer-unique] ______________ 2184s 2184s array_type = functools.partial(, typ=) 2184s axis_name = 'obs', join_type = 'outer', merge_strategy = 'unique' 2184s 2184s def test_transposed_concat(array_type, axis_name, join_type, merge_strategy): 2184s axis, axis_name = merge._resolve_axis(axis_name) 2184s alt_axis = 1 - axis 2184s > lhs = gen_adata((10, 10), X_type=array_type, **GEN_ADATA_DASK_ARGS) 2184s 2184s tests/test_concatenate.py:1167: 2184s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 2184s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:346: in gen_adata 2184s X = X_type(random_state.binomial(100, 0.005, (M, N)).astype(X_dtype)) 2184s /usr/lib/python3.13/functools.py:934: in wrapper 2184s return dispatch(args[0].__class__)(*args, **kw) 2184s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 2184s 2184s val = array([[0., 0., 0., 1., 0., 0., 0., 1., 1., 0.], 2184s [1., 0., 0., 1., 1., 0., 1., 0., 0., 1.], 2184s [0., 0., 0., ... 2.], 2184s [2., 0., 0., 0., 0., 0., 0., 0., 0., 1.], 2184s [1., 0., 1., 0., 2., 0., 0., 0., 0., 0.]], dtype=float32) 2184s typ = 2184s 2184s @singledispatch 2184s def as_cupy(val, typ=None): 2184s """ 2184s Rough conversion function 2184s 2184s Will try to infer target type from input type if not specified. 2184s """ 2184s if typ is None: 2184s typ = resolve_cupy_type(val) 2184s 2184s if issubclass(typ, CupyArray): 2184s > import cupy as cp 2184s E ModuleNotFoundError: No module named 'cupy' 2184s 2184s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:1010: ModuleNotFoundError 2184s ______________ test_transposed_concat[cupy_array-obs-outer-first] ______________ 2184s 2184s array_type = functools.partial(, typ=) 2184s axis_name = 'obs', join_type = 'outer', merge_strategy = 'first' 2184s 2184s def test_transposed_concat(array_type, axis_name, join_type, merge_strategy): 2184s axis, axis_name = merge._resolve_axis(axis_name) 2184s alt_axis = 1 - axis 2184s > lhs = gen_adata((10, 10), X_type=array_type, **GEN_ADATA_DASK_ARGS) 2184s 2184s tests/test_concatenate.py:1167: 2184s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 2184s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:346: in gen_adata 2184s X = X_type(random_state.binomial(100, 0.005, (M, N)).astype(X_dtype)) 2184s /usr/lib/python3.13/functools.py:934: in wrapper 2184s return dispatch(args[0].__class__)(*args, **kw) 2184s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 2184s 2184s val = array([[1., 0., 0., 0., 1., 0., 0., 1., 0., 0.], 2184s [0., 0., 1., 2., 1., 1., 0., 0., 0., 0.], 2184s [0., 0., 0., ... 2.], 2184s [2., 0., 1., 1., 0., 1., 3., 1., 1., 1.], 2184s [0., 0., 1., 2., 0., 0., 0., 0., 0., 0.]], dtype=float32) 2184s typ = 2184s 2184s @singledispatch 2184s def as_cupy(val, typ=None): 2184s """ 2184s Rough conversion function 2184s 2184s Will try to infer target type from input type if not specified. 2184s """ 2184s if typ is None: 2184s typ = resolve_cupy_type(val) 2184s 2184s if issubclass(typ, CupyArray): 2184s > import cupy as cp 2184s E ModuleNotFoundError: No module named 'cupy' 2184s 2184s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:1010: ModuleNotFoundError 2184s ______________ test_transposed_concat[cupy_array-obs-outer-only] _______________ 2184s 2184s array_type = functools.partial(, typ=) 2184s axis_name = 'obs', join_type = 'outer', merge_strategy = 'only' 2184s 2184s def test_transposed_concat(array_type, axis_name, join_type, merge_strategy): 2184s axis, axis_name = merge._resolve_axis(axis_name) 2184s alt_axis = 1 - axis 2184s > lhs = gen_adata((10, 10), X_type=array_type, **GEN_ADATA_DASK_ARGS) 2184s 2184s tests/test_concatenate.py:1167: 2184s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 2184s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:346: in gen_adata 2184s X = X_type(random_state.binomial(100, 0.005, (M, N)).astype(X_dtype)) 2184s /usr/lib/python3.13/functools.py:934: in wrapper 2184s return dispatch(args[0].__class__)(*args, **kw) 2184s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 2184s 2184s val = array([[1., 1., 3., 0., 0., 0., 0., 0., 0., 1.], 2184s [4., 1., 0., 0., 1., 2., 1., 0., 0., 2.], 2184s [1., 0., 1., ... 0.], 2184s [1., 0., 0., 0., 1., 0., 1., 0., 0., 0.], 2184s [0., 1., 1., 0., 1., 0., 0., 2., 2., 0.]], dtype=float32) 2184s typ = 2184s 2184s @singledispatch 2184s def as_cupy(val, typ=None): 2184s """ 2184s Rough conversion function 2184s 2184s Will try to infer target type from input type if not specified. 2184s """ 2184s if typ is None: 2184s typ = resolve_cupy_type(val) 2184s 2184s if issubclass(typ, CupyArray): 2184s > import cupy as cp 2184s E ModuleNotFoundError: No module named 'cupy' 2184s 2184s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:1010: ModuleNotFoundError 2184s ______________ test_transposed_concat[cupy_array-var-inner-None] _______________ 2184s 2184s array_type = functools.partial(, typ=) 2184s axis_name = 'var', join_type = 'inner', merge_strategy = None 2184s 2184s def test_transposed_concat(array_type, axis_name, join_type, merge_strategy): 2184s axis, axis_name = merge._resolve_axis(axis_name) 2184s alt_axis = 1 - axis 2184s > lhs = gen_adata((10, 10), X_type=array_type, **GEN_ADATA_DASK_ARGS) 2184s 2184s tests/test_concatenate.py:1167: 2184s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 2184s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:346: in gen_adata 2184s X = X_type(random_state.binomial(100, 0.005, (M, N)).astype(X_dtype)) 2184s /usr/lib/python3.13/functools.py:934: in wrapper 2184s return dispatch(args[0].__class__)(*args, **kw) 2184s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 2184s 2184s val = array([[0., 0., 0., 0., 0., 0., 0., 1., 0., 0.], 2184s [2., 0., 0., 0., 0., 0., 1., 1., 1., 1.], 2184s [1., 0., 0., ... 0.], 2184s [0., 1., 1., 0., 2., 0., 0., 3., 1., 1.], 2184s [1., 0., 0., 0., 2., 1., 1., 0., 0., 0.]], dtype=float32) 2184s typ = 2184s 2184s @singledispatch 2184s def as_cupy(val, typ=None): 2184s """ 2184s Rough conversion function 2184s 2184s Will try to infer target type from input type if not specified. 2184s """ 2184s if typ is None: 2184s typ = resolve_cupy_type(val) 2184s 2184s if issubclass(typ, CupyArray): 2184s > import cupy as cp 2184s E ModuleNotFoundError: No module named 'cupy' 2184s 2184s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:1010: ModuleNotFoundError 2184s ______________ test_transposed_concat[cupy_array-var-inner-same] _______________ 2184s 2184s array_type = functools.partial(, typ=) 2184s axis_name = 'var', join_type = 'inner', merge_strategy = 'same' 2184s 2184s def test_transposed_concat(array_type, axis_name, join_type, merge_strategy): 2184s axis, axis_name = merge._resolve_axis(axis_name) 2184s alt_axis = 1 - axis 2184s > lhs = gen_adata((10, 10), X_type=array_type, **GEN_ADATA_DASK_ARGS) 2184s 2184s tests/test_concatenate.py:1167: 2184s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 2184s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:346: in gen_adata 2184s X = X_type(random_state.binomial(100, 0.005, (M, N)).astype(X_dtype)) 2184s /usr/lib/python3.13/functools.py:934: in wrapper 2184s return dispatch(args[0].__class__)(*args, **kw) 2184s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 2184s 2184s val = array([[0., 0., 0., 1., 1., 0., 1., 1., 0., 0.], 2184s [0., 1., 1., 1., 0., 1., 0., 0., 0., 0.], 2184s [0., 0., 0., ... 1.], 2184s [0., 1., 0., 1., 0., 0., 0., 0., 0., 0.], 2184s [2., 0., 0., 1., 1., 0., 0., 0., 0., 0.]], dtype=float32) 2184s typ = 2184s 2184s @singledispatch 2184s def as_cupy(val, typ=None): 2184s """ 2184s Rough conversion function 2184s 2184s Will try to infer target type from input type if not specified. 2184s """ 2184s if typ is None: 2184s typ = resolve_cupy_type(val) 2184s 2184s if issubclass(typ, CupyArray): 2184s > import cupy as cp 2184s E ModuleNotFoundError: No module named 'cupy' 2184s 2184s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:1010: ModuleNotFoundError 2184s _____________ test_transposed_concat[cupy_array-var-inner-unique] ______________ 2184s 2184s array_type = functools.partial(, typ=) 2184s axis_name = 'var', join_type = 'inner', merge_strategy = 'unique' 2184s 2184s def test_transposed_concat(array_type, axis_name, join_type, merge_strategy): 2184s axis, axis_name = merge._resolve_axis(axis_name) 2184s alt_axis = 1 - axis 2184s > lhs = gen_adata((10, 10), X_type=array_type, **GEN_ADATA_DASK_ARGS) 2184s 2184s tests/test_concatenate.py:1167: 2184s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 2184s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:346: in gen_adata 2184s X = X_type(random_state.binomial(100, 0.005, (M, N)).astype(X_dtype)) 2184s /usr/lib/python3.13/functools.py:934: in wrapper 2184s return dispatch(args[0].__class__)(*args, **kw) 2184s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 2184s 2184s val = array([[0., 0., 2., 1., 0., 1., 0., 0., 0., 1.], 2184s [0., 0., 0., 1., 2., 0., 1., 0., 1., 0.], 2184s [0., 0., 3., ... 1.], 2184s [0., 0., 0., 2., 1., 0., 0., 0., 1., 0.], 2184s [1., 0., 0., 0., 0., 0., 1., 0., 0., 1.]], dtype=float32) 2184s typ = 2184s 2184s @singledispatch 2184s def as_cupy(val, typ=None): 2184s """ 2184s Rough conversion function 2184s 2184s Will try to infer target type from input type if not specified. 2184s """ 2184s if typ is None: 2184s typ = resolve_cupy_type(val) 2184s 2184s if issubclass(typ, CupyArray): 2184s > import cupy as cp 2184s E ModuleNotFoundError: No module named 'cupy' 2184s 2184s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:1010: ModuleNotFoundError 2184s ______________ test_transposed_concat[cupy_array-var-inner-first] ______________ 2184s 2184s array_type = functools.partial(, typ=) 2184s axis_name = 'var', join_type = 'inner', merge_strategy = 'first' 2184s 2184s def test_transposed_concat(array_type, axis_name, join_type, merge_strategy): 2184s axis, axis_name = merge._resolve_axis(axis_name) 2184s alt_axis = 1 - axis 2184s > lhs = gen_adata((10, 10), X_type=array_type, **GEN_ADATA_DASK_ARGS) 2184s 2184s tests/test_concatenate.py:1167: 2184s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 2184s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:346: in gen_adata 2184s X = X_type(random_state.binomial(100, 0.005, (M, N)).astype(X_dtype)) 2184s /usr/lib/python3.13/functools.py:934: in wrapper 2184s return dispatch(args[0].__class__)(*args, **kw) 2184s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 2184s 2184s val = array([[1., 0., 0., 0., 1., 0., 1., 1., 2., 2.], 2184s [0., 1., 0., 1., 1., 0., 0., 0., 1., 0.], 2184s [0., 1., 0., ... 1.], 2184s [1., 0., 0., 1., 0., 1., 0., 1., 0., 1.], 2184s [2., 1., 0., 0., 0., 0., 0., 0., 1., 0.]], dtype=float32) 2184s typ = 2184s 2184s @singledispatch 2184s def as_cupy(val, typ=None): 2184s """ 2184s Rough conversion function 2184s 2184s Will try to infer target type from input type if not specified. 2184s """ 2184s if typ is None: 2184s typ = resolve_cupy_type(val) 2184s 2184s if issubclass(typ, CupyArray): 2184s > import cupy as cp 2184s E ModuleNotFoundError: No module named 'cupy' 2184s 2184s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:1010: ModuleNotFoundError 2184s ______________ test_transposed_concat[cupy_array-var-inner-only] _______________ 2184s 2184s array_type = functools.partial(, typ=) 2184s axis_name = 'var', join_type = 'inner', merge_strategy = 'only' 2184s 2184s def test_transposed_concat(array_type, axis_name, join_type, merge_strategy): 2184s axis, axis_name = merge._resolve_axis(axis_name) 2184s alt_axis = 1 - axis 2184s > lhs = gen_adata((10, 10), X_type=array_type, **GEN_ADATA_DASK_ARGS) 2184s 2184s tests/test_concatenate.py:1167: 2184s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 2184s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:346: in gen_adata 2184s X = X_type(random_state.binomial(100, 0.005, (M, N)).astype(X_dtype)) 2184s /usr/lib/python3.13/functools.py:934: in wrapper 2184s return dispatch(args[0].__class__)(*args, **kw) 2184s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 2184s 2184s val = array([[1., 0., 1., 0., 0., 1., 1., 0., 2., 0.], 2184s [0., 0., 0., 1., 1., 0., 0., 0., 0., 0.], 2184s [0., 1., 0., ... 1.], 2184s [0., 1., 0., 0., 0., 1., 0., 0., 0., 2.], 2184s [0., 0., 1., 0., 0., 1., 0., 2., 0., 1.]], dtype=float32) 2184s typ = 2184s 2184s @singledispatch 2184s def as_cupy(val, typ=None): 2184s """ 2184s Rough conversion function 2184s 2184s Will try to infer target type from input type if not specified. 2184s """ 2184s if typ is None: 2184s typ = resolve_cupy_type(val) 2184s 2184s if issubclass(typ, CupyArray): 2184s > import cupy as cp 2184s E ModuleNotFoundError: No module named 'cupy' 2184s 2184s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:1010: ModuleNotFoundError 2184s ______________ test_transposed_concat[cupy_array-var-outer-None] _______________ 2184s 2184s array_type = functools.partial(, typ=) 2184s axis_name = 'var', join_type = 'outer', merge_strategy = None 2184s 2184s def test_transposed_concat(array_type, axis_name, join_type, merge_strategy): 2184s axis, axis_name = merge._resolve_axis(axis_name) 2184s alt_axis = 1 - axis 2184s > lhs = gen_adata((10, 10), X_type=array_type, **GEN_ADATA_DASK_ARGS) 2184s 2184s tests/test_concatenate.py:1167: 2184s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 2184s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:346: in gen_adata 2184s X = X_type(random_state.binomial(100, 0.005, (M, N)).astype(X_dtype)) 2184s /usr/lib/python3.13/functools.py:934: in wrapper 2184s return dispatch(args[0].__class__)(*args, **kw) 2184s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 2184s 2184s val = array([[0., 0., 1., 2., 0., 0., 0., 1., 0., 0.], 2184s [0., 1., 0., 1., 1., 0., 0., 1., 3., 0.], 2184s [1., 0., 0., ... 1.], 2184s [1., 2., 0., 1., 1., 0., 0., 0., 1., 0.], 2184s [0., 2., 1., 0., 0., 0., 1., 1., 0., 0.]], dtype=float32) 2184s typ = 2184s 2184s @singledispatch 2184s def as_cupy(val, typ=None): 2184s """ 2184s Rough conversion function 2184s 2184s Will try to infer target type from input type if not specified. 2184s """ 2184s if typ is None: 2184s typ = resolve_cupy_type(val) 2184s 2184s if issubclass(typ, CupyArray): 2184s > import cupy as cp 2184s E ModuleNotFoundError: No module named 'cupy' 2184s 2184s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:1010: ModuleNotFoundError 2184s ______________ test_transposed_concat[cupy_array-var-outer-same] _______________ 2184s 2184s array_type = functools.partial(, typ=) 2184s axis_name = 'var', join_type = 'outer', merge_strategy = 'same' 2184s 2184s def test_transposed_concat(array_type, axis_name, join_type, merge_strategy): 2184s axis, axis_name = merge._resolve_axis(axis_name) 2184s alt_axis = 1 - axis 2184s > lhs = gen_adata((10, 10), X_type=array_type, **GEN_ADATA_DASK_ARGS) 2184s 2184s tests/test_concatenate.py:1167: 2184s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 2184s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:346: in gen_adata 2184s X = X_type(random_state.binomial(100, 0.005, (M, N)).astype(X_dtype)) 2184s /usr/lib/python3.13/functools.py:934: in wrapper 2184s return dispatch(args[0].__class__)(*args, **kw) 2184s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 2184s 2184s val = array([[0., 0., 0., 1., 0., 0., 1., 1., 0., 1.], 2184s [0., 0., 0., 1., 0., 0., 1., 0., 0., 0.], 2184s [0., 1., 0., ... 1.], 2184s [1., 1., 0., 0., 1., 0., 0., 0., 1., 0.], 2184s [1., 0., 1., 1., 0., 1., 1., 0., 1., 1.]], dtype=float32) 2184s typ = 2184s 2184s @singledispatch 2184s def as_cupy(val, typ=None): 2184s """ 2184s Rough conversion function 2184s 2184s Will try to infer target type from input type if not specified. 2184s """ 2184s if typ is None: 2184s typ = resolve_cupy_type(val) 2184s 2184s if issubclass(typ, CupyArray): 2184s > import cupy as cp 2184s E ModuleNotFoundError: No module named 'cupy' 2184s 2184s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:1010: ModuleNotFoundError 2184s _____________ test_transposed_concat[cupy_array-var-outer-unique] ______________ 2184s 2184s array_type = functools.partial(, typ=) 2184s axis_name = 'var', join_type = 'outer', merge_strategy = 'unique' 2184s 2184s def test_transposed_concat(array_type, axis_name, join_type, merge_strategy): 2184s axis, axis_name = merge._resolve_axis(axis_name) 2184s alt_axis = 1 - axis 2184s > lhs = gen_adata((10, 10), X_type=array_type, **GEN_ADATA_DASK_ARGS) 2184s 2184s tests/test_concatenate.py:1167: 2184s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 2184s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:346: in gen_adata 2184s X = X_type(random_state.binomial(100, 0.005, (M, N)).astype(X_dtype)) 2184s /usr/lib/python3.13/functools.py:934: in wrapper 2184s return dispatch(args[0].__class__)(*args, **kw) 2184s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 2184s 2184s val = array([[1., 1., 0., 1., 2., 1., 0., 1., 0., 1.], 2184s [0., 0., 1., 0., 2., 0., 1., 0., 0., 0.], 2184s [0., 0., 0., ... 1.], 2184s [0., 0., 1., 0., 0., 1., 0., 0., 0., 1.], 2184s [0., 0., 1., 0., 1., 1., 0., 0., 0., 2.]], dtype=float32) 2184s typ = 2184s 2184s @singledispatch 2184s def as_cupy(val, typ=None): 2184s """ 2184s Rough conversion function 2184s 2184s Will try to infer target type from input type if not specified. 2184s """ 2184s if typ is None: 2184s typ = resolve_cupy_type(val) 2184s 2184s if issubclass(typ, CupyArray): 2184s > import cupy as cp 2184s E ModuleNotFoundError: No module named 'cupy' 2184s 2184s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:1010: ModuleNotFoundError 2184s ______________ test_transposed_concat[cupy_array-var-outer-first] ______________ 2184s 2184s array_type = functools.partial(, typ=) 2184s axis_name = 'var', join_type = 'outer', merge_strategy = 'first' 2184s 2184s def test_transposed_concat(array_type, axis_name, join_type, merge_strategy): 2184s axis, axis_name = merge._resolve_axis(axis_name) 2184s alt_axis = 1 - axis 2184s > lhs = gen_adata((10, 10), X_type=array_type, **GEN_ADATA_DASK_ARGS) 2184s 2184s tests/test_concatenate.py:1167: 2184s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 2184s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:346: in gen_adata 2184s X = X_type(random_state.binomial(100, 0.005, (M, N)).astype(X_dtype)) 2184s /usr/lib/python3.13/functools.py:934: in wrapper 2184s return dispatch(args[0].__class__)(*args, **kw) 2184s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 2184s 2184s val = array([[0., 0., 0., 0., 0., 0., 2., 0., 1., 2.], 2184s [2., 1., 2., 0., 0., 1., 0., 0., 1., 2.], 2184s [2., 0., 0., ... 0.], 2184s [0., 0., 1., 0., 0., 0., 1., 0., 1., 1.], 2184s [0., 0., 1., 1., 1., 0., 1., 1., 0., 0.]], dtype=float32) 2184s typ = 2184s 2184s @singledispatch 2184s def as_cupy(val, typ=None): 2184s """ 2184s Rough conversion function 2184s 2184s Will try to infer target type from input type if not specified. 2184s """ 2184s if typ is None: 2184s typ = resolve_cupy_type(val) 2184s 2184s if issubclass(typ, CupyArray): 2184s > import cupy as cp 2184s E ModuleNotFoundError: No module named 'cupy' 2184s 2184s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:1010: ModuleNotFoundError 2184s ______________ test_transposed_concat[cupy_array-var-outer-only] _______________ 2184s 2184s array_type = functools.partial(, typ=) 2184s axis_name = 'var', join_type = 'outer', merge_strategy = 'only' 2184s 2184s def test_transposed_concat(array_type, axis_name, join_type, merge_strategy): 2184s axis, axis_name = merge._resolve_axis(axis_name) 2184s alt_axis = 1 - axis 2184s > lhs = gen_adata((10, 10), X_type=array_type, **GEN_ADATA_DASK_ARGS) 2184s 2184s tests/test_concatenate.py:1167: 2184s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 2184s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:346: in gen_adata 2184s X = X_type(random_state.binomial(100, 0.005, (M, N)).astype(X_dtype)) 2184s /usr/lib/python3.13/functools.py:934: in wrapper 2184s return dispatch(args[0].__class__)(*args, **kw) 2184s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 2184s 2184s val = array([[0., 2., 0., 0., 1., 0., 0., 1., 0., 0.], 2184s [0., 2., 0., 0., 0., 2., 1., 0., 0., 0.], 2184s [1., 1., 0., ... 0.], 2184s [0., 0., 1., 0., 0., 0., 0., 0., 1., 0.], 2184s [1., 0., 1., 0., 0., 1., 1., 1., 2., 0.]], dtype=float32) 2184s typ = 2184s 2184s @singledispatch 2184s def as_cupy(val, typ=None): 2184s """ 2184s Rough conversion function 2184s 2184s Will try to infer target type from input type if not specified. 2184s """ 2184s if typ is None: 2184s typ = resolve_cupy_type(val) 2184s 2184s if issubclass(typ, CupyArray): 2184s > import cupy as cp 2184s E ModuleNotFoundError: No module named 'cupy' 2184s 2184s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:1010: ModuleNotFoundError 2184s _______________ test_transposed_concat[cupy_csr-obs-inner-None] ________________ 2184s 2184s array_type = functools.partial(, typ=) 2184s axis_name = 'obs', join_type = 'inner', merge_strategy = None 2184s 2184s def test_transposed_concat(array_type, axis_name, join_type, merge_strategy): 2184s axis, axis_name = merge._resolve_axis(axis_name) 2184s alt_axis = 1 - axis 2184s > lhs = gen_adata((10, 10), X_type=array_type, **GEN_ADATA_DASK_ARGS) 2184s 2184s tests/test_concatenate.py:1167: 2184s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 2184s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:346: in gen_adata 2184s X = X_type(random_state.binomial(100, 0.005, (M, N)).astype(X_dtype)) 2184s /usr/lib/python3.13/functools.py:934: in wrapper 2184s return dispatch(args[0].__class__)(*args, **kw) 2184s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 2184s 2184s val = array([[1., 0., 0., 0., 1., 0., 1., 2., 0., 1.], 2184s [1., 1., 0., 0., 0., 0., 2., 1., 0., 0.], 2184s [0., 0., 2., ... 0.], 2184s [0., 0., 0., 1., 0., 0., 0., 0., 0., 1.], 2184s [0., 1., 1., 0., 0., 0., 0., 0., 2., 0.]], dtype=float32) 2184s typ = 2184s 2184s @singledispatch 2184s def as_cupy(val, typ=None): 2184s """ 2184s Rough conversion function 2184s 2184s Will try to infer target type from input type if not specified. 2184s """ 2184s if typ is None: 2184s typ = resolve_cupy_type(val) 2184s 2184s if issubclass(typ, CupyArray): 2184s import cupy as cp 2184s 2184s if isinstance(val, CSMatrix): 2184s val = val.toarray() 2184s return cp.array(val) 2184s elif issubclass(typ, CupyCSRMatrix): 2184s > import cupy as cp 2184s E ModuleNotFoundError: No module named 'cupy' 2184s 2184s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:1016: ModuleNotFoundError 2184s _______________ test_transposed_concat[cupy_csr-obs-inner-same] ________________ 2184s 2184s array_type = functools.partial(, typ=) 2184s axis_name = 'obs', join_type = 'inner', merge_strategy = 'same' 2184s 2184s def test_transposed_concat(array_type, axis_name, join_type, merge_strategy): 2184s axis, axis_name = merge._resolve_axis(axis_name) 2184s alt_axis = 1 - axis 2184s > lhs = gen_adata((10, 10), X_type=array_type, **GEN_ADATA_DASK_ARGS) 2184s 2184s tests/test_concatenate.py:1167: 2184s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 2184s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:346: in gen_adata 2184s X = X_type(random_state.binomial(100, 0.005, (M, N)).astype(X_dtype)) 2184s /usr/lib/python3.13/functools.py:934: in wrapper 2184s return dispatch(args[0].__class__)(*args, **kw) 2184s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 2184s 2184s val = array([[0., 0., 0., 1., 0., 1., 0., 1., 1., 0.], 2184s [0., 1., 0., 1., 1., 0., 2., 0., 0., 0.], 2184s [1., 1., 0., ... 0.], 2184s [1., 0., 0., 0., 2., 4., 0., 0., 0., 1.], 2184s [0., 1., 2., 1., 0., 0., 0., 1., 0., 1.]], dtype=float32) 2184s typ = 2184s 2184s @singledispatch 2184s def as_cupy(val, typ=None): 2184s """ 2184s Rough conversion function 2184s 2184s Will try to infer target type from input type if not specified. 2184s """ 2184s if typ is None: 2184s typ = resolve_cupy_type(val) 2184s 2184s if issubclass(typ, CupyArray): 2184s import cupy as cp 2184s 2184s if isinstance(val, CSMatrix): 2184s val = val.toarray() 2184s return cp.array(val) 2184s elif issubclass(typ, CupyCSRMatrix): 2184s > import cupy as cp 2184s E ModuleNotFoundError: No module named 'cupy' 2184s 2184s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:1016: ModuleNotFoundError 2184s ______________ test_transposed_concat[cupy_csr-obs-inner-unique] _______________ 2184s 2184s array_type = functools.partial(, typ=) 2184s axis_name = 'obs', join_type = 'inner', merge_strategy = 'unique' 2184s 2184s def test_transposed_concat(array_type, axis_name, join_type, merge_strategy): 2184s axis, axis_name = merge._resolve_axis(axis_name) 2184s alt_axis = 1 - axis 2184s > lhs = gen_adata((10, 10), X_type=array_type, **GEN_ADATA_DASK_ARGS) 2184s 2184s tests/test_concatenate.py:1167: 2184s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 2184s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:346: in gen_adata 2184s X = X_type(random_state.binomial(100, 0.005, (M, N)).astype(X_dtype)) 2184s /usr/lib/python3.13/functools.py:934: in wrapper 2184s return dispatch(args[0].__class__)(*args, **kw) 2184s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 2184s 2184s val = array([[2., 0., 0., 0., 2., 0., 1., 0., 1., 1.], 2184s [0., 0., 1., 0., 0., 1., 0., 0., 2., 0.], 2184s [0., 0., 0., ... 2.], 2184s [1., 0., 0., 0., 0., 0., 0., 0., 0., 0.], 2184s [0., 1., 0., 0., 0., 1., 1., 0., 0., 0.]], dtype=float32) 2184s typ = 2184s 2184s @singledispatch 2184s def as_cupy(val, typ=None): 2184s """ 2184s Rough conversion function 2184s 2184s Will try to infer target type from input type if not specified. 2184s """ 2184s if typ is None: 2184s typ = resolve_cupy_type(val) 2184s 2184s if issubclass(typ, CupyArray): 2184s import cupy as cp 2184s 2184s if isinstance(val, CSMatrix): 2184s val = val.toarray() 2184s return cp.array(val) 2184s elif issubclass(typ, CupyCSRMatrix): 2184s > import cupy as cp 2184s E ModuleNotFoundError: No module named 'cupy' 2184s 2184s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:1016: ModuleNotFoundError 2184s _______________ test_transposed_concat[cupy_csr-obs-inner-first] _______________ 2184s 2184s array_type = functools.partial(, typ=) 2184s axis_name = 'obs', join_type = 'inner', merge_strategy = 'first' 2184s 2184s def test_transposed_concat(array_type, axis_name, join_type, merge_strategy): 2184s axis, axis_name = merge._resolve_axis(axis_name) 2184s alt_axis = 1 - axis 2184s > lhs = gen_adata((10, 10), X_type=array_type, **GEN_ADATA_DASK_ARGS) 2184s 2184s tests/test_concatenate.py:1167: 2184s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 2184s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:346: in gen_adata 2184s X = X_type(random_state.binomial(100, 0.005, (M, N)).astype(X_dtype)) 2184s /usr/lib/python3.13/functools.py:934: in wrapper 2184s return dispatch(args[0].__class__)(*args, **kw) 2184s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 2184s 2184s val = array([[1., 0., 1., 0., 2., 2., 0., 1., 1., 2.], 2184s [0., 1., 0., 0., 0., 0., 0., 2., 2., 0.], 2184s [1., 0., 2., ... 0.], 2184s [1., 0., 1., 0., 1., 0., 0., 2., 0., 0.], 2184s [1., 0., 0., 0., 0., 1., 1., 1., 1., 0.]], dtype=float32) 2184s typ = 2184s 2184s @singledispatch 2184s def as_cupy(val, typ=None): 2184s """ 2184s Rough conversion function 2184s 2184s Will try to infer target type from input type if not specified. 2184s """ 2184s if typ is None: 2184s typ = resolve_cupy_type(val) 2184s 2184s if issubclass(typ, CupyArray): 2184s import cupy as cp 2184s 2184s if isinstance(val, CSMatrix): 2184s val = val.toarray() 2184s return cp.array(val) 2184s elif issubclass(typ, CupyCSRMatrix): 2184s > import cupy as cp 2184s E ModuleNotFoundError: No module named 'cupy' 2184s 2184s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:1016: ModuleNotFoundError 2184s _______________ test_transposed_concat[cupy_csr-obs-inner-only] ________________ 2184s 2184s array_type = functools.partial(, typ=) 2184s axis_name = 'obs', join_type = 'inner', merge_strategy = 'only' 2184s 2184s def test_transposed_concat(array_type, axis_name, join_type, merge_strategy): 2184s axis, axis_name = merge._resolve_axis(axis_name) 2184s alt_axis = 1 - axis 2184s > lhs = gen_adata((10, 10), X_type=array_type, **GEN_ADATA_DASK_ARGS) 2184s 2184s tests/test_concatenate.py:1167: 2184s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 2184s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:346: in gen_adata 2184s X = X_type(random_state.binomial(100, 0.005, (M, N)).astype(X_dtype)) 2184s /usr/lib/python3.13/functools.py:934: in wrapper 2184s return dispatch(args[0].__class__)(*args, **kw) 2184s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 2184s 2184s val = array([[0., 0., 1., 0., 0., 0., 0., 0., 0., 2.], 2184s [0., 1., 0., 0., 1., 1., 0., 0., 0., 0.], 2184s [0., 0., 0., ... 0.], 2184s [3., 1., 1., 0., 1., 0., 1., 2., 0., 0.], 2184s [0., 0., 0., 0., 0., 0., 1., 1., 1., 0.]], dtype=float32) 2184s typ = 2184s 2184s @singledispatch 2184s def as_cupy(val, typ=None): 2184s """ 2184s Rough conversion function 2184s 2184s Will try to infer target type from input type if not specified. 2184s """ 2184s if typ is None: 2184s typ = resolve_cupy_type(val) 2184s 2184s if issubclass(typ, CupyArray): 2184s import cupy as cp 2184s 2184s if isinstance(val, CSMatrix): 2184s val = val.toarray() 2184s return cp.array(val) 2184s elif issubclass(typ, CupyCSRMatrix): 2184s > import cupy as cp 2184s E ModuleNotFoundError: No module named 'cupy' 2184s 2184s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:1016: ModuleNotFoundError 2184s _______________ test_transposed_concat[cupy_csr-obs-outer-None] ________________ 2184s 2184s array_type = functools.partial(, typ=) 2184s axis_name = 'obs', join_type = 'outer', merge_strategy = None 2184s 2184s def test_transposed_concat(array_type, axis_name, join_type, merge_strategy): 2184s axis, axis_name = merge._resolve_axis(axis_name) 2184s alt_axis = 1 - axis 2184s > lhs = gen_adata((10, 10), X_type=array_type, **GEN_ADATA_DASK_ARGS) 2184s 2184s tests/test_concatenate.py:1167: 2184s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 2184s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:346: in gen_adata 2184s X = X_type(random_state.binomial(100, 0.005, (M, N)).astype(X_dtype)) 2184s /usr/lib/python3.13/functools.py:934: in wrapper 2184s return dispatch(args[0].__class__)(*args, **kw) 2184s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 2184s 2184s val = array([[0., 1., 0., 0., 1., 0., 1., 3., 0., 2.], 2184s [0., 0., 0., 0., 1., 0., 0., 2., 0., 0.], 2184s [1., 0., 0., ... 0.], 2184s [2., 2., 1., 0., 1., 1., 1., 1., 1., 0.], 2184s [1., 0., 0., 0., 1., 0., 0., 1., 0., 1.]], dtype=float32) 2184s typ = 2184s 2184s @singledispatch 2184s def as_cupy(val, typ=None): 2184s """ 2184s Rough conversion function 2184s 2184s Will try to infer target type from input type if not specified. 2184s """ 2184s if typ is None: 2184s typ = resolve_cupy_type(val) 2184s 2184s if issubclass(typ, CupyArray): 2184s import cupy as cp 2184s 2184s if isinstance(val, CSMatrix): 2184s val = val.toarray() 2184s return cp.array(val) 2184s elif issubclass(typ, CupyCSRMatrix): 2184s > import cupy as cp 2184s E ModuleNotFoundError: No module named 'cupy' 2184s 2184s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:1016: ModuleNotFoundError 2184s _______________ test_transposed_concat[cupy_csr-obs-outer-same] ________________ 2184s 2184s array_type = functools.partial(, typ=) 2184s axis_name = 'obs', join_type = 'outer', merge_strategy = 'same' 2184s 2184s def test_transposed_concat(array_type, axis_name, join_type, merge_strategy): 2184s axis, axis_name = merge._resolve_axis(axis_name) 2184s alt_axis = 1 - axis 2184s > lhs = gen_adata((10, 10), X_type=array_type, **GEN_ADATA_DASK_ARGS) 2184s 2184s tests/test_concatenate.py:1167: 2184s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 2184s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:346: in gen_adata 2184s X = X_type(random_state.binomial(100, 0.005, (M, N)).astype(X_dtype)) 2184s /usr/lib/python3.13/functools.py:934: in wrapper 2184s return dispatch(args[0].__class__)(*args, **kw) 2184s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 2184s 2184s val = array([[1., 1., 0., 1., 0., 1., 0., 0., 1., 0.], 2184s [0., 2., 0., 1., 0., 1., 3., 1., 1., 1.], 2184s [0., 3., 0., ... 0.], 2184s [0., 0., 2., 0., 0., 0., 1., 0., 1., 1.], 2184s [0., 1., 0., 0., 0., 0., 0., 0., 0., 0.]], dtype=float32) 2184s typ = 2184s 2184s @singledispatch 2184s def as_cupy(val, typ=None): 2184s """ 2184s Rough conversion function 2184s 2184s Will try to infer target type from input type if not specified. 2184s """ 2184s if typ is None: 2184s typ = resolve_cupy_type(val) 2184s 2184s if issubclass(typ, CupyArray): 2184s import cupy as cp 2184s 2184s if isinstance(val, CSMatrix): 2184s val = val.toarray() 2184s return cp.array(val) 2184s elif issubclass(typ, CupyCSRMatrix): 2184s > import cupy as cp 2184s E ModuleNotFoundError: No module named 'cupy' 2184s 2184s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:1016: ModuleNotFoundError 2184s ______________ test_transposed_concat[cupy_csr-obs-outer-unique] _______________ 2184s 2184s array_type = functools.partial(, typ=) 2184s axis_name = 'obs', join_type = 'outer', merge_strategy = 'unique' 2184s 2184s def test_transposed_concat(array_type, axis_name, join_type, merge_strategy): 2184s axis, axis_name = merge._resolve_axis(axis_name) 2184s alt_axis = 1 - axis 2184s > lhs = gen_adata((10, 10), X_type=array_type, **GEN_ADATA_DASK_ARGS) 2184s 2184s tests/test_concatenate.py:1167: 2184s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 2184s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:346: in gen_adata 2184s X = X_type(random_state.binomial(100, 0.005, (M, N)).astype(X_dtype)) 2184s /usr/lib/python3.13/functools.py:934: in wrapper 2184s return dispatch(args[0].__class__)(*args, **kw) 2184s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 2184s 2184s val = array([[1., 0., 0., 0., 0., 1., 0., 0., 0., 2.], 2184s [0., 0., 1., 0., 0., 0., 3., 0., 1., 1.], 2184s [0., 0., 0., ... 1.], 2184s [0., 0., 1., 0., 0., 1., 2., 0., 0., 1.], 2184s [0., 0., 0., 0., 0., 0., 0., 0., 1., 0.]], dtype=float32) 2184s typ = 2184s 2184s @singledispatch 2184s def as_cupy(val, typ=None): 2184s """ 2184s Rough conversion function 2184s 2184s Will try to infer target type from input type if not specified. 2184s """ 2184s if typ is None: 2184s typ = resolve_cupy_type(val) 2184s 2184s if issubclass(typ, CupyArray): 2184s import cupy as cp 2184s 2184s if isinstance(val, CSMatrix): 2184s val = val.toarray() 2184s return cp.array(val) 2184s elif issubclass(typ, CupyCSRMatrix): 2184s > import cupy as cp 2184s E ModuleNotFoundError: No module named 'cupy' 2184s 2184s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:1016: ModuleNotFoundError 2184s _______________ test_transposed_concat[cupy_csr-obs-outer-first] _______________ 2184s 2184s array_type = functools.partial(, typ=) 2184s axis_name = 'obs', join_type = 'outer', merge_strategy = 'first' 2184s 2184s def test_transposed_concat(array_type, axis_name, join_type, merge_strategy): 2184s axis, axis_name = merge._resolve_axis(axis_name) 2184s alt_axis = 1 - axis 2184s > lhs = gen_adata((10, 10), X_type=array_type, **GEN_ADATA_DASK_ARGS) 2184s 2184s tests/test_concatenate.py:1167: 2184s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 2184s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:346: in gen_adata 2184s X = X_type(random_state.binomial(100, 0.005, (M, N)).astype(X_dtype)) 2184s /usr/lib/python3.13/functools.py:934: in wrapper 2184s return dispatch(args[0].__class__)(*args, **kw) 2184s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 2184s 2184s val = array([[1., 1., 0., 0., 1., 1., 0., 0., 0., 0.], 2184s [1., 0., 0., 1., 0., 3., 0., 2., 0., 0.], 2184s [0., 0., 0., ... 0.], 2184s [2., 1., 2., 0., 2., 0., 2., 0., 1., 0.], 2184s [2., 0., 1., 0., 1., 1., 0., 0., 0., 0.]], dtype=float32) 2184s typ = 2184s 2184s @singledispatch 2184s def as_cupy(val, typ=None): 2184s """ 2184s Rough conversion function 2184s 2184s Will try to infer target type from input type if not specified. 2184s """ 2184s if typ is None: 2184s typ = resolve_cupy_type(val) 2184s 2184s if issubclass(typ, CupyArray): 2184s import cupy as cp 2184s 2184s if isinstance(val, CSMatrix): 2184s val = val.toarray() 2184s return cp.array(val) 2184s elif issubclass(typ, CupyCSRMatrix): 2184s > import cupy as cp 2184s E ModuleNotFoundError: No module named 'cupy' 2184s 2184s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:1016: ModuleNotFoundError 2184s _______________ test_transposed_concat[cupy_csr-obs-outer-only] ________________ 2184s 2184s array_type = functools.partial(, typ=) 2184s axis_name = 'obs', join_type = 'outer', merge_strategy = 'only' 2184s 2184s def test_transposed_concat(array_type, axis_name, join_type, merge_strategy): 2184s axis, axis_name = merge._resolve_axis(axis_name) 2184s alt_axis = 1 - axis 2184s > lhs = gen_adata((10, 10), X_type=array_type, **GEN_ADATA_DASK_ARGS) 2184s 2184s tests/test_concatenate.py:1167: 2184s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 2184s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:346: in gen_adata 2184s X = X_type(random_state.binomial(100, 0.005, (M, N)).astype(X_dtype)) 2184s /usr/lib/python3.13/functools.py:934: in wrapper 2184s return dispatch(args[0].__class__)(*args, **kw) 2184s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 2184s 2184s val = array([[0., 2., 0., 0., 1., 0., 2., 0., 0., 0.], 2184s [0., 0., 1., 1., 0., 0., 1., 1., 0., 0.], 2184s [1., 1., 1., ... 0.], 2184s [1., 2., 0., 1., 0., 1., 0., 0., 1., 2.], 2184s [0., 2., 1., 0., 0., 2., 0., 0., 0., 0.]], dtype=float32) 2184s typ = 2184s 2184s @singledispatch 2184s def as_cupy(val, typ=None): 2184s """ 2184s Rough conversion function 2184s 2184s Will try to infer target type from input type if not specified. 2184s """ 2184s if typ is None: 2184s typ = resolve_cupy_type(val) 2184s 2184s if issubclass(typ, CupyArray): 2184s import cupy as cp 2184s 2184s if isinstance(val, CSMatrix): 2184s val = val.toarray() 2184s return cp.array(val) 2184s elif issubclass(typ, CupyCSRMatrix): 2184s > import cupy as cp 2184s E ModuleNotFoundError: No module named 'cupy' 2184s 2184s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:1016: ModuleNotFoundError 2184s _______________ test_transposed_concat[cupy_csr-var-inner-None] ________________ 2184s 2184s array_type = functools.partial(, typ=) 2184s axis_name = 'var', join_type = 'inner', merge_strategy = None 2184s 2184s def test_transposed_concat(array_type, axis_name, join_type, merge_strategy): 2184s axis, axis_name = merge._resolve_axis(axis_name) 2184s alt_axis = 1 - axis 2184s > lhs = gen_adata((10, 10), X_type=array_type, **GEN_ADATA_DASK_ARGS) 2184s 2184s tests/test_concatenate.py:1167: 2184s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 2184s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:346: in gen_adata 2184s X = X_type(random_state.binomial(100, 0.005, (M, N)).astype(X_dtype)) 2184s /usr/lib/python3.13/functools.py:934: in wrapper 2184s return dispatch(args[0].__class__)(*args, **kw) 2184s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 2184s 2184s val = array([[2., 0., 0., 1., 0., 0., 2., 0., 1., 0.], 2184s [0., 0., 1., 1., 0., 1., 2., 2., 0., 0.], 2184s [3., 0., 0., ... 0.], 2184s [0., 0., 0., 2., 1., 0., 1., 0., 0., 0.], 2184s [0., 0., 2., 0., 0., 0., 0., 0., 1., 1.]], dtype=float32) 2184s typ = 2184s 2184s @singledispatch 2184s def as_cupy(val, typ=None): 2184s """ 2184s Rough conversion function 2184s 2184s Will try to infer target type from input type if not specified. 2184s """ 2184s if typ is None: 2184s typ = resolve_cupy_type(val) 2184s 2184s if issubclass(typ, CupyArray): 2184s import cupy as cp 2184s 2184s if isinstance(val, CSMatrix): 2184s val = val.toarray() 2184s return cp.array(val) 2184s elif issubclass(typ, CupyCSRMatrix): 2184s > import cupy as cp 2184s E ModuleNotFoundError: No module named 'cupy' 2184s 2184s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:1016: ModuleNotFoundError 2184s _______________ test_transposed_concat[cupy_csr-var-inner-same] ________________ 2184s 2184s array_type = functools.partial(, typ=) 2184s axis_name = 'var', join_type = 'inner', merge_strategy = 'same' 2184s 2184s def test_transposed_concat(array_type, axis_name, join_type, merge_strategy): 2184s axis, axis_name = merge._resolve_axis(axis_name) 2184s alt_axis = 1 - axis 2184s > lhs = gen_adata((10, 10), X_type=array_type, **GEN_ADATA_DASK_ARGS) 2184s 2184s tests/test_concatenate.py:1167: 2184s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 2184s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:346: in gen_adata 2184s X = X_type(random_state.binomial(100, 0.005, (M, N)).astype(X_dtype)) 2184s /usr/lib/python3.13/functools.py:934: in wrapper 2184s return dispatch(args[0].__class__)(*args, **kw) 2184s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 2184s 2184s val = array([[0., 2., 0., 2., 0., 0., 1., 0., 0., 2.], 2184s [1., 1., 0., 0., 2., 1., 2., 0., 0., 0.], 2184s [1., 0., 0., ... 0.], 2184s [0., 1., 0., 1., 1., 0., 0., 0., 0., 0.], 2184s [0., 1., 2., 1., 1., 0., 0., 1., 0., 0.]], dtype=float32) 2184s typ = 2184s 2184s @singledispatch 2184s def as_cupy(val, typ=None): 2184s """ 2184s Rough conversion function 2184s 2184s Will try to infer target type from input type if not specified. 2184s """ 2184s if typ is None: 2184s typ = resolve_cupy_type(val) 2184s 2184s if issubclass(typ, CupyArray): 2184s import cupy as cp 2184s 2184s if isinstance(val, CSMatrix): 2184s val = val.toarray() 2184s return cp.array(val) 2184s elif issubclass(typ, CupyCSRMatrix): 2184s > import cupy as cp 2184s E ModuleNotFoundError: No module named 'cupy' 2184s 2184s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:1016: ModuleNotFoundError 2184s ______________ test_transposed_concat[cupy_csr-var-inner-unique] _______________ 2184s 2184s array_type = functools.partial(, typ=) 2184s axis_name = 'var', join_type = 'inner', merge_strategy = 'unique' 2184s 2184s def test_transposed_concat(array_type, axis_name, join_type, merge_strategy): 2184s axis, axis_name = merge._resolve_axis(axis_name) 2184s alt_axis = 1 - axis 2184s > lhs = gen_adata((10, 10), X_type=array_type, **GEN_ADATA_DASK_ARGS) 2184s 2184s tests/test_concatenate.py:1167: 2184s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 2184s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:346: in gen_adata 2184s X = X_type(random_state.binomial(100, 0.005, (M, N)).astype(X_dtype)) 2184s /usr/lib/python3.13/functools.py:934: in wrapper 2184s return dispatch(args[0].__class__)(*args, **kw) 2184s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 2184s 2184s val = array([[0., 1., 0., 1., 1., 0., 0., 1., 1., 0.], 2184s [1., 0., 1., 0., 0., 1., 0., 1., 1., 1.], 2184s [0., 1., 1., ... 0.], 2184s [1., 1., 1., 0., 1., 0., 0., 3., 1., 0.], 2184s [1., 0., 1., 1., 1., 0., 1., 1., 1., 1.]], dtype=float32) 2184s typ = 2184s 2184s @singledispatch 2184s def as_cupy(val, typ=None): 2184s """ 2184s Rough conversion function 2184s 2184s Will try to infer target type from input type if not specified. 2184s """ 2184s if typ is None: 2184s typ = resolve_cupy_type(val) 2184s 2184s if issubclass(typ, CupyArray): 2184s import cupy as cp 2184s 2184s if isinstance(val, CSMatrix): 2184s val = val.toarray() 2184s return cp.array(val) 2184s elif issubclass(typ, CupyCSRMatrix): 2184s > import cupy as cp 2184s E ModuleNotFoundError: No module named 'cupy' 2184s 2184s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:1016: ModuleNotFoundError 2184s _______________ test_transposed_concat[cupy_csr-var-inner-first] _______________ 2184s 2184s array_type = functools.partial(, typ=) 2184s axis_name = 'var', join_type = 'inner', merge_strategy = 'first' 2184s 2184s def test_transposed_concat(array_type, axis_name, join_type, merge_strategy): 2184s axis, axis_name = merge._resolve_axis(axis_name) 2184s alt_axis = 1 - axis 2184s > lhs = gen_adata((10, 10), X_type=array_type, **GEN_ADATA_DASK_ARGS) 2184s 2184s tests/test_concatenate.py:1167: 2184s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 2184s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:346: in gen_adata 2184s X = X_type(random_state.binomial(100, 0.005, (M, N)).astype(X_dtype)) 2184s /usr/lib/python3.13/functools.py:934: in wrapper 2184s return dispatch(args[0].__class__)(*args, **kw) 2184s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 2184s 2184s val = array([[0., 0., 0., 0., 0., 0., 0., 0., 0., 1.], 2184s [0., 0., 0., 1., 0., 0., 1., 0., 1., 0.], 2184s [1., 0., 0., ... 0.], 2184s [1., 2., 0., 1., 1., 0., 1., 0., 1., 0.], 2184s [0., 0., 2., 0., 1., 0., 0., 0., 2., 1.]], dtype=float32) 2184s typ = 2184s 2184s @singledispatch 2184s def as_cupy(val, typ=None): 2184s """ 2184s Rough conversion function 2184s 2184s Will try to infer target type from input type if not specified. 2184s """ 2184s if typ is None: 2184s typ = resolve_cupy_type(val) 2184s 2184s if issubclass(typ, CupyArray): 2184s import cupy as cp 2184s 2184s if isinstance(val, CSMatrix): 2184s val = val.toarray() 2184s return cp.array(val) 2184s elif issubclass(typ, CupyCSRMatrix): 2184s > import cupy as cp 2184s E ModuleNotFoundError: No module named 'cupy' 2184s 2184s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:1016: ModuleNotFoundError 2184s _______________ test_transposed_concat[cupy_csr-var-inner-only] ________________ 2184s 2184s array_type = functools.partial(, typ=) 2184s axis_name = 'var', join_type = 'inner', merge_strategy = 'only' 2184s 2184s def test_transposed_concat(array_type, axis_name, join_type, merge_strategy): 2184s axis, axis_name = merge._resolve_axis(axis_name) 2184s alt_axis = 1 - axis 2184s > lhs = gen_adata((10, 10), X_type=array_type, **GEN_ADATA_DASK_ARGS) 2184s 2184s tests/test_concatenate.py:1167: 2184s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 2184s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:346: in gen_adata 2184s X = X_type(random_state.binomial(100, 0.005, (M, N)).astype(X_dtype)) 2184s /usr/lib/python3.13/functools.py:934: in wrapper 2184s return dispatch(args[0].__class__)(*args, **kw) 2184s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 2184s 2184s val = array([[0., 1., 0., 0., 1., 0., 0., 0., 0., 0.], 2184s [2., 1., 0., 0., 3., 2., 0., 0., 0., 0.], 2184s [0., 0., 0., ... 1.], 2184s [1., 0., 0., 2., 0., 2., 1., 0., 0., 2.], 2184s [1., 0., 1., 0., 0., 0., 1., 1., 1., 0.]], dtype=float32) 2184s typ = 2184s 2184s @singledispatch 2184s def as_cupy(val, typ=None): 2184s """ 2184s Rough conversion function 2184s 2184s Will try to infer target type from input type if not specified. 2184s """ 2184s if typ is None: 2184s typ = resolve_cupy_type(val) 2184s 2184s if issubclass(typ, CupyArray): 2184s import cupy as cp 2184s 2184s if isinstance(val, CSMatrix): 2184s val = val.toarray() 2184s return cp.array(val) 2184s elif issubclass(typ, CupyCSRMatrix): 2184s > import cupy as cp 2184s E ModuleNotFoundError: No module named 'cupy' 2184s 2184s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:1016: ModuleNotFoundError 2184s _______________ test_transposed_concat[cupy_csr-var-outer-None] ________________ 2184s 2184s array_type = functools.partial(, typ=) 2184s axis_name = 'var', join_type = 'outer', merge_strategy = None 2184s 2184s def test_transposed_concat(array_type, axis_name, join_type, merge_strategy): 2184s axis, axis_name = merge._resolve_axis(axis_name) 2184s alt_axis = 1 - axis 2184s > lhs = gen_adata((10, 10), X_type=array_type, **GEN_ADATA_DASK_ARGS) 2184s 2184s tests/test_concatenate.py:1167: 2184s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 2184s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:346: in gen_adata 2184s X = X_type(random_state.binomial(100, 0.005, (M, N)).astype(X_dtype)) 2184s /usr/lib/python3.13/functools.py:934: in wrapper 2184s return dispatch(args[0].__class__)(*args, **kw) 2184s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 2184s 2184s val = array([[0., 0., 3., 0., 0., 1., 2., 0., 1., 0.], 2184s [0., 0., 0., 1., 1., 0., 0., 0., 0., 0.], 2184s [0., 0., 3., ... 0.], 2184s [0., 1., 0., 0., 0., 0., 1., 0., 0., 0.], 2184s [0., 0., 0., 0., 0., 1., 0., 0., 0., 0.]], dtype=float32) 2184s typ = 2184s 2184s @singledispatch 2184s def as_cupy(val, typ=None): 2184s """ 2184s Rough conversion function 2184s 2184s Will try to infer target type from input type if not specified. 2184s """ 2184s if typ is None: 2184s typ = resolve_cupy_type(val) 2184s 2184s if issubclass(typ, CupyArray): 2184s import cupy as cp 2184s 2184s if isinstance(val, CSMatrix): 2184s val = val.toarray() 2184s return cp.array(val) 2184s elif issubclass(typ, CupyCSRMatrix): 2184s > import cupy as cp 2184s E ModuleNotFoundError: No module named 'cupy' 2184s 2184s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:1016: ModuleNotFoundError 2184s _______________ test_transposed_concat[cupy_csr-var-outer-same] ________________ 2184s 2184s array_type = functools.partial(, typ=) 2184s axis_name = 'var', join_type = 'outer', merge_strategy = 'same' 2184s 2184s def test_transposed_concat(array_type, axis_name, join_type, merge_strategy): 2184s axis, axis_name = merge._resolve_axis(axis_name) 2184s alt_axis = 1 - axis 2184s > lhs = gen_adata((10, 10), X_type=array_type, **GEN_ADATA_DASK_ARGS) 2184s 2184s tests/test_concatenate.py:1167: 2184s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 2184s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:346: in gen_adata 2184s X = X_type(random_state.binomial(100, 0.005, (M, N)).astype(X_dtype)) 2184s /usr/lib/python3.13/functools.py:934: in wrapper 2184s return dispatch(args[0].__class__)(*args, **kw) 2184s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 2184s 2184s val = array([[0., 1., 0., 0., 0., 0., 0., 0., 1., 2.], 2184s [3., 0., 0., 1., 0., 1., 1., 1., 0., 0.], 2184s [0., 0., 0., ... 1.], 2184s [0., 0., 1., 0., 0., 0., 0., 0., 1., 0.], 2184s [1., 0., 0., 1., 0., 1., 1., 0., 0., 1.]], dtype=float32) 2184s typ = 2184s 2184s @singledispatch 2184s def as_cupy(val, typ=None): 2184s """ 2184s Rough conversion function 2184s 2184s Will try to infer target type from input type if not specified. 2184s """ 2184s if typ is None: 2184s typ = resolve_cupy_type(val) 2184s 2184s if issubclass(typ, CupyArray): 2184s import cupy as cp 2184s 2184s if isinstance(val, CSMatrix): 2184s val = val.toarray() 2184s return cp.array(val) 2184s elif issubclass(typ, CupyCSRMatrix): 2184s > import cupy as cp 2184s E ModuleNotFoundError: No module named 'cupy' 2184s 2184s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:1016: ModuleNotFoundError 2184s ______________ test_transposed_concat[cupy_csr-var-outer-unique] _______________ 2184s 2184s array_type = functools.partial(, typ=) 2184s axis_name = 'var', join_type = 'outer', merge_strategy = 'unique' 2184s 2184s def test_transposed_concat(array_type, axis_name, join_type, merge_strategy): 2184s axis, axis_name = merge._resolve_axis(axis_name) 2184s alt_axis = 1 - axis 2184s > lhs = gen_adata((10, 10), X_type=array_type, **GEN_ADATA_DASK_ARGS) 2184s 2184s tests/test_concatenate.py:1167: 2184s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 2184s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:346: in gen_adata 2184s X = X_type(random_state.binomial(100, 0.005, (M, N)).astype(X_dtype)) 2184s /usr/lib/python3.13/functools.py:934: in wrapper 2184s return dispatch(args[0].__class__)(*args, **kw) 2184s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 2184s 2184s val = array([[0., 0., 0., 0., 0., 0., 0., 0., 2., 1.], 2184s [0., 1., 1., 0., 1., 0., 0., 1., 0., 1.], 2184s [1., 2., 0., ... 0.], 2184s [0., 1., 1., 0., 0., 1., 0., 0., 1., 0.], 2184s [0., 3., 1., 0., 0., 0., 1., 0., 0., 0.]], dtype=float32) 2184s typ = 2184s 2184s @singledispatch 2184s def as_cupy(val, typ=None): 2184s """ 2184s Rough conversion function 2184s 2184s Will try to infer target type from input type if not specified. 2184s """ 2184s if typ is None: 2184s typ = resolve_cupy_type(val) 2184s 2184s if issubclass(typ, CupyArray): 2184s import cupy as cp 2184s 2184s if isinstance(val, CSMatrix): 2184s val = val.toarray() 2184s return cp.array(val) 2184s elif issubclass(typ, CupyCSRMatrix): 2184s > import cupy as cp 2184s E ModuleNotFoundError: No module named 'cupy' 2184s 2184s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:1016: ModuleNotFoundError 2184s _______________ test_transposed_concat[cupy_csr-var-outer-first] _______________ 2184s 2184s array_type = functools.partial(, typ=) 2184s axis_name = 'var', join_type = 'outer', merge_strategy = 'first' 2184s 2184s def test_transposed_concat(array_type, axis_name, join_type, merge_strategy): 2184s axis, axis_name = merge._resolve_axis(axis_name) 2184s alt_axis = 1 - axis 2184s > lhs = gen_adata((10, 10), X_type=array_type, **GEN_ADATA_DASK_ARGS) 2184s 2184s tests/test_concatenate.py:1167: 2184s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 2184s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:346: in gen_adata 2184s X = X_type(random_state.binomial(100, 0.005, (M, N)).astype(X_dtype)) 2184s /usr/lib/python3.13/functools.py:934: in wrapper 2184s return dispatch(args[0].__class__)(*args, **kw) 2184s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 2184s 2184s val = array([[1., 0., 0., 1., 0., 1., 0., 0., 1., 1.], 2184s [1., 0., 0., 0., 0., 1., 1., 0., 0., 1.], 2184s [0., 0., 1., ... 0.], 2184s [0., 0., 1., 0., 0., 1., 1., 0., 1., 0.], 2184s [0., 0., 1., 0., 0., 1., 0., 0., 0., 0.]], dtype=float32) 2184s typ = 2184s 2184s @singledispatch 2184s def as_cupy(val, typ=None): 2184s """ 2184s Rough conversion function 2184s 2184s Will try to infer target type from input type if not specified. 2184s """ 2184s if typ is None: 2184s typ = resolve_cupy_type(val) 2184s 2184s if issubclass(typ, CupyArray): 2184s import cupy as cp 2184s 2184s if isinstance(val, CSMatrix): 2184s val = val.toarray() 2184s return cp.array(val) 2184s elif issubclass(typ, CupyCSRMatrix): 2184s > import cupy as cp 2184s E ModuleNotFoundError: No module named 'cupy' 2184s 2184s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:1016: ModuleNotFoundError 2184s _______________ test_transposed_concat[cupy_csr-var-outer-only] ________________ 2184s 2184s array_type = functools.partial(, typ=) 2184s axis_name = 'var', join_type = 'outer', merge_strategy = 'only' 2184s 2184s def test_transposed_concat(array_type, axis_name, join_type, merge_strategy): 2184s axis, axis_name = merge._resolve_axis(axis_name) 2184s alt_axis = 1 - axis 2184s > lhs = gen_adata((10, 10), X_type=array_type, **GEN_ADATA_DASK_ARGS) 2184s 2184s tests/test_concatenate.py:1167: 2184s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 2184s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:346: in gen_adata 2184s X = X_type(random_state.binomial(100, 0.005, (M, N)).astype(X_dtype)) 2184s /usr/lib/python3.13/functools.py:934: in wrapper 2184s return dispatch(args[0].__class__)(*args, **kw) 2184s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 2184s 2184s val = array([[2., 1., 0., 1., 1., 1., 0., 0., 2., 1.], 2184s [0., 1., 0., 1., 1., 1., 0., 0., 2., 0.], 2184s [0., 0., 0., ... 1.], 2184s [2., 1., 0., 3., 0., 0., 1., 0., 1., 0.], 2184s [1., 0., 1., 0., 0., 1., 0., 2., 0., 0.]], dtype=float32) 2184s typ = 2184s 2184s @singledispatch 2184s def as_cupy(val, typ=None): 2184s """ 2184s Rough conversion function 2184s 2184s Will try to infer target type from input type if not specified. 2184s """ 2184s if typ is None: 2184s typ = resolve_cupy_type(val) 2184s 2184s if issubclass(typ, CupyArray): 2184s import cupy as cp 2184s 2184s if isinstance(val, CSMatrix): 2184s val = val.toarray() 2184s return cp.array(val) 2184s elif issubclass(typ, CupyCSRMatrix): 2184s > import cupy as cp 2184s E ModuleNotFoundError: No module named 'cupy' 2184s 2184s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:1016: ModuleNotFoundError 2184s _______________ test_transposed_concat[cupy_csc-obs-inner-None] ________________ 2184s 2184s array_type = functools.partial(, typ=) 2184s axis_name = 'obs', join_type = 'inner', merge_strategy = None 2184s 2184s def test_transposed_concat(array_type, axis_name, join_type, merge_strategy): 2184s axis, axis_name = merge._resolve_axis(axis_name) 2184s alt_axis = 1 - axis 2184s > lhs = gen_adata((10, 10), X_type=array_type, **GEN_ADATA_DASK_ARGS) 2184s 2184s tests/test_concatenate.py:1167: 2184s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 2184s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:346: in gen_adata 2184s X = X_type(random_state.binomial(100, 0.005, (M, N)).astype(X_dtype)) 2184s /usr/lib/python3.13/functools.py:934: in wrapper 2184s return dispatch(args[0].__class__)(*args, **kw) 2184s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 2184s 2184s val = array([[0., 0., 2., 0., 1., 0., 0., 0., 1., 2.], 2184s [1., 0., 0., 0., 0., 1., 1., 1., 1., 1.], 2184s [0., 0., 1., ... 0.], 2184s [0., 0., 0., 0., 2., 1., 0., 1., 0., 0.], 2184s [0., 0., 1., 0., 3., 0., 0., 1., 0., 0.]], dtype=float32) 2184s typ = 2184s 2184s @singledispatch 2184s def as_cupy(val, typ=None): 2184s """ 2184s Rough conversion function 2184s 2184s Will try to infer target type from input type if not specified. 2184s """ 2184s if typ is None: 2184s typ = resolve_cupy_type(val) 2184s 2184s if issubclass(typ, CupyArray): 2184s import cupy as cp 2184s 2184s if isinstance(val, CSMatrix): 2184s val = val.toarray() 2184s return cp.array(val) 2184s elif issubclass(typ, CupyCSRMatrix): 2184s import cupy as cp 2184s import cupyx.scipy.sparse as cpsparse 2184s 2184s if isinstance(val, np.ndarray): 2184s return cpsparse.csr_matrix(cp.array(val)) 2184s else: 2184s return cpsparse.csr_matrix(val) 2184s elif issubclass(typ, CupyCSCMatrix): 2184s > import cupy as cp 2184s E ModuleNotFoundError: No module named 'cupy' 2184s 2184s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:1024: ModuleNotFoundError 2184s _______________ test_transposed_concat[cupy_csc-obs-inner-same] ________________ 2184s 2184s array_type = functools.partial(, typ=) 2184s axis_name = 'obs', join_type = 'inner', merge_strategy = 'same' 2184s 2184s def test_transposed_concat(array_type, axis_name, join_type, merge_strategy): 2184s axis, axis_name = merge._resolve_axis(axis_name) 2184s alt_axis = 1 - axis 2184s > lhs = gen_adata((10, 10), X_type=array_type, **GEN_ADATA_DASK_ARGS) 2184s 2184s tests/test_concatenate.py:1167: 2184s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 2184s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:346: in gen_adata 2184s X = X_type(random_state.binomial(100, 0.005, (M, N)).astype(X_dtype)) 2184s /usr/lib/python3.13/functools.py:934: in wrapper 2184s return dispatch(args[0].__class__)(*args, **kw) 2184s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 2184s 2184s val = array([[0., 0., 2., 1., 1., 0., 0., 0., 0., 0.], 2184s [0., 1., 0., 0., 0., 0., 0., 0., 0., 1.], 2184s [0., 0., 0., ... 0.], 2184s [0., 1., 1., 2., 1., 0., 0., 1., 1., 0.], 2184s [1., 1., 0., 1., 1., 0., 0., 0., 1., 1.]], dtype=float32) 2184s typ = 2184s 2184s @singledispatch 2184s def as_cupy(val, typ=None): 2184s """ 2184s Rough conversion function 2184s 2184s Will try to infer target type from input type if not specified. 2184s """ 2184s if typ is None: 2184s typ = resolve_cupy_type(val) 2184s 2184s if issubclass(typ, CupyArray): 2184s import cupy as cp 2184s 2184s if isinstance(val, CSMatrix): 2184s val = val.toarray() 2184s return cp.array(val) 2184s elif issubclass(typ, CupyCSRMatrix): 2184s import cupy as cp 2184s import cupyx.scipy.sparse as cpsparse 2184s 2184s if isinstance(val, np.ndarray): 2184s return cpsparse.csr_matrix(cp.array(val)) 2184s else: 2184s return cpsparse.csr_matrix(val) 2184s elif issubclass(typ, CupyCSCMatrix): 2184s > import cupy as cp 2184s E ModuleNotFoundError: No module named 'cupy' 2184s 2184s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:1024: ModuleNotFoundError 2184s ______________ test_transposed_concat[cupy_csc-obs-inner-unique] _______________ 2184s 2184s array_type = functools.partial(, typ=) 2184s axis_name = 'obs', join_type = 'inner', merge_strategy = 'unique' 2184s 2184s def test_transposed_concat(array_type, axis_name, join_type, merge_strategy): 2184s axis, axis_name = merge._resolve_axis(axis_name) 2184s alt_axis = 1 - axis 2184s > lhs = gen_adata((10, 10), X_type=array_type, **GEN_ADATA_DASK_ARGS) 2184s 2184s tests/test_concatenate.py:1167: 2184s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 2184s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:346: in gen_adata 2184s X = X_type(random_state.binomial(100, 0.005, (M, N)).astype(X_dtype)) 2184s /usr/lib/python3.13/functools.py:934: in wrapper 2184s return dispatch(args[0].__class__)(*args, **kw) 2184s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 2184s 2184s val = array([[1., 1., 0., 1., 1., 0., 0., 0., 0., 0.], 2184s [1., 0., 1., 0., 1., 0., 1., 0., 0., 0.], 2184s [0., 0., 0., ... 1.], 2184s [0., 1., 1., 0., 0., 1., 0., 0., 0., 0.], 2184s [0., 0., 1., 1., 1., 0., 1., 1., 2., 0.]], dtype=float32) 2184s typ = 2184s 2184s @singledispatch 2184s def as_cupy(val, typ=None): 2184s """ 2184s Rough conversion function 2184s 2184s Will try to infer target type from input type if not specified. 2184s """ 2184s if typ is None: 2184s typ = resolve_cupy_type(val) 2184s 2184s if issubclass(typ, CupyArray): 2184s import cupy as cp 2184s 2184s if isinstance(val, CSMatrix): 2184s val = val.toarray() 2184s return cp.array(val) 2184s elif issubclass(typ, CupyCSRMatrix): 2184s import cupy as cp 2184s import cupyx.scipy.sparse as cpsparse 2184s 2184s if isinstance(val, np.ndarray): 2184s return cpsparse.csr_matrix(cp.array(val)) 2184s else: 2184s return cpsparse.csr_matrix(val) 2184s elif issubclass(typ, CupyCSCMatrix): 2184s > import cupy as cp 2184s E ModuleNotFoundError: No module named 'cupy' 2184s 2184s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:1024: ModuleNotFoundError 2184s _______________ test_transposed_concat[cupy_csc-obs-inner-first] _______________ 2184s 2184s array_type = functools.partial(, typ=) 2184s axis_name = 'obs', join_type = 'inner', merge_strategy = 'first' 2184s 2184s def test_transposed_concat(array_type, axis_name, join_type, merge_strategy): 2184s axis, axis_name = merge._resolve_axis(axis_name) 2184s alt_axis = 1 - axis 2184s > lhs = gen_adata((10, 10), X_type=array_type, **GEN_ADATA_DASK_ARGS) 2184s 2184s tests/test_concatenate.py:1167: 2184s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 2184s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:346: in gen_adata 2184s X = X_type(random_state.binomial(100, 0.005, (M, N)).astype(X_dtype)) 2184s /usr/lib/python3.13/functools.py:934: in wrapper 2184s return dispatch(args[0].__class__)(*args, **kw) 2184s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 2184s 2184s val = array([[0., 1., 2., 1., 0., 0., 1., 0., 1., 0.], 2184s [0., 0., 0., 0., 2., 0., 1., 0., 0., 1.], 2184s [1., 0., 0., ... 0.], 2184s [1., 1., 0., 1., 0., 0., 0., 0., 0., 0.], 2184s [0., 0., 1., 0., 1., 0., 1., 1., 0., 2.]], dtype=float32) 2184s typ = 2184s 2184s @singledispatch 2184s def as_cupy(val, typ=None): 2184s """ 2184s Rough conversion function 2184s 2184s Will try to infer target type from input type if not specified. 2184s """ 2184s if typ is None: 2184s typ = resolve_cupy_type(val) 2184s 2184s if issubclass(typ, CupyArray): 2184s import cupy as cp 2184s 2184s if isinstance(val, CSMatrix): 2184s val = val.toarray() 2184s return cp.array(val) 2184s elif issubclass(typ, CupyCSRMatrix): 2184s import cupy as cp 2184s import cupyx.scipy.sparse as cpsparse 2184s 2184s if isinstance(val, np.ndarray): 2184s return cpsparse.csr_matrix(cp.array(val)) 2184s else: 2184s return cpsparse.csr_matrix(val) 2184s elif issubclass(typ, CupyCSCMatrix): 2184s > import cupy as cp 2184s E ModuleNotFoundError: No module named 'cupy' 2184s 2184s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:1024: ModuleNotFoundError 2184s _______________ test_transposed_concat[cupy_csc-obs-inner-only] ________________ 2184s 2184s array_type = functools.partial(, typ=) 2184s axis_name = 'obs', join_type = 'inner', merge_strategy = 'only' 2184s 2184s def test_transposed_concat(array_type, axis_name, join_type, merge_strategy): 2184s axis, axis_name = merge._resolve_axis(axis_name) 2184s alt_axis = 1 - axis 2184s > lhs = gen_adata((10, 10), X_type=array_type, **GEN_ADATA_DASK_ARGS) 2184s 2184s tests/test_concatenate.py:1167: 2184s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 2184s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:346: in gen_adata 2184s X = X_type(random_state.binomial(100, 0.005, (M, N)).astype(X_dtype)) 2184s /usr/lib/python3.13/functools.py:934: in wrapper 2184s return dispatch(args[0].__class__)(*args, **kw) 2184s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 2184s 2184s val = array([[1., 0., 0., 1., 2., 0., 0., 0., 1., 1.], 2184s [0., 0., 3., 0., 1., 1., 1., 0., 0., 1.], 2184s [0., 0., 0., ... 0.], 2184s [0., 3., 0., 0., 1., 0., 1., 1., 0., 1.], 2184s [0., 2., 1., 0., 2., 1., 0., 1., 0., 0.]], dtype=float32) 2184s typ = 2184s 2184s @singledispatch 2184s def as_cupy(val, typ=None): 2184s """ 2184s Rough conversion function 2184s 2184s Will try to infer target type from input type if not specified. 2184s """ 2184s if typ is None: 2184s typ = resolve_cupy_type(val) 2184s 2184s if issubclass(typ, CupyArray): 2184s import cupy as cp 2184s 2184s if isinstance(val, CSMatrix): 2184s val = val.toarray() 2184s return cp.array(val) 2184s elif issubclass(typ, CupyCSRMatrix): 2184s import cupy as cp 2184s import cupyx.scipy.sparse as cpsparse 2184s 2184s if isinstance(val, np.ndarray): 2184s return cpsparse.csr_matrix(cp.array(val)) 2184s else: 2184s return cpsparse.csr_matrix(val) 2184s elif issubclass(typ, CupyCSCMatrix): 2184s > import cupy as cp 2184s E ModuleNotFoundError: No module named 'cupy' 2184s 2184s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:1024: ModuleNotFoundError 2184s _______________ test_transposed_concat[cupy_csc-obs-outer-None] ________________ 2184s 2184s array_type = functools.partial(, typ=) 2184s axis_name = 'obs', join_type = 'outer', merge_strategy = None 2184s 2184s def test_transposed_concat(array_type, axis_name, join_type, merge_strategy): 2184s axis, axis_name = merge._resolve_axis(axis_name) 2184s alt_axis = 1 - axis 2184s > lhs = gen_adata((10, 10), X_type=array_type, **GEN_ADATA_DASK_ARGS) 2184s 2184s tests/test_concatenate.py:1167: 2184s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 2184s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:346: in gen_adata 2184s X = X_type(random_state.binomial(100, 0.005, (M, N)).astype(X_dtype)) 2184s /usr/lib/python3.13/functools.py:934: in wrapper 2184s return dispatch(args[0].__class__)(*args, **kw) 2184s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 2184s 2184s val = array([[1., 1., 0., 0., 0., 1., 1., 0., 0., 0.], 2184s [0., 1., 1., 0., 0., 0., 1., 1., 2., 1.], 2184s [0., 1., 1., ... 1.], 2184s [0., 0., 0., 0., 1., 0., 0., 1., 0., 0.], 2184s [1., 0., 0., 0., 0., 2., 2., 1., 2., 0.]], dtype=float32) 2184s typ = 2184s 2184s @singledispatch 2184s def as_cupy(val, typ=None): 2184s """ 2184s Rough conversion function 2184s 2184s Will try to infer target type from input type if not specified. 2184s """ 2184s if typ is None: 2184s typ = resolve_cupy_type(val) 2184s 2184s if issubclass(typ, CupyArray): 2184s import cupy as cp 2184s 2184s if isinstance(val, CSMatrix): 2184s val = val.toarray() 2184s return cp.array(val) 2184s elif issubclass(typ, CupyCSRMatrix): 2184s import cupy as cp 2184s import cupyx.scipy.sparse as cpsparse 2184s 2184s if isinstance(val, np.ndarray): 2184s return cpsparse.csr_matrix(cp.array(val)) 2184s else: 2184s return cpsparse.csr_matrix(val) 2184s elif issubclass(typ, CupyCSCMatrix): 2184s > import cupy as cp 2184s E ModuleNotFoundError: No module named 'cupy' 2184s 2184s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:1024: ModuleNotFoundError 2184s _______________ test_transposed_concat[cupy_csc-obs-outer-same] ________________ 2184s 2184s array_type = functools.partial(, typ=) 2184s axis_name = 'obs', join_type = 'outer', merge_strategy = 'same' 2184s 2184s def test_transposed_concat(array_type, axis_name, join_type, merge_strategy): 2184s axis, axis_name = merge._resolve_axis(axis_name) 2184s alt_axis = 1 - axis 2184s > lhs = gen_adata((10, 10), X_type=array_type, **GEN_ADATA_DASK_ARGS) 2184s 2184s tests/test_concatenate.py:1167: 2184s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 2184s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:346: in gen_adata 2184s X = X_type(random_state.binomial(100, 0.005, (M, N)).astype(X_dtype)) 2184s /usr/lib/python3.13/functools.py:934: in wrapper 2184s return dispatch(args[0].__class__)(*args, **kw) 2184s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 2184s 2184s val = array([[0., 1., 0., 1., 0., 1., 1., 2., 1., 1.], 2184s [0., 0., 0., 1., 2., 0., 0., 0., 0., 2.], 2184s [0., 1., 1., ... 0.], 2184s [0., 0., 2., 2., 0., 1., 1., 1., 1., 1.], 2184s [0., 0., 0., 0., 0., 0., 0., 2., 0., 0.]], dtype=float32) 2184s typ = 2184s 2184s @singledispatch 2184s def as_cupy(val, typ=None): 2184s """ 2184s Rough conversion function 2184s 2184s Will try to infer target type from input type if not specified. 2184s """ 2184s if typ is None: 2184s typ = resolve_cupy_type(val) 2184s 2184s if issubclass(typ, CupyArray): 2184s import cupy as cp 2184s 2184s if isinstance(val, CSMatrix): 2184s val = val.toarray() 2184s return cp.array(val) 2184s elif issubclass(typ, CupyCSRMatrix): 2184s import cupy as cp 2184s import cupyx.scipy.sparse as cpsparse 2184s 2184s if isinstance(val, np.ndarray): 2184s return cpsparse.csr_matrix(cp.array(val)) 2184s else: 2184s return cpsparse.csr_matrix(val) 2184s elif issubclass(typ, CupyCSCMatrix): 2184s > import cupy as cp 2184s E ModuleNotFoundError: No module named 'cupy' 2184s 2184s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:1024: ModuleNotFoundError 2184s ______________ test_transposed_concat[cupy_csc-obs-outer-unique] _______________ 2184s 2184s array_type = functools.partial(, typ=) 2184s axis_name = 'obs', join_type = 'outer', merge_strategy = 'unique' 2184s 2184s def test_transposed_concat(array_type, axis_name, join_type, merge_strategy): 2184s axis, axis_name = merge._resolve_axis(axis_name) 2184s alt_axis = 1 - axis 2184s > lhs = gen_adata((10, 10), X_type=array_type, **GEN_ADATA_DASK_ARGS) 2184s 2184s tests/test_concatenate.py:1167: 2184s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 2184s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:346: in gen_adata 2184s X = X_type(random_state.binomial(100, 0.005, (M, N)).astype(X_dtype)) 2184s /usr/lib/python3.13/functools.py:934: in wrapper 2184s return dispatch(args[0].__class__)(*args, **kw) 2184s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 2184s 2184s val = array([[0., 0., 0., 0., 1., 0., 0., 1., 0., 0.], 2184s [0., 0., 0., 0., 0., 1., 0., 1., 1., 0.], 2184s [0., 0., 1., ... 0.], 2184s [1., 0., 1., 0., 0., 1., 0., 0., 1., 0.], 2184s [0., 2., 1., 0., 2., 1., 0., 1., 0., 3.]], dtype=float32) 2184s typ = 2184s 2184s @singledispatch 2184s def as_cupy(val, typ=None): 2184s """ 2184s Rough conversion function 2184s 2184s Will try to infer target type from input type if not specified. 2184s """ 2184s if typ is None: 2184s typ = resolve_cupy_type(val) 2184s 2184s if issubclass(typ, CupyArray): 2184s import cupy as cp 2184s 2184s if isinstance(val, CSMatrix): 2184s val = val.toarray() 2184s return cp.array(val) 2184s elif issubclass(typ, CupyCSRMatrix): 2184s import cupy as cp 2184s import cupyx.scipy.sparse as cpsparse 2184s 2184s if isinstance(val, np.ndarray): 2184s return cpsparse.csr_matrix(cp.array(val)) 2184s else: 2184s return cpsparse.csr_matrix(val) 2184s elif issubclass(typ, CupyCSCMatrix): 2184s > import cupy as cp 2184s E ModuleNotFoundError: No module named 'cupy' 2184s 2184s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:1024: ModuleNotFoundError 2184s _______________ test_transposed_concat[cupy_csc-obs-outer-first] _______________ 2184s 2184s array_type = functools.partial(, typ=) 2184s axis_name = 'obs', join_type = 'outer', merge_strategy = 'first' 2184s 2184s def test_transposed_concat(array_type, axis_name, join_type, merge_strategy): 2184s axis, axis_name = merge._resolve_axis(axis_name) 2184s alt_axis = 1 - axis 2184s > lhs = gen_adata((10, 10), X_type=array_type, **GEN_ADATA_DASK_ARGS) 2184s 2184s tests/test_concatenate.py:1167: 2184s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 2184s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:346: in gen_adata 2184s X = X_type(random_state.binomial(100, 0.005, (M, N)).astype(X_dtype)) 2184s /usr/lib/python3.13/functools.py:934: in wrapper 2184s return dispatch(args[0].__class__)(*args, **kw) 2184s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 2184s 2184s val = array([[0., 1., 0., 0., 0., 0., 2., 1., 1., 2.], 2184s [1., 0., 0., 0., 0., 1., 0., 2., 0., 0.], 2184s [0., 0., 1., ... 1.], 2184s [0., 1., 0., 0., 2., 1., 1., 2., 3., 0.], 2184s [0., 0., 0., 0., 1., 1., 0., 0., 1., 0.]], dtype=float32) 2184s typ = 2184s 2184s @singledispatch 2184s def as_cupy(val, typ=None): 2184s """ 2184s Rough conversion function 2184s 2184s Will try to infer target type from input type if not specified. 2184s """ 2184s if typ is None: 2184s typ = resolve_cupy_type(val) 2184s 2184s if issubclass(typ, CupyArray): 2184s import cupy as cp 2184s 2184s if isinstance(val, CSMatrix): 2184s val = val.toarray() 2184s return cp.array(val) 2184s elif issubclass(typ, CupyCSRMatrix): 2184s import cupy as cp 2184s import cupyx.scipy.sparse as cpsparse 2184s 2184s if isinstance(val, np.ndarray): 2184s return cpsparse.csr_matrix(cp.array(val)) 2184s else: 2184s return cpsparse.csr_matrix(val) 2184s elif issubclass(typ, CupyCSCMatrix): 2184s > import cupy as cp 2184s E ModuleNotFoundError: No module named 'cupy' 2184s 2184s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:1024: ModuleNotFoundError 2184s _______________ test_transposed_concat[cupy_csc-obs-outer-only] ________________ 2184s 2184s array_type = functools.partial(, typ=) 2184s axis_name = 'obs', join_type = 'outer', merge_strategy = 'only' 2184s 2184s def test_transposed_concat(array_type, axis_name, join_type, merge_strategy): 2184s axis, axis_name = merge._resolve_axis(axis_name) 2184s alt_axis = 1 - axis 2184s > lhs = gen_adata((10, 10), X_type=array_type, **GEN_ADATA_DASK_ARGS) 2184s 2184s tests/test_concatenate.py:1167: 2184s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 2184s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:346: in gen_adata 2184s X = X_type(random_state.binomial(100, 0.005, (M, N)).astype(X_dtype)) 2184s /usr/lib/python3.13/functools.py:934: in wrapper 2184s return dispatch(args[0].__class__)(*args, **kw) 2184s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 2184s 2184s val = array([[0., 1., 0., 1., 2., 1., 0., 1., 1., 0.], 2184s [0., 0., 0., 0., 1., 1., 1., 2., 1., 0.], 2184s [0., 0., 0., ... 0.], 2184s [0., 0., 1., 0., 1., 1., 2., 0., 0., 1.], 2184s [0., 0., 0., 1., 0., 0., 0., 2., 0., 0.]], dtype=float32) 2184s typ = 2184s 2184s @singledispatch 2184s def as_cupy(val, typ=None): 2184s """ 2184s Rough conversion function 2184s 2184s Will try to infer target type from input type if not specified. 2184s """ 2184s if typ is None: 2184s typ = resolve_cupy_type(val) 2184s 2184s if issubclass(typ, CupyArray): 2184s import cupy as cp 2184s 2184s if isinstance(val, CSMatrix): 2184s val = val.toarray() 2184s return cp.array(val) 2184s elif issubclass(typ, CupyCSRMatrix): 2184s import cupy as cp 2184s import cupyx.scipy.sparse as cpsparse 2184s 2184s if isinstance(val, np.ndarray): 2184s return cpsparse.csr_matrix(cp.array(val)) 2184s else: 2184s return cpsparse.csr_matrix(val) 2184s elif issubclass(typ, CupyCSCMatrix): 2184s > import cupy as cp 2184s E ModuleNotFoundError: No module named 'cupy' 2184s 2184s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:1024: ModuleNotFoundError 2184s _______________ test_transposed_concat[cupy_csc-var-inner-None] ________________ 2184s 2184s array_type = functools.partial(, typ=) 2184s axis_name = 'var', join_type = 'inner', merge_strategy = None 2184s 2184s def test_transposed_concat(array_type, axis_name, join_type, merge_strategy): 2184s axis, axis_name = merge._resolve_axis(axis_name) 2184s alt_axis = 1 - axis 2184s > lhs = gen_adata((10, 10), X_type=array_type, **GEN_ADATA_DASK_ARGS) 2184s 2184s tests/test_concatenate.py:1167: 2184s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 2184s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:346: in gen_adata 2184s X = X_type(random_state.binomial(100, 0.005, (M, N)).astype(X_dtype)) 2184s /usr/lib/python3.13/functools.py:934: in wrapper 2184s return dispatch(args[0].__class__)(*args, **kw) 2184s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 2184s 2184s val = array([[0., 1., 1., 0., 1., 0., 0., 1., 0., 0.], 2184s [1., 1., 1., 1., 0., 0., 0., 1., 0., 0.], 2184s [0., 1., 0., ... 1.], 2184s [1., 1., 3., 1., 1., 1., 1., 0., 0., 0.], 2184s [1., 0., 0., 0., 1., 0., 0., 2., 2., 0.]], dtype=float32) 2184s typ = 2184s 2184s @singledispatch 2184s def as_cupy(val, typ=None): 2184s """ 2184s Rough conversion function 2184s 2184s Will try to infer target type from input type if not specified. 2184s """ 2184s if typ is None: 2184s typ = resolve_cupy_type(val) 2184s 2184s if issubclass(typ, CupyArray): 2184s import cupy as cp 2184s 2184s if isinstance(val, CSMatrix): 2184s val = val.toarray() 2184s return cp.array(val) 2184s elif issubclass(typ, CupyCSRMatrix): 2184s import cupy as cp 2184s import cupyx.scipy.sparse as cpsparse 2184s 2184s if isinstance(val, np.ndarray): 2184s return cpsparse.csr_matrix(cp.array(val)) 2184s else: 2184s return cpsparse.csr_matrix(val) 2184s elif issubclass(typ, CupyCSCMatrix): 2184s > import cupy as cp 2184s E ModuleNotFoundError: No module named 'cupy' 2184s 2184s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:1024: ModuleNotFoundError 2184s _______________ test_transposed_concat[cupy_csc-var-inner-same] ________________ 2184s 2184s array_type = functools.partial(, typ=) 2184s axis_name = 'var', join_type = 'inner', merge_strategy = 'same' 2184s 2184s def test_transposed_concat(array_type, axis_name, join_type, merge_strategy): 2184s axis, axis_name = merge._resolve_axis(axis_name) 2184s alt_axis = 1 - axis 2184s > lhs = gen_adata((10, 10), X_type=array_type, **GEN_ADATA_DASK_ARGS) 2184s 2184s tests/test_concatenate.py:1167: 2184s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 2184s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:346: in gen_adata 2184s X = X_type(random_state.binomial(100, 0.005, (M, N)).astype(X_dtype)) 2184s /usr/lib/python3.13/functools.py:934: in wrapper 2184s return dispatch(args[0].__class__)(*args, **kw) 2184s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 2184s 2184s val = array([[1., 0., 0., 0., 1., 1., 0., 1., 0., 1.], 2184s [0., 0., 1., 0., 0., 1., 2., 0., 0., 0.], 2184s [3., 1., 1., ... 0.], 2184s [0., 0., 1., 0., 0., 2., 0., 0., 1., 0.], 2184s [0., 0., 0., 0., 0., 2., 1., 1., 1., 1.]], dtype=float32) 2184s typ = 2184s 2184s @singledispatch 2184s def as_cupy(val, typ=None): 2184s """ 2184s Rough conversion function 2184s 2184s Will try to infer target type from input type if not specified. 2184s """ 2184s if typ is None: 2184s typ = resolve_cupy_type(val) 2184s 2184s if issubclass(typ, CupyArray): 2184s import cupy as cp 2184s 2184s if isinstance(val, CSMatrix): 2184s val = val.toarray() 2184s return cp.array(val) 2184s elif issubclass(typ, CupyCSRMatrix): 2184s import cupy as cp 2184s import cupyx.scipy.sparse as cpsparse 2184s 2184s if isinstance(val, np.ndarray): 2184s return cpsparse.csr_matrix(cp.array(val)) 2184s else: 2184s return cpsparse.csr_matrix(val) 2184s elif issubclass(typ, CupyCSCMatrix): 2184s > import cupy as cp 2184s E ModuleNotFoundError: No module named 'cupy' 2184s 2184s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:1024: ModuleNotFoundError 2184s ______________ test_transposed_concat[cupy_csc-var-inner-unique] _______________ 2184s 2184s array_type = functools.partial(, typ=) 2184s axis_name = 'var', join_type = 'inner', merge_strategy = 'unique' 2184s 2184s def test_transposed_concat(array_type, axis_name, join_type, merge_strategy): 2184s axis, axis_name = merge._resolve_axis(axis_name) 2184s alt_axis = 1 - axis 2184s > lhs = gen_adata((10, 10), X_type=array_type, **GEN_ADATA_DASK_ARGS) 2184s 2184s tests/test_concatenate.py:1167: 2184s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 2184s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:346: in gen_adata 2184s X = X_type(random_state.binomial(100, 0.005, (M, N)).astype(X_dtype)) 2184s /usr/lib/python3.13/functools.py:934: in wrapper 2184s return dispatch(args[0].__class__)(*args, **kw) 2184s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 2184s 2184s val = array([[0., 1., 0., 0., 0., 0., 0., 0., 1., 1.], 2184s [0., 2., 0., 1., 0., 1., 0., 3., 0., 0.], 2184s [1., 2., 2., ... 2.], 2184s [1., 1., 4., 0., 0., 1., 0., 0., 0., 0.], 2184s [0., 2., 0., 1., 0., 0., 1., 0., 1., 0.]], dtype=float32) 2184s typ = 2184s 2184s @singledispatch 2184s def as_cupy(val, typ=None): 2184s """ 2184s Rough conversion function 2184s 2184s Will try to infer target type from input type if not specified. 2184s """ 2184s if typ is None: 2184s typ = resolve_cupy_type(val) 2184s 2184s if issubclass(typ, CupyArray): 2184s import cupy as cp 2184s 2184s if isinstance(val, CSMatrix): 2184s val = val.toarray() 2184s return cp.array(val) 2184s elif issubclass(typ, CupyCSRMatrix): 2184s import cupy as cp 2184s import cupyx.scipy.sparse as cpsparse 2184s 2184s if isinstance(val, np.ndarray): 2184s return cpsparse.csr_matrix(cp.array(val)) 2184s else: 2184s return cpsparse.csr_matrix(val) 2184s elif issubclass(typ, CupyCSCMatrix): 2184s > import cupy as cp 2184s E ModuleNotFoundError: No module named 'cupy' 2184s 2184s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:1024: ModuleNotFoundError 2184s _______________ test_transposed_concat[cupy_csc-var-inner-first] _______________ 2184s 2184s array_type = functools.partial(, typ=) 2184s axis_name = 'var', join_type = 'inner', merge_strategy = 'first' 2184s 2184s def test_transposed_concat(array_type, axis_name, join_type, merge_strategy): 2184s axis, axis_name = merge._resolve_axis(axis_name) 2184s alt_axis = 1 - axis 2184s > lhs = gen_adata((10, 10), X_type=array_type, **GEN_ADATA_DASK_ARGS) 2184s 2184s tests/test_concatenate.py:1167: 2184s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 2184s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:346: in gen_adata 2184s X = X_type(random_state.binomial(100, 0.005, (M, N)).astype(X_dtype)) 2184s /usr/lib/python3.13/functools.py:934: in wrapper 2184s return dispatch(args[0].__class__)(*args, **kw) 2184s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 2184s 2184s val = array([[0., 0., 0., 4., 1., 0., 0., 1., 1., 0.], 2184s [0., 0., 1., 0., 0., 0., 0., 0., 0., 0.], 2184s [0., 1., 1., ... 0.], 2184s [1., 1., 2., 0., 1., 1., 0., 0., 0., 0.], 2184s [0., 0., 0., 1., 1., 1., 2., 1., 1., 0.]], dtype=float32) 2184s typ = 2184s 2184s @singledispatch 2184s def as_cupy(val, typ=None): 2184s """ 2184s Rough conversion function 2184s 2184s Will try to infer target type from input type if not specified. 2184s """ 2184s if typ is None: 2184s typ = resolve_cupy_type(val) 2184s 2184s if issubclass(typ, CupyArray): 2184s import cupy as cp 2184s 2184s if isinstance(val, CSMatrix): 2184s val = val.toarray() 2184s return cp.array(val) 2184s elif issubclass(typ, CupyCSRMatrix): 2184s import cupy as cp 2184s import cupyx.scipy.sparse as cpsparse 2184s 2184s if isinstance(val, np.ndarray): 2184s return cpsparse.csr_matrix(cp.array(val)) 2184s else: 2184s return cpsparse.csr_matrix(val) 2184s elif issubclass(typ, CupyCSCMatrix): 2184s > import cupy as cp 2184s E ModuleNotFoundError: No module named 'cupy' 2184s 2184s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:1024: ModuleNotFoundError 2184s _______________ test_transposed_concat[cupy_csc-var-inner-only] ________________ 2184s 2184s array_type = functools.partial(, typ=) 2184s axis_name = 'var', join_type = 'inner', merge_strategy = 'only' 2184s 2184s def test_transposed_concat(array_type, axis_name, join_type, merge_strategy): 2184s axis, axis_name = merge._resolve_axis(axis_name) 2184s alt_axis = 1 - axis 2184s > lhs = gen_adata((10, 10), X_type=array_type, **GEN_ADATA_DASK_ARGS) 2184s 2184s tests/test_concatenate.py:1167: 2184s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 2184s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:346: in gen_adata 2184s X = X_type(random_state.binomial(100, 0.005, (M, N)).astype(X_dtype)) 2184s /usr/lib/python3.13/functools.py:934: in wrapper 2184s return dispatch(args[0].__class__)(*args, **kw) 2184s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 2184s 2184s val = array([[1., 0., 1., 1., 1., 0., 0., 0., 0., 0.], 2184s [1., 1., 1., 1., 0., 2., 0., 1., 0., 1.], 2184s [0., 0., 0., ... 1.], 2184s [2., 0., 0., 0., 2., 0., 1., 1., 0., 1.], 2184s [0., 0., 0., 0., 0., 0., 0., 1., 1., 0.]], dtype=float32) 2184s typ = 2184s 2184s @singledispatch 2184s def as_cupy(val, typ=None): 2184s """ 2184s Rough conversion function 2184s 2184s Will try to infer target type from input type if not specified. 2184s """ 2184s if typ is None: 2184s typ = resolve_cupy_type(val) 2184s 2184s if issubclass(typ, CupyArray): 2184s import cupy as cp 2184s 2184s if isinstance(val, CSMatrix): 2184s val = val.toarray() 2184s return cp.array(val) 2184s elif issubclass(typ, CupyCSRMatrix): 2184s import cupy as cp 2184s import cupyx.scipy.sparse as cpsparse 2184s 2184s if isinstance(val, np.ndarray): 2184s return cpsparse.csr_matrix(cp.array(val)) 2184s else: 2184s return cpsparse.csr_matrix(val) 2184s elif issubclass(typ, CupyCSCMatrix): 2184s > import cupy as cp 2184s E ModuleNotFoundError: No module named 'cupy' 2184s 2184s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:1024: ModuleNotFoundError 2184s _______________ test_transposed_concat[cupy_csc-var-outer-None] ________________ 2184s 2184s array_type = functools.partial(, typ=) 2184s axis_name = 'var', join_type = 'outer', merge_strategy = None 2184s 2184s def test_transposed_concat(array_type, axis_name, join_type, merge_strategy): 2184s axis, axis_name = merge._resolve_axis(axis_name) 2184s alt_axis = 1 - axis 2184s > lhs = gen_adata((10, 10), X_type=array_type, **GEN_ADATA_DASK_ARGS) 2184s 2184s tests/test_concatenate.py:1167: 2184s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 2184s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:346: in gen_adata 2184s X = X_type(random_state.binomial(100, 0.005, (M, N)).astype(X_dtype)) 2184s /usr/lib/python3.13/functools.py:934: in wrapper 2184s return dispatch(args[0].__class__)(*args, **kw) 2184s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 2184s 2184s val = array([[0., 1., 0., 0., 0., 1., 0., 1., 0., 1.], 2184s [0., 1., 1., 0., 0., 0., 1., 0., 1., 0.], 2184s [0., 0., 1., ... 0.], 2184s [0., 0., 0., 0., 1., 0., 1., 0., 1., 0.], 2184s [0., 1., 0., 0., 2., 0., 2., 2., 0., 0.]], dtype=float32) 2184s typ = 2184s 2184s @singledispatch 2184s def as_cupy(val, typ=None): 2184s """ 2184s Rough conversion function 2184s 2184s Will try to infer target type from input type if not specified. 2184s """ 2184s if typ is None: 2184s typ = resolve_cupy_type(val) 2184s 2184s if issubclass(typ, CupyArray): 2184s import cupy as cp 2184s 2184s if isinstance(val, CSMatrix): 2184s val = val.toarray() 2184s return cp.array(val) 2184s elif issubclass(typ, CupyCSRMatrix): 2184s import cupy as cp 2184s import cupyx.scipy.sparse as cpsparse 2184s 2184s if isinstance(val, np.ndarray): 2184s return cpsparse.csr_matrix(cp.array(val)) 2184s else: 2184s return cpsparse.csr_matrix(val) 2184s elif issubclass(typ, CupyCSCMatrix): 2184s > import cupy as cp 2184s E ModuleNotFoundError: No module named 'cupy' 2184s 2184s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:1024: ModuleNotFoundError 2184s _______________ test_transposed_concat[cupy_csc-var-outer-same] ________________ 2184s 2184s array_type = functools.partial(, typ=) 2184s axis_name = 'var', join_type = 'outer', merge_strategy = 'same' 2184s 2184s def test_transposed_concat(array_type, axis_name, join_type, merge_strategy): 2184s axis, axis_name = merge._resolve_axis(axis_name) 2184s alt_axis = 1 - axis 2184s > lhs = gen_adata((10, 10), X_type=array_type, **GEN_ADATA_DASK_ARGS) 2184s 2184s tests/test_concatenate.py:1167: 2184s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 2184s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:346: in gen_adata 2184s X = X_type(random_state.binomial(100, 0.005, (M, N)).astype(X_dtype)) 2184s /usr/lib/python3.13/functools.py:934: in wrapper 2184s return dispatch(args[0].__class__)(*args, **kw) 2184s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 2184s 2184s val = array([[0., 0., 0., 1., 0., 0., 1., 0., 2., 0.], 2184s [1., 0., 0., 0., 1., 2., 0., 0., 0., 1.], 2184s [0., 0., 0., ... 1.], 2184s [0., 0., 0., 1., 1., 0., 0., 0., 0., 0.], 2184s [0., 0., 2., 0., 0., 0., 1., 1., 2., 0.]], dtype=float32) 2184s typ = 2184s 2184s @singledispatch 2184s def as_cupy(val, typ=None): 2184s """ 2184s Rough conversion function 2184s 2184s Will try to infer target type from input type if not specified. 2184s """ 2184s if typ is None: 2184s typ = resolve_cupy_type(val) 2184s 2184s if issubclass(typ, CupyArray): 2184s import cupy as cp 2184s 2184s if isinstance(val, CSMatrix): 2184s val = val.toarray() 2184s return cp.array(val) 2184s elif issubclass(typ, CupyCSRMatrix): 2184s import cupy as cp 2184s import cupyx.scipy.sparse as cpsparse 2184s 2184s if isinstance(val, np.ndarray): 2184s return cpsparse.csr_matrix(cp.array(val)) 2184s else: 2184s return cpsparse.csr_matrix(val) 2184s elif issubclass(typ, CupyCSCMatrix): 2184s > import cupy as cp 2184s E ModuleNotFoundError: No module named 'cupy' 2184s 2184s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:1024: ModuleNotFoundError 2184s ______________ test_transposed_concat[cupy_csc-var-outer-unique] _______________ 2184s 2184s array_type = functools.partial(, typ=) 2184s axis_name = 'var', join_type = 'outer', merge_strategy = 'unique' 2184s 2184s def test_transposed_concat(array_type, axis_name, join_type, merge_strategy): 2184s axis, axis_name = merge._resolve_axis(axis_name) 2184s alt_axis = 1 - axis 2184s > lhs = gen_adata((10, 10), X_type=array_type, **GEN_ADATA_DASK_ARGS) 2184s 2184s tests/test_concatenate.py:1167: 2184s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 2184s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:346: in gen_adata 2184s X = X_type(random_state.binomial(100, 0.005, (M, N)).astype(X_dtype)) 2184s /usr/lib/python3.13/functools.py:934: in wrapper 2184s return dispatch(args[0].__class__)(*args, **kw) 2184s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 2184s 2184s val = array([[0., 1., 1., 1., 1., 1., 0., 0., 1., 0.], 2184s [1., 1., 0., 0., 1., 1., 1., 1., 0., 0.], 2184s [0., 0., 1., ... 1.], 2184s [0., 0., 0., 0., 1., 1., 0., 0., 2., 2.], 2184s [1., 0., 0., 0., 0., 0., 1., 1., 1., 1.]], dtype=float32) 2184s typ = 2184s 2184s @singledispatch 2184s def as_cupy(val, typ=None): 2184s """ 2184s Rough conversion function 2184s 2184s Will try to infer target type from input type if not specified. 2184s """ 2184s if typ is None: 2184s typ = resolve_cupy_type(val) 2184s 2184s if issubclass(typ, CupyArray): 2184s import cupy as cp 2184s 2184s if isinstance(val, CSMatrix): 2184s val = val.toarray() 2184s return cp.array(val) 2184s elif issubclass(typ, CupyCSRMatrix): 2184s import cupy as cp 2184s import cupyx.scipy.sparse as cpsparse 2184s 2184s if isinstance(val, np.ndarray): 2184s return cpsparse.csr_matrix(cp.array(val)) 2184s else: 2184s return cpsparse.csr_matrix(val) 2184s elif issubclass(typ, CupyCSCMatrix): 2184s > import cupy as cp 2184s E ModuleNotFoundError: No module named 'cupy' 2184s 2184s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:1024: ModuleNotFoundError 2184s _______________ test_transposed_concat[cupy_csc-var-outer-first] _______________ 2184s 2184s array_type = functools.partial(, typ=) 2184s axis_name = 'var', join_type = 'outer', merge_strategy = 'first' 2184s 2184s def test_transposed_concat(array_type, axis_name, join_type, merge_strategy): 2184s axis, axis_name = merge._resolve_axis(axis_name) 2184s alt_axis = 1 - axis 2184s > lhs = gen_adata((10, 10), X_type=array_type, **GEN_ADATA_DASK_ARGS) 2184s 2184s tests/test_concatenate.py:1167: 2184s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 2184s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:346: in gen_adata 2184s X = X_type(random_state.binomial(100, 0.005, (M, N)).astype(X_dtype)) 2184s /usr/lib/python3.13/functools.py:934: in wrapper 2184s return dispatch(args[0].__class__)(*args, **kw) 2184s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 2184s 2184s val = array([[1., 0., 2., 2., 2., 1., 0., 0., 0., 0.], 2184s [2., 3., 0., 1., 0., 1., 1., 0., 1., 2.], 2184s [1., 0., 0., ... 1.], 2184s [0., 1., 2., 1., 0., 0., 0., 0., 0., 2.], 2184s [0., 0., 1., 3., 0., 0., 1., 0., 0., 1.]], dtype=float32) 2184s typ = 2184s 2184s @singledispatch 2184s def as_cupy(val, typ=None): 2184s """ 2184s Rough conversion function 2184s 2184s Will try to infer target type from input type if not specified. 2184s """ 2184s if typ is None: 2184s typ = resolve_cupy_type(val) 2184s 2184s if issubclass(typ, CupyArray): 2184s import cupy as cp 2184s 2184s if isinstance(val, CSMatrix): 2184s val = val.toarray() 2184s return cp.array(val) 2184s elif issubclass(typ, CupyCSRMatrix): 2184s import cupy as cp 2184s import cupyx.scipy.sparse as cpsparse 2184s 2184s if isinstance(val, np.ndarray): 2184s return cpsparse.csr_matrix(cp.array(val)) 2184s else: 2184s return cpsparse.csr_matrix(val) 2184s elif issubclass(typ, CupyCSCMatrix): 2184s > import cupy as cp 2184s E ModuleNotFoundError: No module named 'cupy' 2184s 2184s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:1024: ModuleNotFoundError 2184s _______________ test_transposed_concat[cupy_csc-var-outer-only] ________________ 2184s 2184s array_type = functools.partial(, typ=) 2184s axis_name = 'var', join_type = 'outer', merge_strategy = 'only' 2184s 2184s def test_transposed_concat(array_type, axis_name, join_type, merge_strategy): 2184s axis, axis_name = merge._resolve_axis(axis_name) 2184s alt_axis = 1 - axis 2184s > lhs = gen_adata((10, 10), X_type=array_type, **GEN_ADATA_DASK_ARGS) 2184s 2184s tests/test_concatenate.py:1167: 2184s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 2184s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:346: in gen_adata 2184s X = X_type(random_state.binomial(100, 0.005, (M, N)).astype(X_dtype)) 2184s /usr/lib/python3.13/functools.py:934: in wrapper 2184s return dispatch(args[0].__class__)(*args, **kw) 2184s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 2184s 2184s val = array([[2., 0., 0., 0., 0., 0., 1., 2., 0., 1.], 2184s [2., 0., 1., 0., 0., 1., 0., 1., 0., 0.], 2184s [0., 0., 1., ... 1.], 2184s [0., 1., 0., 0., 0., 0., 0., 0., 1., 0.], 2184s [1., 0., 0., 1., 0., 0., 1., 1., 1., 0.]], dtype=float32) 2184s typ = 2184s 2184s @singledispatch 2184s def as_cupy(val, typ=None): 2184s """ 2184s Rough conversion function 2184s 2184s Will try to infer target type from input type if not specified. 2184s """ 2184s if typ is None: 2184s typ = resolve_cupy_type(val) 2184s 2184s if issubclass(typ, CupyArray): 2184s import cupy as cp 2184s 2184s if isinstance(val, CSMatrix): 2184s val = val.toarray() 2184s return cp.array(val) 2184s elif issubclass(typ, CupyCSRMatrix): 2184s import cupy as cp 2184s import cupyx.scipy.sparse as cpsparse 2184s 2184s if isinstance(val, np.ndarray): 2184s return cpsparse.csr_matrix(cp.array(val)) 2184s else: 2184s return cpsparse.csr_matrix(val) 2184s elif issubclass(typ, CupyCSCMatrix): 2184s > import cupy as cp 2184s E ModuleNotFoundError: No module named 'cupy' 2184s 2184s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:1024: ModuleNotFoundError 2184s ______________ test_concat_different_types_dask[None-cupy_array] _______________ 2184s 2184s merge_strategy = None 2184s array_type = functools.partial(, typ=) 2184s 2184s def test_concat_different_types_dask(merge_strategy, array_type): 2184s import dask.array as da 2184s from scipy import sparse 2184s 2184s import anndata as ad 2184s 2184s varm_array = sparse.random(5, 20, density=0.5, format="csr") 2184s 2184s ad1 = ad.AnnData(X=np.ones((5, 5)), varm={"a": varm_array}) 2184s > ad1_other = ad.AnnData(X=np.ones((5, 5)), varm={"a": array_type(varm_array)}) 2184s 2184s tests/test_concatenate.py:1536: 2184s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 2184s /usr/lib/python3.13/functools.py:934: in wrapper 2184s return dispatch(args[0].__class__)(*args, **kw) 2184s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 2184s 2184s val = 2184s typ = 2184s 2184s @singledispatch 2184s def as_cupy(val, typ=None): 2184s """ 2184s Rough conversion function 2184s 2184s Will try to infer target type from input type if not specified. 2184s """ 2184s if typ is None: 2184s typ = resolve_cupy_type(val) 2184s 2184s if issubclass(typ, CupyArray): 2184s > import cupy as cp 2184s E ModuleNotFoundError: No module named 'cupy' 2184s 2184s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:1010: ModuleNotFoundError 2184s _______________ test_concat_different_types_dask[None-cupy_csr] ________________ 2184s 2184s merge_strategy = None 2184s array_type = functools.partial(, typ=) 2184s 2184s def test_concat_different_types_dask(merge_strategy, array_type): 2184s import dask.array as da 2184s from scipy import sparse 2184s 2184s import anndata as ad 2184s 2184s varm_array = sparse.random(5, 20, density=0.5, format="csr") 2184s 2184s ad1 = ad.AnnData(X=np.ones((5, 5)), varm={"a": varm_array}) 2184s > ad1_other = ad.AnnData(X=np.ones((5, 5)), varm={"a": array_type(varm_array)}) 2184s 2184s tests/test_concatenate.py:1536: 2184s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 2184s /usr/lib/python3.13/functools.py:934: in wrapper 2184s return dispatch(args[0].__class__)(*args, **kw) 2184s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 2184s 2184s val = 2184s typ = 2184s 2184s @singledispatch 2184s def as_cupy(val, typ=None): 2184s """ 2184s Rough conversion function 2184s 2184s Will try to infer target type from input type if not specified. 2184s """ 2184s if typ is None: 2184s typ = resolve_cupy_type(val) 2184s 2184s if issubclass(typ, CupyArray): 2184s import cupy as cp 2184s 2184s if isinstance(val, CSMatrix): 2184s val = val.toarray() 2184s return cp.array(val) 2184s elif issubclass(typ, CupyCSRMatrix): 2184s > import cupy as cp 2184s E ModuleNotFoundError: No module named 'cupy' 2184s 2184s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:1016: ModuleNotFoundError 2184s _______________ test_concat_different_types_dask[None-cupy_csc] ________________ 2184s 2184s merge_strategy = None 2184s array_type = functools.partial(, typ=) 2184s 2184s def test_concat_different_types_dask(merge_strategy, array_type): 2184s import dask.array as da 2184s from scipy import sparse 2184s 2184s import anndata as ad 2184s 2184s varm_array = sparse.random(5, 20, density=0.5, format="csr") 2184s 2184s ad1 = ad.AnnData(X=np.ones((5, 5)), varm={"a": varm_array}) 2184s > ad1_other = ad.AnnData(X=np.ones((5, 5)), varm={"a": array_type(varm_array)}) 2184s 2184s tests/test_concatenate.py:1536: 2184s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 2184s /usr/lib/python3.13/functools.py:934: in wrapper 2184s return dispatch(args[0].__class__)(*args, **kw) 2184s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 2184s 2184s val = 2184s typ = 2184s 2184s @singledispatch 2184s def as_cupy(val, typ=None): 2184s """ 2184s Rough conversion function 2184s 2184s Will try to infer target type from input type if not specified. 2184s """ 2184s if typ is None: 2184s typ = resolve_cupy_type(val) 2184s 2184s if issubclass(typ, CupyArray): 2184s import cupy as cp 2184s 2184s if isinstance(val, CSMatrix): 2184s val = val.toarray() 2184s return cp.array(val) 2184s elif issubclass(typ, CupyCSRMatrix): 2184s import cupy as cp 2184s import cupyx.scipy.sparse as cpsparse 2184s 2184s if isinstance(val, np.ndarray): 2184s return cpsparse.csr_matrix(cp.array(val)) 2184s else: 2184s return cpsparse.csr_matrix(val) 2184s elif issubclass(typ, CupyCSCMatrix): 2184s > import cupy as cp 2184s E ModuleNotFoundError: No module named 'cupy' 2184s 2184s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:1024: ModuleNotFoundError 2184s ______________ test_concat_different_types_dask[same-cupy_array] _______________ 2184s 2184s merge_strategy = 'same' 2184s array_type = functools.partial(, typ=) 2184s 2184s def test_concat_different_types_dask(merge_strategy, array_type): 2184s import dask.array as da 2184s from scipy import sparse 2184s 2184s import anndata as ad 2184s 2184s varm_array = sparse.random(5, 20, density=0.5, format="csr") 2184s 2184s ad1 = ad.AnnData(X=np.ones((5, 5)), varm={"a": varm_array}) 2184s > ad1_other = ad.AnnData(X=np.ones((5, 5)), varm={"a": array_type(varm_array)}) 2184s 2184s tests/test_concatenate.py:1536: 2184s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 2184s /usr/lib/python3.13/functools.py:934: in wrapper 2184s return dispatch(args[0].__class__)(*args, **kw) 2184s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 2184s 2184s val = 2184s typ = 2184s 2184s @singledispatch 2184s def as_cupy(val, typ=None): 2184s """ 2184s Rough conversion function 2184s 2184s Will try to infer target type from input type if not specified. 2184s """ 2184s if typ is None: 2184s typ = resolve_cupy_type(val) 2184s 2184s if issubclass(typ, CupyArray): 2184s > import cupy as cp 2184s E ModuleNotFoundError: No module named 'cupy' 2184s 2184s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:1010: ModuleNotFoundError 2184s _______________ test_concat_different_types_dask[same-cupy_csr] ________________ 2184s 2184s merge_strategy = 'same' 2184s array_type = functools.partial(, typ=) 2184s 2184s def test_concat_different_types_dask(merge_strategy, array_type): 2184s import dask.array as da 2184s from scipy import sparse 2184s 2184s import anndata as ad 2184s 2184s varm_array = sparse.random(5, 20, density=0.5, format="csr") 2184s 2184s ad1 = ad.AnnData(X=np.ones((5, 5)), varm={"a": varm_array}) 2184s > ad1_other = ad.AnnData(X=np.ones((5, 5)), varm={"a": array_type(varm_array)}) 2184s 2184s tests/test_concatenate.py:1536: 2184s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 2184s /usr/lib/python3.13/functools.py:934: in wrapper 2184s return dispatch(args[0].__class__)(*args, **kw) 2184s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 2184s 2184s val = 2184s typ = 2184s 2184s @singledispatch 2184s def as_cupy(val, typ=None): 2184s """ 2184s Rough conversion function 2184s 2184s Will try to infer target type from input type if not specified. 2184s """ 2184s if typ is None: 2184s typ = resolve_cupy_type(val) 2184s 2184s if issubclass(typ, CupyArray): 2184s import cupy as cp 2184s 2184s if isinstance(val, CSMatrix): 2184s val = val.toarray() 2184s return cp.array(val) 2184s elif issubclass(typ, CupyCSRMatrix): 2184s > import cupy as cp 2184s E ModuleNotFoundError: No module named 'cupy' 2184s 2184s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:1016: ModuleNotFoundError 2184s _______________ test_concat_different_types_dask[same-cupy_csc] ________________ 2184s 2184s merge_strategy = 'same' 2184s array_type = functools.partial(, typ=) 2184s 2184s def test_concat_different_types_dask(merge_strategy, array_type): 2184s import dask.array as da 2184s from scipy import sparse 2184s 2184s import anndata as ad 2184s 2184s varm_array = sparse.random(5, 20, density=0.5, format="csr") 2184s 2184s ad1 = ad.AnnData(X=np.ones((5, 5)), varm={"a": varm_array}) 2184s > ad1_other = ad.AnnData(X=np.ones((5, 5)), varm={"a": array_type(varm_array)}) 2184s 2184s tests/test_concatenate.py:1536: 2184s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 2184s /usr/lib/python3.13/functools.py:934: in wrapper 2184s return dispatch(args[0].__class__)(*args, **kw) 2184s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 2184s 2184s val = 2184s typ = 2184s 2184s @singledispatch 2184s def as_cupy(val, typ=None): 2184s """ 2184s Rough conversion function 2184s 2184s Will try to infer target type from input type if not specified. 2184s """ 2184s if typ is None: 2184s typ = resolve_cupy_type(val) 2184s 2184s if issubclass(typ, CupyArray): 2184s import cupy as cp 2184s 2184s if isinstance(val, CSMatrix): 2184s val = val.toarray() 2184s return cp.array(val) 2184s elif issubclass(typ, CupyCSRMatrix): 2184s import cupy as cp 2184s import cupyx.scipy.sparse as cpsparse 2184s 2184s if isinstance(val, np.ndarray): 2184s return cpsparse.csr_matrix(cp.array(val)) 2184s else: 2184s return cpsparse.csr_matrix(val) 2184s elif issubclass(typ, CupyCSCMatrix): 2184s > import cupy as cp 2184s E ModuleNotFoundError: No module named 'cupy' 2184s 2184s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:1024: ModuleNotFoundError 2184s _____________ test_concat_different_types_dask[unique-cupy_array] ______________ 2184s 2184s merge_strategy = 'unique' 2184s array_type = functools.partial(, typ=) 2184s 2184s def test_concat_different_types_dask(merge_strategy, array_type): 2184s import dask.array as da 2184s from scipy import sparse 2184s 2184s import anndata as ad 2184s 2184s varm_array = sparse.random(5, 20, density=0.5, format="csr") 2184s 2184s ad1 = ad.AnnData(X=np.ones((5, 5)), varm={"a": varm_array}) 2184s > ad1_other = ad.AnnData(X=np.ones((5, 5)), varm={"a": array_type(varm_array)}) 2184s 2184s tests/test_concatenate.py:1536: 2184s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 2184s /usr/lib/python3.13/functools.py:934: in wrapper 2184s return dispatch(args[0].__class__)(*args, **kw) 2184s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 2184s 2184s val = 2184s typ = 2184s 2184s @singledispatch 2184s def as_cupy(val, typ=None): 2184s """ 2184s Rough conversion function 2184s 2184s Will try to infer target type from input type if not specified. 2184s """ 2184s if typ is None: 2184s typ = resolve_cupy_type(val) 2184s 2184s if issubclass(typ, CupyArray): 2184s > import cupy as cp 2184s E ModuleNotFoundError: No module named 'cupy' 2184s 2184s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:1010: ModuleNotFoundError 2184s ______________ test_concat_different_types_dask[unique-cupy_csr] _______________ 2184s 2184s merge_strategy = 'unique' 2184s array_type = functools.partial(, typ=) 2184s 2184s def test_concat_different_types_dask(merge_strategy, array_type): 2184s import dask.array as da 2184s from scipy import sparse 2184s 2184s import anndata as ad 2184s 2184s varm_array = sparse.random(5, 20, density=0.5, format="csr") 2184s 2184s ad1 = ad.AnnData(X=np.ones((5, 5)), varm={"a": varm_array}) 2184s > ad1_other = ad.AnnData(X=np.ones((5, 5)), varm={"a": array_type(varm_array)}) 2184s 2184s tests/test_concatenate.py:1536: 2184s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 2184s /usr/lib/python3.13/functools.py:934: in wrapper 2184s return dispatch(args[0].__class__)(*args, **kw) 2184s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 2184s 2184s val = 2184s typ = 2184s 2184s @singledispatch 2184s def as_cupy(val, typ=None): 2184s """ 2184s Rough conversion function 2184s 2184s Will try to infer target type from input type if not specified. 2184s """ 2184s if typ is None: 2184s typ = resolve_cupy_type(val) 2184s 2184s if issubclass(typ, CupyArray): 2184s import cupy as cp 2184s 2184s if isinstance(val, CSMatrix): 2184s val = val.toarray() 2184s return cp.array(val) 2184s elif issubclass(typ, CupyCSRMatrix): 2184s > import cupy as cp 2184s E ModuleNotFoundError: No module named 'cupy' 2184s 2184s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:1016: ModuleNotFoundError 2184s ______________ test_concat_different_types_dask[unique-cupy_csc] _______________ 2184s 2184s merge_strategy = 'unique' 2184s array_type = functools.partial(, typ=) 2184s 2184s def test_concat_different_types_dask(merge_strategy, array_type): 2184s import dask.array as da 2184s from scipy import sparse 2184s 2184s import anndata as ad 2184s 2184s varm_array = sparse.random(5, 20, density=0.5, format="csr") 2184s 2184s ad1 = ad.AnnData(X=np.ones((5, 5)), varm={"a": varm_array}) 2184s > ad1_other = ad.AnnData(X=np.ones((5, 5)), varm={"a": array_type(varm_array)}) 2184s 2184s tests/test_concatenate.py:1536: 2184s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 2184s /usr/lib/python3.13/functools.py:934: in wrapper 2184s return dispatch(args[0].__class__)(*args, **kw) 2184s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 2184s 2184s val = 2184s typ = 2184s 2184s @singledispatch 2184s def as_cupy(val, typ=None): 2184s """ 2184s Rough conversion function 2184s 2184s Will try to infer target type from input type if not specified. 2184s """ 2184s if typ is None: 2184s typ = resolve_cupy_type(val) 2184s 2184s if issubclass(typ, CupyArray): 2184s import cupy as cp 2184s 2184s if isinstance(val, CSMatrix): 2184s val = val.toarray() 2184s return cp.array(val) 2184s elif issubclass(typ, CupyCSRMatrix): 2184s import cupy as cp 2184s import cupyx.scipy.sparse as cpsparse 2184s 2184s if isinstance(val, np.ndarray): 2184s return cpsparse.csr_matrix(cp.array(val)) 2184s else: 2184s return cpsparse.csr_matrix(val) 2184s elif issubclass(typ, CupyCSCMatrix): 2184s > import cupy as cp 2184s E ModuleNotFoundError: No module named 'cupy' 2184s 2184s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:1024: ModuleNotFoundError 2184s ______________ test_concat_different_types_dask[first-cupy_array] ______________ 2184s 2184s merge_strategy = 'first' 2184s array_type = functools.partial(, typ=) 2184s 2184s def test_concat_different_types_dask(merge_strategy, array_type): 2184s import dask.array as da 2184s from scipy import sparse 2184s 2184s import anndata as ad 2184s 2184s varm_array = sparse.random(5, 20, density=0.5, format="csr") 2184s 2184s ad1 = ad.AnnData(X=np.ones((5, 5)), varm={"a": varm_array}) 2184s > ad1_other = ad.AnnData(X=np.ones((5, 5)), varm={"a": array_type(varm_array)}) 2184s 2184s tests/test_concatenate.py:1536: 2184s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 2184s /usr/lib/python3.13/functools.py:934: in wrapper 2184s return dispatch(args[0].__class__)(*args, **kw) 2184s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 2184s 2184s val = 2184s typ = 2184s 2184s @singledispatch 2184s def as_cupy(val, typ=None): 2184s """ 2184s Rough conversion function 2184s 2184s Will try to infer target type from input type if not specified. 2184s """ 2184s if typ is None: 2184s typ = resolve_cupy_type(val) 2184s 2184s if issubclass(typ, CupyArray): 2184s > import cupy as cp 2184s E ModuleNotFoundError: No module named 'cupy' 2184s 2184s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:1010: ModuleNotFoundError 2184s _______________ test_concat_different_types_dask[first-cupy_csr] _______________ 2184s 2184s merge_strategy = 'first' 2184s array_type = functools.partial(, typ=) 2184s 2184s def test_concat_different_types_dask(merge_strategy, array_type): 2184s import dask.array as da 2184s from scipy import sparse 2184s 2184s import anndata as ad 2184s 2184s varm_array = sparse.random(5, 20, density=0.5, format="csr") 2184s 2184s ad1 = ad.AnnData(X=np.ones((5, 5)), varm={"a": varm_array}) 2184s > ad1_other = ad.AnnData(X=np.ones((5, 5)), varm={"a": array_type(varm_array)}) 2184s 2184s tests/test_concatenate.py:1536: 2184s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 2184s /usr/lib/python3.13/functools.py:934: in wrapper 2184s return dispatch(args[0].__class__)(*args, **kw) 2184s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 2184s 2184s val = 2184s typ = 2184s 2184s @singledispatch 2184s def as_cupy(val, typ=None): 2184s """ 2184s Rough conversion function 2184s 2184s Will try to infer target type from input type if not specified. 2184s """ 2184s if typ is None: 2184s typ = resolve_cupy_type(val) 2184s 2184s if issubclass(typ, CupyArray): 2184s import cupy as cp 2184s 2184s if isinstance(val, CSMatrix): 2184s val = val.toarray() 2184s return cp.array(val) 2184s elif issubclass(typ, CupyCSRMatrix): 2184s > import cupy as cp 2184s E ModuleNotFoundError: No module named 'cupy' 2184s 2184s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:1016: ModuleNotFoundError 2184s _______________ test_concat_different_types_dask[first-cupy_csc] _______________ 2184s 2184s merge_strategy = 'first' 2184s array_type = functools.partial(, typ=) 2184s 2184s def test_concat_different_types_dask(merge_strategy, array_type): 2184s import dask.array as da 2184s from scipy import sparse 2184s 2184s import anndata as ad 2184s 2184s varm_array = sparse.random(5, 20, density=0.5, format="csr") 2184s 2184s ad1 = ad.AnnData(X=np.ones((5, 5)), varm={"a": varm_array}) 2184s > ad1_other = ad.AnnData(X=np.ones((5, 5)), varm={"a": array_type(varm_array)}) 2184s 2184s tests/test_concatenate.py:1536: 2184s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 2184s /usr/lib/python3.13/functools.py:934: in wrapper 2184s return dispatch(args[0].__class__)(*args, **kw) 2184s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 2184s 2184s val = 2184s typ = 2184s 2184s @singledispatch 2184s def as_cupy(val, typ=None): 2184s """ 2184s Rough conversion function 2184s 2184s Will try to infer target type from input type if not specified. 2184s """ 2184s if typ is None: 2184s typ = resolve_cupy_type(val) 2184s 2184s if issubclass(typ, CupyArray): 2184s import cupy as cp 2184s 2184s if isinstance(val, CSMatrix): 2184s val = val.toarray() 2184s return cp.array(val) 2184s elif issubclass(typ, CupyCSRMatrix): 2184s import cupy as cp 2184s import cupyx.scipy.sparse as cpsparse 2184s 2184s if isinstance(val, np.ndarray): 2184s return cpsparse.csr_matrix(cp.array(val)) 2184s else: 2184s return cpsparse.csr_matrix(val) 2184s elif issubclass(typ, CupyCSCMatrix): 2184s > import cupy as cp 2184s E ModuleNotFoundError: No module named 'cupy' 2184s 2184s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:1024: ModuleNotFoundError 2184s ______________ test_concat_different_types_dask[only-cupy_array] _______________ 2184s 2184s merge_strategy = 'only' 2184s array_type = functools.partial(, typ=) 2184s 2184s def test_concat_different_types_dask(merge_strategy, array_type): 2184s import dask.array as da 2184s from scipy import sparse 2184s 2184s import anndata as ad 2184s 2184s varm_array = sparse.random(5, 20, density=0.5, format="csr") 2184s 2184s ad1 = ad.AnnData(X=np.ones((5, 5)), varm={"a": varm_array}) 2184s > ad1_other = ad.AnnData(X=np.ones((5, 5)), varm={"a": array_type(varm_array)}) 2184s 2184s tests/test_concatenate.py:1536: 2184s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 2184s /usr/lib/python3.13/functools.py:934: in wrapper 2184s return dispatch(args[0].__class__)(*args, **kw) 2184s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 2184s 2184s val = 2184s typ = 2184s 2184s @singledispatch 2184s def as_cupy(val, typ=None): 2184s """ 2184s Rough conversion function 2184s 2184s Will try to infer target type from input type if not specified. 2184s """ 2184s if typ is None: 2184s typ = resolve_cupy_type(val) 2184s 2184s if issubclass(typ, CupyArray): 2184s > import cupy as cp 2184s E ModuleNotFoundError: No module named 'cupy' 2184s 2184s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:1010: ModuleNotFoundError 2184s _______________ test_concat_different_types_dask[only-cupy_csr] ________________ 2184s 2184s merge_strategy = 'only' 2184s array_type = functools.partial(, typ=) 2184s 2184s def test_concat_different_types_dask(merge_strategy, array_type): 2184s import dask.array as da 2184s from scipy import sparse 2184s 2184s import anndata as ad 2184s 2184s varm_array = sparse.random(5, 20, density=0.5, format="csr") 2184s 2184s ad1 = ad.AnnData(X=np.ones((5, 5)), varm={"a": varm_array}) 2184s > ad1_other = ad.AnnData(X=np.ones((5, 5)), varm={"a": array_type(varm_array)}) 2184s 2184s tests/test_concatenate.py:1536: 2184s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 2184s /usr/lib/python3.13/functools.py:934: in wrapper 2184s return dispatch(args[0].__class__)(*args, **kw) 2184s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 2184s 2184s val = 2184s typ = 2184s 2184s @singledispatch 2184s def as_cupy(val, typ=None): 2184s """ 2184s Rough conversion function 2184s 2184s Will try to infer target type from input type if not specified. 2184s """ 2184s if typ is None: 2184s typ = resolve_cupy_type(val) 2184s 2184s if issubclass(typ, CupyArray): 2184s import cupy as cp 2184s 2184s if isinstance(val, CSMatrix): 2184s val = val.toarray() 2184s return cp.array(val) 2184s elif issubclass(typ, CupyCSRMatrix): 2184s > import cupy as cp 2184s E ModuleNotFoundError: No module named 'cupy' 2184s 2184s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:1016: ModuleNotFoundError 2184s _______________ test_concat_different_types_dask[only-cupy_csc] ________________ 2184s 2184s merge_strategy = 'only' 2184s array_type = functools.partial(, typ=) 2184s 2184s def test_concat_different_types_dask(merge_strategy, array_type): 2184s import dask.array as da 2184s from scipy import sparse 2184s 2184s import anndata as ad 2184s 2184s varm_array = sparse.random(5, 20, density=0.5, format="csr") 2184s 2184s ad1 = ad.AnnData(X=np.ones((5, 5)), varm={"a": varm_array}) 2184s > ad1_other = ad.AnnData(X=np.ones((5, 5)), varm={"a": array_type(varm_array)}) 2184s 2184s tests/test_concatenate.py:1536: 2184s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 2184s /usr/lib/python3.13/functools.py:934: in wrapper 2184s return dispatch(args[0].__class__)(*args, **kw) 2184s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 2184s 2184s val = 2184s typ = 2184s 2184s @singledispatch 2184s def as_cupy(val, typ=None): 2184s """ 2184s Rough conversion function 2184s 2184s Will try to infer target type from input type if not specified. 2184s """ 2184s if typ is None: 2184s typ = resolve_cupy_type(val) 2184s 2184s if issubclass(typ, CupyArray): 2184s import cupy as cp 2184s 2184s if isinstance(val, CSMatrix): 2184s val = val.toarray() 2184s return cp.array(val) 2184s elif issubclass(typ, CupyCSRMatrix): 2184s import cupy as cp 2184s import cupyx.scipy.sparse as cpsparse 2184s 2184s if isinstance(val, np.ndarray): 2184s return cpsparse.csr_matrix(cp.array(val)) 2184s else: 2184s return cpsparse.csr_matrix(val) 2184s elif issubclass(typ, CupyCSCMatrix): 2184s > import cupy as cp 2184s E ModuleNotFoundError: No module named 'cupy' 2184s 2184s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:1024: ModuleNotFoundError 2184s __________________ test_concat_on_var_outer_join[cupy_array] ___________________ 2184s 2184s array_type = functools.partial(, typ=) 2184s 2184s def test_concat_on_var_outer_join(array_type): 2184s # https://github.com/scverse/anndata/issues/1286 2184s a = AnnData( 2184s obs=pd.DataFrame(index=[f"cell_{i:02d}" for i in range(10)]), 2184s var=pd.DataFrame(index=[f"gene_{i:02d}" for i in range(10)]), 2184s layers={ 2184s > "X": array_type(np.ones((10, 10))), 2184s }, 2184s ) 2184s 2184s tests/test_concatenate.py:1671: 2184s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 2184s /usr/lib/python3.13/functools.py:934: in wrapper 2184s return dispatch(args[0].__class__)(*args, **kw) 2184s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 2184s 2184s val = array([[1., 1., 1., 1., 1., 1., 1., 1., 1., 1.], 2184s [1., 1., 1., 1., 1., 1., 1., 1., 1., 1.], 2184s [1., 1., 1., ...1., 1., 1., 1., 1.], 2184s [1., 1., 1., 1., 1., 1., 1., 1., 1., 1.], 2184s [1., 1., 1., 1., 1., 1., 1., 1., 1., 1.]]) 2184s typ = 2184s 2184s @singledispatch 2184s def as_cupy(val, typ=None): 2184s """ 2184s Rough conversion function 2184s 2184s Will try to infer target type from input type if not specified. 2184s """ 2184s if typ is None: 2184s typ = resolve_cupy_type(val) 2184s 2184s if issubclass(typ, CupyArray): 2184s > import cupy as cp 2184s E ModuleNotFoundError: No module named 'cupy' 2184s 2184s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:1010: ModuleNotFoundError 2184s ___________________ test_concat_on_var_outer_join[cupy_csr] ____________________ 2184s 2184s array_type = functools.partial(, typ=) 2184s 2184s def test_concat_on_var_outer_join(array_type): 2184s # https://github.com/scverse/anndata/issues/1286 2184s a = AnnData( 2184s obs=pd.DataFrame(index=[f"cell_{i:02d}" for i in range(10)]), 2184s var=pd.DataFrame(index=[f"gene_{i:02d}" for i in range(10)]), 2184s layers={ 2184s > "X": array_type(np.ones((10, 10))), 2184s }, 2184s ) 2184s 2184s tests/test_concatenate.py:1671: 2184s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 2184s /usr/lib/python3.13/functools.py:934: in wrapper 2184s return dispatch(args[0].__class__)(*args, **kw) 2184s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 2184s 2184s val = array([[1., 1., 1., 1., 1., 1., 1., 1., 1., 1.], 2184s [1., 1., 1., 1., 1., 1., 1., 1., 1., 1.], 2184s [1., 1., 1., ...1., 1., 1., 1., 1.], 2184s [1., 1., 1., 1., 1., 1., 1., 1., 1., 1.], 2184s [1., 1., 1., 1., 1., 1., 1., 1., 1., 1.]]) 2184s typ = 2184s 2184s @singledispatch 2184s def as_cupy(val, typ=None): 2184s """ 2184s Rough conversion function 2184s 2184s Will try to infer target type from input type if not specified. 2184s """ 2184s if typ is None: 2184s typ = resolve_cupy_type(val) 2184s 2184s if issubclass(typ, CupyArray): 2184s import cupy as cp 2184s 2184s if isinstance(val, CSMatrix): 2184s val = val.toarray() 2184s return cp.array(val) 2184s elif issubclass(typ, CupyCSRMatrix): 2184s > import cupy as cp 2184s E ModuleNotFoundError: No module named 'cupy' 2184s 2184s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:1016: ModuleNotFoundError 2184s ___________________ test_concat_on_var_outer_join[cupy_csc] ____________________ 2184s 2184s array_type = functools.partial(, typ=) 2184s 2184s def test_concat_on_var_outer_join(array_type): 2184s # https://github.com/scverse/anndata/issues/1286 2184s a = AnnData( 2184s obs=pd.DataFrame(index=[f"cell_{i:02d}" for i in range(10)]), 2184s var=pd.DataFrame(index=[f"gene_{i:02d}" for i in range(10)]), 2184s layers={ 2184s > "X": array_type(np.ones((10, 10))), 2184s }, 2184s ) 2184s 2184s tests/test_concatenate.py:1671: 2184s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 2184s /usr/lib/python3.13/functools.py:934: in wrapper 2184s return dispatch(args[0].__class__)(*args, **kw) 2184s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 2184s 2184s val = array([[1., 1., 1., 1., 1., 1., 1., 1., 1., 1.], 2184s [1., 1., 1., 1., 1., 1., 1., 1., 1., 1.], 2184s [1., 1., 1., ...1., 1., 1., 1., 1.], 2184s [1., 1., 1., 1., 1., 1., 1., 1., 1., 1.], 2184s [1., 1., 1., 1., 1., 1., 1., 1., 1., 1.]]) 2184s typ = 2184s 2184s @singledispatch 2184s def as_cupy(val, typ=None): 2184s """ 2184s Rough conversion function 2184s 2184s Will try to infer target type from input type if not specified. 2184s """ 2184s if typ is None: 2184s typ = resolve_cupy_type(val) 2184s 2184s if issubclass(typ, CupyArray): 2184s import cupy as cp 2184s 2184s if isinstance(val, CSMatrix): 2184s val = val.toarray() 2184s return cp.array(val) 2184s elif issubclass(typ, CupyCSRMatrix): 2184s import cupy as cp 2184s import cupyx.scipy.sparse as cpsparse 2184s 2184s if isinstance(val, np.ndarray): 2184s return cpsparse.csr_matrix(cp.array(val)) 2184s else: 2184s return cpsparse.csr_matrix(val) 2184s elif issubclass(typ, CupyCSCMatrix): 2184s > import cupy as cp 2184s E ModuleNotFoundError: No module named 'cupy' 2184s 2184s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:1024: ModuleNotFoundError 2184s _____________ test_dask_to_memory_unbacked[cupy_dense_dask_array] ______________ 2184s 2184s array_func = 2184s mem_type = 2184s 2184s @pytest.mark.parametrize( 2184s ("array_func", "mem_type"), 2184s [ 2184s pytest.param(as_dense_dask_array, np.ndarray, id="dense_dask_array"), 2184s pytest.param(as_sparse_dask_array, sparse.csr_matrix, id="sparse_dask_array"), 2184s pytest.param( 2184s as_dense_cupy_dask_array, 2184s CupyArray, 2184s id="cupy_dense_dask_array", 2184s marks=pytest.mark.gpu, 2184s ), 2184s ], 2184s ) 2184s def test_dask_to_memory_unbacked(array_func, mem_type): 2184s > orig = gen_adata((15, 10), X_type=array_func, **GEN_ADATA_DASK_ARGS) 2184s 2184s tests/test_dask.py:289: 2184s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 2184s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:346: in gen_adata 2184s X = X_type(random_state.binomial(100, 0.005, (M, N)).astype(X_dtype)) 2184s /usr/lib/python3.13/functools.py:934: in wrapper 2184s return dispatch(args[0].__class__)(*args, **kw) 2184s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 2184s 2184s a = array([[0., 0., 0., 1., 0., 2., 2., 2., 0., 2.], 2184s [0., 0., 0., 0., 0., 0., 0., 0., 0., 1.], 2184s [0., 3., 1., ... 0.], 2184s [2., 0., 0., 0., 0., 0., 2., 3., 1., 0.], 2184s [0., 1., 1., 0., 2., 0., 1., 0., 2., 0.]], dtype=float32) 2184s 2184s @singledispatch 2184s def as_dense_cupy_dask_array(a): 2184s > import cupy as cp 2184s E ModuleNotFoundError: No module named 'cupy' 2184s 2184s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:882: ModuleNotFoundError 2184s _________________ test_as_dask_functions[cupy_dense-np_array] __________________ 2184s 2184s input_type = 2184s as_dask_type = 2184s mem_type = 2184s 2184s @pytest.mark.parametrize( 2184s "input_type", BASE_MATRIX_PARAMS + DASK_MATRIX_PARAMS + CUPY_MATRIX_PARAMS 2184s ) 2184s @pytest.mark.parametrize( 2184s ( 2184s "as_dask_type", 2184s "mem_type", 2184s ), 2184s [ 2184s pytest.param( 2184s as_dense_cupy_dask_array, CupyArray, id="cupy_dense", marks=pytest.mark.gpu 2184s ), 2184s pytest.param(as_dense_dask_array, np.ndarray, id="numpy_dense"), 2184s pytest.param( 2184s as_cupy_sparse_dask_array, 2184s CupyCSRMatrix, 2184s id="cupy_csr", 2184s marks=pytest.mark.gpu, 2184s ), 2184s ], 2184s ) 2184s def test_as_dask_functions(input_type, as_dask_type, mem_type): 2184s SHAPE = (1000, 100) 2184s 2184s rng = np.random.default_rng(42) 2184s X_source = rng.poisson(size=SHAPE).astype(np.float32) 2184s X_input = input_type(X_source) 2184s > X_output = as_dask_type(X_input) 2184s 2184s tests/test_helpers.py:304: 2184s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 2184s /usr/lib/python3.13/functools.py:934: in wrapper 2184s return dispatch(args[0].__class__)(*args, **kw) 2184s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 2184s 2184s a = array([[1., 2., 3., ..., 2., 0., 3.], 2184s [0., 0., 0., ..., 1., 0., 2.], 2184s [2., 1., 3., ..., 0., 3., 1.], 2184s ...1., 0.], 2184s [0., 1., 1., ..., 0., 1., 1.], 2184s [2., 1., 3., ..., 2., 0., 1.]], shape=(1000, 100), dtype=float32) 2184s 2184s @singledispatch 2184s def as_dense_cupy_dask_array(a): 2184s > import cupy as cp 2184s E ModuleNotFoundError: No module named 'cupy' 2184s 2184s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:882: ModuleNotFoundError 2184s _____________ test_as_dask_functions[cupy_dense-scipy_csr_matrix] ______________ 2184s 2184s input_type = 2184s as_dask_type = 2184s mem_type = 2184s 2184s @pytest.mark.parametrize( 2184s "input_type", BASE_MATRIX_PARAMS + DASK_MATRIX_PARAMS + CUPY_MATRIX_PARAMS 2184s ) 2184s @pytest.mark.parametrize( 2184s ( 2184s "as_dask_type", 2184s "mem_type", 2184s ), 2184s [ 2184s pytest.param( 2184s as_dense_cupy_dask_array, CupyArray, id="cupy_dense", marks=pytest.mark.gpu 2184s ), 2184s pytest.param(as_dense_dask_array, np.ndarray, id="numpy_dense"), 2184s pytest.param( 2184s as_cupy_sparse_dask_array, 2184s CupyCSRMatrix, 2184s id="cupy_csr", 2184s marks=pytest.mark.gpu, 2184s ), 2184s ], 2184s ) 2184s def test_as_dask_functions(input_type, as_dask_type, mem_type): 2184s SHAPE = (1000, 100) 2184s 2184s rng = np.random.default_rng(42) 2184s X_source = rng.poisson(size=SHAPE).astype(np.float32) 2184s X_input = input_type(X_source) 2184s > X_output = as_dask_type(X_input) 2184s 2184s tests/test_helpers.py:304: 2184s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 2184s /usr/lib/python3.13/functools.py:934: in wrapper 2184s return dispatch(args[0].__class__)(*args, **kw) 2184s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 2184s 2184s a = 2184s 2184s @singledispatch 2184s def as_dense_cupy_dask_array(a): 2184s > import cupy as cp 2184s E ModuleNotFoundError: No module named 'cupy' 2184s 2184s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:882: ModuleNotFoundError 2184s _____________ test_as_dask_functions[cupy_dense-scipy_csc_matrix] ______________ 2184s 2184s input_type = 2184s as_dask_type = 2184s mem_type = 2184s 2184s @pytest.mark.parametrize( 2184s "input_type", BASE_MATRIX_PARAMS + DASK_MATRIX_PARAMS + CUPY_MATRIX_PARAMS 2184s ) 2184s @pytest.mark.parametrize( 2184s ( 2184s "as_dask_type", 2184s "mem_type", 2184s ), 2184s [ 2184s pytest.param( 2184s as_dense_cupy_dask_array, CupyArray, id="cupy_dense", marks=pytest.mark.gpu 2184s ), 2184s pytest.param(as_dense_dask_array, np.ndarray, id="numpy_dense"), 2184s pytest.param( 2184s as_cupy_sparse_dask_array, 2184s CupyCSRMatrix, 2184s id="cupy_csr", 2184s marks=pytest.mark.gpu, 2184s ), 2184s ], 2184s ) 2184s def test_as_dask_functions(input_type, as_dask_type, mem_type): 2184s SHAPE = (1000, 100) 2184s 2184s rng = np.random.default_rng(42) 2184s X_source = rng.poisson(size=SHAPE).astype(np.float32) 2184s X_input = input_type(X_source) 2184s > X_output = as_dask_type(X_input) 2184s 2184s tests/test_helpers.py:304: 2184s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 2184s /usr/lib/python3.13/functools.py:934: in wrapper 2184s return dispatch(args[0].__class__)(*args, **kw) 2184s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 2184s 2184s a = 2184s 2184s @singledispatch 2184s def as_dense_cupy_dask_array(a): 2184s > import cupy as cp 2184s E ModuleNotFoundError: No module named 'cupy' 2184s 2184s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:882: ModuleNotFoundError 2184s ______________ test_as_dask_functions[cupy_dense-scipy_csr_array] ______________ 2184s 2184s input_type = 2184s as_dask_type = 2184s mem_type = 2184s 2184s @pytest.mark.parametrize( 2184s "input_type", BASE_MATRIX_PARAMS + DASK_MATRIX_PARAMS + CUPY_MATRIX_PARAMS 2184s ) 2184s @pytest.mark.parametrize( 2184s ( 2184s "as_dask_type", 2184s "mem_type", 2184s ), 2184s [ 2184s pytest.param( 2184s as_dense_cupy_dask_array, CupyArray, id="cupy_dense", marks=pytest.mark.gpu 2184s ), 2184s pytest.param(as_dense_dask_array, np.ndarray, id="numpy_dense"), 2184s pytest.param( 2184s as_cupy_sparse_dask_array, 2184s CupyCSRMatrix, 2184s id="cupy_csr", 2184s marks=pytest.mark.gpu, 2184s ), 2184s ], 2184s ) 2184s def test_as_dask_functions(input_type, as_dask_type, mem_type): 2184s SHAPE = (1000, 100) 2184s 2184s rng = np.random.default_rng(42) 2184s X_source = rng.poisson(size=SHAPE).astype(np.float32) 2184s X_input = input_type(X_source) 2184s > X_output = as_dask_type(X_input) 2184s 2184s tests/test_helpers.py:304: 2184s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 2184s /usr/lib/python3.13/functools.py:934: in wrapper 2184s return dispatch(args[0].__class__)(*args, **kw) 2184s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 2184s 2184s a = 2184s 2184s @singledispatch 2184s def as_dense_cupy_dask_array(a): 2184s > import cupy as cp 2184s E ModuleNotFoundError: No module named 'cupy' 2184s 2184s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:882: ModuleNotFoundError 2184s ______________ test_as_dask_functions[cupy_dense-scipy_csc_array] ______________ 2184s 2184s input_type = 2184s as_dask_type = 2184s mem_type = 2184s 2184s @pytest.mark.parametrize( 2184s "input_type", BASE_MATRIX_PARAMS + DASK_MATRIX_PARAMS + CUPY_MATRIX_PARAMS 2184s ) 2184s @pytest.mark.parametrize( 2184s ( 2184s "as_dask_type", 2184s "mem_type", 2184s ), 2184s [ 2184s pytest.param( 2184s as_dense_cupy_dask_array, CupyArray, id="cupy_dense", marks=pytest.mark.gpu 2184s ), 2184s pytest.param(as_dense_dask_array, np.ndarray, id="numpy_dense"), 2184s pytest.param( 2184s as_cupy_sparse_dask_array, 2184s CupyCSRMatrix, 2184s id="cupy_csr", 2184s marks=pytest.mark.gpu, 2184s ), 2184s ], 2184s ) 2184s def test_as_dask_functions(input_type, as_dask_type, mem_type): 2184s SHAPE = (1000, 100) 2184s 2184s rng = np.random.default_rng(42) 2184s X_source = rng.poisson(size=SHAPE).astype(np.float32) 2184s X_input = input_type(X_source) 2184s > X_output = as_dask_type(X_input) 2184s 2184s tests/test_helpers.py:304: 2184s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 2184s /usr/lib/python3.13/functools.py:934: in wrapper 2184s return dispatch(args[0].__class__)(*args, **kw) 2184s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 2184s 2184s a = 2184s 2184s @singledispatch 2184s def as_dense_cupy_dask_array(a): 2184s > import cupy as cp 2184s E ModuleNotFoundError: No module named 'cupy' 2184s 2184s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:882: ModuleNotFoundError 2184s _____________ test_as_dask_functions[cupy_dense-dense_dask_array] ______________ 2184s 2184s input_type = 2184s as_dask_type = 2184s mem_type = 2184s 2184s @pytest.mark.parametrize( 2184s "input_type", BASE_MATRIX_PARAMS + DASK_MATRIX_PARAMS + CUPY_MATRIX_PARAMS 2184s ) 2184s @pytest.mark.parametrize( 2184s ( 2184s "as_dask_type", 2184s "mem_type", 2184s ), 2184s [ 2184s pytest.param( 2184s as_dense_cupy_dask_array, CupyArray, id="cupy_dense", marks=pytest.mark.gpu 2184s ), 2184s pytest.param(as_dense_dask_array, np.ndarray, id="numpy_dense"), 2184s pytest.param( 2184s as_cupy_sparse_dask_array, 2184s CupyCSRMatrix, 2184s id="cupy_csr", 2184s marks=pytest.mark.gpu, 2184s ), 2184s ], 2184s ) 2184s def test_as_dask_functions(input_type, as_dask_type, mem_type): 2184s SHAPE = (1000, 100) 2184s 2184s rng = np.random.default_rng(42) 2184s X_source = rng.poisson(size=SHAPE).astype(np.float32) 2184s X_input = input_type(X_source) 2184s > X_output = as_dask_type(X_input) 2184s 2184s tests/test_helpers.py:304: 2184s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 2184s /usr/lib/python3.13/functools.py:934: in wrapper 2184s return dispatch(args[0].__class__)(*args, **kw) 2184s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 2184s 2184s a = dask.array 2184s 2184s @as_dense_cupy_dask_array.register(DaskArray) 2184s def _(a): 2184s > import cupy as cp 2184s E ModuleNotFoundError: No module named 'cupy' 2184s 2184s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:903: ModuleNotFoundError 2184s _____________ test_as_dask_functions[cupy_dense-sparse_dask_array] _____________ 2184s 2184s input_type = 2184s as_dask_type = 2184s mem_type = 2184s 2184s @pytest.mark.parametrize( 2184s "input_type", BASE_MATRIX_PARAMS + DASK_MATRIX_PARAMS + CUPY_MATRIX_PARAMS 2184s ) 2184s @pytest.mark.parametrize( 2184s ( 2184s "as_dask_type", 2184s "mem_type", 2184s ), 2184s [ 2184s pytest.param( 2184s as_dense_cupy_dask_array, CupyArray, id="cupy_dense", marks=pytest.mark.gpu 2184s ), 2184s pytest.param(as_dense_dask_array, np.ndarray, id="numpy_dense"), 2184s pytest.param( 2184s as_cupy_sparse_dask_array, 2184s CupyCSRMatrix, 2184s id="cupy_csr", 2184s marks=pytest.mark.gpu, 2184s ), 2184s ], 2184s ) 2184s def test_as_dask_functions(input_type, as_dask_type, mem_type): 2184s SHAPE = (1000, 100) 2184s 2184s rng = np.random.default_rng(42) 2184s X_source = rng.poisson(size=SHAPE).astype(np.float32) 2184s X_input = input_type(X_source) 2184s > X_output = as_dask_type(X_input) 2184s 2184s tests/test_helpers.py:304: 2184s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 2184s /usr/lib/python3.13/functools.py:934: in wrapper 2184s return dispatch(args[0].__class__)(*args, **kw) 2184s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 2184s 2184s a = dask.array 2184s 2184s @as_dense_cupy_dask_array.register(DaskArray) 2184s def _(a): 2184s > import cupy as cp 2184s E ModuleNotFoundError: No module named 'cupy' 2184s 2184s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:903: ModuleNotFoundError 2184s ________________ test_as_dask_functions[cupy_dense-cupy_array] _________________ 2184s 2184s input_type = functools.partial(, typ=) 2184s as_dask_type = 2184s mem_type = 2184s 2184s @pytest.mark.parametrize( 2184s "input_type", BASE_MATRIX_PARAMS + DASK_MATRIX_PARAMS + CUPY_MATRIX_PARAMS 2184s ) 2184s @pytest.mark.parametrize( 2184s ( 2184s "as_dask_type", 2184s "mem_type", 2184s ), 2184s [ 2184s pytest.param( 2184s as_dense_cupy_dask_array, CupyArray, id="cupy_dense", marks=pytest.mark.gpu 2184s ), 2184s pytest.param(as_dense_dask_array, np.ndarray, id="numpy_dense"), 2184s pytest.param( 2184s as_cupy_sparse_dask_array, 2184s CupyCSRMatrix, 2184s id="cupy_csr", 2184s marks=pytest.mark.gpu, 2184s ), 2184s ], 2184s ) 2184s def test_as_dask_functions(input_type, as_dask_type, mem_type): 2184s SHAPE = (1000, 100) 2184s 2184s rng = np.random.default_rng(42) 2184s X_source = rng.poisson(size=SHAPE).astype(np.float32) 2184s > X_input = input_type(X_source) 2184s 2184s tests/test_helpers.py:303: 2184s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 2184s /usr/lib/python3.13/functools.py:934: in wrapper 2184s return dispatch(args[0].__class__)(*args, **kw) 2184s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 2184s 2184s val = array([[1., 2., 3., ..., 2., 0., 3.], 2184s [0., 0., 0., ..., 1., 0., 2.], 2184s [2., 1., 3., ..., 0., 3., 1.], 2184s ...1., 0.], 2184s [0., 1., 1., ..., 0., 1., 1.], 2184s [2., 1., 3., ..., 2., 0., 1.]], shape=(1000, 100), dtype=float32) 2184s typ = 2184s 2184s @singledispatch 2184s def as_cupy(val, typ=None): 2184s """ 2184s Rough conversion function 2184s 2184s Will try to infer target type from input type if not specified. 2184s """ 2184s if typ is None: 2184s typ = resolve_cupy_type(val) 2184s 2184s if issubclass(typ, CupyArray): 2184s > import cupy as cp 2184s E ModuleNotFoundError: No module named 'cupy' 2184s 2184s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:1010: ModuleNotFoundError 2184s _________________ test_as_dask_functions[cupy_dense-cupy_csr] __________________ 2184s 2184s input_type = functools.partial(, typ=) 2184s as_dask_type = 2184s mem_type = 2184s 2184s @pytest.mark.parametrize( 2184s "input_type", BASE_MATRIX_PARAMS + DASK_MATRIX_PARAMS + CUPY_MATRIX_PARAMS 2184s ) 2184s @pytest.mark.parametrize( 2184s ( 2184s "as_dask_type", 2184s "mem_type", 2184s ), 2184s [ 2184s pytest.param( 2184s as_dense_cupy_dask_array, CupyArray, id="cupy_dense", marks=pytest.mark.gpu 2184s ), 2184s pytest.param(as_dense_dask_array, np.ndarray, id="numpy_dense"), 2184s pytest.param( 2184s as_cupy_sparse_dask_array, 2184s CupyCSRMatrix, 2184s id="cupy_csr", 2184s marks=pytest.mark.gpu, 2184s ), 2184s ], 2184s ) 2184s def test_as_dask_functions(input_type, as_dask_type, mem_type): 2184s SHAPE = (1000, 100) 2184s 2184s rng = np.random.default_rng(42) 2184s X_source = rng.poisson(size=SHAPE).astype(np.float32) 2184s > X_input = input_type(X_source) 2184s 2184s tests/test_helpers.py:303: 2184s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 2184s /usr/lib/python3.13/functools.py:934: in wrapper 2184s return dispatch(args[0].__class__)(*args, **kw) 2184s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 2184s 2184s val = array([[1., 2., 3., ..., 2., 0., 3.], 2184s [0., 0., 0., ..., 1., 0., 2.], 2184s [2., 1., 3., ..., 0., 3., 1.], 2184s ...1., 0.], 2184s [0., 1., 1., ..., 0., 1., 1.], 2184s [2., 1., 3., ..., 2., 0., 1.]], shape=(1000, 100), dtype=float32) 2184s typ = 2184s 2184s @singledispatch 2184s def as_cupy(val, typ=None): 2184s """ 2184s Rough conversion function 2184s 2184s Will try to infer target type from input type if not specified. 2184s """ 2184s if typ is None: 2184s typ = resolve_cupy_type(val) 2184s 2184s if issubclass(typ, CupyArray): 2184s import cupy as cp 2184s 2184s if isinstance(val, CSMatrix): 2184s val = val.toarray() 2184s return cp.array(val) 2184s elif issubclass(typ, CupyCSRMatrix): 2184s > import cupy as cp 2184s E ModuleNotFoundError: No module named 'cupy' 2184s 2184s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:1016: ModuleNotFoundError 2184s _________________ test_as_dask_functions[cupy_dense-cupy_csc] __________________ 2184s 2184s input_type = functools.partial(, typ=) 2184s as_dask_type = 2184s mem_type = 2184s 2184s @pytest.mark.parametrize( 2184s "input_type", BASE_MATRIX_PARAMS + DASK_MATRIX_PARAMS + CUPY_MATRIX_PARAMS 2184s ) 2184s @pytest.mark.parametrize( 2184s ( 2184s "as_dask_type", 2184s "mem_type", 2184s ), 2184s [ 2184s pytest.param( 2184s as_dense_cupy_dask_array, CupyArray, id="cupy_dense", marks=pytest.mark.gpu 2184s ), 2184s pytest.param(as_dense_dask_array, np.ndarray, id="numpy_dense"), 2184s pytest.param( 2184s as_cupy_sparse_dask_array, 2184s CupyCSRMatrix, 2184s id="cupy_csr", 2184s marks=pytest.mark.gpu, 2184s ), 2184s ], 2184s ) 2184s def test_as_dask_functions(input_type, as_dask_type, mem_type): 2184s SHAPE = (1000, 100) 2184s 2184s rng = np.random.default_rng(42) 2184s X_source = rng.poisson(size=SHAPE).astype(np.float32) 2184s > X_input = input_type(X_source) 2184s 2184s tests/test_helpers.py:303: 2184s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 2184s /usr/lib/python3.13/functools.py:934: in wrapper 2184s return dispatch(args[0].__class__)(*args, **kw) 2184s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 2184s 2184s val = array([[1., 2., 3., ..., 2., 0., 3.], 2184s [0., 0., 0., ..., 1., 0., 2.], 2184s [2., 1., 3., ..., 0., 3., 1.], 2184s ...1., 0.], 2184s [0., 1., 1., ..., 0., 1., 1.], 2184s [2., 1., 3., ..., 2., 0., 1.]], shape=(1000, 100), dtype=float32) 2184s typ = 2184s 2184s @singledispatch 2184s def as_cupy(val, typ=None): 2184s """ 2184s Rough conversion function 2184s 2184s Will try to infer target type from input type if not specified. 2184s """ 2184s if typ is None: 2184s typ = resolve_cupy_type(val) 2184s 2184s if issubclass(typ, CupyArray): 2184s import cupy as cp 2184s 2184s if isinstance(val, CSMatrix): 2184s val = val.toarray() 2184s return cp.array(val) 2184s elif issubclass(typ, CupyCSRMatrix): 2184s import cupy as cp 2184s import cupyx.scipy.sparse as cpsparse 2184s 2184s if isinstance(val, np.ndarray): 2184s return cpsparse.csr_matrix(cp.array(val)) 2184s else: 2184s return cpsparse.csr_matrix(val) 2184s elif issubclass(typ, CupyCSCMatrix): 2184s > import cupy as cp 2184s E ModuleNotFoundError: No module named 'cupy' 2184s 2184s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:1024: ModuleNotFoundError 2184s ________________ test_as_dask_functions[numpy_dense-cupy_array] ________________ 2184s 2184s input_type = functools.partial(, typ=) 2184s as_dask_type = 2184s mem_type = 2184s 2184s @pytest.mark.parametrize( 2184s "input_type", BASE_MATRIX_PARAMS + DASK_MATRIX_PARAMS + CUPY_MATRIX_PARAMS 2184s ) 2184s @pytest.mark.parametrize( 2184s ( 2184s "as_dask_type", 2184s "mem_type", 2184s ), 2184s [ 2184s pytest.param( 2184s as_dense_cupy_dask_array, CupyArray, id="cupy_dense", marks=pytest.mark.gpu 2184s ), 2184s pytest.param(as_dense_dask_array, np.ndarray, id="numpy_dense"), 2184s pytest.param( 2184s as_cupy_sparse_dask_array, 2184s CupyCSRMatrix, 2184s id="cupy_csr", 2184s marks=pytest.mark.gpu, 2184s ), 2184s ], 2184s ) 2184s def test_as_dask_functions(input_type, as_dask_type, mem_type): 2184s SHAPE = (1000, 100) 2184s 2184s rng = np.random.default_rng(42) 2184s X_source = rng.poisson(size=SHAPE).astype(np.float32) 2184s > X_input = input_type(X_source) 2184s 2184s tests/test_helpers.py:303: 2184s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 2184s /usr/lib/python3.13/functools.py:934: in wrapper 2184s return dispatch(args[0].__class__)(*args, **kw) 2184s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 2184s 2184s val = array([[1., 2., 3., ..., 2., 0., 3.], 2184s [0., 0., 0., ..., 1., 0., 2.], 2184s [2., 1., 3., ..., 0., 3., 1.], 2184s ...1., 0.], 2184s [0., 1., 1., ..., 0., 1., 1.], 2184s [2., 1., 3., ..., 2., 0., 1.]], shape=(1000, 100), dtype=float32) 2184s typ = 2184s 2184s @singledispatch 2184s def as_cupy(val, typ=None): 2184s """ 2184s Rough conversion function 2184s 2184s Will try to infer target type from input type if not specified. 2184s """ 2184s if typ is None: 2184s typ = resolve_cupy_type(val) 2184s 2184s if issubclass(typ, CupyArray): 2184s > import cupy as cp 2184s E ModuleNotFoundError: No module named 'cupy' 2184s 2184s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:1010: ModuleNotFoundError 2184s _________________ test_as_dask_functions[numpy_dense-cupy_csr] _________________ 2184s 2184s input_type = functools.partial(, typ=) 2184s as_dask_type = 2184s mem_type = 2184s 2184s @pytest.mark.parametrize( 2184s "input_type", BASE_MATRIX_PARAMS + DASK_MATRIX_PARAMS + CUPY_MATRIX_PARAMS 2184s ) 2184s @pytest.mark.parametrize( 2184s ( 2184s "as_dask_type", 2184s "mem_type", 2184s ), 2184s [ 2184s pytest.param( 2184s as_dense_cupy_dask_array, CupyArray, id="cupy_dense", marks=pytest.mark.gpu 2184s ), 2184s pytest.param(as_dense_dask_array, np.ndarray, id="numpy_dense"), 2184s pytest.param( 2184s as_cupy_sparse_dask_array, 2184s CupyCSRMatrix, 2184s id="cupy_csr", 2184s marks=pytest.mark.gpu, 2184s ), 2184s ], 2184s ) 2184s def test_as_dask_functions(input_type, as_dask_type, mem_type): 2184s SHAPE = (1000, 100) 2184s 2184s rng = np.random.default_rng(42) 2184s X_source = rng.poisson(size=SHAPE).astype(np.float32) 2184s > X_input = input_type(X_source) 2184s 2184s tests/test_helpers.py:303: 2184s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 2184s /usr/lib/python3.13/functools.py:934: in wrapper 2184s return dispatch(args[0].__class__)(*args, **kw) 2184s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 2184s 2184s val = array([[1., 2., 3., ..., 2., 0., 3.], 2184s [0., 0., 0., ..., 1., 0., 2.], 2184s [2., 1., 3., ..., 0., 3., 1.], 2184s ...1., 0.], 2184s [0., 1., 1., ..., 0., 1., 1.], 2184s [2., 1., 3., ..., 2., 0., 1.]], shape=(1000, 100), dtype=float32) 2184s typ = 2184s 2184s @singledispatch 2184s def as_cupy(val, typ=None): 2184s """ 2184s Rough conversion function 2184s 2184s Will try to infer target type from input type if not specified. 2184s """ 2184s if typ is None: 2184s typ = resolve_cupy_type(val) 2184s 2184s if issubclass(typ, CupyArray): 2184s import cupy as cp 2184s 2184s if isinstance(val, CSMatrix): 2184s val = val.toarray() 2184s return cp.array(val) 2184s elif issubclass(typ, CupyCSRMatrix): 2184s > import cupy as cp 2184s E ModuleNotFoundError: No module named 'cupy' 2184s 2184s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:1016: ModuleNotFoundError 2184s _________________ test_as_dask_functions[numpy_dense-cupy_csc] _________________ 2184s 2184s input_type = functools.partial(, typ=) 2184s as_dask_type = 2184s mem_type = 2184s 2184s @pytest.mark.parametrize( 2184s "input_type", BASE_MATRIX_PARAMS + DASK_MATRIX_PARAMS + CUPY_MATRIX_PARAMS 2184s ) 2184s @pytest.mark.parametrize( 2184s ( 2184s "as_dask_type", 2184s "mem_type", 2184s ), 2184s [ 2184s pytest.param( 2184s as_dense_cupy_dask_array, CupyArray, id="cupy_dense", marks=pytest.mark.gpu 2184s ), 2184s pytest.param(as_dense_dask_array, np.ndarray, id="numpy_dense"), 2184s pytest.param( 2184s as_cupy_sparse_dask_array, 2184s CupyCSRMatrix, 2184s id="cupy_csr", 2184s marks=pytest.mark.gpu, 2184s ), 2184s ], 2184s ) 2184s def test_as_dask_functions(input_type, as_dask_type, mem_type): 2184s SHAPE = (1000, 100) 2184s 2184s rng = np.random.default_rng(42) 2184s X_source = rng.poisson(size=SHAPE).astype(np.float32) 2184s > X_input = input_type(X_source) 2184s 2184s tests/test_helpers.py:303: 2184s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 2184s /usr/lib/python3.13/functools.py:934: in wrapper 2184s return dispatch(args[0].__class__)(*args, **kw) 2184s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 2184s 2184s val = array([[1., 2., 3., ..., 2., 0., 3.], 2184s [0., 0., 0., ..., 1., 0., 2.], 2184s [2., 1., 3., ..., 0., 3., 1.], 2184s ...1., 0.], 2184s [0., 1., 1., ..., 0., 1., 1.], 2184s [2., 1., 3., ..., 2., 0., 1.]], shape=(1000, 100), dtype=float32) 2184s typ = 2184s 2184s @singledispatch 2184s def as_cupy(val, typ=None): 2184s """ 2184s Rough conversion function 2184s 2184s Will try to infer target type from input type if not specified. 2184s """ 2184s if typ is None: 2184s typ = resolve_cupy_type(val) 2184s 2184s if issubclass(typ, CupyArray): 2184s import cupy as cp 2184s 2184s if isinstance(val, CSMatrix): 2184s val = val.toarray() 2184s return cp.array(val) 2184s elif issubclass(typ, CupyCSRMatrix): 2184s import cupy as cp 2184s import cupyx.scipy.sparse as cpsparse 2184s 2184s if isinstance(val, np.ndarray): 2184s return cpsparse.csr_matrix(cp.array(val)) 2184s else: 2184s return cpsparse.csr_matrix(val) 2184s elif issubclass(typ, CupyCSCMatrix): 2184s > import cupy as cp 2184s E ModuleNotFoundError: No module named 'cupy' 2184s 2184s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:1024: ModuleNotFoundError 2184s __________________ test_as_dask_functions[cupy_csr-np_array] ___________________ 2184s 2184s input_type = 2184s as_dask_type = 2184s mem_type = 2184s 2184s @pytest.mark.parametrize( 2184s "input_type", BASE_MATRIX_PARAMS + DASK_MATRIX_PARAMS + CUPY_MATRIX_PARAMS 2184s ) 2184s @pytest.mark.parametrize( 2184s ( 2184s "as_dask_type", 2184s "mem_type", 2184s ), 2184s [ 2184s pytest.param( 2184s as_dense_cupy_dask_array, CupyArray, id="cupy_dense", marks=pytest.mark.gpu 2184s ), 2184s pytest.param(as_dense_dask_array, np.ndarray, id="numpy_dense"), 2184s pytest.param( 2184s as_cupy_sparse_dask_array, 2184s CupyCSRMatrix, 2184s id="cupy_csr", 2184s marks=pytest.mark.gpu, 2184s ), 2184s ], 2184s ) 2184s def test_as_dask_functions(input_type, as_dask_type, mem_type): 2184s SHAPE = (1000, 100) 2184s 2184s rng = np.random.default_rng(42) 2184s X_source = rng.poisson(size=SHAPE).astype(np.float32) 2184s X_input = input_type(X_source) 2184s > X_output = as_dask_type(X_input) 2184s 2184s tests/test_helpers.py:304: 2184s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 2184s /usr/lib/python3.13/functools.py:934: in wrapper 2184s return dispatch(args[0].__class__)(*args, **kw) 2184s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 2184s 2184s a = array([[1., 2., 3., ..., 2., 0., 3.], 2184s [0., 0., 0., ..., 1., 0., 2.], 2184s [2., 1., 3., ..., 0., 3., 1.], 2184s ...1., 0.], 2184s [0., 1., 1., ..., 0., 1., 1.], 2184s [2., 1., 3., ..., 2., 0., 1.]], shape=(1000, 100), dtype=float32) 2184s format = 'csr' 2184s 2184s @singledispatch 2184s def as_cupy_sparse_dask_array(a, format="csr"): 2184s > memory_class = format_to_memory_class[format] 2184s E KeyError: 'csr' 2184s 2184s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:926: KeyError 2184s ______________ test_as_dask_functions[cupy_csr-scipy_csr_matrix] _______________ 2184s 2184s input_type = 2184s as_dask_type = 2184s mem_type = 2184s 2184s @pytest.mark.parametrize( 2184s "input_type", BASE_MATRIX_PARAMS + DASK_MATRIX_PARAMS + CUPY_MATRIX_PARAMS 2184s ) 2184s @pytest.mark.parametrize( 2184s ( 2184s "as_dask_type", 2184s "mem_type", 2184s ), 2184s [ 2184s pytest.param( 2184s as_dense_cupy_dask_array, CupyArray, id="cupy_dense", marks=pytest.mark.gpu 2184s ), 2184s pytest.param(as_dense_dask_array, np.ndarray, id="numpy_dense"), 2184s pytest.param( 2184s as_cupy_sparse_dask_array, 2184s CupyCSRMatrix, 2184s id="cupy_csr", 2184s marks=pytest.mark.gpu, 2184s ), 2184s ], 2184s ) 2184s def test_as_dask_functions(input_type, as_dask_type, mem_type): 2184s SHAPE = (1000, 100) 2184s 2184s rng = np.random.default_rng(42) 2184s X_source = rng.poisson(size=SHAPE).astype(np.float32) 2184s X_input = input_type(X_source) 2184s > X_output = as_dask_type(X_input) 2184s 2184s tests/test_helpers.py:304: 2184s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 2184s /usr/lib/python3.13/functools.py:934: in wrapper 2184s return dispatch(args[0].__class__)(*args, **kw) 2184s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 2184s 2184s a = 2184s format = 'csr' 2184s 2184s @singledispatch 2184s def as_cupy_sparse_dask_array(a, format="csr"): 2184s > memory_class = format_to_memory_class[format] 2184s E KeyError: 'csr' 2184s 2184s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:926: KeyError 2184s ______________ test_as_dask_functions[cupy_csr-scipy_csc_matrix] _______________ 2184s 2184s input_type = 2184s as_dask_type = 2184s mem_type = 2184s 2184s @pytest.mark.parametrize( 2184s "input_type", BASE_MATRIX_PARAMS + DASK_MATRIX_PARAMS + CUPY_MATRIX_PARAMS 2184s ) 2184s @pytest.mark.parametrize( 2184s ( 2184s "as_dask_type", 2184s "mem_type", 2184s ), 2184s [ 2184s pytest.param( 2184s as_dense_cupy_dask_array, CupyArray, id="cupy_dense", marks=pytest.mark.gpu 2184s ), 2184s pytest.param(as_dense_dask_array, np.ndarray, id="numpy_dense"), 2184s pytest.param( 2184s as_cupy_sparse_dask_array, 2184s CupyCSRMatrix, 2184s id="cupy_csr", 2184s marks=pytest.mark.gpu, 2184s ), 2184s ], 2184s ) 2184s def test_as_dask_functions(input_type, as_dask_type, mem_type): 2184s SHAPE = (1000, 100) 2184s 2184s rng = np.random.default_rng(42) 2184s X_source = rng.poisson(size=SHAPE).astype(np.float32) 2184s X_input = input_type(X_source) 2184s > X_output = as_dask_type(X_input) 2184s 2184s tests/test_helpers.py:304: 2184s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 2184s /usr/lib/python3.13/functools.py:934: in wrapper 2184s return dispatch(args[0].__class__)(*args, **kw) 2184s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 2184s 2184s a = 2184s format = 'csr' 2184s 2184s @singledispatch 2184s def as_cupy_sparse_dask_array(a, format="csr"): 2184s > memory_class = format_to_memory_class[format] 2184s E KeyError: 'csr' 2184s 2184s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:926: KeyError 2184s _______________ test_as_dask_functions[cupy_csr-scipy_csr_array] _______________ 2184s 2184s input_type = 2184s as_dask_type = 2184s mem_type = 2184s 2184s @pytest.mark.parametrize( 2184s "input_type", BASE_MATRIX_PARAMS + DASK_MATRIX_PARAMS + CUPY_MATRIX_PARAMS 2184s ) 2184s @pytest.mark.parametrize( 2184s ( 2184s "as_dask_type", 2184s "mem_type", 2184s ), 2184s [ 2184s pytest.param( 2184s as_dense_cupy_dask_array, CupyArray, id="cupy_dense", marks=pytest.mark.gpu 2184s ), 2184s pytest.param(as_dense_dask_array, np.ndarray, id="numpy_dense"), 2184s pytest.param( 2184s as_cupy_sparse_dask_array, 2184s CupyCSRMatrix, 2184s id="cupy_csr", 2184s marks=pytest.mark.gpu, 2184s ), 2184s ], 2184s ) 2184s def test_as_dask_functions(input_type, as_dask_type, mem_type): 2184s SHAPE = (1000, 100) 2184s 2184s rng = np.random.default_rng(42) 2184s X_source = rng.poisson(size=SHAPE).astype(np.float32) 2184s X_input = input_type(X_source) 2184s > X_output = as_dask_type(X_input) 2184s 2184s tests/test_helpers.py:304: 2184s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 2184s /usr/lib/python3.13/functools.py:934: in wrapper 2184s return dispatch(args[0].__class__)(*args, **kw) 2184s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 2184s 2184s a = 2184s format = 'csr' 2184s 2184s @singledispatch 2184s def as_cupy_sparse_dask_array(a, format="csr"): 2184s > memory_class = format_to_memory_class[format] 2184s E KeyError: 'csr' 2184s 2184s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:926: KeyError 2184s _______________ test_as_dask_functions[cupy_csr-scipy_csc_array] _______________ 2184s 2184s input_type = 2184s as_dask_type = 2184s mem_type = 2184s 2184s @pytest.mark.parametrize( 2184s "input_type", BASE_MATRIX_PARAMS + DASK_MATRIX_PARAMS + CUPY_MATRIX_PARAMS 2184s ) 2184s @pytest.mark.parametrize( 2184s ( 2184s "as_dask_type", 2184s "mem_type", 2184s ), 2184s [ 2184s pytest.param( 2184s as_dense_cupy_dask_array, CupyArray, id="cupy_dense", marks=pytest.mark.gpu 2184s ), 2184s pytest.param(as_dense_dask_array, np.ndarray, id="numpy_dense"), 2184s pytest.param( 2184s as_cupy_sparse_dask_array, 2184s CupyCSRMatrix, 2184s id="cupy_csr", 2184s marks=pytest.mark.gpu, 2184s ), 2184s ], 2184s ) 2184s def test_as_dask_functions(input_type, as_dask_type, mem_type): 2184s SHAPE = (1000, 100) 2184s 2184s rng = np.random.default_rng(42) 2184s X_source = rng.poisson(size=SHAPE).astype(np.float32) 2184s X_input = input_type(X_source) 2184s > X_output = as_dask_type(X_input) 2184s 2184s tests/test_helpers.py:304: 2184s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 2184s /usr/lib/python3.13/functools.py:934: in wrapper 2184s return dispatch(args[0].__class__)(*args, **kw) 2184s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 2184s 2184s a = 2184s format = 'csr' 2184s 2184s @singledispatch 2184s def as_cupy_sparse_dask_array(a, format="csr"): 2184s > memory_class = format_to_memory_class[format] 2184s E KeyError: 'csr' 2184s 2184s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:926: KeyError 2184s ______________ test_as_dask_functions[cupy_csr-dense_dask_array] _______________ 2184s 2184s input_type = 2184s as_dask_type = 2184s mem_type = 2184s 2184s @pytest.mark.parametrize( 2184s "input_type", BASE_MATRIX_PARAMS + DASK_MATRIX_PARAMS + CUPY_MATRIX_PARAMS 2184s ) 2184s @pytest.mark.parametrize( 2184s ( 2184s "as_dask_type", 2184s "mem_type", 2184s ), 2184s [ 2184s pytest.param( 2184s as_dense_cupy_dask_array, CupyArray, id="cupy_dense", marks=pytest.mark.gpu 2184s ), 2184s pytest.param(as_dense_dask_array, np.ndarray, id="numpy_dense"), 2184s pytest.param( 2184s as_cupy_sparse_dask_array, 2184s CupyCSRMatrix, 2184s id="cupy_csr", 2184s marks=pytest.mark.gpu, 2184s ), 2184s ], 2184s ) 2184s def test_as_dask_functions(input_type, as_dask_type, mem_type): 2184s SHAPE = (1000, 100) 2184s 2184s rng = np.random.default_rng(42) 2184s X_source = rng.poisson(size=SHAPE).astype(np.float32) 2184s X_input = input_type(X_source) 2184s > X_output = as_dask_type(X_input) 2184s 2184s tests/test_helpers.py:304: 2184s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 2184s /usr/lib/python3.13/functools.py:934: in wrapper 2184s return dispatch(args[0].__class__)(*args, **kw) 2184s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 2184s 2184s a = dask.array 2184s format = 'csr' 2184s 2184s @as_cupy_sparse_dask_array.register(DaskArray) 2184s def _(a, format="csr"): 2184s > memory_class = format_to_memory_class[format] 2184s E KeyError: 'csr' 2184s 2184s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:944: KeyError 2184s ______________ test_as_dask_functions[cupy_csr-sparse_dask_array] ______________ 2184s 2184s input_type = 2184s as_dask_type = 2184s mem_type = 2184s 2184s @pytest.mark.parametrize( 2184s "input_type", BASE_MATRIX_PARAMS + DASK_MATRIX_PARAMS + CUPY_MATRIX_PARAMS 2184s ) 2184s @pytest.mark.parametrize( 2184s ( 2184s "as_dask_type", 2184s "mem_type", 2184s ), 2184s [ 2184s pytest.param( 2184s as_dense_cupy_dask_array, CupyArray, id="cupy_dense", marks=pytest.mark.gpu 2184s ), 2184s pytest.param(as_dense_dask_array, np.ndarray, id="numpy_dense"), 2184s pytest.param( 2184s as_cupy_sparse_dask_array, 2184s CupyCSRMatrix, 2184s id="cupy_csr", 2184s marks=pytest.mark.gpu, 2184s ), 2184s ], 2184s ) 2184s def test_as_dask_functions(input_type, as_dask_type, mem_type): 2184s SHAPE = (1000, 100) 2184s 2184s rng = np.random.default_rng(42) 2184s X_source = rng.poisson(size=SHAPE).astype(np.float32) 2184s X_input = input_type(X_source) 2184s > X_output = as_dask_type(X_input) 2184s 2184s tests/test_helpers.py:304: 2184s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 2184s /usr/lib/python3.13/functools.py:934: in wrapper 2184s return dispatch(args[0].__class__)(*args, **kw) 2184s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 2184s 2184s a = dask.array 2184s format = 'csr' 2184s 2184s @as_cupy_sparse_dask_array.register(DaskArray) 2184s def _(a, format="csr"): 2184s > memory_class = format_to_memory_class[format] 2184s E KeyError: 'csr' 2184s 2184s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:944: KeyError 2184s _________________ test_as_dask_functions[cupy_csr-cupy_array] __________________ 2184s 2184s input_type = functools.partial(, typ=) 2184s as_dask_type = 2184s mem_type = 2184s 2184s @pytest.mark.parametrize( 2184s "input_type", BASE_MATRIX_PARAMS + DASK_MATRIX_PARAMS + CUPY_MATRIX_PARAMS 2184s ) 2184s @pytest.mark.parametrize( 2184s ( 2184s "as_dask_type", 2184s "mem_type", 2184s ), 2184s [ 2184s pytest.param( 2184s as_dense_cupy_dask_array, CupyArray, id="cupy_dense", marks=pytest.mark.gpu 2184s ), 2184s pytest.param(as_dense_dask_array, np.ndarray, id="numpy_dense"), 2184s pytest.param( 2184s as_cupy_sparse_dask_array, 2184s CupyCSRMatrix, 2184s id="cupy_csr", 2184s marks=pytest.mark.gpu, 2184s ), 2184s ], 2184s ) 2184s def test_as_dask_functions(input_type, as_dask_type, mem_type): 2184s SHAPE = (1000, 100) 2184s 2184s rng = np.random.default_rng(42) 2184s X_source = rng.poisson(size=SHAPE).astype(np.float32) 2184s > X_input = input_type(X_source) 2184s 2184s tests/test_helpers.py:303: 2184s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 2184s /usr/lib/python3.13/functools.py:934: in wrapper 2184s return dispatch(args[0].__class__)(*args, **kw) 2184s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 2184s 2184s val = array([[1., 2., 3., ..., 2., 0., 3.], 2184s [0., 0., 0., ..., 1., 0., 2.], 2184s [2., 1., 3., ..., 0., 3., 1.], 2184s ...1., 0.], 2184s [0., 1., 1., ..., 0., 1., 1.], 2184s [2., 1., 3., ..., 2., 0., 1.]], shape=(1000, 100), dtype=float32) 2184s typ = 2184s 2184s @singledispatch 2184s def as_cupy(val, typ=None): 2184s """ 2184s Rough conversion function 2184s 2184s Will try to infer target type from input type if not specified. 2184s """ 2184s if typ is None: 2184s typ = resolve_cupy_type(val) 2184s 2184s if issubclass(typ, CupyArray): 2184s > import cupy as cp 2184s E ModuleNotFoundError: No module named 'cupy' 2184s 2184s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:1010: ModuleNotFoundError 2184s __________________ test_as_dask_functions[cupy_csr-cupy_csr] ___________________ 2184s 2184s input_type = functools.partial(, typ=) 2184s as_dask_type = 2184s mem_type = 2184s 2184s @pytest.mark.parametrize( 2184s "input_type", BASE_MATRIX_PARAMS + DASK_MATRIX_PARAMS + CUPY_MATRIX_PARAMS 2184s ) 2184s @pytest.mark.parametrize( 2184s ( 2184s "as_dask_type", 2184s "mem_type", 2184s ), 2184s [ 2184s pytest.param( 2184s as_dense_cupy_dask_array, CupyArray, id="cupy_dense", marks=pytest.mark.gpu 2184s ), 2184s pytest.param(as_dense_dask_array, np.ndarray, id="numpy_dense"), 2184s pytest.param( 2184s as_cupy_sparse_dask_array, 2184s CupyCSRMatrix, 2184s id="cupy_csr", 2184s marks=pytest.mark.gpu, 2184s ), 2184s ], 2184s ) 2184s def test_as_dask_functions(input_type, as_dask_type, mem_type): 2184s SHAPE = (1000, 100) 2184s 2184s rng = np.random.default_rng(42) 2184s X_source = rng.poisson(size=SHAPE).astype(np.float32) 2184s > X_input = input_type(X_source) 2184s 2184s tests/test_helpers.py:303: 2184s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 2184s /usr/lib/python3.13/functools.py:934: in wrapper 2184s return dispatch(args[0].__class__)(*args, **kw) 2184s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 2184s 2184s val = array([[1., 2., 3., ..., 2., 0., 3.], 2184s [0., 0., 0., ..., 1., 0., 2.], 2184s [2., 1., 3., ..., 0., 3., 1.], 2184s ...1., 0.], 2184s [0., 1., 1., ..., 0., 1., 1.], 2184s [2., 1., 3., ..., 2., 0., 1.]], shape=(1000, 100), dtype=float32) 2184s typ = 2184s 2184s @singledispatch 2184s def as_cupy(val, typ=None): 2184s """ 2184s Rough conversion function 2184s 2184s Will try to infer target type from input type if not specified. 2184s """ 2184s if typ is None: 2184s typ = resolve_cupy_type(val) 2184s 2184s if issubclass(typ, CupyArray): 2184s import cupy as cp 2184s 2184s if isinstance(val, CSMatrix): 2184s val = val.toarray() 2184s return cp.array(val) 2184s elif issubclass(typ, CupyCSRMatrix): 2184s > import cupy as cp 2184s E ModuleNotFoundError: No module named 'cupy' 2184s 2184s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:1016: ModuleNotFoundError 2184s __________________ test_as_dask_functions[cupy_csr-cupy_csc] ___________________ 2184s 2184s input_type = functools.partial(, typ=) 2184s as_dask_type = 2184s mem_type = 2184s 2184s @pytest.mark.parametrize( 2184s "input_type", BASE_MATRIX_PARAMS + DASK_MATRIX_PARAMS + CUPY_MATRIX_PARAMS 2184s ) 2184s @pytest.mark.parametrize( 2184s ( 2184s "as_dask_type", 2184s "mem_type", 2184s ), 2184s [ 2184s pytest.param( 2184s as_dense_cupy_dask_array, CupyArray, id="cupy_dense", marks=pytest.mark.gpu 2184s ), 2184s pytest.param(as_dense_dask_array, np.ndarray, id="numpy_dense"), 2184s pytest.param( 2184s as_cupy_sparse_dask_array, 2184s CupyCSRMatrix, 2184s id="cupy_csr", 2184s marks=pytest.mark.gpu, 2184s ), 2184s ], 2184s ) 2184s def test_as_dask_functions(input_type, as_dask_type, mem_type): 2184s SHAPE = (1000, 100) 2184s 2184s rng = np.random.default_rng(42) 2184s X_source = rng.poisson(size=SHAPE).astype(np.float32) 2184s > X_input = input_type(X_source) 2184s 2184s tests/test_helpers.py:303: 2184s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 2184s /usr/lib/python3.13/functools.py:934: in wrapper 2184s return dispatch(args[0].__class__)(*args, **kw) 2184s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 2184s 2184s val = array([[1., 2., 3., ..., 2., 0., 3.], 2184s [0., 0., 0., ..., 1., 0., 2.], 2184s [2., 1., 3., ..., 0., 3., 1.], 2184s ...1., 0.], 2184s [0., 1., 1., ..., 0., 1., 1.], 2184s [2., 1., 3., ..., 2., 0., 1.]], shape=(1000, 100), dtype=float32) 2184s typ = 2184s 2184s @singledispatch 2184s def as_cupy(val, typ=None): 2184s """ 2184s Rough conversion function 2184s 2184s Will try to infer target type from input type if not specified. 2184s """ 2184s if typ is None: 2184s typ = resolve_cupy_type(val) 2184s 2184s if issubclass(typ, CupyArray): 2184s import cupy as cp 2184s 2184s if isinstance(val, CSMatrix): 2184s val = val.toarray() 2184s return cp.array(val) 2184s elif issubclass(typ, CupyCSRMatrix): 2184s import cupy as cp 2184s import cupyx.scipy.sparse as cpsparse 2184s 2184s if isinstance(val, np.ndarray): 2184s return cpsparse.csr_matrix(cp.array(val)) 2184s else: 2184s return cpsparse.csr_matrix(val) 2184s elif issubclass(typ, CupyCSCMatrix): 2184s > import cupy as cp 2184s E ModuleNotFoundError: No module named 'cupy' 2184s 2184s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:1024: ModuleNotFoundError 2184s _____________________ test_as_cupy_dask[dense_dask_array] ______________________ 2184s 2184s dask_matrix_type = 2184s 2184s @pytest.mark.parametrize( 2184s "dask_matrix_type", 2184s DASK_MATRIX_PARAMS, 2184s ) 2184s @pytest.mark.gpu 2184s def test_as_cupy_dask(dask_matrix_type): 2184s SHAPE = (100, 10) 2184s rng = np.random.default_rng(42) 2184s X_cpu = dask_matrix_type(rng.normal(size=SHAPE)) 2184s X_gpu_roundtripped = as_cupy(X_cpu).map_blocks(lambda x: x.get(), meta=X_cpu._meta) 2184s assert isinstance(X_gpu_roundtripped._meta, type(X_cpu._meta)) 2184s > assert isinstance(X_gpu_roundtripped.compute(), type(X_cpu.compute())) 2184s 2184s tests/test_helpers.py:327: 2184s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 2184s /usr/lib/python3/dist-packages/dask/base.py:372: in compute 2184s (result,) = compute(self, traverse=False, **kwargs) 2184s /usr/lib/python3/dist-packages/dask/base.py:660: in compute 2184s results = schedule(dsk, keys, **kwargs) 2184s /usr/lib/python3.13/functools.py:934: in wrapper 2184s return dispatch(args[0].__class__)(*args, **kw) 2184s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 2184s 2184s val = array([[-5.43495508e-01, 2.42041501e+00, 4.34884271e-01, 2184s -5.59572286e-01, 4.65080210e-01], 2184s [ 3.44645...4.82790159e-01], 2184s [ 3.52720163e-01, 7.66822872e-01, 1.21177949e-01, 2184s 1.30764188e-01, 8.23753132e-01]]) 2184s typ = 2184s 2184s @singledispatch 2184s def as_cupy(val, typ=None): 2184s """ 2184s Rough conversion function 2184s 2184s Will try to infer target type from input type if not specified. 2184s """ 2184s if typ is None: 2184s typ = resolve_cupy_type(val) 2184s 2184s if issubclass(typ, CupyArray): 2184s > import cupy as cp 2184s E ModuleNotFoundError: No module named 'cupy' 2184s 2184s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:1010: ModuleNotFoundError 2184s _____________________ test_as_cupy_dask[sparse_dask_array] _____________________ 2184s 2184s dask_matrix_type = 2184s 2184s @pytest.mark.parametrize( 2184s "dask_matrix_type", 2184s DASK_MATRIX_PARAMS, 2184s ) 2184s @pytest.mark.gpu 2184s def test_as_cupy_dask(dask_matrix_type): 2184s SHAPE = (100, 10) 2184s rng = np.random.default_rng(42) 2184s X_cpu = dask_matrix_type(rng.normal(size=SHAPE)) 2184s X_gpu_roundtripped = as_cupy(X_cpu).map_blocks(lambda x: x.get(), meta=X_cpu._meta) 2184s assert isinstance(X_gpu_roundtripped._meta, type(X_cpu._meta)) 2184s > assert isinstance(X_gpu_roundtripped.compute(), type(X_cpu.compute())) 2184s 2184s tests/test_helpers.py:327: 2184s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 2184s /usr/lib/python3/dist-packages/dask/base.py:372: in compute 2184s (result,) = compute(self, traverse=False, **kwargs) 2184s /usr/lib/python3/dist-packages/dask/base.py:660: in compute 2184s results = schedule(dsk, keys, **kwargs) 2184s /usr/lib/python3.13/functools.py:934: in wrapper 2184s return dispatch(args[0].__class__)(*args, **kw) 2184s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 2184s 2184s val = 2184s typ = 2184s 2184s @singledispatch 2184s def as_cupy(val, typ=None): 2184s """ 2184s Rough conversion function 2184s 2184s Will try to infer target type from input type if not specified. 2184s """ 2184s if typ is None: 2184s typ = resolve_cupy_type(val) 2184s 2184s if issubclass(typ, CupyArray): 2184s import cupy as cp 2184s 2184s if isinstance(val, CSMatrix): 2184s val = val.toarray() 2184s return cp.array(val) 2184s elif issubclass(typ, CupyCSRMatrix): 2184s > import cupy as cp 2184s E ModuleNotFoundError: No module named 'cupy' 2184s 2184s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:1016: ModuleNotFoundError 2184s __________________ test_io_spec_cupy[h5ad-False-value0-array] __________________ 2184s 2184s store = , value = array([1, 2, 3]) 2184s encoding_type = 'array', as_dask = False 2184s 2184s @pytest.mark.gpu 2184s @pytest.mark.parametrize( 2184s ("value", "encoding_type"), 2184s [ 2184s (np.array([1, 2, 3]), "array"), 2184s (np.arange(12).reshape(4, 3), "array"), 2184s (sparse.random(5, 3, format="csr", density=0.5), "csr_matrix"), 2184s (sparse.random(5, 3, format="csc", density=0.5), "csc_matrix"), 2184s ], 2184s ) 2184s @pytest.mark.parametrize("as_dask", [False, True]) 2184s def test_io_spec_cupy(store, value, encoding_type, as_dask): 2184s if as_dask: 2184s if isinstance(value, CSMatrix): 2184s value = as_cupy_sparse_dask_array(value, format=encoding_type[:3]) 2184s else: 2184s value = as_dense_cupy_dask_array(value) 2184s else: 2184s > value = as_cupy(value) 2184s 2184s tests/test_io_elementwise.py:265: 2184s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 2184s /usr/lib/python3.13/functools.py:934: in wrapper 2184s return dispatch(args[0].__class__)(*args, **kw) 2184s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 2184s 2184s val = array([1, 2, 3]), typ = 2184s 2184s @singledispatch 2184s def as_cupy(val, typ=None): 2184s """ 2184s Rough conversion function 2184s 2184s Will try to infer target type from input type if not specified. 2184s """ 2184s if typ is None: 2184s typ = resolve_cupy_type(val) 2184s 2184s if issubclass(typ, CupyArray): 2184s > import cupy as cp 2184s E ModuleNotFoundError: No module named 'cupy' 2184s 2184s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:1010: ModuleNotFoundError 2184s __________________ test_io_spec_cupy[h5ad-False-value1-array] __________________ 2184s 2184s store = 2184s value = array([[ 0, 1, 2], 2184s [ 3, 4, 5], 2184s [ 6, 7, 8], 2184s [ 9, 10, 11]]) 2184s encoding_type = 'array', as_dask = False 2184s 2184s @pytest.mark.gpu 2184s @pytest.mark.parametrize( 2184s ("value", "encoding_type"), 2184s [ 2184s (np.array([1, 2, 3]), "array"), 2184s (np.arange(12).reshape(4, 3), "array"), 2184s (sparse.random(5, 3, format="csr", density=0.5), "csr_matrix"), 2184s (sparse.random(5, 3, format="csc", density=0.5), "csc_matrix"), 2184s ], 2184s ) 2184s @pytest.mark.parametrize("as_dask", [False, True]) 2184s def test_io_spec_cupy(store, value, encoding_type, as_dask): 2184s if as_dask: 2184s if isinstance(value, CSMatrix): 2184s value = as_cupy_sparse_dask_array(value, format=encoding_type[:3]) 2184s else: 2184s value = as_dense_cupy_dask_array(value) 2184s else: 2184s > value = as_cupy(value) 2184s 2184s tests/test_io_elementwise.py:265: 2184s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 2184s /usr/lib/python3.13/functools.py:934: in wrapper 2184s return dispatch(args[0].__class__)(*args, **kw) 2184s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 2184s 2184s val = array([[ 0, 1, 2], 2184s [ 3, 4, 5], 2184s [ 6, 7, 8], 2184s [ 9, 10, 11]]) 2184s typ = 2184s 2184s @singledispatch 2184s def as_cupy(val, typ=None): 2184s """ 2184s Rough conversion function 2184s 2184s Will try to infer target type from input type if not specified. 2184s """ 2184s if typ is None: 2184s typ = resolve_cupy_type(val) 2184s 2184s if issubclass(typ, CupyArray): 2184s > import cupy as cp 2184s E ModuleNotFoundError: No module named 'cupy' 2184s 2184s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:1010: ModuleNotFoundError 2184s _______________ test_io_spec_cupy[h5ad-False-value2-csr_matrix] ________________ 2184s 2184s store = 2184s value = 2184s encoding_type = 'csr_matrix', as_dask = False 2184s 2184s @pytest.mark.gpu 2184s @pytest.mark.parametrize( 2184s ("value", "encoding_type"), 2184s [ 2184s (np.array([1, 2, 3]), "array"), 2184s (np.arange(12).reshape(4, 3), "array"), 2184s (sparse.random(5, 3, format="csr", density=0.5), "csr_matrix"), 2184s (sparse.random(5, 3, format="csc", density=0.5), "csc_matrix"), 2184s ], 2184s ) 2184s @pytest.mark.parametrize("as_dask", [False, True]) 2184s def test_io_spec_cupy(store, value, encoding_type, as_dask): 2184s if as_dask: 2184s if isinstance(value, CSMatrix): 2184s value = as_cupy_sparse_dask_array(value, format=encoding_type[:3]) 2184s else: 2184s value = as_dense_cupy_dask_array(value) 2184s else: 2184s > value = as_cupy(value) 2184s 2184s tests/test_io_elementwise.py:265: 2184s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 2184s /usr/lib/python3.13/functools.py:934: in wrapper 2184s return dispatch(args[0].__class__)(*args, **kw) 2184s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 2184s 2184s val = 2184s typ = 2184s 2184s @singledispatch 2184s def as_cupy(val, typ=None): 2184s """ 2184s Rough conversion function 2184s 2184s Will try to infer target type from input type if not specified. 2184s """ 2184s if typ is None: 2184s typ = resolve_cupy_type(val) 2184s 2184s if issubclass(typ, CupyArray): 2184s import cupy as cp 2184s 2184s if isinstance(val, CSMatrix): 2184s val = val.toarray() 2184s return cp.array(val) 2184s elif issubclass(typ, CupyCSRMatrix): 2184s > import cupy as cp 2184s E ModuleNotFoundError: No module named 'cupy' 2184s 2184s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:1016: ModuleNotFoundError 2184s _______________ test_io_spec_cupy[h5ad-False-value3-csc_matrix] ________________ 2184s 2184s store = 2184s value = 2184s encoding_type = 'csc_matrix', as_dask = False 2184s 2184s @pytest.mark.gpu 2184s @pytest.mark.parametrize( 2184s ("value", "encoding_type"), 2184s [ 2184s (np.array([1, 2, 3]), "array"), 2184s (np.arange(12).reshape(4, 3), "array"), 2184s (sparse.random(5, 3, format="csr", density=0.5), "csr_matrix"), 2184s (sparse.random(5, 3, format="csc", density=0.5), "csc_matrix"), 2184s ], 2184s ) 2184s @pytest.mark.parametrize("as_dask", [False, True]) 2184s def test_io_spec_cupy(store, value, encoding_type, as_dask): 2184s if as_dask: 2184s if isinstance(value, CSMatrix): 2184s value = as_cupy_sparse_dask_array(value, format=encoding_type[:3]) 2184s else: 2184s value = as_dense_cupy_dask_array(value) 2184s else: 2184s > value = as_cupy(value) 2184s 2184s tests/test_io_elementwise.py:265: 2184s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 2184s /usr/lib/python3.13/functools.py:934: in wrapper 2184s return dispatch(args[0].__class__)(*args, **kw) 2184s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 2184s 2184s val = 2184s typ = 2184s 2184s @singledispatch 2184s def as_cupy(val, typ=None): 2184s """ 2184s Rough conversion function 2184s 2184s Will try to infer target type from input type if not specified. 2184s """ 2184s if typ is None: 2184s typ = resolve_cupy_type(val) 2184s 2184s if issubclass(typ, CupyArray): 2184s import cupy as cp 2184s 2184s if isinstance(val, CSMatrix): 2184s val = val.toarray() 2184s return cp.array(val) 2184s elif issubclass(typ, CupyCSRMatrix): 2184s import cupy as cp 2184s import cupyx.scipy.sparse as cpsparse 2184s 2184s if isinstance(val, np.ndarray): 2184s return cpsparse.csr_matrix(cp.array(val)) 2184s else: 2184s return cpsparse.csr_matrix(val) 2184s elif issubclass(typ, CupyCSCMatrix): 2184s > import cupy as cp 2184s E ModuleNotFoundError: No module named 'cupy' 2184s 2184s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:1024: ModuleNotFoundError 2184s __________________ test_io_spec_cupy[h5ad-True-value0-array] ___________________ 2184s 2184s store = , value = array([1, 2, 3]) 2184s encoding_type = 'array', as_dask = True 2184s 2184s @pytest.mark.gpu 2184s @pytest.mark.parametrize( 2184s ("value", "encoding_type"), 2184s [ 2184s (np.array([1, 2, 3]), "array"), 2184s (np.arange(12).reshape(4, 3), "array"), 2184s (sparse.random(5, 3, format="csr", density=0.5), "csr_matrix"), 2184s (sparse.random(5, 3, format="csc", density=0.5), "csc_matrix"), 2184s ], 2184s ) 2184s @pytest.mark.parametrize("as_dask", [False, True]) 2184s def test_io_spec_cupy(store, value, encoding_type, as_dask): 2184s if as_dask: 2184s if isinstance(value, CSMatrix): 2184s value = as_cupy_sparse_dask_array(value, format=encoding_type[:3]) 2184s else: 2184s > value = as_dense_cupy_dask_array(value) 2184s 2184s tests/test_io_elementwise.py:263: 2184s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 2184s /usr/lib/python3.13/functools.py:934: in wrapper 2184s return dispatch(args[0].__class__)(*args, **kw) 2184s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 2184s 2184s a = array([1, 2, 3]) 2184s 2184s @singledispatch 2184s def as_dense_cupy_dask_array(a): 2184s > import cupy as cp 2184s E ModuleNotFoundError: No module named 'cupy' 2184s 2184s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:882: ModuleNotFoundError 2184s __________________ test_io_spec_cupy[h5ad-True-value1-array] ___________________ 2184s 2184s store = 2184s value = array([[ 0, 1, 2], 2184s [ 3, 4, 5], 2184s [ 6, 7, 8], 2184s [ 9, 10, 11]]) 2184s encoding_type = 'array', as_dask = True 2184s 2184s @pytest.mark.gpu 2184s @pytest.mark.parametrize( 2184s ("value", "encoding_type"), 2184s [ 2184s (np.array([1, 2, 3]), "array"), 2184s (np.arange(12).reshape(4, 3), "array"), 2184s (sparse.random(5, 3, format="csr", density=0.5), "csr_matrix"), 2184s (sparse.random(5, 3, format="csc", density=0.5), "csc_matrix"), 2184s ], 2184s ) 2184s @pytest.mark.parametrize("as_dask", [False, True]) 2184s def test_io_spec_cupy(store, value, encoding_type, as_dask): 2184s if as_dask: 2184s if isinstance(value, CSMatrix): 2184s value = as_cupy_sparse_dask_array(value, format=encoding_type[:3]) 2184s else: 2184s > value = as_dense_cupy_dask_array(value) 2184s 2184s tests/test_io_elementwise.py:263: 2184s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 2184s /usr/lib/python3.13/functools.py:934: in wrapper 2184s return dispatch(args[0].__class__)(*args, **kw) 2184s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 2184s 2184s a = array([[ 0, 1, 2], 2184s [ 3, 4, 5], 2184s [ 6, 7, 8], 2184s [ 9, 10, 11]]) 2184s 2184s @singledispatch 2184s def as_dense_cupy_dask_array(a): 2184s > import cupy as cp 2184s E ModuleNotFoundError: No module named 'cupy' 2184s 2184s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:882: ModuleNotFoundError 2184s ________________ test_io_spec_cupy[h5ad-True-value2-csr_matrix] ________________ 2184s 2184s store = 2184s value = 2184s encoding_type = 'csr_matrix', as_dask = True 2184s 2184s @pytest.mark.gpu 2184s @pytest.mark.parametrize( 2184s ("value", "encoding_type"), 2184s [ 2184s (np.array([1, 2, 3]), "array"), 2184s (np.arange(12).reshape(4, 3), "array"), 2184s (sparse.random(5, 3, format="csr", density=0.5), "csr_matrix"), 2184s (sparse.random(5, 3, format="csc", density=0.5), "csc_matrix"), 2184s ], 2184s ) 2184s @pytest.mark.parametrize("as_dask", [False, True]) 2184s def test_io_spec_cupy(store, value, encoding_type, as_dask): 2184s if as_dask: 2184s if isinstance(value, CSMatrix): 2184s > value = as_cupy_sparse_dask_array(value, format=encoding_type[:3]) 2184s 2184s tests/test_io_elementwise.py:261: 2184s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 2184s /usr/lib/python3.13/functools.py:934: in wrapper 2184s return dispatch(args[0].__class__)(*args, **kw) 2184s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 2184s 2184s a = 2184s format = 'csr' 2184s 2184s @singledispatch 2184s def as_cupy_sparse_dask_array(a, format="csr"): 2184s > memory_class = format_to_memory_class[format] 2184s E KeyError: 'csr' 2184s 2184s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:926: KeyError 2184s ________________ test_io_spec_cupy[h5ad-True-value3-csc_matrix] ________________ 2184s 2184s store = 2184s value = 2184s encoding_type = 'csc_matrix', as_dask = True 2184s 2184s @pytest.mark.gpu 2184s @pytest.mark.parametrize( 2184s ("value", "encoding_type"), 2184s [ 2184s (np.array([1, 2, 3]), "array"), 2184s (np.arange(12).reshape(4, 3), "array"), 2184s (sparse.random(5, 3, format="csr", density=0.5), "csr_matrix"), 2184s (sparse.random(5, 3, format="csc", density=0.5), "csc_matrix"), 2184s ], 2184s ) 2184s @pytest.mark.parametrize("as_dask", [False, True]) 2184s def test_io_spec_cupy(store, value, encoding_type, as_dask): 2184s if as_dask: 2184s if isinstance(value, CSMatrix): 2184s > value = as_cupy_sparse_dask_array(value, format=encoding_type[:3]) 2184s 2184s tests/test_io_elementwise.py:261: 2184s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 2184s /usr/lib/python3.13/functools.py:934: in wrapper 2184s return dispatch(args[0].__class__)(*args, **kw) 2184s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 2184s 2184s a = 2184s format = 'csc' 2184s 2184s @singledispatch 2184s def as_cupy_sparse_dask_array(a, format="csr"): 2184s > memory_class = format_to_memory_class[format] 2184s E KeyError: 'csc' 2184s 2184s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:926: KeyError 2184s _________________ test_io_spec_cupy[zarr2-False-value0-array] __________________ 2184s 2184s store = 2184s value = array([1, 2, 3]), encoding_type = 'array', as_dask = False 2184s 2184s @pytest.mark.gpu 2184s @pytest.mark.parametrize( 2184s ("value", "encoding_type"), 2184s [ 2184s (np.array([1, 2, 3]), "array"), 2184s (np.arange(12).reshape(4, 3), "array"), 2184s (sparse.random(5, 3, format="csr", density=0.5), "csr_matrix"), 2184s (sparse.random(5, 3, format="csc", density=0.5), "csc_matrix"), 2184s ], 2184s ) 2184s @pytest.mark.parametrize("as_dask", [False, True]) 2184s def test_io_spec_cupy(store, value, encoding_type, as_dask): 2184s if as_dask: 2184s if isinstance(value, CSMatrix): 2184s value = as_cupy_sparse_dask_array(value, format=encoding_type[:3]) 2184s else: 2184s value = as_dense_cupy_dask_array(value) 2184s else: 2184s > value = as_cupy(value) 2184s 2184s tests/test_io_elementwise.py:265: 2184s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 2184s /usr/lib/python3.13/functools.py:934: in wrapper 2184s return dispatch(args[0].__class__)(*args, **kw) 2184s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 2184s 2184s val = array([1, 2, 3]), typ = 2184s 2184s @singledispatch 2184s def as_cupy(val, typ=None): 2184s """ 2184s Rough conversion function 2184s 2184s Will try to infer target type from input type if not specified. 2184s """ 2184s if typ is None: 2184s typ = resolve_cupy_type(val) 2184s 2184s if issubclass(typ, CupyArray): 2184s > import cupy as cp 2184s E ModuleNotFoundError: No module named 'cupy' 2184s 2184s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:1010: ModuleNotFoundError 2184s _________________ test_io_spec_cupy[zarr2-False-value1-array] __________________ 2184s 2184s store = 2184s value = array([[ 0, 1, 2], 2184s [ 3, 4, 5], 2184s [ 6, 7, 8], 2184s [ 9, 10, 11]]) 2184s encoding_type = 'array', as_dask = False 2184s 2184s @pytest.mark.gpu 2184s @pytest.mark.parametrize( 2184s ("value", "encoding_type"), 2184s [ 2184s (np.array([1, 2, 3]), "array"), 2184s (np.arange(12).reshape(4, 3), "array"), 2184s (sparse.random(5, 3, format="csr", density=0.5), "csr_matrix"), 2184s (sparse.random(5, 3, format="csc", density=0.5), "csc_matrix"), 2184s ], 2184s ) 2184s @pytest.mark.parametrize("as_dask", [False, True]) 2184s def test_io_spec_cupy(store, value, encoding_type, as_dask): 2184s if as_dask: 2184s if isinstance(value, CSMatrix): 2184s value = as_cupy_sparse_dask_array(value, format=encoding_type[:3]) 2184s else: 2184s value = as_dense_cupy_dask_array(value) 2184s else: 2184s > value = as_cupy(value) 2184s 2184s tests/test_io_elementwise.py:265: 2184s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 2184s /usr/lib/python3.13/functools.py:934: in wrapper 2184s return dispatch(args[0].__class__)(*args, **kw) 2184s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 2184s 2184s val = array([[ 0, 1, 2], 2184s [ 3, 4, 5], 2184s [ 6, 7, 8], 2184s [ 9, 10, 11]]) 2184s typ = 2184s 2184s @singledispatch 2184s def as_cupy(val, typ=None): 2184s """ 2184s Rough conversion function 2184s 2184s Will try to infer target type from input type if not specified. 2184s """ 2184s if typ is None: 2184s typ = resolve_cupy_type(val) 2184s 2184s if issubclass(typ, CupyArray): 2184s > import cupy as cp 2184s E ModuleNotFoundError: No module named 'cupy' 2184s 2184s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:1010: ModuleNotFoundError 2184s _______________ test_io_spec_cupy[zarr2-False-value2-csr_matrix] _______________ 2184s 2184s store = 2184s value = 2184s encoding_type = 'csr_matrix', as_dask = False 2184s 2184s @pytest.mark.gpu 2184s @pytest.mark.parametrize( 2184s ("value", "encoding_type"), 2184s [ 2184s (np.array([1, 2, 3]), "array"), 2184s (np.arange(12).reshape(4, 3), "array"), 2184s (sparse.random(5, 3, format="csr", density=0.5), "csr_matrix"), 2184s (sparse.random(5, 3, format="csc", density=0.5), "csc_matrix"), 2184s ], 2184s ) 2184s @pytest.mark.parametrize("as_dask", [False, True]) 2184s def test_io_spec_cupy(store, value, encoding_type, as_dask): 2184s if as_dask: 2184s if isinstance(value, CSMatrix): 2184s value = as_cupy_sparse_dask_array(value, format=encoding_type[:3]) 2184s else: 2184s value = as_dense_cupy_dask_array(value) 2184s else: 2184s > value = as_cupy(value) 2184s 2184s tests/test_io_elementwise.py:265: 2184s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 2184s /usr/lib/python3.13/functools.py:934: in wrapper 2184s return dispatch(args[0].__class__)(*args, **kw) 2184s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 2184s 2184s val = 2184s typ = 2184s 2184s @singledispatch 2184s def as_cupy(val, typ=None): 2184s """ 2184s Rough conversion function 2184s 2184s Will try to infer target type from input type if not specified. 2184s """ 2184s if typ is None: 2184s typ = resolve_cupy_type(val) 2184s 2184s if issubclass(typ, CupyArray): 2184s import cupy as cp 2184s 2184s if isinstance(val, CSMatrix): 2184s val = val.toarray() 2184s return cp.array(val) 2184s elif issubclass(typ, CupyCSRMatrix): 2184s > import cupy as cp 2184s E ModuleNotFoundError: No module named 'cupy' 2184s 2184s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:1016: ModuleNotFoundError 2184s _______________ test_io_spec_cupy[zarr2-False-value3-csc_matrix] _______________ 2184s 2184s store = 2184s value = 2184s encoding_type = 'csc_matrix', as_dask = False 2184s 2184s @pytest.mark.gpu 2184s @pytest.mark.parametrize( 2184s ("value", "encoding_type"), 2184s [ 2184s (np.array([1, 2, 3]), "array"), 2184s (np.arange(12).reshape(4, 3), "array"), 2184s (sparse.random(5, 3, format="csr", density=0.5), "csr_matrix"), 2184s (sparse.random(5, 3, format="csc", density=0.5), "csc_matrix"), 2184s ], 2184s ) 2184s @pytest.mark.parametrize("as_dask", [False, True]) 2184s def test_io_spec_cupy(store, value, encoding_type, as_dask): 2184s if as_dask: 2184s if isinstance(value, CSMatrix): 2184s value = as_cupy_sparse_dask_array(value, format=encoding_type[:3]) 2184s else: 2184s value = as_dense_cupy_dask_array(value) 2184s else: 2184s > value = as_cupy(value) 2184s 2184s tests/test_io_elementwise.py:265: 2184s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 2184s /usr/lib/python3.13/functools.py:934: in wrapper 2184s return dispatch(args[0].__class__)(*args, **kw) 2184s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 2184s 2184s val = 2184s typ = 2184s 2184s @singledispatch 2184s def as_cupy(val, typ=None): 2184s """ 2184s Rough conversion function 2184s 2184s Will try to infer target type from input type if not specified. 2184s """ 2184s if typ is None: 2184s typ = resolve_cupy_type(val) 2184s 2184s if issubclass(typ, CupyArray): 2184s import cupy as cp 2184s 2184s if isinstance(val, CSMatrix): 2184s val = val.toarray() 2184s return cp.array(val) 2184s elif issubclass(typ, CupyCSRMatrix): 2184s import cupy as cp 2184s import cupyx.scipy.sparse as cpsparse 2184s 2184s if isinstance(val, np.ndarray): 2184s return cpsparse.csr_matrix(cp.array(val)) 2184s else: 2184s return cpsparse.csr_matrix(val) 2184s elif issubclass(typ, CupyCSCMatrix): 2184s > import cupy as cp 2184s E ModuleNotFoundError: No module named 'cupy' 2184s 2184s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:1024: ModuleNotFoundError 2184s __________________ test_io_spec_cupy[zarr2-True-value0-array] __________________ 2184s 2184s store = 2184s value = array([1, 2, 3]), encoding_type = 'array', as_dask = True 2184s 2184s @pytest.mark.gpu 2184s @pytest.mark.parametrize( 2184s ("value", "encoding_type"), 2184s [ 2184s (np.array([1, 2, 3]), "array"), 2184s (np.arange(12).reshape(4, 3), "array"), 2184s (sparse.random(5, 3, format="csr", density=0.5), "csr_matrix"), 2184s (sparse.random(5, 3, format="csc", density=0.5), "csc_matrix"), 2184s ], 2184s ) 2184s @pytest.mark.parametrize("as_dask", [False, True]) 2184s def test_io_spec_cupy(store, value, encoding_type, as_dask): 2184s if as_dask: 2184s if isinstance(value, CSMatrix): 2184s value = as_cupy_sparse_dask_array(value, format=encoding_type[:3]) 2184s else: 2184s > value = as_dense_cupy_dask_array(value) 2184s 2184s tests/test_io_elementwise.py:263: 2184s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 2184s /usr/lib/python3.13/functools.py:934: in wrapper 2184s return dispatch(args[0].__class__)(*args, **kw) 2184s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 2184s 2184s a = array([1, 2, 3]) 2184s 2184s @singledispatch 2184s def as_dense_cupy_dask_array(a): 2184s > import cupy as cp 2184s E ModuleNotFoundError: No module named 'cupy' 2184s 2184s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:882: ModuleNotFoundError 2184s __________________ test_io_spec_cupy[zarr2-True-value1-array] __________________ 2184s 2184s store = 2184s value = array([[ 0, 1, 2], 2184s [ 3, 4, 5], 2184s [ 6, 7, 8], 2184s [ 9, 10, 11]]) 2184s encoding_type = 'array', as_dask = True 2184s 2184s @pytest.mark.gpu 2184s @pytest.mark.parametrize( 2184s ("value", "encoding_type"), 2184s [ 2184s (np.array([1, 2, 3]), "array"), 2184s (np.arange(12).reshape(4, 3), "array"), 2184s (sparse.random(5, 3, format="csr", density=0.5), "csr_matrix"), 2184s (sparse.random(5, 3, format="csc", density=0.5), "csc_matrix"), 2184s ], 2184s ) 2184s @pytest.mark.parametrize("as_dask", [False, True]) 2184s def test_io_spec_cupy(store, value, encoding_type, as_dask): 2184s if as_dask: 2184s if isinstance(value, CSMatrix): 2184s value = as_cupy_sparse_dask_array(value, format=encoding_type[:3]) 2184s else: 2184s > value = as_dense_cupy_dask_array(value) 2184s 2184s tests/test_io_elementwise.py:263: 2184s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 2184s /usr/lib/python3.13/functools.py:934: in wrapper 2184s return dispatch(args[0].__class__)(*args, **kw) 2184s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 2184s 2184s a = array([[ 0, 1, 2], 2184s [ 3, 4, 5], 2184s [ 6, 7, 8], 2184s [ 9, 10, 11]]) 2184s 2184s @singledispatch 2184s def as_dense_cupy_dask_array(a): 2184s > import cupy as cp 2184s E ModuleNotFoundError: No module named 'cupy' 2184s 2184s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:882: ModuleNotFoundError 2184s _______________ test_io_spec_cupy[zarr2-True-value2-csr_matrix] ________________ 2184s 2184s store = 2184s value = 2184s encoding_type = 'csr_matrix', as_dask = True 2184s 2184s @pytest.mark.gpu 2184s @pytest.mark.parametrize( 2184s ("value", "encoding_type"), 2184s [ 2184s (np.array([1, 2, 3]), "array"), 2184s (np.arange(12).reshape(4, 3), "array"), 2184s (sparse.random(5, 3, format="csr", density=0.5), "csr_matrix"), 2184s (sparse.random(5, 3, format="csc", density=0.5), "csc_matrix"), 2184s ], 2184s ) 2184s @pytest.mark.parametrize("as_dask", [False, True]) 2184s def test_io_spec_cupy(store, value, encoding_type, as_dask): 2184s if as_dask: 2184s if isinstance(value, CSMatrix): 2184s > value = as_cupy_sparse_dask_array(value, format=encoding_type[:3]) 2184s 2184s tests/test_io_elementwise.py:261: 2184s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 2184s /usr/lib/python3.13/functools.py:934: in wrapper 2184s return dispatch(args[0].__class__)(*args, **kw) 2184s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 2184s 2184s a = 2184s format = 'csr' 2184s 2184s @singledispatch 2184s def as_cupy_sparse_dask_array(a, format="csr"): 2184s > memory_class = format_to_memory_class[format] 2184s E KeyError: 'csr' 2184s 2184s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:926: KeyError 2184s _______________ test_io_spec_cupy[zarr2-True-value3-csc_matrix] ________________ 2184s 2184s store = 2184s value = 2184s encoding_type = 'csc_matrix', as_dask = True 2184s 2184s @pytest.mark.gpu 2184s @pytest.mark.parametrize( 2184s ("value", "encoding_type"), 2184s [ 2184s (np.array([1, 2, 3]), "array"), 2184s (np.arange(12).reshape(4, 3), "array"), 2184s (sparse.random(5, 3, format="csr", density=0.5), "csr_matrix"), 2184s (sparse.random(5, 3, format="csc", density=0.5), "csc_matrix"), 2184s ], 2184s ) 2184s @pytest.mark.parametrize("as_dask", [False, True]) 2184s def test_io_spec_cupy(store, value, encoding_type, as_dask): 2184s if as_dask: 2184s if isinstance(value, CSMatrix): 2184s > value = as_cupy_sparse_dask_array(value, format=encoding_type[:3]) 2184s 2184s tests/test_io_elementwise.py:261: 2184s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 2184s /usr/lib/python3.13/functools.py:934: in wrapper 2184s return dispatch(args[0].__class__)(*args, **kw) 2184s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 2184s 2184s a = 2184s format = 'csc' 2184s 2184s @singledispatch 2184s def as_cupy_sparse_dask_array(a, format="csr"): 2184s > memory_class = format_to_memory_class[format] 2184s E KeyError: 'csc' 2184s 2184s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:926: KeyError 2184s _________________ test_io_spec_cupy[zarr3-False-value0-array] __________________ 2184s 2184s store = 2184s value = array([1, 2, 3]), encoding_type = 'array', as_dask = False 2184s 2184s @pytest.mark.gpu 2184s @pytest.mark.parametrize( 2184s ("value", "encoding_type"), 2184s [ 2184s (np.array([1, 2, 3]), "array"), 2184s (np.arange(12).reshape(4, 3), "array"), 2184s (sparse.random(5, 3, format="csr", density=0.5), "csr_matrix"), 2184s (sparse.random(5, 3, format="csc", density=0.5), "csc_matrix"), 2184s ], 2184s ) 2184s @pytest.mark.parametrize("as_dask", [False, True]) 2184s def test_io_spec_cupy(store, value, encoding_type, as_dask): 2184s if as_dask: 2184s if isinstance(value, CSMatrix): 2184s value = as_cupy_sparse_dask_array(value, format=encoding_type[:3]) 2184s else: 2184s value = as_dense_cupy_dask_array(value) 2184s else: 2184s > value = as_cupy(value) 2184s 2184s tests/test_io_elementwise.py:265: 2184s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 2184s /usr/lib/python3.13/functools.py:934: in wrapper 2184s return dispatch(args[0].__class__)(*args, **kw) 2184s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 2184s 2184s val = array([1, 2, 3]), typ = 2184s 2184s @singledispatch 2184s def as_cupy(val, typ=None): 2184s """ 2184s Rough conversion function 2184s 2184s Will try to infer target type from input type if not specified. 2184s """ 2184s if typ is None: 2184s typ = resolve_cupy_type(val) 2184s 2184s if issubclass(typ, CupyArray): 2184s > import cupy as cp 2184s E ModuleNotFoundError: No module named 'cupy' 2184s 2184s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:1010: ModuleNotFoundError 2184s _________________ test_io_spec_cupy[zarr3-False-value1-array] __________________ 2184s 2184s store = 2184s value = array([[ 0, 1, 2], 2184s [ 3, 4, 5], 2184s [ 6, 7, 8], 2184s [ 9, 10, 11]]) 2184s encoding_type = 'array', as_dask = False 2184s 2184s @pytest.mark.gpu 2184s @pytest.mark.parametrize( 2184s ("value", "encoding_type"), 2184s [ 2184s (np.array([1, 2, 3]), "array"), 2184s (np.arange(12).reshape(4, 3), "array"), 2184s (sparse.random(5, 3, format="csr", density=0.5), "csr_matrix"), 2184s (sparse.random(5, 3, format="csc", density=0.5), "csc_matrix"), 2184s ], 2184s ) 2184s @pytest.mark.parametrize("as_dask", [False, True]) 2184s def test_io_spec_cupy(store, value, encoding_type, as_dask): 2184s if as_dask: 2184s if isinstance(value, CSMatrix): 2184s value = as_cupy_sparse_dask_array(value, format=encoding_type[:3]) 2184s else: 2184s value = as_dense_cupy_dask_array(value) 2184s else: 2184s > value = as_cupy(value) 2184s 2184s tests/test_io_elementwise.py:265: 2184s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 2184s /usr/lib/python3.13/functools.py:934: in wrapper 2184s return dispatch(args[0].__class__)(*args, **kw) 2184s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 2184s 2184s val = array([[ 0, 1, 2], 2184s [ 3, 4, 5], 2184s [ 6, 7, 8], 2184s [ 9, 10, 11]]) 2184s typ = 2184s 2184s @singledispatch 2184s def as_cupy(val, typ=None): 2184s """ 2184s Rough conversion function 2184s 2184s Will try to infer target type from input type if not specified. 2184s """ 2184s if typ is None: 2184s typ = resolve_cupy_type(val) 2184s 2184s if issubclass(typ, CupyArray): 2184s > import cupy as cp 2184s E ModuleNotFoundError: No module named 'cupy' 2184s 2184s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:1010: ModuleNotFoundError 2184s _______________ test_io_spec_cupy[zarr3-False-value2-csr_matrix] _______________ 2184s 2184s store = 2184s value = 2184s encoding_type = 'csr_matrix', as_dask = False 2184s 2184s @pytest.mark.gpu 2184s @pytest.mark.parametrize( 2184s ("value", "encoding_type"), 2184s [ 2184s (np.array([1, 2, 3]), "array"), 2184s (np.arange(12).reshape(4, 3), "array"), 2184s (sparse.random(5, 3, format="csr", density=0.5), "csr_matrix"), 2184s (sparse.random(5, 3, format="csc", density=0.5), "csc_matrix"), 2184s ], 2184s ) 2184s @pytest.mark.parametrize("as_dask", [False, True]) 2184s def test_io_spec_cupy(store, value, encoding_type, as_dask): 2184s if as_dask: 2184s if isinstance(value, CSMatrix): 2184s value = as_cupy_sparse_dask_array(value, format=encoding_type[:3]) 2184s else: 2184s value = as_dense_cupy_dask_array(value) 2184s else: 2184s > value = as_cupy(value) 2184s 2184s tests/test_io_elementwise.py:265: 2184s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 2184s /usr/lib/python3.13/functools.py:934: in wrapper 2184s return dispatch(args[0].__class__)(*args, **kw) 2184s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 2184s 2184s val = 2184s typ = 2184s 2184s @singledispatch 2184s def as_cupy(val, typ=None): 2184s """ 2184s Rough conversion function 2184s 2184s Will try to infer target type from input type if not specified. 2184s """ 2184s if typ is None: 2184s typ = resolve_cupy_type(val) 2184s 2184s if issubclass(typ, CupyArray): 2184s import cupy as cp 2184s 2184s if isinstance(val, CSMatrix): 2184s val = val.toarray() 2184s return cp.array(val) 2184s elif issubclass(typ, CupyCSRMatrix): 2184s > import cupy as cp 2184s E ModuleNotFoundError: No module named 'cupy' 2184s 2184s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:1016: ModuleNotFoundError 2184s _______________ test_io_spec_cupy[zarr3-False-value3-csc_matrix] _______________ 2184s 2184s store = 2184s value = 2184s encoding_type = 'csc_matrix', as_dask = False 2184s 2184s @pytest.mark.gpu 2184s @pytest.mark.parametrize( 2184s ("value", "encoding_type"), 2184s [ 2184s (np.array([1, 2, 3]), "array"), 2184s (np.arange(12).reshape(4, 3), "array"), 2184s (sparse.random(5, 3, format="csr", density=0.5), "csr_matrix"), 2184s (sparse.random(5, 3, format="csc", density=0.5), "csc_matrix"), 2184s ], 2184s ) 2184s @pytest.mark.parametrize("as_dask", [False, True]) 2184s def test_io_spec_cupy(store, value, encoding_type, as_dask): 2184s if as_dask: 2184s if isinstance(value, CSMatrix): 2184s value = as_cupy_sparse_dask_array(value, format=encoding_type[:3]) 2184s else: 2184s value = as_dense_cupy_dask_array(value) 2184s else: 2184s > value = as_cupy(value) 2184s 2184s tests/test_io_elementwise.py:265: 2184s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 2184s /usr/lib/python3.13/functools.py:934: in wrapper 2184s return dispatch(args[0].__class__)(*args, **kw) 2184s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 2184s 2184s val = 2184s typ = 2184s 2184s @singledispatch 2184s def as_cupy(val, typ=None): 2184s """ 2184s Rough conversion function 2184s 2184s Will try to infer target type from input type if not specified. 2184s """ 2184s if typ is None: 2184s typ = resolve_cupy_type(val) 2184s 2184s if issubclass(typ, CupyArray): 2184s import cupy as cp 2184s 2184s if isinstance(val, CSMatrix): 2184s val = val.toarray() 2184s return cp.array(val) 2184s elif issubclass(typ, CupyCSRMatrix): 2184s import cupy as cp 2184s import cupyx.scipy.sparse as cpsparse 2184s 2184s if isinstance(val, np.ndarray): 2184s return cpsparse.csr_matrix(cp.array(val)) 2184s else: 2184s return cpsparse.csr_matrix(val) 2184s elif issubclass(typ, CupyCSCMatrix): 2184s > import cupy as cp 2184s E ModuleNotFoundError: No module named 'cupy' 2184s 2184s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:1024: ModuleNotFoundError 2184s __________________ test_io_spec_cupy[zarr3-True-value0-array] __________________ 2184s 2184s store = 2184s value = array([1, 2, 3]), encoding_type = 'array', as_dask = True 2184s 2184s @pytest.mark.gpu 2184s @pytest.mark.parametrize( 2184s ("value", "encoding_type"), 2184s [ 2184s (np.array([1, 2, 3]), "array"), 2184s (np.arange(12).reshape(4, 3), "array"), 2184s (sparse.random(5, 3, format="csr", density=0.5), "csr_matrix"), 2184s (sparse.random(5, 3, format="csc", density=0.5), "csc_matrix"), 2184s ], 2184s ) 2184s @pytest.mark.parametrize("as_dask", [False, True]) 2184s def test_io_spec_cupy(store, value, encoding_type, as_dask): 2184s if as_dask: 2184s if isinstance(value, CSMatrix): 2184s value = as_cupy_sparse_dask_array(value, format=encoding_type[:3]) 2184s else: 2184s > value = as_dense_cupy_dask_array(value) 2184s 2184s tests/test_io_elementwise.py:263: 2184s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 2184s /usr/lib/python3.13/functools.py:934: in wrapper 2184s return dispatch(args[0].__class__)(*args, **kw) 2184s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 2184s 2184s a = array([1, 2, 3]) 2184s 2184s @singledispatch 2184s def as_dense_cupy_dask_array(a): 2184s > import cupy as cp 2184s E ModuleNotFoundError: No module named 'cupy' 2184s 2184s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:882: ModuleNotFoundError 2184s __________________ test_io_spec_cupy[zarr3-True-value1-array] __________________ 2184s 2184s store = 2184s value = array([[ 0, 1, 2], 2184s [ 3, 4, 5], 2184s [ 6, 7, 8], 2184s [ 9, 10, 11]]) 2184s encoding_type = 'array', as_dask = True 2184s 2184s @pytest.mark.gpu 2184s @pytest.mark.parametrize( 2184s ("value", "encoding_type"), 2184s [ 2184s (np.array([1, 2, 3]), "array"), 2184s (np.arange(12).reshape(4, 3), "array"), 2184s (sparse.random(5, 3, format="csr", density=0.5), "csr_matrix"), 2184s (sparse.random(5, 3, format="csc", density=0.5), "csc_matrix"), 2184s ], 2184s ) 2184s @pytest.mark.parametrize("as_dask", [False, True]) 2184s def test_io_spec_cupy(store, value, encoding_type, as_dask): 2184s if as_dask: 2184s if isinstance(value, CSMatrix): 2184s value = as_cupy_sparse_dask_array(value, format=encoding_type[:3]) 2184s else: 2184s > value = as_dense_cupy_dask_array(value) 2184s 2184s tests/test_io_elementwise.py:263: 2184s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 2184s /usr/lib/python3.13/functools.py:934: in wrapper 2184s return dispatch(args[0].__class__)(*args, **kw) 2184s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 2184s 2184s a = array([[ 0, 1, 2], 2184s [ 3, 4, 5], 2184s [ 6, 7, 8], 2184s [ 9, 10, 11]]) 2184s 2184s @singledispatch 2184s def as_dense_cupy_dask_array(a): 2184s > import cupy as cp 2184s E ModuleNotFoundError: No module named 'cupy' 2184s 2184s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:882: ModuleNotFoundError 2184s _______________ test_io_spec_cupy[zarr3-True-value2-csr_matrix] ________________ 2184s 2184s store = 2184s value = 2184s encoding_type = 'csr_matrix', as_dask = True 2184s 2184s @pytest.mark.gpu 2184s @pytest.mark.parametrize( 2184s ("value", "encoding_type"), 2184s [ 2184s (np.array([1, 2, 3]), "array"), 2184s (np.arange(12).reshape(4, 3), "array"), 2184s (sparse.random(5, 3, format="csr", density=0.5), "csr_matrix"), 2184s (sparse.random(5, 3, format="csc", density=0.5), "csc_matrix"), 2184s ], 2184s ) 2184s @pytest.mark.parametrize("as_dask", [False, True]) 2184s def test_io_spec_cupy(store, value, encoding_type, as_dask): 2184s if as_dask: 2184s if isinstance(value, CSMatrix): 2184s > value = as_cupy_sparse_dask_array(value, format=encoding_type[:3]) 2184s 2184s tests/test_io_elementwise.py:261: 2184s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 2184s /usr/lib/python3.13/functools.py:934: in wrapper 2184s return dispatch(args[0].__class__)(*args, **kw) 2184s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 2184s 2184s a = 2184s format = 'csr' 2184s 2184s @singledispatch 2184s def as_cupy_sparse_dask_array(a, format="csr"): 2184s > memory_class = format_to_memory_class[format] 2184s E KeyError: 'csr' 2184s 2184s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:926: KeyError 2184s _______________ test_io_spec_cupy[zarr3-True-value3-csc_matrix] ________________ 2184s 2184s store = 2184s value = 2184s encoding_type = 'csc_matrix', as_dask = True 2184s 2184s @pytest.mark.gpu 2184s @pytest.mark.parametrize( 2184s ("value", "encoding_type"), 2184s [ 2184s (np.array([1, 2, 3]), "array"), 2184s (np.arange(12).reshape(4, 3), "array"), 2184s (sparse.random(5, 3, format="csr", density=0.5), "csr_matrix"), 2184s (sparse.random(5, 3, format="csc", density=0.5), "csc_matrix"), 2184s ], 2184s ) 2184s @pytest.mark.parametrize("as_dask", [False, True]) 2184s def test_io_spec_cupy(store, value, encoding_type, as_dask): 2184s if as_dask: 2184s if isinstance(value, CSMatrix): 2184s > value = as_cupy_sparse_dask_array(value, format=encoding_type[:3]) 2184s 2184s tests/test_io_elementwise.py:261: 2184s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 2184s /usr/lib/python3.13/functools.py:934: in wrapper 2184s return dispatch(args[0].__class__)(*args, **kw) 2184s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 2184s 2184s a = 2184s format = 'csc' 2184s 2184s @singledispatch 2184s def as_cupy_sparse_dask_array(a, format="csr"): 2184s > memory_class = format_to_memory_class[format] 2184s E KeyError: 'csc' 2184s 2184s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:926: KeyError 2184s _________ test_readwrite_kitchensink[dataset_kwargs0-csr_matrix-h5ad] __________ 2184s 2184s tmp_path = PosixPath('/tmp/pytest-of-ubuntu/pytest-0/test_readwrite_kitchensink_dat2') 2184s storage = 'h5ad', typ = 2184s backing_h5ad = PosixPath('/tmp/pytest-of-ubuntu/pytest-0/test_readwrite_kitchensink_dat2/test.h5ad') 2184s dataset_kwargs = {} 2184s 2184s @pytest.mark.parametrize("storage", ["h5ad", "zarr"]) 2184s @pytest.mark.parametrize("typ", [np.array, csr_matrix, csr_array, as_dense_dask_array]) 2184s def test_readwrite_kitchensink(tmp_path, storage, typ, backing_h5ad, dataset_kwargs): 2184s X = typ(X_list) 2184s adata_src = ad.AnnData(X, obs=obs_dict, var=var_dict, uns=uns_dict) 2184s assert not isinstance(adata_src.obs["oanno1"].dtype, pd.CategoricalDtype) 2184s adata_src.raw = adata_src.copy() 2184s 2184s if storage == "h5ad": 2184s adata_src.write(backing_h5ad, **dataset_kwargs) 2184s adata_mid = ad.read_h5ad(backing_h5ad) 2184s adata_mid.write(tmp_path / "mid.h5ad", **dataset_kwargs) 2184s adata = ad.read_h5ad(tmp_path / "mid.h5ad") 2184s else: 2184s adata_src.write_zarr(tmp_path / "test_zarr_dir") 2184s adata = ad.read_zarr(tmp_path / "test_zarr_dir") 2184s assert isinstance(adata.obs["oanno1"].dtype, pd.CategoricalDtype) 2184s assert not isinstance(adata.obs["oanno2"].dtype, pd.CategoricalDtype) 2184s assert adata.obs.index.tolist() == ["name1", "name2", "name3"] 2184s assert adata.obs["oanno1"].cat.categories.tolist() == ["cat1", "cat2"] 2184s assert adata.obs["oanno1c"].cat.categories.tolist() == ["cat1"] 2184s assert isinstance(adata.raw.var["vanno2"].dtype, pd.CategoricalDtype) 2184s pd.testing.assert_frame_equal(adata.obs, adata_src.obs) 2184s pd.testing.assert_frame_equal(adata.var, adata_src.var) 2184s assert_equal(adata.var.index, adata_src.var.index) 2184s assert adata.var.index.dtype == adata_src.var.index.dtype 2184s 2184s # Dev. Note: 2184s # either load as same type or load the convert DaskArray to array 2184s # since we tested if assigned types and loaded types are DaskArray 2184s # this would also work if they work 2184s if isinstance(adata_src.raw.X, CSArray): 2184s assert isinstance(adata.raw.X, CSMatrix) 2184s else: 2184s > assert isinstance(adata_src.raw.X, type(adata.raw.X) | DaskArray) 2184s E AssertionError: assert False 2184s E + where False = isinstance(, ( | DaskArray)) 2184s E + where = .X 2184s 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 2184s E + and = type() 2184s E + where = .X 2184s 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 2184s 2184s tests/test_readwrite.py:178: AssertionError 2184s _________ test_readwrite_kitchensink[dataset_kwargs0-csr_matrix-zarr] __________ 2184s 2184s tmp_path = PosixPath('/tmp/pytest-of-ubuntu/pytest-0/test_readwrite_kitchensink_dat3') 2184s storage = 'zarr', typ = 2184s backing_h5ad = PosixPath('/tmp/pytest-of-ubuntu/pytest-0/test_readwrite_kitchensink_dat3/test.h5ad') 2184s dataset_kwargs = {} 2184s 2184s @pytest.mark.parametrize("storage", ["h5ad", "zarr"]) 2184s @pytest.mark.parametrize("typ", [np.array, csr_matrix, csr_array, as_dense_dask_array]) 2184s def test_readwrite_kitchensink(tmp_path, storage, typ, backing_h5ad, dataset_kwargs): 2184s X = typ(X_list) 2184s adata_src = ad.AnnData(X, obs=obs_dict, var=var_dict, uns=uns_dict) 2184s assert not isinstance(adata_src.obs["oanno1"].dtype, pd.CategoricalDtype) 2184s adata_src.raw = adata_src.copy() 2184s 2184s if storage == "h5ad": 2184s adata_src.write(backing_h5ad, **dataset_kwargs) 2184s adata_mid = ad.read_h5ad(backing_h5ad) 2184s adata_mid.write(tmp_path / "mid.h5ad", **dataset_kwargs) 2184s adata = ad.read_h5ad(tmp_path / "mid.h5ad") 2184s else: 2184s adata_src.write_zarr(tmp_path / "test_zarr_dir") 2184s adata = ad.read_zarr(tmp_path / "test_zarr_dir") 2184s assert isinstance(adata.obs["oanno1"].dtype, pd.CategoricalDtype) 2184s assert not isinstance(adata.obs["oanno2"].dtype, pd.CategoricalDtype) 2184s assert adata.obs.index.tolist() == ["name1", "name2", "name3"] 2184s assert adata.obs["oanno1"].cat.categories.tolist() == ["cat1", "cat2"] 2184s assert adata.obs["oanno1c"].cat.categories.tolist() == ["cat1"] 2184s assert isinstance(adata.raw.var["vanno2"].dtype, pd.CategoricalDtype) 2184s pd.testing.assert_frame_equal(adata.obs, adata_src.obs) 2184s pd.testing.assert_frame_equal(adata.var, adata_src.var) 2184s assert_equal(adata.var.index, adata_src.var.index) 2184s assert adata.var.index.dtype == adata_src.var.index.dtype 2184s 2184s # Dev. Note: 2184s # either load as same type or load the convert DaskArray to array 2184s # since we tested if assigned types and loaded types are DaskArray 2184s # this would also work if they work 2184s if isinstance(adata_src.raw.X, CSArray): 2184s assert isinstance(adata.raw.X, CSMatrix) 2184s else: 2184s > assert isinstance(adata_src.raw.X, type(adata.raw.X) | DaskArray) 2184s E AssertionError: assert False 2184s E + where False = isinstance(, ( | DaskArray)) 2184s E + where = .X 2184s 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 2184s E + and = type() 2184s E + where = .X 2184s 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 2184s 2184s tests/test_readwrite.py:178: AssertionError 2184s __________ test_readwrite_kitchensink[dataset_kwargs0-csr_array-h5ad] __________ 2184s 2184s tmp_path = PosixPath('/tmp/pytest-of-ubuntu/pytest-0/test_readwrite_kitchensink_dat4') 2184s storage = 'h5ad', typ = 2184s backing_h5ad = PosixPath('/tmp/pytest-of-ubuntu/pytest-0/test_readwrite_kitchensink_dat4/test.h5ad') 2184s dataset_kwargs = {} 2184s 2184s @pytest.mark.parametrize("storage", ["h5ad", "zarr"]) 2184s @pytest.mark.parametrize("typ", [np.array, csr_matrix, csr_array, as_dense_dask_array]) 2184s def test_readwrite_kitchensink(tmp_path, storage, typ, backing_h5ad, dataset_kwargs): 2184s X = typ(X_list) 2184s adata_src = ad.AnnData(X, obs=obs_dict, var=var_dict, uns=uns_dict) 2184s assert not isinstance(adata_src.obs["oanno1"].dtype, pd.CategoricalDtype) 2184s adata_src.raw = adata_src.copy() 2184s 2184s if storage == "h5ad": 2184s adata_src.write(backing_h5ad, **dataset_kwargs) 2184s adata_mid = ad.read_h5ad(backing_h5ad) 2184s adata_mid.write(tmp_path / "mid.h5ad", **dataset_kwargs) 2184s adata = ad.read_h5ad(tmp_path / "mid.h5ad") 2184s else: 2184s adata_src.write_zarr(tmp_path / "test_zarr_dir") 2184s adata = ad.read_zarr(tmp_path / "test_zarr_dir") 2184s assert isinstance(adata.obs["oanno1"].dtype, pd.CategoricalDtype) 2184s assert not isinstance(adata.obs["oanno2"].dtype, pd.CategoricalDtype) 2184s assert adata.obs.index.tolist() == ["name1", "name2", "name3"] 2184s assert adata.obs["oanno1"].cat.categories.tolist() == ["cat1", "cat2"] 2184s assert adata.obs["oanno1c"].cat.categories.tolist() == ["cat1"] 2184s assert isinstance(adata.raw.var["vanno2"].dtype, pd.CategoricalDtype) 2184s pd.testing.assert_frame_equal(adata.obs, adata_src.obs) 2184s pd.testing.assert_frame_equal(adata.var, adata_src.var) 2184s assert_equal(adata.var.index, adata_src.var.index) 2184s assert adata.var.index.dtype == adata_src.var.index.dtype 2184s 2184s # Dev. Note: 2184s # either load as same type or load the convert DaskArray to array 2184s # since we tested if assigned types and loaded types are DaskArray 2184s # this would also work if they work 2184s if isinstance(adata_src.raw.X, CSArray): 2184s > assert isinstance(adata.raw.X, CSMatrix) 2184s E AssertionError: assert False 2184s E + where False = isinstance(, scipy.sparse._csr.csr_matrix | scipy.sparse._csc.csc_matrix) 2184s E + where = .X 2184s 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 2184s 2184s tests/test_readwrite.py:176: AssertionError 2184s __________ test_readwrite_kitchensink[dataset_kwargs0-csr_array-zarr] __________ 2184s 2184s tmp_path = PosixPath('/tmp/pytest-of-ubuntu/pytest-0/test_readwrite_kitchensink_dat5') 2184s storage = 'zarr', typ = 2184s backing_h5ad = PosixPath('/tmp/pytest-of-ubuntu/pytest-0/test_readwrite_kitchensink_dat5/test.h5ad') 2184s dataset_kwargs = {} 2184s 2184s @pytest.mark.parametrize("storage", ["h5ad", "zarr"]) 2184s @pytest.mark.parametrize("typ", [np.array, csr_matrix, csr_array, as_dense_dask_array]) 2184s def test_readwrite_kitchensink(tmp_path, storage, typ, backing_h5ad, dataset_kwargs): 2184s X = typ(X_list) 2184s adata_src = ad.AnnData(X, obs=obs_dict, var=var_dict, uns=uns_dict) 2184s assert not isinstance(adata_src.obs["oanno1"].dtype, pd.CategoricalDtype) 2184s adata_src.raw = adata_src.copy() 2184s 2184s if storage == "h5ad": 2184s adata_src.write(backing_h5ad, **dataset_kwargs) 2184s adata_mid = ad.read_h5ad(backing_h5ad) 2184s adata_mid.write(tmp_path / "mid.h5ad", **dataset_kwargs) 2184s adata = ad.read_h5ad(tmp_path / "mid.h5ad") 2184s else: 2184s adata_src.write_zarr(tmp_path / "test_zarr_dir") 2184s adata = ad.read_zarr(tmp_path / "test_zarr_dir") 2184s assert isinstance(adata.obs["oanno1"].dtype, pd.CategoricalDtype) 2184s assert not isinstance(adata.obs["oanno2"].dtype, pd.CategoricalDtype) 2184s assert adata.obs.index.tolist() == ["name1", "name2", "name3"] 2184s assert adata.obs["oanno1"].cat.categories.tolist() == ["cat1", "cat2"] 2184s assert adata.obs["oanno1c"].cat.categories.tolist() == ["cat1"] 2184s assert isinstance(adata.raw.var["vanno2"].dtype, pd.CategoricalDtype) 2184s pd.testing.assert_frame_equal(adata.obs, adata_src.obs) 2184s pd.testing.assert_frame_equal(adata.var, adata_src.var) 2184s assert_equal(adata.var.index, adata_src.var.index) 2184s assert adata.var.index.dtype == adata_src.var.index.dtype 2184s 2184s # Dev. Note: 2184s # either load as same type or load the convert DaskArray to array 2184s # since we tested if assigned types and loaded types are DaskArray 2184s # this would also work if they work 2184s if isinstance(adata_src.raw.X, CSArray): 2184s > assert isinstance(adata.raw.X, CSMatrix) 2184s E AssertionError: assert False 2184s E + where False = isinstance(, scipy.sparse._csr.csr_matrix | scipy.sparse._csc.csc_matrix) 2184s E + where = .X 2184s 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', 'uns4', 'oanno1_colors'.raw 2184s 2184s tests/test_readwrite.py:176: AssertionError 2184s _________ test_readwrite_kitchensink[dataset_kwargs1-csr_matrix-h5ad] __________ 2184s 2184s tmp_path = PosixPath('/tmp/pytest-of-ubuntu/pytest-0/test_readwrite_kitchensink_dat10') 2184s storage = 'h5ad', typ = 2184s backing_h5ad = PosixPath('/tmp/pytest-of-ubuntu/pytest-0/test_readwrite_kitchensink_dat10/test.h5ad') 2184s dataset_kwargs = {'compression': 'gzip'} 2184s 2184s @pytest.mark.parametrize("storage", ["h5ad", "zarr"]) 2184s @pytest.mark.parametrize("typ", [np.array, csr_matrix, csr_array, as_dense_dask_array]) 2184s def test_readwrite_kitchensink(tmp_path, storage, typ, backing_h5ad, dataset_kwargs): 2184s X = typ(X_list) 2184s adata_src = ad.AnnData(X, obs=obs_dict, var=var_dict, uns=uns_dict) 2184s assert not isinstance(adata_src.obs["oanno1"].dtype, pd.CategoricalDtype) 2184s adata_src.raw = adata_src.copy() 2184s 2184s if storage == "h5ad": 2184s adata_src.write(backing_h5ad, **dataset_kwargs) 2184s adata_mid = ad.read_h5ad(backing_h5ad) 2184s adata_mid.write(tmp_path / "mid.h5ad", **dataset_kwargs) 2184s adata = ad.read_h5ad(tmp_path / "mid.h5ad") 2184s else: 2184s adata_src.write_zarr(tmp_path / "test_zarr_dir") 2184s adata = ad.read_zarr(tmp_path / "test_zarr_dir") 2184s assert isinstance(adata.obs["oanno1"].dtype, pd.CategoricalDtype) 2184s assert not isinstance(adata.obs["oanno2"].dtype, pd.CategoricalDtype) 2184s assert adata.obs.index.tolist() == ["name1", "name2", "name3"] 2184s assert adata.obs["oanno1"].cat.categories.tolist() == ["cat1", "cat2"] 2184s assert adata.obs["oanno1c"].cat.categories.tolist() == ["cat1"] 2184s assert isinstance(adata.raw.var["vanno2"].dtype, pd.CategoricalDtype) 2184s pd.testing.assert_frame_equal(adata.obs, adata_src.obs) 2184s pd.testing.assert_frame_equal(adata.var, adata_src.var) 2184s assert_equal(adata.var.index, adata_src.var.index) 2184s assert adata.var.index.dtype == adata_src.var.index.dtype 2184s 2184s # Dev. Note: 2184s # either load as same type or load the convert DaskArray to array 2184s # since we tested if assigned types and loaded types are DaskArray 2184s # this would also work if they work 2184s if isinstance(adata_src.raw.X, CSArray): 2184s assert isinstance(adata.raw.X, CSMatrix) 2184s else: 2184s > assert isinstance(adata_src.raw.X, type(adata.raw.X) | DaskArray) 2184s E AssertionError: assert False 2184s E + where False = isinstance(, ( | DaskArray)) 2184s E + where = .X 2184s 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 2184s E + and = type() 2184s E + where = .X 2184s 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 2184s 2184s tests/test_readwrite.py:178: AssertionError 2184s _________ test_readwrite_kitchensink[dataset_kwargs1-csr_matrix-zarr] __________ 2184s 2184s tmp_path = PosixPath('/tmp/pytest-of-ubuntu/pytest-0/test_readwrite_kitchensink_dat11') 2184s storage = 'zarr', typ = 2184s backing_h5ad = PosixPath('/tmp/pytest-of-ubuntu/pytest-0/test_readwrite_kitchensink_dat11/test.h5ad') 2184s dataset_kwargs = {'compression': 'gzip'} 2184s 2184s @pytest.mark.parametrize("storage", ["h5ad", "zarr"]) 2184s @pytest.mark.parametrize("typ", [np.array, csr_matrix, csr_array, as_dense_dask_array]) 2184s def test_readwrite_kitchensink(tmp_path, storage, typ, backing_h5ad, dataset_kwargs): 2184s X = typ(X_list) 2184s adata_src = ad.AnnData(X, obs=obs_dict, var=var_dict, uns=uns_dict) 2184s assert not isinstance(adata_src.obs["oanno1"].dtype, pd.CategoricalDtype) 2184s adata_src.raw = adata_src.copy() 2184s 2184s if storage == "h5ad": 2184s adata_src.write(backing_h5ad, **dataset_kwargs) 2184s adata_mid = ad.read_h5ad(backing_h5ad) 2184s adata_mid.write(tmp_path / "mid.h5ad", **dataset_kwargs) 2184s adata = ad.read_h5ad(tmp_path / "mid.h5ad") 2184s else: 2184s adata_src.write_zarr(tmp_path / "test_zarr_dir") 2184s adata = ad.read_zarr(tmp_path / "test_zarr_dir") 2184s assert isinstance(adata.obs["oanno1"].dtype, pd.CategoricalDtype) 2184s assert not isinstance(adata.obs["oanno2"].dtype, pd.CategoricalDtype) 2184s assert adata.obs.index.tolist() == ["name1", "name2", "name3"] 2184s assert adata.obs["oanno1"].cat.categories.tolist() == ["cat1", "cat2"] 2184s assert adata.obs["oanno1c"].cat.categories.tolist() == ["cat1"] 2184s assert isinstance(adata.raw.var["vanno2"].dtype, pd.CategoricalDtype) 2184s pd.testing.assert_frame_equal(adata.obs, adata_src.obs) 2184s pd.testing.assert_frame_equal(adata.var, adata_src.var) 2184s assert_equal(adata.var.index, adata_src.var.index) 2184s assert adata.var.index.dtype == adata_src.var.index.dtype 2184s 2184s # Dev. Note: 2184s # either load as same type or load the convert DaskArray to array 2184s # since we tested if assigned types and loaded types are DaskArray 2184s # this would also work if they work 2184s if isinstance(adata_src.raw.X, CSArray): 2184s assert isinstance(adata.raw.X, CSMatrix) 2184s else: 2184s > assert isinstance(adata_src.raw.X, type(adata.raw.X) | DaskArray) 2184s E AssertionError: assert False 2184s E + where False = isinstance(, ( | DaskArray)) 2184s E + where = .X 2184s 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 2184s E + and = type() 2184s E + where = .X 2184s 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', 'uns4', 'uns3', 'oanno1_colors'.raw 2184s 2184s tests/test_readwrite.py:178: AssertionError 2184s __________ test_readwrite_kitchensink[dataset_kwargs1-csr_array-h5ad] __________ 2184s 2184s tmp_path = PosixPath('/tmp/pytest-of-ubuntu/pytest-0/test_readwrite_kitchensink_dat12') 2184s storage = 'h5ad', typ = 2184s backing_h5ad = PosixPath('/tmp/pytest-of-ubuntu/pytest-0/test_readwrite_kitchensink_dat12/test.h5ad') 2184s dataset_kwargs = {'compression': 'gzip'} 2184s 2184s @pytest.mark.parametrize("storage", ["h5ad", "zarr"]) 2184s @pytest.mark.parametrize("typ", [np.array, csr_matrix, csr_array, as_dense_dask_array]) 2184s def test_readwrite_kitchensink(tmp_path, storage, typ, backing_h5ad, dataset_kwargs): 2184s X = typ(X_list) 2184s adata_src = ad.AnnData(X, obs=obs_dict, var=var_dict, uns=uns_dict) 2184s assert not isinstance(adata_src.obs["oanno1"].dtype, pd.CategoricalDtype) 2184s adata_src.raw = adata_src.copy() 2184s 2184s if storage == "h5ad": 2184s adata_src.write(backing_h5ad, **dataset_kwargs) 2184s adata_mid = ad.read_h5ad(backing_h5ad) 2184s adata_mid.write(tmp_path / "mid.h5ad", **dataset_kwargs) 2184s adata = ad.read_h5ad(tmp_path / "mid.h5ad") 2184s else: 2184s adata_src.write_zarr(tmp_path / "test_zarr_dir") 2184s adata = ad.read_zarr(tmp_path / "test_zarr_dir") 2184s assert isinstance(adata.obs["oanno1"].dtype, pd.CategoricalDtype) 2184s assert not isinstance(adata.obs["oanno2"].dtype, pd.CategoricalDtype) 2184s assert adata.obs.index.tolist() == ["name1", "name2", "name3"] 2184s assert adata.obs["oanno1"].cat.categories.tolist() == ["cat1", "cat2"] 2184s assert adata.obs["oanno1c"].cat.categories.tolist() == ["cat1"] 2184s assert isinstance(adata.raw.var["vanno2"].dtype, pd.CategoricalDtype) 2184s pd.testing.assert_frame_equal(adata.obs, adata_src.obs) 2184s pd.testing.assert_frame_equal(adata.var, adata_src.var) 2184s assert_equal(adata.var.index, adata_src.var.index) 2184s assert adata.var.index.dtype == adata_src.var.index.dtype 2184s 2184s # Dev. Note: 2184s # either load as same type or load the convert DaskArray to array 2184s # since we tested if assigned types and loaded types are DaskArray 2184s # this would also work if they work 2184s if isinstance(adata_src.raw.X, CSArray): 2184s > assert isinstance(adata.raw.X, CSMatrix) 2184s E AssertionError: assert False 2184s E + where False = isinstance(, scipy.sparse._csr.csr_matrix | scipy.sparse._csc.csc_matrix) 2184s E + where = .X 2184s 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 2184s 2184s tests/test_readwrite.py:176: AssertionError 2184s __________ test_readwrite_kitchensink[dataset_kwargs1-csr_array-zarr] __________ 2184s 2184s tmp_path = PosixPath('/tmp/pytest-of-ubuntu/pytest-0/test_readwrite_kitchensink_dat13') 2184s storage = 'zarr', typ = 2184s backing_h5ad = PosixPath('/tmp/pytest-of-ubuntu/pytest-0/test_readwrite_kitchensink_dat13/test.h5ad') 2184s dataset_kwargs = {'compression': 'gzip'} 2184s 2184s @pytest.mark.parametrize("storage", ["h5ad", "zarr"]) 2184s @pytest.mark.parametrize("typ", [np.array, csr_matrix, csr_array, as_dense_dask_array]) 2184s def test_readwrite_kitchensink(tmp_path, storage, typ, backing_h5ad, dataset_kwargs): 2184s X = typ(X_list) 2184s adata_src = ad.AnnData(X, obs=obs_dict, var=var_dict, uns=uns_dict) 2184s assert not isinstance(adata_src.obs["oanno1"].dtype, pd.CategoricalDtype) 2184s adata_src.raw = adata_src.copy() 2184s 2184s if storage == "h5ad": 2184s adata_src.write(backing_h5ad, **dataset_kwargs) 2184s adata_mid = ad.read_h5ad(backing_h5ad) 2184s adata_mid.write(tmp_path / "mid.h5ad", **dataset_kwargs) 2184s adata = ad.read_h5ad(tmp_path / "mid.h5ad") 2184s else: 2184s adata_src.write_zarr(tmp_path / "test_zarr_dir") 2184s adata = ad.read_zarr(tmp_path / "test_zarr_dir") 2184s assert isinstance(adata.obs["oanno1"].dtype, pd.CategoricalDtype) 2184s assert not isinstance(adata.obs["oanno2"].dtype, pd.CategoricalDtype) 2184s assert adata.obs.index.tolist() == ["name1", "name2", "name3"] 2184s assert adata.obs["oanno1"].cat.categories.tolist() == ["cat1", "cat2"] 2184s assert adata.obs["oanno1c"].cat.categories.tolist() == ["cat1"] 2184s assert isinstance(adata.raw.var["vanno2"].dtype, pd.CategoricalDtype) 2184s pd.testing.assert_frame_equal(adata.obs, adata_src.obs) 2184s pd.testing.assert_frame_equal(adata.var, adata_src.var) 2184s assert_equal(adata.var.index, adata_src.var.index) 2184s assert adata.var.index.dtype == adata_src.var.index.dtype 2184s 2184s # Dev. Note: 2184s # either load as same type or load the convert DaskArray to array 2184s # since we tested if assigned types and loaded types are DaskArray 2184s # this would also work if they work 2184s if isinstance(adata_src.raw.X, CSArray): 2184s > assert isinstance(adata.raw.X, CSMatrix) 2184s E AssertionError: assert False 2184s E + where False = isinstance(, scipy.sparse._csr.csr_matrix | scipy.sparse._csc.csc_matrix) 2184s E + where = .X 2184s 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', 'oanno1_colors', 'uns3', 'uns4'.raw 2184s 2184s tests/test_readwrite.py:176: AssertionError 2184s ___________________ test_read_write_maintain_obsmvarm_dtypes ___________________ 2184s 2184s rw = (AnnData object with n_obs × n_vars = 100 × 101 2184s obs: 'cat_unordered', 'obs_cat', 'int64', 'float64', 'uint8', 'boo...ray', 'sparse', 'sparse_array' 2184s obsp: 'array', 'sparse', 'sparse_array' 2184s varp: 'array', 'sparse', 'sparse_array') 2184s 2184s def test_read_write_maintain_obsmvarm_dtypes(rw): 2184s curr, orig = rw 2184s 2184s assert type(orig.obsm["array"]) is type(curr.obsm["array"]) 2184s assert np.all(orig.obsm["array"] == curr.obsm["array"]) 2184s assert np.all(orig.varm["array"] == curr.varm["array"]) 2184s > assert type(orig.obsm["sparse"]) is type(curr.obsm["sparse"]) 2184s E AssertionError: assert is 2184s E + where = type() 2184s E + and = type() 2184s 2184s tests/test_readwrite.py:207: AssertionError 2184s _____________________________ test_maintain_layers _____________________________ 2184s 2184s rw = (AnnData object with n_obs × n_vars = 100 × 101 2184s obs: 'cat_unordered', 'obs_cat', 'int64', 'float64', 'uint8', 'boo...ray', 'sparse', 'sparse_array' 2184s obsp: 'array', 'sparse', 'sparse_array' 2184s varp: 'array', 'sparse', 'sparse_array') 2184s 2184s def test_maintain_layers(rw): 2184s curr, orig = rw 2184s 2184s assert type(orig.layers["array"]) is type(curr.layers["array"]) 2184s assert np.all(orig.layers["array"] == curr.layers["array"]) 2184s > assert type(orig.layers["sparse"]) is type(curr.layers["sparse"]) 2184s E AssertionError: assert is 2184s E + where = type() 2184s E + and = type() 2184s 2184s tests/test_readwrite.py:220: AssertionError 2184s ________________ test_modify_view_component[cupy_array-layers] _________________ 2184s 2184s matrix_type = functools.partial(, typ=) 2184s mapping_name = 'layers' 2184s request = > 2184s 2184s def test_modify_view_component(matrix_type, mapping_name, request): 2184s adata = ad.AnnData( 2184s np.zeros((10, 10)), 2184s > **{mapping_name: dict(m=matrix_type(asarray(sparse.random(10, 10))))}, 2184s ) 2184s 2184s tests/test_views.py:161: 2184s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 2184s /usr/lib/python3.13/functools.py:934: in wrapper 2184s return dispatch(args[0].__class__)(*args, **kw) 2184s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 2184s 2184s val = array([[0. , 0. , 0. , 0. , 0. , 2184s 0. , 0. , 0. , 0. ..., 0. , 0. , 0. , 0. , 2184s 0. , 0. , 0. , 0. , 0. ]]) 2184s typ = 2184s 2184s @singledispatch 2184s def as_cupy(val, typ=None): 2184s """ 2184s Rough conversion function 2184s 2184s Will try to infer target type from input type if not specified. 2184s """ 2184s if typ is None: 2184s typ = resolve_cupy_type(val) 2184s 2184s if issubclass(typ, CupyArray): 2184s > import cupy as cp 2184s E ModuleNotFoundError: No module named 'cupy' 2184s 2184s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:1010: ModuleNotFoundError 2184s _________________ test_modify_view_component[cupy_array-obsm] __________________ 2184s 2184s matrix_type = functools.partial(, typ=) 2184s mapping_name = 'obsm' 2184s request = > 2184s 2184s def test_modify_view_component(matrix_type, mapping_name, request): 2184s adata = ad.AnnData( 2184s np.zeros((10, 10)), 2184s > **{mapping_name: dict(m=matrix_type(asarray(sparse.random(10, 10))))}, 2184s ) 2184s 2184s tests/test_views.py:161: 2184s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 2184s /usr/lib/python3.13/functools.py:934: in wrapper 2184s return dispatch(args[0].__class__)(*args, **kw) 2184s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 2184s 2184s val = array([[0. , 0. , 0. , 0. , 0. , 2184s 0. , 0. , 0. , 0. ..., 0. , 0. , 0. , 0. , 2184s 0. , 0. , 0. , 0. , 0. ]]) 2184s typ = 2184s 2184s @singledispatch 2184s def as_cupy(val, typ=None): 2184s """ 2184s Rough conversion function 2184s 2184s Will try to infer target type from input type if not specified. 2184s """ 2184s if typ is None: 2184s typ = resolve_cupy_type(val) 2184s 2184s if issubclass(typ, CupyArray): 2184s > import cupy as cp 2184s E ModuleNotFoundError: No module named 'cupy' 2184s 2184s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:1010: ModuleNotFoundError 2184s _________________ test_modify_view_component[cupy_array-varm] __________________ 2184s 2184s matrix_type = functools.partial(, typ=) 2184s mapping_name = 'varm' 2184s request = > 2184s 2184s def test_modify_view_component(matrix_type, mapping_name, request): 2184s adata = ad.AnnData( 2184s np.zeros((10, 10)), 2184s > **{mapping_name: dict(m=matrix_type(asarray(sparse.random(10, 10))))}, 2184s ) 2184s 2184s tests/test_views.py:161: 2184s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 2184s /usr/lib/python3.13/functools.py:934: in wrapper 2184s return dispatch(args[0].__class__)(*args, **kw) 2184s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 2184s 2184s val = array([[0. , 0. , 0. , 0. , 0. , 0. , 2184s 0. , 0. , 0. , 0. ...0. , 0. , 0. , 0. , 0. , 0. , 2184s 0. , 0. , 0. , 0. ]]) 2184s typ = 2184s 2184s @singledispatch 2184s def as_cupy(val, typ=None): 2184s """ 2184s Rough conversion function 2184s 2184s Will try to infer target type from input type if not specified. 2184s """ 2184s if typ is None: 2184s typ = resolve_cupy_type(val) 2184s 2184s if issubclass(typ, CupyArray): 2184s > import cupy as cp 2184s E ModuleNotFoundError: No module named 'cupy' 2184s 2184s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:1010: ModuleNotFoundError 2184s _________________ test_modify_view_component[cupy_csr-layers] __________________ 2184s 2184s matrix_type = functools.partial(, typ=) 2184s mapping_name = 'layers' 2184s request = > 2184s 2184s def test_modify_view_component(matrix_type, mapping_name, request): 2184s adata = ad.AnnData( 2184s np.zeros((10, 10)), 2184s > **{mapping_name: dict(m=matrix_type(asarray(sparse.random(10, 10))))}, 2184s ) 2184s 2184s tests/test_views.py:161: 2184s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 2184s /usr/lib/python3.13/functools.py:934: in wrapper 2184s return dispatch(args[0].__class__)(*args, **kw) 2184s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 2184s 2184s val = array([[0. , 0. , 0. , 0. , 0. , 2184s 0. , 0. , 0. , 0. ..., 0. , 0. , 0. , 0. , 2184s 0. , 0. , 0. , 0. , 0. ]]) 2184s typ = 2184s 2184s @singledispatch 2184s def as_cupy(val, typ=None): 2184s """ 2184s Rough conversion function 2184s 2184s Will try to infer target type from input type if not specified. 2184s """ 2184s if typ is None: 2184s typ = resolve_cupy_type(val) 2184s 2184s if issubclass(typ, CupyArray): 2184s import cupy as cp 2184s 2184s if isinstance(val, CSMatrix): 2184s val = val.toarray() 2184s return cp.array(val) 2184s elif issubclass(typ, CupyCSRMatrix): 2184s > import cupy as cp 2184s E ModuleNotFoundError: No module named 'cupy' 2184s 2184s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:1016: ModuleNotFoundError 2184s __________________ test_modify_view_component[cupy_csr-obsm] ___________________ 2184s 2184s matrix_type = functools.partial(, typ=) 2184s mapping_name = 'obsm' 2184s request = > 2184s 2184s def test_modify_view_component(matrix_type, mapping_name, request): 2184s adata = ad.AnnData( 2184s np.zeros((10, 10)), 2184s > **{mapping_name: dict(m=matrix_type(asarray(sparse.random(10, 10))))}, 2184s ) 2184s 2184s tests/test_views.py:161: 2184s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 2184s /usr/lib/python3.13/functools.py:934: in wrapper 2184s return dispatch(args[0].__class__)(*args, **kw) 2184s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 2184s 2184s val = array([[0. , 0. , 0. , 0. , 0. , 2184s 0. , 0. , 0. , 0. ..., 0. , 0. , 0. , 0. , 2184s 0. , 0. , 0. , 0. , 0. ]]) 2184s typ = 2184s 2184s @singledispatch 2184s def as_cupy(val, typ=None): 2184s """ 2184s Rough conversion function 2184s 2184s Will try to infer target type from input type if not specified. 2184s """ 2184s if typ is None: 2184s typ = resolve_cupy_type(val) 2184s 2184s if issubclass(typ, CupyArray): 2184s import cupy as cp 2184s 2184s if isinstance(val, CSMatrix): 2184s val = val.toarray() 2184s return cp.array(val) 2184s elif issubclass(typ, CupyCSRMatrix): 2184s > import cupy as cp 2184s E ModuleNotFoundError: No module named 'cupy' 2184s 2184s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:1016: ModuleNotFoundError 2184s __________________ test_modify_view_component[cupy_csr-varm] ___________________ 2184s 2184s matrix_type = functools.partial(, typ=) 2184s mapping_name = 'varm' 2184s request = > 2184s 2184s def test_modify_view_component(matrix_type, mapping_name, request): 2184s adata = ad.AnnData( 2184s np.zeros((10, 10)), 2184s > **{mapping_name: dict(m=matrix_type(asarray(sparse.random(10, 10))))}, 2184s ) 2184s 2184s tests/test_views.py:161: 2184s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 2184s /usr/lib/python3.13/functools.py:934: in wrapper 2184s return dispatch(args[0].__class__)(*args, **kw) 2184s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 2184s 2184s val = array([[0. , 0. , 0. , 0. , 0. , 2184s 0. , 0. , 0. , 0. ..., 0. , 0. , 0. , 0. , 2184s 0. , 0. , 0. , 0. , 0. ]]) 2184s typ = 2184s 2184s @singledispatch 2184s def as_cupy(val, typ=None): 2184s """ 2184s Rough conversion function 2184s 2184s Will try to infer target type from input type if not specified. 2184s """ 2184s if typ is None: 2184s typ = resolve_cupy_type(val) 2184s 2184s if issubclass(typ, CupyArray): 2184s import cupy as cp 2184s 2184s if isinstance(val, CSMatrix): 2184s val = val.toarray() 2184s return cp.array(val) 2184s elif issubclass(typ, CupyCSRMatrix): 2184s > import cupy as cp 2184s E ModuleNotFoundError: No module named 'cupy' 2184s 2184s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:1016: ModuleNotFoundError 2184s _________________ test_modify_view_component[cupy_csc-layers] __________________ 2184s 2184s matrix_type = functools.partial(, typ=) 2184s mapping_name = 'layers' 2184s request = > 2184s 2184s def test_modify_view_component(matrix_type, mapping_name, request): 2184s adata = ad.AnnData( 2184s np.zeros((10, 10)), 2184s > **{mapping_name: dict(m=matrix_type(asarray(sparse.random(10, 10))))}, 2184s ) 2184s 2184s tests/test_views.py:161: 2184s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 2184s /usr/lib/python3.13/functools.py:934: in wrapper 2184s return dispatch(args[0].__class__)(*args, **kw) 2184s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 2184s 2184s val = array([[0. , 0. , 0. , 0. , 0. , 2184s 0. , 0. , 0. , 0.2157..., 0. , 0. , 0. , 0. , 2184s 0. , 0. , 0. , 0. , 0. ]]) 2184s typ = 2184s 2184s @singledispatch 2184s def as_cupy(val, typ=None): 2184s """ 2184s Rough conversion function 2184s 2184s Will try to infer target type from input type if not specified. 2184s """ 2184s if typ is None: 2184s typ = resolve_cupy_type(val) 2184s 2184s if issubclass(typ, CupyArray): 2184s import cupy as cp 2184s 2184s if isinstance(val, CSMatrix): 2184s val = val.toarray() 2184s return cp.array(val) 2184s elif issubclass(typ, CupyCSRMatrix): 2184s import cupy as cp 2184s import cupyx.scipy.sparse as cpsparse 2184s 2184s if isinstance(val, np.ndarray): 2184s return cpsparse.csr_matrix(cp.array(val)) 2184s else: 2184s return cpsparse.csr_matrix(val) 2184s elif issubclass(typ, CupyCSCMatrix): 2184s > import cupy as cp 2184s E ModuleNotFoundError: No module named 'cupy' 2184s 2184s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:1024: ModuleNotFoundError 2184s __________________ test_modify_view_component[cupy_csc-obsm] ___________________ 2184s 2184s matrix_type = functools.partial(, typ=) 2184s mapping_name = 'obsm' 2184s request = > 2184s 2184s def test_modify_view_component(matrix_type, mapping_name, request): 2184s adata = ad.AnnData( 2184s np.zeros((10, 10)), 2184s > **{mapping_name: dict(m=matrix_type(asarray(sparse.random(10, 10))))}, 2184s ) 2184s 2184s tests/test_views.py:161: 2184s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 2184s /usr/lib/python3.13/functools.py:934: in wrapper 2184s return dispatch(args[0].__class__)(*args, **kw) 2184s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 2184s 2184s val = array([[0. , 0. , 0. , 0. , 0. , 2184s 0.84088716, 0. , 0. , 0. ..., 0. , 0. , 0. , 0. , 2184s 0. , 0. , 0. , 0. , 0. ]]) 2184s typ = 2184s 2184s @singledispatch 2184s def as_cupy(val, typ=None): 2184s """ 2184s Rough conversion function 2184s 2184s Will try to infer target type from input type if not specified. 2184s """ 2184s if typ is None: 2184s typ = resolve_cupy_type(val) 2184s 2184s if issubclass(typ, CupyArray): 2184s import cupy as cp 2184s 2184s if isinstance(val, CSMatrix): 2184s val = val.toarray() 2184s return cp.array(val) 2184s elif issubclass(typ, CupyCSRMatrix): 2184s import cupy as cp 2184s import cupyx.scipy.sparse as cpsparse 2184s 2184s if isinstance(val, np.ndarray): 2184s return cpsparse.csr_matrix(cp.array(val)) 2184s else: 2184s return cpsparse.csr_matrix(val) 2184s elif issubclass(typ, CupyCSCMatrix): 2184s > import cupy as cp 2184s E ModuleNotFoundError: No module named 'cupy' 2184s 2184s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:1024: ModuleNotFoundError 2184s __________________ test_modify_view_component[cupy_csc-varm] ___________________ 2184s 2184s matrix_type = functools.partial(, typ=) 2184s mapping_name = 'varm' 2184s request = > 2184s 2184s def test_modify_view_component(matrix_type, mapping_name, request): 2184s adata = ad.AnnData( 2184s np.zeros((10, 10)), 2184s > **{mapping_name: dict(m=matrix_type(asarray(sparse.random(10, 10))))}, 2184s ) 2184s 2184s tests/test_views.py:161: 2184s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 2184s /usr/lib/python3.13/functools.py:934: in wrapper 2184s return dispatch(args[0].__class__)(*args, **kw) 2184s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 2184s 2184s val = array([[0. , 0. , 0. , 0. , 0. , 2184s 0. , 0. , 0. , 0. ..., 0. , 0. , 0. , 0. , 2184s 0. , 0. , 0. , 0. , 0. ]]) 2184s typ = 2184s 2184s @singledispatch 2184s def as_cupy(val, typ=None): 2184s """ 2184s Rough conversion function 2184s 2184s Will try to infer target type from input type if not specified. 2184s """ 2184s if typ is None: 2184s typ = resolve_cupy_type(val) 2184s 2184s if issubclass(typ, CupyArray): 2184s import cupy as cp 2184s 2184s if isinstance(val, CSMatrix): 2184s val = val.toarray() 2184s return cp.array(val) 2184s elif issubclass(typ, CupyCSRMatrix): 2184s import cupy as cp 2184s import cupyx.scipy.sparse as cpsparse 2184s 2184s if isinstance(val, np.ndarray): 2184s return cpsparse.csr_matrix(cp.array(val)) 2184s else: 2184s return cpsparse.csr_matrix(val) 2184s elif issubclass(typ, CupyCSCMatrix): 2184s > import cupy as cp 2184s E ModuleNotFoundError: No module named 'cupy' 2184s 2184s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:1024: ModuleNotFoundError 2184s ______________ test_set_scalar_subset_X[cupy_array-array_subset] _______________ 2184s 2184s matrix_type = functools.partial(, typ=) 2184s subset_func = 2184s 2184s @IGNORE_SPARSE_EFFICIENCY_WARNING 2184s def test_set_scalar_subset_X(matrix_type, subset_func): 2184s > adata = ad.AnnData(matrix_type(np.zeros((10, 10)))) 2184s 2184s tests/test_views.py:369: 2184s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 2184s /usr/lib/python3.13/functools.py:934: in wrapper 2184s return dispatch(args[0].__class__)(*args, **kw) 2184s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 2184s 2184s val = array([[0., 0., 0., 0., 0., 0., 0., 0., 0., 0.], 2184s [0., 0., 0., 0., 0., 0., 0., 0., 0., 0.], 2184s [0., 0., 0., ...0., 0., 0., 0., 0.], 2184s [0., 0., 0., 0., 0., 0., 0., 0., 0., 0.], 2184s [0., 0., 0., 0., 0., 0., 0., 0., 0., 0.]]) 2184s typ = 2184s 2184s @singledispatch 2184s def as_cupy(val, typ=None): 2184s """ 2184s Rough conversion function 2184s 2184s Will try to infer target type from input type if not specified. 2184s """ 2184s if typ is None: 2184s typ = resolve_cupy_type(val) 2184s 2184s if issubclass(typ, CupyArray): 2184s > import cupy as cp 2184s E ModuleNotFoundError: No module named 'cupy' 2184s 2184s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:1010: ModuleNotFoundError 2184s ______________ test_set_scalar_subset_X[cupy_array-slice_subset] _______________ 2184s 2184s matrix_type = functools.partial(, typ=) 2184s subset_func = 2184s 2184s @IGNORE_SPARSE_EFFICIENCY_WARNING 2184s def test_set_scalar_subset_X(matrix_type, subset_func): 2184s > adata = ad.AnnData(matrix_type(np.zeros((10, 10)))) 2184s 2184s tests/test_views.py:369: 2184s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 2184s /usr/lib/python3.13/functools.py:934: in wrapper 2184s return dispatch(args[0].__class__)(*args, **kw) 2184s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 2184s 2184s val = array([[0., 0., 0., 0., 0., 0., 0., 0., 0., 0.], 2184s [0., 0., 0., 0., 0., 0., 0., 0., 0., 0.], 2184s [0., 0., 0., ...0., 0., 0., 0., 0.], 2184s [0., 0., 0., 0., 0., 0., 0., 0., 0., 0.], 2184s [0., 0., 0., 0., 0., 0., 0., 0., 0., 0.]]) 2184s typ = 2184s 2184s @singledispatch 2184s def as_cupy(val, typ=None): 2184s """ 2184s Rough conversion function 2184s 2184s Will try to infer target type from input type if not specified. 2184s """ 2184s if typ is None: 2184s typ = resolve_cupy_type(val) 2184s 2184s if issubclass(typ, CupyArray): 2184s > import cupy as cp 2184s E ModuleNotFoundError: No module named 'cupy' 2184s 2184s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:1010: ModuleNotFoundError 2184s ______________ test_set_scalar_subset_X[cupy_array-single_subset] ______________ 2184s 2184s matrix_type = functools.partial(, typ=) 2184s subset_func = 2184s 2184s @IGNORE_SPARSE_EFFICIENCY_WARNING 2184s def test_set_scalar_subset_X(matrix_type, subset_func): 2184s > adata = ad.AnnData(matrix_type(np.zeros((10, 10)))) 2184s 2184s tests/test_views.py:369: 2184s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 2184s /usr/lib/python3.13/functools.py:934: in wrapper 2184s return dispatch(args[0].__class__)(*args, **kw) 2184s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 2184s 2184s val = array([[0., 0., 0., 0., 0., 0., 0., 0., 0., 0.], 2184s [0., 0., 0., 0., 0., 0., 0., 0., 0., 0.], 2184s [0., 0., 0., ...0., 0., 0., 0., 0.], 2184s [0., 0., 0., 0., 0., 0., 0., 0., 0., 0.], 2184s [0., 0., 0., 0., 0., 0., 0., 0., 0., 0.]]) 2184s typ = 2184s 2184s @singledispatch 2184s def as_cupy(val, typ=None): 2184s """ 2184s Rough conversion function 2184s 2184s Will try to infer target type from input type if not specified. 2184s """ 2184s if typ is None: 2184s typ = resolve_cupy_type(val) 2184s 2184s if issubclass(typ, CupyArray): 2184s > import cupy as cp 2184s E ModuleNotFoundError: No module named 'cupy' 2184s 2184s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:1010: ModuleNotFoundError 2184s ____________ test_set_scalar_subset_X[cupy_array-array_int_subset] _____________ 2184s 2184s matrix_type = functools.partial(, typ=) 2184s subset_func = 2184s 2184s @IGNORE_SPARSE_EFFICIENCY_WARNING 2184s def test_set_scalar_subset_X(matrix_type, subset_func): 2184s > adata = ad.AnnData(matrix_type(np.zeros((10, 10)))) 2184s 2184s tests/test_views.py:369: 2184s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 2184s /usr/lib/python3.13/functools.py:934: in wrapper 2184s return dispatch(args[0].__class__)(*args, **kw) 2184s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 2184s 2184s val = array([[0., 0., 0., 0., 0., 0., 0., 0., 0., 0.], 2184s [0., 0., 0., 0., 0., 0., 0., 0., 0., 0.], 2184s [0., 0., 0., ...0., 0., 0., 0., 0.], 2184s [0., 0., 0., 0., 0., 0., 0., 0., 0., 0.], 2184s [0., 0., 0., 0., 0., 0., 0., 0., 0., 0.]]) 2184s typ = 2184s 2184s @singledispatch 2184s def as_cupy(val, typ=None): 2184s """ 2184s Rough conversion function 2184s 2184s Will try to infer target type from input type if not specified. 2184s """ 2184s if typ is None: 2184s typ = resolve_cupy_type(val) 2184s 2184s if issubclass(typ, CupyArray): 2184s > import cupy as cp 2184s E ModuleNotFoundError: No module named 'cupy' 2184s 2184s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:1010: ModuleNotFoundError 2184s _____________ test_set_scalar_subset_X[cupy_array-list_int_subset] _____________ 2184s 2184s matrix_type = functools.partial(, typ=) 2184s subset_func = 2184s 2184s @IGNORE_SPARSE_EFFICIENCY_WARNING 2184s def test_set_scalar_subset_X(matrix_type, subset_func): 2184s > adata = ad.AnnData(matrix_type(np.zeros((10, 10)))) 2184s 2184s tests/test_views.py:369: 2184s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 2184s /usr/lib/python3.13/functools.py:934: in wrapper 2184s return dispatch(args[0].__class__)(*args, **kw) 2184s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 2184s 2184s val = array([[0., 0., 0., 0., 0., 0., 0., 0., 0., 0.], 2184s [0., 0., 0., 0., 0., 0., 0., 0., 0., 0.], 2184s [0., 0., 0., ...0., 0., 0., 0., 0.], 2184s [0., 0., 0., 0., 0., 0., 0., 0., 0., 0.], 2184s [0., 0., 0., 0., 0., 0., 0., 0., 0., 0.]]) 2184s typ = 2184s 2184s @singledispatch 2184s def as_cupy(val, typ=None): 2184s """ 2184s Rough conversion function 2184s 2184s Will try to infer target type from input type if not specified. 2184s """ 2184s if typ is None: 2184s typ = resolve_cupy_type(val) 2184s 2184s if issubclass(typ, CupyArray): 2184s > import cupy as cp 2184s E ModuleNotFoundError: No module named 'cupy' 2184s 2184s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:1010: ModuleNotFoundError 2184s ____________ test_set_scalar_subset_X[cupy_array-array_bool_subset] ____________ 2184s 2184s matrix_type = functools.partial(, typ=) 2184s subset_func = 2184s 2184s @IGNORE_SPARSE_EFFICIENCY_WARNING 2184s def test_set_scalar_subset_X(matrix_type, subset_func): 2184s > adata = ad.AnnData(matrix_type(np.zeros((10, 10)))) 2184s 2184s tests/test_views.py:369: 2184s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 2184s /usr/lib/python3.13/functools.py:934: in wrapper 2184s return dispatch(args[0].__class__)(*args, **kw) 2184s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 2184s 2184s val = array([[0., 0., 0., 0., 0., 0., 0., 0., 0., 0.], 2184s [0., 0., 0., 0., 0., 0., 0., 0., 0., 0.], 2184s [0., 0., 0., ...0., 0., 0., 0., 0.], 2184s [0., 0., 0., 0., 0., 0., 0., 0., 0., 0.], 2184s [0., 0., 0., 0., 0., 0., 0., 0., 0., 0.]]) 2184s typ = 2184s 2184s @singledispatch 2184s def as_cupy(val, typ=None): 2184s """ 2184s Rough conversion function 2184s 2184s Will try to infer target type from input type if not specified. 2184s """ 2184s if typ is None: 2184s typ = resolve_cupy_type(val) 2184s 2184s if issubclass(typ, CupyArray): 2184s > import cupy as cp 2184s E ModuleNotFoundError: No module named 'cupy' 2184s 2184s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:1010: ModuleNotFoundError 2184s ____________ test_set_scalar_subset_X[cupy_array-list_bool_subset] _____________ 2184s 2184s matrix_type = functools.partial(, typ=) 2184s subset_func = 2184s 2184s @IGNORE_SPARSE_EFFICIENCY_WARNING 2184s def test_set_scalar_subset_X(matrix_type, subset_func): 2184s > adata = ad.AnnData(matrix_type(np.zeros((10, 10)))) 2184s 2184s tests/test_views.py:369: 2184s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 2184s /usr/lib/python3.13/functools.py:934: in wrapper 2184s return dispatch(args[0].__class__)(*args, **kw) 2184s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 2184s 2184s val = array([[0., 0., 0., 0., 0., 0., 0., 0., 0., 0.], 2184s [0., 0., 0., 0., 0., 0., 0., 0., 0., 0.], 2184s [0., 0., 0., ...0., 0., 0., 0., 0.], 2184s [0., 0., 0., 0., 0., 0., 0., 0., 0., 0.], 2184s [0., 0., 0., 0., 0., 0., 0., 0., 0., 0.]]) 2184s typ = 2184s 2184s @singledispatch 2184s def as_cupy(val, typ=None): 2184s """ 2184s Rough conversion function 2184s 2184s Will try to infer target type from input type if not specified. 2184s """ 2184s if typ is None: 2184s typ = resolve_cupy_type(val) 2184s 2184s if issubclass(typ, CupyArray): 2184s > import cupy as cp 2184s E ModuleNotFoundError: No module named 'cupy' 2184s 2184s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:1010: ModuleNotFoundError 2184s ___________ test_set_scalar_subset_X[cupy_array-matrix_bool_subset] ____________ 2184s 2184s matrix_type = functools.partial(, typ=) 2184s subset_func = 2184s 2184s @IGNORE_SPARSE_EFFICIENCY_WARNING 2184s def test_set_scalar_subset_X(matrix_type, subset_func): 2184s > adata = ad.AnnData(matrix_type(np.zeros((10, 10)))) 2184s 2184s tests/test_views.py:369: 2184s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 2184s /usr/lib/python3.13/functools.py:934: in wrapper 2184s return dispatch(args[0].__class__)(*args, **kw) 2184s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 2184s 2184s val = array([[0., 0., 0., 0., 0., 0., 0., 0., 0., 0.], 2184s [0., 0., 0., 0., 0., 0., 0., 0., 0., 0.], 2184s [0., 0., 0., ...0., 0., 0., 0., 0.], 2184s [0., 0., 0., 0., 0., 0., 0., 0., 0., 0.], 2184s [0., 0., 0., 0., 0., 0., 0., 0., 0., 0.]]) 2184s typ = 2184s 2184s @singledispatch 2184s def as_cupy(val, typ=None): 2184s """ 2184s Rough conversion function 2184s 2184s Will try to infer target type from input type if not specified. 2184s """ 2184s if typ is None: 2184s typ = resolve_cupy_type(val) 2184s 2184s if issubclass(typ, CupyArray): 2184s > import cupy as cp 2184s E ModuleNotFoundError: No module named 'cupy' 2184s 2184s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:1010: ModuleNotFoundError 2184s __________ test_set_scalar_subset_X[cupy_array-spmatrix_bool_subset] ___________ 2184s 2184s matrix_type = functools.partial(, typ=) 2184s subset_func = 2184s 2184s @IGNORE_SPARSE_EFFICIENCY_WARNING 2184s def test_set_scalar_subset_X(matrix_type, subset_func): 2184s > adata = ad.AnnData(matrix_type(np.zeros((10, 10)))) 2184s 2184s tests/test_views.py:369: 2184s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 2184s /usr/lib/python3.13/functools.py:934: in wrapper 2184s return dispatch(args[0].__class__)(*args, **kw) 2184s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 2184s 2184s val = array([[0., 0., 0., 0., 0., 0., 0., 0., 0., 0.], 2184s [0., 0., 0., 0., 0., 0., 0., 0., 0., 0.], 2184s [0., 0., 0., ...0., 0., 0., 0., 0.], 2184s [0., 0., 0., 0., 0., 0., 0., 0., 0., 0.], 2184s [0., 0., 0., 0., 0., 0., 0., 0., 0., 0.]]) 2184s typ = 2184s 2184s @singledispatch 2184s def as_cupy(val, typ=None): 2184s """ 2184s Rough conversion function 2184s 2184s Will try to infer target type from input type if not specified. 2184s """ 2184s if typ is None: 2184s typ = resolve_cupy_type(val) 2184s 2184s if issubclass(typ, CupyArray): 2184s > import cupy as cp 2184s E ModuleNotFoundError: No module named 'cupy' 2184s 2184s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:1010: ModuleNotFoundError 2184s ___________ test_set_scalar_subset_X[cupy_array-sparray_bool_subset] ___________ 2184s 2184s matrix_type = functools.partial(, typ=) 2184s subset_func = 2184s 2184s @IGNORE_SPARSE_EFFICIENCY_WARNING 2184s def test_set_scalar_subset_X(matrix_type, subset_func): 2184s > adata = ad.AnnData(matrix_type(np.zeros((10, 10)))) 2184s 2184s tests/test_views.py:369: 2184s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 2184s /usr/lib/python3.13/functools.py:934: in wrapper 2184s return dispatch(args[0].__class__)(*args, **kw) 2184s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 2184s 2184s val = array([[0., 0., 0., 0., 0., 0., 0., 0., 0., 0.], 2184s [0., 0., 0., 0., 0., 0., 0., 0., 0., 0.], 2184s [0., 0., 0., ...0., 0., 0., 0., 0.], 2184s [0., 0., 0., 0., 0., 0., 0., 0., 0., 0.], 2184s [0., 0., 0., 0., 0., 0., 0., 0., 0., 0.]]) 2184s typ = 2184s 2184s @singledispatch 2184s def as_cupy(val, typ=None): 2184s """ 2184s Rough conversion function 2184s 2184s Will try to infer target type from input type if not specified. 2184s """ 2184s if typ is None: 2184s typ = resolve_cupy_type(val) 2184s 2184s if issubclass(typ, CupyArray): 2184s > import cupy as cp 2184s E ModuleNotFoundError: No module named 'cupy' 2184s 2184s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:1010: ModuleNotFoundError 2184s _______________ test_set_scalar_subset_X[cupy_csr-array_subset] ________________ 2184s 2184s matrix_type = functools.partial(, typ=) 2184s subset_func = 2184s 2184s @IGNORE_SPARSE_EFFICIENCY_WARNING 2184s def test_set_scalar_subset_X(matrix_type, subset_func): 2184s > adata = ad.AnnData(matrix_type(np.zeros((10, 10)))) 2184s 2184s tests/test_views.py:369: 2184s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 2184s /usr/lib/python3.13/functools.py:934: in wrapper 2184s return dispatch(args[0].__class__)(*args, **kw) 2184s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 2184s 2184s val = array([[0., 0., 0., 0., 0., 0., 0., 0., 0., 0.], 2184s [0., 0., 0., 0., 0., 0., 0., 0., 0., 0.], 2184s [0., 0., 0., ...0., 0., 0., 0., 0.], 2184s [0., 0., 0., 0., 0., 0., 0., 0., 0., 0.], 2184s [0., 0., 0., 0., 0., 0., 0., 0., 0., 0.]]) 2184s typ = 2184s 2184s @singledispatch 2184s def as_cupy(val, typ=None): 2184s """ 2184s Rough conversion function 2184s 2184s Will try to infer target type from input type if not specified. 2184s """ 2184s if typ is None: 2184s typ = resolve_cupy_type(val) 2184s 2184s if issubclass(typ, CupyArray): 2184s import cupy as cp 2184s 2184s if isinstance(val, CSMatrix): 2184s val = val.toarray() 2184s return cp.array(val) 2184s elif issubclass(typ, CupyCSRMatrix): 2184s > import cupy as cp 2184s E ModuleNotFoundError: No module named 'cupy' 2184s 2184s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:1016: ModuleNotFoundError 2184s _______________ test_set_scalar_subset_X[cupy_csr-slice_subset] ________________ 2184s 2184s matrix_type = functools.partial(, typ=) 2184s subset_func = 2184s 2184s @IGNORE_SPARSE_EFFICIENCY_WARNING 2184s def test_set_scalar_subset_X(matrix_type, subset_func): 2184s > adata = ad.AnnData(matrix_type(np.zeros((10, 10)))) 2184s 2184s tests/test_views.py:369: 2184s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 2184s /usr/lib/python3.13/functools.py:934: in wrapper 2184s return dispatch(args[0].__class__)(*args, **kw) 2184s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 2184s 2184s val = array([[0., 0., 0., 0., 0., 0., 0., 0., 0., 0.], 2184s [0., 0., 0., 0., 0., 0., 0., 0., 0., 0.], 2184s [0., 0., 0., ...0., 0., 0., 0., 0.], 2184s [0., 0., 0., 0., 0., 0., 0., 0., 0., 0.], 2184s [0., 0., 0., 0., 0., 0., 0., 0., 0., 0.]]) 2184s typ = 2184s 2184s @singledispatch 2184s def as_cupy(val, typ=None): 2184s """ 2184s Rough conversion function 2184s 2184s Will try to infer target type from input type if not specified. 2184s """ 2184s if typ is None: 2184s typ = resolve_cupy_type(val) 2184s 2184s if issubclass(typ, CupyArray): 2184s import cupy as cp 2184s 2184s if isinstance(val, CSMatrix): 2184s val = val.toarray() 2184s return cp.array(val) 2184s elif issubclass(typ, CupyCSRMatrix): 2184s > import cupy as cp 2184s E ModuleNotFoundError: No module named 'cupy' 2184s 2184s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:1016: ModuleNotFoundError 2184s _______________ test_set_scalar_subset_X[cupy_csr-single_subset] _______________ 2184s 2184s matrix_type = functools.partial(, typ=) 2184s subset_func = 2184s 2184s @IGNORE_SPARSE_EFFICIENCY_WARNING 2184s def test_set_scalar_subset_X(matrix_type, subset_func): 2184s > adata = ad.AnnData(matrix_type(np.zeros((10, 10)))) 2184s 2184s tests/test_views.py:369: 2184s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 2184s /usr/lib/python3.13/functools.py:934: in wrapper 2184s return dispatch(args[0].__class__)(*args, **kw) 2184s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 2184s 2184s val = array([[0., 0., 0., 0., 0., 0., 0., 0., 0., 0.], 2184s [0., 0., 0., 0., 0., 0., 0., 0., 0., 0.], 2184s [0., 0., 0., ...0., 0., 0., 0., 0.], 2184s [0., 0., 0., 0., 0., 0., 0., 0., 0., 0.], 2184s [0., 0., 0., 0., 0., 0., 0., 0., 0., 0.]]) 2184s typ = 2184s 2184s @singledispatch 2184s def as_cupy(val, typ=None): 2184s """ 2184s Rough conversion function 2184s 2184s Will try to infer target type from input type if not specified. 2184s """ 2184s if typ is None: 2184s typ = resolve_cupy_type(val) 2184s 2184s if issubclass(typ, CupyArray): 2184s import cupy as cp 2184s 2184s if isinstance(val, CSMatrix): 2184s val = val.toarray() 2184s return cp.array(val) 2184s elif issubclass(typ, CupyCSRMatrix): 2184s > import cupy as cp 2184s E ModuleNotFoundError: No module named 'cupy' 2184s 2184s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:1016: ModuleNotFoundError 2184s _____________ test_set_scalar_subset_X[cupy_csr-array_int_subset] ______________ 2184s 2184s matrix_type = functools.partial(, typ=) 2184s subset_func = 2184s 2184s @IGNORE_SPARSE_EFFICIENCY_WARNING 2184s def test_set_scalar_subset_X(matrix_type, subset_func): 2184s > adata = ad.AnnData(matrix_type(np.zeros((10, 10)))) 2184s 2184s tests/test_views.py:369: 2184s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 2184s /usr/lib/python3.13/functools.py:934: in wrapper 2184s return dispatch(args[0].__class__)(*args, **kw) 2184s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 2184s 2184s val = array([[0., 0., 0., 0., 0., 0., 0., 0., 0., 0.], 2184s [0., 0., 0., 0., 0., 0., 0., 0., 0., 0.], 2184s [0., 0., 0., ...0., 0., 0., 0., 0.], 2184s [0., 0., 0., 0., 0., 0., 0., 0., 0., 0.], 2184s [0., 0., 0., 0., 0., 0., 0., 0., 0., 0.]]) 2184s typ = 2184s 2184s @singledispatch 2184s def as_cupy(val, typ=None): 2184s """ 2184s Rough conversion function 2184s 2184s Will try to infer target type from input type if not specified. 2184s """ 2184s if typ is None: 2184s typ = resolve_cupy_type(val) 2184s 2184s if issubclass(typ, CupyArray): 2184s import cupy as cp 2184s 2184s if isinstance(val, CSMatrix): 2184s val = val.toarray() 2184s return cp.array(val) 2184s elif issubclass(typ, CupyCSRMatrix): 2184s > import cupy as cp 2184s E ModuleNotFoundError: No module named 'cupy' 2184s 2184s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:1016: ModuleNotFoundError 2184s ______________ test_set_scalar_subset_X[cupy_csr-list_int_subset] ______________ 2184s 2184s matrix_type = functools.partial(, typ=) 2184s subset_func = 2184s 2184s @IGNORE_SPARSE_EFFICIENCY_WARNING 2184s def test_set_scalar_subset_X(matrix_type, subset_func): 2184s > adata = ad.AnnData(matrix_type(np.zeros((10, 10)))) 2184s 2184s tests/test_views.py:369: 2184s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 2184s /usr/lib/python3.13/functools.py:934: in wrapper 2184s return dispatch(args[0].__class__)(*args, **kw) 2184s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 2184s 2184s val = array([[0., 0., 0., 0., 0., 0., 0., 0., 0., 0.], 2184s [0., 0., 0., 0., 0., 0., 0., 0., 0., 0.], 2184s [0., 0., 0., ...0., 0., 0., 0., 0.], 2184s [0., 0., 0., 0., 0., 0., 0., 0., 0., 0.], 2184s [0., 0., 0., 0., 0., 0., 0., 0., 0., 0.]]) 2184s typ = 2184s 2184s @singledispatch 2184s def as_cupy(val, typ=None): 2184s """ 2184s Rough conversion function 2184s 2184s Will try to infer target type from input type if not specified. 2184s """ 2184s if typ is None: 2184s typ = resolve_cupy_type(val) 2184s 2184s if issubclass(typ, CupyArray): 2184s import cupy as cp 2184s 2184s if isinstance(val, CSMatrix): 2184s val = val.toarray() 2184s return cp.array(val) 2184s elif issubclass(typ, CupyCSRMatrix): 2184s > import cupy as cp 2184s E ModuleNotFoundError: No module named 'cupy' 2184s 2184s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:1016: ModuleNotFoundError 2184s _____________ test_set_scalar_subset_X[cupy_csr-array_bool_subset] _____________ 2184s 2184s matrix_type = functools.partial(, typ=) 2184s subset_func = 2184s 2184s @IGNORE_SPARSE_EFFICIENCY_WARNING 2184s def test_set_scalar_subset_X(matrix_type, subset_func): 2184s > adata = ad.AnnData(matrix_type(np.zeros((10, 10)))) 2184s 2184s tests/test_views.py:369: 2184s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 2184s /usr/lib/python3.13/functools.py:934: in wrapper 2184s return dispatch(args[0].__class__)(*args, **kw) 2184s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 2184s 2184s val = array([[0., 0., 0., 0., 0., 0., 0., 0., 0., 0.], 2184s [0., 0., 0., 0., 0., 0., 0., 0., 0., 0.], 2184s [0., 0., 0., ...0., 0., 0., 0., 0.], 2184s [0., 0., 0., 0., 0., 0., 0., 0., 0., 0.], 2184s [0., 0., 0., 0., 0., 0., 0., 0., 0., 0.]]) 2184s typ = 2184s 2184s @singledispatch 2184s def as_cupy(val, typ=None): 2184s """ 2184s Rough conversion function 2184s 2184s Will try to infer target type from input type if not specified. 2184s """ 2184s if typ is None: 2184s typ = resolve_cupy_type(val) 2184s 2184s if issubclass(typ, CupyArray): 2184s import cupy as cp 2184s 2184s if isinstance(val, CSMatrix): 2184s val = val.toarray() 2184s return cp.array(val) 2184s elif issubclass(typ, CupyCSRMatrix): 2184s > import cupy as cp 2184s E ModuleNotFoundError: No module named 'cupy' 2184s 2184s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:1016: ModuleNotFoundError 2184s _____________ test_set_scalar_subset_X[cupy_csr-list_bool_subset] ______________ 2184s 2184s matrix_type = functools.partial(, typ=) 2184s subset_func = 2184s 2184s @IGNORE_SPARSE_EFFICIENCY_WARNING 2184s def test_set_scalar_subset_X(matrix_type, subset_func): 2184s > adata = ad.AnnData(matrix_type(np.zeros((10, 10)))) 2184s 2184s tests/test_views.py:369: 2184s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 2184s /usr/lib/python3.13/functools.py:934: in wrapper 2184s return dispatch(args[0].__class__)(*args, **kw) 2184s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 2184s 2184s val = array([[0., 0., 0., 0., 0., 0., 0., 0., 0., 0.], 2184s [0., 0., 0., 0., 0., 0., 0., 0., 0., 0.], 2184s [0., 0., 0., ...0., 0., 0., 0., 0.], 2184s [0., 0., 0., 0., 0., 0., 0., 0., 0., 0.], 2184s [0., 0., 0., 0., 0., 0., 0., 0., 0., 0.]]) 2184s typ = 2184s 2184s @singledispatch 2184s def as_cupy(val, typ=None): 2184s """ 2184s Rough conversion function 2184s 2184s Will try to infer target type from input type if not specified. 2184s """ 2184s if typ is None: 2184s typ = resolve_cupy_type(val) 2184s 2184s if issubclass(typ, CupyArray): 2184s import cupy as cp 2184s 2184s if isinstance(val, CSMatrix): 2184s val = val.toarray() 2184s return cp.array(val) 2184s elif issubclass(typ, CupyCSRMatrix): 2184s > import cupy as cp 2184s E ModuleNotFoundError: No module named 'cupy' 2184s 2184s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:1016: ModuleNotFoundError 2184s ____________ test_set_scalar_subset_X[cupy_csr-matrix_bool_subset] _____________ 2184s 2184s matrix_type = functools.partial(, typ=) 2184s subset_func = 2184s 2184s @IGNORE_SPARSE_EFFICIENCY_WARNING 2184s def test_set_scalar_subset_X(matrix_type, subset_func): 2184s > adata = ad.AnnData(matrix_type(np.zeros((10, 10)))) 2184s 2184s tests/test_views.py:369: 2184s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 2184s /usr/lib/python3.13/functools.py:934: in wrapper 2184s return dispatch(args[0].__class__)(*args, **kw) 2184s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 2184s 2184s val = array([[0., 0., 0., 0., 0., 0., 0., 0., 0., 0.], 2184s [0., 0., 0., 0., 0., 0., 0., 0., 0., 0.], 2184s [0., 0., 0., ...0., 0., 0., 0., 0.], 2184s [0., 0., 0., 0., 0., 0., 0., 0., 0., 0.], 2184s [0., 0., 0., 0., 0., 0., 0., 0., 0., 0.]]) 2184s typ = 2184s 2184s @singledispatch 2184s def as_cupy(val, typ=None): 2184s """ 2184s Rough conversion function 2184s 2184s Will try to infer target type from input type if not specified. 2184s """ 2184s if typ is None: 2184s typ = resolve_cupy_type(val) 2184s 2184s if issubclass(typ, CupyArray): 2184s import cupy as cp 2184s 2184s if isinstance(val, CSMatrix): 2184s val = val.toarray() 2184s return cp.array(val) 2184s elif issubclass(typ, CupyCSRMatrix): 2184s > import cupy as cp 2184s E ModuleNotFoundError: No module named 'cupy' 2184s 2184s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:1016: ModuleNotFoundError 2184s ___________ test_set_scalar_subset_X[cupy_csr-spmatrix_bool_subset] ____________ 2184s 2184s matrix_type = functools.partial(, typ=) 2184s subset_func = 2184s 2184s @IGNORE_SPARSE_EFFICIENCY_WARNING 2184s def test_set_scalar_subset_X(matrix_type, subset_func): 2184s > adata = ad.AnnData(matrix_type(np.zeros((10, 10)))) 2184s 2184s tests/test_views.py:369: 2184s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 2184s /usr/lib/python3.13/functools.py:934: in wrapper 2184s return dispatch(args[0].__class__)(*args, **kw) 2184s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 2184s 2184s val = array([[0., 0., 0., 0., 0., 0., 0., 0., 0., 0.], 2184s [0., 0., 0., 0., 0., 0., 0., 0., 0., 0.], 2184s [0., 0., 0., ...0., 0., 0., 0., 0.], 2184s [0., 0., 0., 0., 0., 0., 0., 0., 0., 0.], 2184s [0., 0., 0., 0., 0., 0., 0., 0., 0., 0.]]) 2184s typ = 2184s 2184s @singledispatch 2184s def as_cupy(val, typ=None): 2184s """ 2184s Rough conversion function 2184s 2184s Will try to infer target type from input type if not specified. 2184s """ 2184s if typ is None: 2184s typ = resolve_cupy_type(val) 2184s 2184s if issubclass(typ, CupyArray): 2184s import cupy as cp 2184s 2184s if isinstance(val, CSMatrix): 2184s val = val.toarray() 2184s return cp.array(val) 2184s elif issubclass(typ, CupyCSRMatrix): 2184s > import cupy as cp 2184s E ModuleNotFoundError: No module named 'cupy' 2184s 2184s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:1016: ModuleNotFoundError 2184s ____________ test_set_scalar_subset_X[cupy_csr-sparray_bool_subset] ____________ 2184s 2184s matrix_type = functools.partial(, typ=) 2184s subset_func = 2184s 2184s @IGNORE_SPARSE_EFFICIENCY_WARNING 2184s def test_set_scalar_subset_X(matrix_type, subset_func): 2184s > adata = ad.AnnData(matrix_type(np.zeros((10, 10)))) 2184s 2184s tests/test_views.py:369: 2184s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 2184s /usr/lib/python3.13/functools.py:934: in wrapper 2184s return dispatch(args[0].__class__)(*args, **kw) 2184s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 2184s 2184s val = array([[0., 0., 0., 0., 0., 0., 0., 0., 0., 0.], 2184s [0., 0., 0., 0., 0., 0., 0., 0., 0., 0.], 2184s [0., 0., 0., ...0., 0., 0., 0., 0.], 2184s [0., 0., 0., 0., 0., 0., 0., 0., 0., 0.], 2184s [0., 0., 0., 0., 0., 0., 0., 0., 0., 0.]]) 2184s typ = 2184s 2184s @singledispatch 2184s def as_cupy(val, typ=None): 2184s """ 2184s Rough conversion function 2184s 2184s Will try to infer target type from input type if not specified. 2184s """ 2184s if typ is None: 2184s typ = resolve_cupy_type(val) 2184s 2184s if issubclass(typ, CupyArray): 2184s import cupy as cp 2184s 2184s if isinstance(val, CSMatrix): 2184s val = val.toarray() 2184s return cp.array(val) 2184s elif issubclass(typ, CupyCSRMatrix): 2184s > import cupy as cp 2184s E ModuleNotFoundError: No module named 'cupy' 2184s 2184s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:1016: ModuleNotFoundError 2184s _______________ test_set_scalar_subset_X[cupy_csc-array_subset] ________________ 2184s 2184s matrix_type = functools.partial(, typ=) 2184s subset_func = 2184s 2184s @IGNORE_SPARSE_EFFICIENCY_WARNING 2184s def test_set_scalar_subset_X(matrix_type, subset_func): 2184s > adata = ad.AnnData(matrix_type(np.zeros((10, 10)))) 2184s 2184s tests/test_views.py:369: 2184s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 2184s /usr/lib/python3.13/functools.py:934: in wrapper 2184s return dispatch(args[0].__class__)(*args, **kw) 2184s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 2184s 2184s val = array([[0., 0., 0., 0., 0., 0., 0., 0., 0., 0.], 2184s [0., 0., 0., 0., 0., 0., 0., 0., 0., 0.], 2184s [0., 0., 0., ...0., 0., 0., 0., 0.], 2184s [0., 0., 0., 0., 0., 0., 0., 0., 0., 0.], 2184s [0., 0., 0., 0., 0., 0., 0., 0., 0., 0.]]) 2184s typ = 2184s 2184s @singledispatch 2184s def as_cupy(val, typ=None): 2184s """ 2184s Rough conversion function 2184s 2184s Will try to infer target type from input type if not specified. 2184s """ 2184s if typ is None: 2184s typ = resolve_cupy_type(val) 2184s 2184s if issubclass(typ, CupyArray): 2184s import cupy as cp 2184s 2184s if isinstance(val, CSMatrix): 2184s val = val.toarray() 2184s return cp.array(val) 2184s elif issubclass(typ, CupyCSRMatrix): 2184s import cupy as cp 2184s import cupyx.scipy.sparse as cpsparse 2184s 2184s if isinstance(val, np.ndarray): 2184s return cpsparse.csr_matrix(cp.array(val)) 2184s else: 2184s return cpsparse.csr_matrix(val) 2184s elif issubclass(typ, CupyCSCMatrix): 2184s > import cupy as cp 2184s E ModuleNotFoundError: No module named 'cupy' 2184s 2184s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:1024: ModuleNotFoundError 2184s _______________ test_set_scalar_subset_X[cupy_csc-slice_subset] ________________ 2184s 2184s matrix_type = functools.partial(, typ=) 2184s subset_func = 2184s 2184s @IGNORE_SPARSE_EFFICIENCY_WARNING 2184s def test_set_scalar_subset_X(matrix_type, subset_func): 2184s > adata = ad.AnnData(matrix_type(np.zeros((10, 10)))) 2184s 2184s tests/test_views.py:369: 2184s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 2184s /usr/lib/python3.13/functools.py:934: in wrapper 2184s return dispatch(args[0].__class__)(*args, **kw) 2184s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 2184s 2184s val = array([[0., 0., 0., 0., 0., 0., 0., 0., 0., 0.], 2184s [0., 0., 0., 0., 0., 0., 0., 0., 0., 0.], 2184s [0., 0., 0., ...0., 0., 0., 0., 0.], 2184s [0., 0., 0., 0., 0., 0., 0., 0., 0., 0.], 2184s [0., 0., 0., 0., 0., 0., 0., 0., 0., 0.]]) 2184s typ = 2184s 2184s @singledispatch 2184s def as_cupy(val, typ=None): 2184s """ 2184s Rough conversion function 2184s 2184s Will try to infer target type from input type if not specified. 2184s """ 2184s if typ is None: 2184s typ = resolve_cupy_type(val) 2184s 2184s if issubclass(typ, CupyArray): 2184s import cupy as cp 2184s 2184s if isinstance(val, CSMatrix): 2184s val = val.toarray() 2184s return cp.array(val) 2184s elif issubclass(typ, CupyCSRMatrix): 2184s import cupy as cp 2184s import cupyx.scipy.sparse as cpsparse 2184s 2184s if isinstance(val, np.ndarray): 2184s return cpsparse.csr_matrix(cp.array(val)) 2184s else: 2184s return cpsparse.csr_matrix(val) 2184s elif issubclass(typ, CupyCSCMatrix): 2184s > import cupy as cp 2184s E ModuleNotFoundError: No module named 'cupy' 2184s 2184s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:1024: ModuleNotFoundError 2184s _______________ test_set_scalar_subset_X[cupy_csc-single_subset] _______________ 2184s 2184s matrix_type = functools.partial(, typ=) 2184s subset_func = 2184s 2184s @IGNORE_SPARSE_EFFICIENCY_WARNING 2184s def test_set_scalar_subset_X(matrix_type, subset_func): 2184s > adata = ad.AnnData(matrix_type(np.zeros((10, 10)))) 2184s 2184s tests/test_views.py:369: 2184s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 2184s /usr/lib/python3.13/functools.py:934: in wrapper 2184s return dispatch(args[0].__class__)(*args, **kw) 2184s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 2184s 2184s val = array([[0., 0., 0., 0., 0., 0., 0., 0., 0., 0.], 2184s [0., 0., 0., 0., 0., 0., 0., 0., 0., 0.], 2184s [0., 0., 0., ...0., 0., 0., 0., 0.], 2184s [0., 0., 0., 0., 0., 0., 0., 0., 0., 0.], 2184s [0., 0., 0., 0., 0., 0., 0., 0., 0., 0.]]) 2184s typ = 2184s 2184s @singledispatch 2184s def as_cupy(val, typ=None): 2184s """ 2184s Rough conversion function 2184s 2184s Will try to infer target type from input type if not specified. 2184s """ 2184s if typ is None: 2184s typ = resolve_cupy_type(val) 2184s 2184s if issubclass(typ, CupyArray): 2184s import cupy as cp 2184s 2184s if isinstance(val, CSMatrix): 2184s val = val.toarray() 2184s return cp.array(val) 2184s elif issubclass(typ, CupyCSRMatrix): 2184s import cupy as cp 2184s import cupyx.scipy.sparse as cpsparse 2184s 2184s if isinstance(val, np.ndarray): 2184s return cpsparse.csr_matrix(cp.array(val)) 2184s else: 2184s return cpsparse.csr_matrix(val) 2184s elif issubclass(typ, CupyCSCMatrix): 2184s > import cupy as cp 2184s E ModuleNotFoundError: No module named 'cupy' 2184s 2184s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:1024: ModuleNotFoundError 2184s _____________ test_set_scalar_subset_X[cupy_csc-array_int_subset] ______________ 2184s 2184s matrix_type = functools.partial(, typ=) 2184s subset_func = 2184s 2184s @IGNORE_SPARSE_EFFICIENCY_WARNING 2184s def test_set_scalar_subset_X(matrix_type, subset_func): 2184s > adata = ad.AnnData(matrix_type(np.zeros((10, 10)))) 2184s 2184s tests/test_views.py:369: 2184s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 2184s /usr/lib/python3.13/functools.py:934: in wrapper 2184s return dispatch(args[0].__class__)(*args, **kw) 2184s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 2184s 2184s val = array([[0., 0., 0., 0., 0., 0., 0., 0., 0., 0.], 2184s [0., 0., 0., 0., 0., 0., 0., 0., 0., 0.], 2184s [0., 0., 0., ...0., 0., 0., 0., 0.], 2184s [0., 0., 0., 0., 0., 0., 0., 0., 0., 0.], 2184s [0., 0., 0., 0., 0., 0., 0., 0., 0., 0.]]) 2184s typ = 2184s 2184s @singledispatch 2184s def as_cupy(val, typ=None): 2184s """ 2184s Rough conversion function 2184s 2184s Will try to infer target type from input type if not specified. 2184s """ 2184s if typ is None: 2184s typ = resolve_cupy_type(val) 2184s 2184s if issubclass(typ, CupyArray): 2184s import cupy as cp 2184s 2184s if isinstance(val, CSMatrix): 2184s val = val.toarray() 2184s return cp.array(val) 2184s elif issubclass(typ, CupyCSRMatrix): 2184s import cupy as cp 2184s import cupyx.scipy.sparse as cpsparse 2184s 2184s if isinstance(val, np.ndarray): 2184s return cpsparse.csr_matrix(cp.array(val)) 2184s else: 2184s return cpsparse.csr_matrix(val) 2184s elif issubclass(typ, CupyCSCMatrix): 2184s > import cupy as cp 2184s E ModuleNotFoundError: No module named 'cupy' 2184s 2184s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:1024: ModuleNotFoundError 2184s ______________ test_set_scalar_subset_X[cupy_csc-list_int_subset] ______________ 2184s 2184s matrix_type = functools.partial(, typ=) 2184s subset_func = 2184s 2184s @IGNORE_SPARSE_EFFICIENCY_WARNING 2184s def test_set_scalar_subset_X(matrix_type, subset_func): 2184s > adata = ad.AnnData(matrix_type(np.zeros((10, 10)))) 2184s 2184s tests/test_views.py:369: 2184s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 2184s /usr/lib/python3.13/functools.py:934: in wrapper 2184s return dispatch(args[0].__class__)(*args, **kw) 2184s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 2184s 2184s val = array([[0., 0., 0., 0., 0., 0., 0., 0., 0., 0.], 2184s [0., 0., 0., 0., 0., 0., 0., 0., 0., 0.], 2184s [0., 0., 0., ...0., 0., 0., 0., 0.], 2184s [0., 0., 0., 0., 0., 0., 0., 0., 0., 0.], 2184s [0., 0., 0., 0., 0., 0., 0., 0., 0., 0.]]) 2184s typ = 2184s 2184s @singledispatch 2184s def as_cupy(val, typ=None): 2184s """ 2184s Rough conversion function 2184s 2184s Will try to infer target type from input type if not specified. 2184s """ 2184s if typ is None: 2184s typ = resolve_cupy_type(val) 2184s 2184s if issubclass(typ, CupyArray): 2184s import cupy as cp 2184s 2184s if isinstance(val, CSMatrix): 2184s val = val.toarray() 2184s return cp.array(val) 2184s elif issubclass(typ, CupyCSRMatrix): 2184s import cupy as cp 2184s import cupyx.scipy.sparse as cpsparse 2184s 2184s if isinstance(val, np.ndarray): 2184s return cpsparse.csr_matrix(cp.array(val)) 2184s else: 2184s return cpsparse.csr_matrix(val) 2184s elif issubclass(typ, CupyCSCMatrix): 2184s > import cupy as cp 2184s E ModuleNotFoundError: No module named 'cupy' 2184s 2184s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:1024: ModuleNotFoundError 2184s _____________ test_set_scalar_subset_X[cupy_csc-array_bool_subset] _____________ 2184s 2184s matrix_type = functools.partial(, typ=) 2184s subset_func = 2184s 2184s @IGNORE_SPARSE_EFFICIENCY_WARNING 2184s def test_set_scalar_subset_X(matrix_type, subset_func): 2184s > adata = ad.AnnData(matrix_type(np.zeros((10, 10)))) 2184s 2184s tests/test_views.py:369: 2184s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 2184s /usr/lib/python3.13/functools.py:934: in wrapper 2184s return dispatch(args[0].__class__)(*args, **kw) 2184s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 2184s 2184s val = array([[0., 0., 0., 0., 0., 0., 0., 0., 0., 0.], 2184s [0., 0., 0., 0., 0., 0., 0., 0., 0., 0.], 2184s [0., 0., 0., ...0., 0., 0., 0., 0.], 2184s [0., 0., 0., 0., 0., 0., 0., 0., 0., 0.], 2184s [0., 0., 0., 0., 0., 0., 0., 0., 0., 0.]]) 2184s typ = 2184s 2184s @singledispatch 2184s def as_cupy(val, typ=None): 2184s """ 2184s Rough conversion function 2184s 2184s Will try to infer target type from input type if not specified. 2184s """ 2184s if typ is None: 2184s typ = resolve_cupy_type(val) 2184s 2184s if issubclass(typ, CupyArray): 2184s import cupy as cp 2184s 2184s if isinstance(val, CSMatrix): 2184s val = val.toarray() 2184s return cp.array(val) 2184s elif issubclass(typ, CupyCSRMatrix): 2184s import cupy as cp 2184s import cupyx.scipy.sparse as cpsparse 2184s 2184s if isinstance(val, np.ndarray): 2184s return cpsparse.csr_matrix(cp.array(val)) 2184s else: 2184s return cpsparse.csr_matrix(val) 2184s elif issubclass(typ, CupyCSCMatrix): 2184s > import cupy as cp 2184s E ModuleNotFoundError: No module named 'cupy' 2184s 2184s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:1024: ModuleNotFoundError 2184s _____________ test_set_scalar_subset_X[cupy_csc-list_bool_subset] ______________ 2184s 2184s matrix_type = functools.partial(, typ=) 2184s subset_func = 2184s 2184s @IGNORE_SPARSE_EFFICIENCY_WARNING 2184s def test_set_scalar_subset_X(matrix_type, subset_func): 2184s > adata = ad.AnnData(matrix_type(np.zeros((10, 10)))) 2184s 2184s tests/test_views.py:369: 2184s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 2184s /usr/lib/python3.13/functools.py:934: in wrapper 2184s return dispatch(args[0].__class__)(*args, **kw) 2184s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 2184s 2184s val = array([[0., 0., 0., 0., 0., 0., 0., 0., 0., 0.], 2184s [0., 0., 0., 0., 0., 0., 0., 0., 0., 0.], 2184s [0., 0., 0., ...0., 0., 0., 0., 0.], 2184s [0., 0., 0., 0., 0., 0., 0., 0., 0., 0.], 2184s [0., 0., 0., 0., 0., 0., 0., 0., 0., 0.]]) 2184s typ = 2184s 2184s @singledispatch 2184s def as_cupy(val, typ=None): 2184s """ 2184s Rough conversion function 2184s 2184s Will try to infer target type from input type if not specified. 2184s """ 2184s if typ is None: 2184s typ = resolve_cupy_type(val) 2184s 2184s if issubclass(typ, CupyArray): 2184s import cupy as cp 2184s 2184s if isinstance(val, CSMatrix): 2184s val = val.toarray() 2184s return cp.array(val) 2184s elif issubclass(typ, CupyCSRMatrix): 2184s import cupy as cp 2184s import cupyx.scipy.sparse as cpsparse 2184s 2184s if isinstance(val, np.ndarray): 2184s return cpsparse.csr_matrix(cp.array(val)) 2184s else: 2184s return cpsparse.csr_matrix(val) 2184s elif issubclass(typ, CupyCSCMatrix): 2184s > import cupy as cp 2184s E ModuleNotFoundError: No module named 'cupy' 2184s 2184s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:1024: ModuleNotFoundError 2184s ____________ test_set_scalar_subset_X[cupy_csc-matrix_bool_subset] _____________ 2184s 2184s matrix_type = functools.partial(, typ=) 2184s subset_func = 2184s 2184s @IGNORE_SPARSE_EFFICIENCY_WARNING 2184s def test_set_scalar_subset_X(matrix_type, subset_func): 2184s > adata = ad.AnnData(matrix_type(np.zeros((10, 10)))) 2184s 2184s tests/test_views.py:369: 2184s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 2184s /usr/lib/python3.13/functools.py:934: in wrapper 2184s return dispatch(args[0].__class__)(*args, **kw) 2184s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 2184s 2184s val = array([[0., 0., 0., 0., 0., 0., 0., 0., 0., 0.], 2184s [0., 0., 0., 0., 0., 0., 0., 0., 0., 0.], 2184s [0., 0., 0., ...0., 0., 0., 0., 0.], 2184s [0., 0., 0., 0., 0., 0., 0., 0., 0., 0.], 2184s [0., 0., 0., 0., 0., 0., 0., 0., 0., 0.]]) 2184s typ = 2184s 2184s @singledispatch 2184s def as_cupy(val, typ=None): 2184s """ 2184s Rough conversion function 2184s 2184s Will try to infer target type from input type if not specified. 2184s """ 2184s if typ is None: 2184s typ = resolve_cupy_type(val) 2184s 2184s if issubclass(typ, CupyArray): 2184s import cupy as cp 2184s 2184s if isinstance(val, CSMatrix): 2184s val = val.toarray() 2184s return cp.array(val) 2184s elif issubclass(typ, CupyCSRMatrix): 2184s import cupy as cp 2184s import cupyx.scipy.sparse as cpsparse 2184s 2184s if isinstance(val, np.ndarray): 2184s return cpsparse.csr_matrix(cp.array(val)) 2184s else: 2184s return cpsparse.csr_matrix(val) 2184s elif issubclass(typ, CupyCSCMatrix): 2184s > import cupy as cp 2184s E ModuleNotFoundError: No module named 'cupy' 2184s 2184s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:1024: ModuleNotFoundError 2184s ___________ test_set_scalar_subset_X[cupy_csc-spmatrix_bool_subset] ____________ 2184s 2184s matrix_type = functools.partial(, typ=) 2184s subset_func = 2184s 2184s @IGNORE_SPARSE_EFFICIENCY_WARNING 2184s def test_set_scalar_subset_X(matrix_type, subset_func): 2184s > adata = ad.AnnData(matrix_type(np.zeros((10, 10)))) 2184s 2184s tests/test_views.py:369: 2184s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 2184s /usr/lib/python3.13/functools.py:934: in wrapper 2184s return dispatch(args[0].__class__)(*args, **kw) 2184s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 2184s 2184s val = array([[0., 0., 0., 0., 0., 0., 0., 0., 0., 0.], 2184s [0., 0., 0., 0., 0., 0., 0., 0., 0., 0.], 2184s [0., 0., 0., ...0., 0., 0., 0., 0.], 2184s [0., 0., 0., 0., 0., 0., 0., 0., 0., 0.], 2184s [0., 0., 0., 0., 0., 0., 0., 0., 0., 0.]]) 2184s typ = 2184s 2184s @singledispatch 2184s def as_cupy(val, typ=None): 2184s """ 2184s Rough conversion function 2184s 2184s Will try to infer target type from input type if not specified. 2184s """ 2184s if typ is None: 2184s typ = resolve_cupy_type(val) 2184s 2184s if issubclass(typ, CupyArray): 2184s import cupy as cp 2184s 2184s if isinstance(val, CSMatrix): 2184s val = val.toarray() 2184s return cp.array(val) 2184s elif issubclass(typ, CupyCSRMatrix): 2184s import cupy as cp 2184s import cupyx.scipy.sparse as cpsparse 2184s 2184s if isinstance(val, np.ndarray): 2184s return cpsparse.csr_matrix(cp.array(val)) 2184s else: 2184s return cpsparse.csr_matrix(val) 2184s elif issubclass(typ, CupyCSCMatrix): 2184s > import cupy as cp 2184s E ModuleNotFoundError: No module named 'cupy' 2184s 2184s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:1024: ModuleNotFoundError 2184s ____________ test_set_scalar_subset_X[cupy_csc-sparray_bool_subset] ____________ 2184s 2184s matrix_type = functools.partial(, typ=) 2184s subset_func = 2184s 2184s @IGNORE_SPARSE_EFFICIENCY_WARNING 2184s def test_set_scalar_subset_X(matrix_type, subset_func): 2184s > adata = ad.AnnData(matrix_type(np.zeros((10, 10)))) 2184s 2184s tests/test_views.py:369: 2184s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 2184s /usr/lib/python3.13/functools.py:934: in wrapper 2184s return dispatch(args[0].__class__)(*args, **kw) 2184s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 2184s 2184s val = array([[0., 0., 0., 0., 0., 0., 0., 0., 0., 0.], 2184s [0., 0., 0., 0., 0., 0., 0., 0., 0., 0.], 2184s [0., 0., 0., ...0., 0., 0., 0., 0.], 2184s [0., 0., 0., 0., 0., 0., 0., 0., 0., 0.], 2184s [0., 0., 0., 0., 0., 0., 0., 0., 0., 0.]]) 2184s typ = 2184s 2184s @singledispatch 2184s def as_cupy(val, typ=None): 2184s """ 2184s Rough conversion function 2184s 2184s Will try to infer target type from input type if not specified. 2184s """ 2184s if typ is None: 2184s typ = resolve_cupy_type(val) 2184s 2184s if issubclass(typ, CupyArray): 2184s import cupy as cp 2184s 2184s if isinstance(val, CSMatrix): 2184s val = val.toarray() 2184s return cp.array(val) 2184s elif issubclass(typ, CupyCSRMatrix): 2184s import cupy as cp 2184s import cupyx.scipy.sparse as cpsparse 2184s 2184s if isinstance(val, np.ndarray): 2184s return cpsparse.csr_matrix(cp.array(val)) 2184s else: 2184s return cpsparse.csr_matrix(val) 2184s elif issubclass(typ, CupyCSCMatrix): 2184s > import cupy as cp 2184s E ModuleNotFoundError: No module named 'cupy' 2184s 2184s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:1024: ModuleNotFoundError 2184s ___________ test_view_of_view[cupy_array-array_subset-array_subset] ____________ 2184s 2184s matrix_type = functools.partial(, typ=) 2184s subset_func = 2184s subset_func2 = 2184s 2184s def test_view_of_view(matrix_type, subset_func, subset_func2): 2184s > adata = gen_adata((30, 15), X_type=matrix_type) 2184s 2184s tests/test_views.py:531: 2184s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 2184s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:346: in gen_adata 2184s X = X_type(random_state.binomial(100, 0.005, (M, N)).astype(X_dtype)) 2184s /usr/lib/python3.13/functools.py:934: in wrapper 2184s return dispatch(args[0].__class__)(*args, **kw) 2184s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 2184s 2184s val = array([[1., 0., 0., 0., 1., 1., 0., 1., 0., 1., 0., 0., 0., 0., 0.], 2184s [2., 1., 0., 0., 0., 0., 0., 0., 1., 0., 0...0., 1., 0., 0., 0., 0., 0.], 2184s [1., 0., 3., 2., 0., 0., 0., 1., 0., 0., 0., 1., 0., 1., 1.]], 2184s dtype=float32) 2184s typ = 2184s 2184s @singledispatch 2184s def as_cupy(val, typ=None): 2184s """ 2184s Rough conversion function 2184s 2184s Will try to infer target type from input type if not specified. 2184s """ 2184s if typ is None: 2184s typ = resolve_cupy_type(val) 2184s 2184s if issubclass(typ, CupyArray): 2184s > import cupy as cp 2184s E ModuleNotFoundError: No module named 'cupy' 2184s 2184s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:1010: ModuleNotFoundError 2184s ___________ test_view_of_view[cupy_array-array_subset-slice_subset] ____________ 2184s 2184s matrix_type = functools.partial(, typ=) 2184s subset_func = 2184s subset_func2 = 2184s 2184s def test_view_of_view(matrix_type, subset_func, subset_func2): 2184s > adata = gen_adata((30, 15), X_type=matrix_type) 2184s 2184s tests/test_views.py:531: 2184s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 2184s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:346: in gen_adata 2184s X = X_type(random_state.binomial(100, 0.005, (M, N)).astype(X_dtype)) 2184s /usr/lib/python3.13/functools.py:934: in wrapper 2184s return dispatch(args[0].__class__)(*args, **kw) 2184s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 2184s 2184s val = array([[0., 1., 0., 0., 2., 0., 3., 2., 1., 0., 0., 1., 0., 1., 0.], 2184s [0., 1., 0., 0., 0., 0., 0., 0., 0., 0., 0...0., 1., 0., 0., 0., 0., 0.], 2184s [0., 0., 0., 0., 1., 0., 1., 0., 0., 1., 1., 2., 0., 0., 0.]], 2184s dtype=float32) 2184s typ = 2184s 2184s @singledispatch 2184s def as_cupy(val, typ=None): 2184s """ 2184s Rough conversion function 2184s 2184s Will try to infer target type from input type if not specified. 2184s """ 2184s if typ is None: 2184s typ = resolve_cupy_type(val) 2184s 2184s if issubclass(typ, CupyArray): 2184s > import cupy as cp 2184s E ModuleNotFoundError: No module named 'cupy' 2184s 2184s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:1010: ModuleNotFoundError 2184s ___________ test_view_of_view[cupy_array-array_subset-single_subset] ___________ 2184s 2184s matrix_type = functools.partial(, typ=) 2184s subset_func = 2184s subset_func2 = 2184s 2184s def test_view_of_view(matrix_type, subset_func, subset_func2): 2184s > adata = gen_adata((30, 15), X_type=matrix_type) 2184s 2184s tests/test_views.py:531: 2184s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 2184s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:346: in gen_adata 2184s X = X_type(random_state.binomial(100, 0.005, (M, N)).astype(X_dtype)) 2184s /usr/lib/python3.13/functools.py:934: in wrapper 2184s return dispatch(args[0].__class__)(*args, **kw) 2184s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 2184s 2184s val = array([[0., 1., 0., 1., 0., 1., 3., 0., 1., 0., 0., 0., 0., 0., 1.], 2184s [0., 0., 0., 0., 0., 0., 1., 0., 0., 0., 3...0., 1., 0., 0., 0., 2., 0.], 2184s [0., 0., 0., 0., 1., 1., 0., 1., 0., 0., 0., 1., 0., 0., 0.]], 2184s dtype=float32) 2184s typ = 2184s 2184s @singledispatch 2184s def as_cupy(val, typ=None): 2184s """ 2184s Rough conversion function 2184s 2184s Will try to infer target type from input type if not specified. 2184s """ 2184s if typ is None: 2184s typ = resolve_cupy_type(val) 2184s 2184s if issubclass(typ, CupyArray): 2184s > import cupy as cp 2184s E ModuleNotFoundError: No module named 'cupy' 2184s 2184s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:1010: ModuleNotFoundError 2184s _________ test_view_of_view[cupy_array-array_subset-array_int_subset] __________ 2184s 2184s matrix_type = functools.partial(, typ=) 2184s subset_func = 2184s subset_func2 = 2184s 2184s def test_view_of_view(matrix_type, subset_func, subset_func2): 2184s > adata = gen_adata((30, 15), X_type=matrix_type) 2184s 2184s tests/test_views.py:531: 2184s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 2184s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:346: in gen_adata 2184s X = X_type(random_state.binomial(100, 0.005, (M, N)).astype(X_dtype)) 2184s /usr/lib/python3.13/functools.py:934: in wrapper 2184s return dispatch(args[0].__class__)(*args, **kw) 2184s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 2184s 2184s val = array([[0., 0., 0., 0., 0., 0., 1., 0., 0., 0., 1., 1., 2., 1., 0.], 2184s [0., 1., 0., 0., 0., 1., 0., 0., 0., 0., 1...0., 1., 1., 0., 0., 1., 0.], 2184s [0., 0., 1., 2., 0., 1., 0., 0., 1., 0., 0., 0., 0., 2., 0.]], 2184s dtype=float32) 2184s typ = 2184s 2184s @singledispatch 2184s def as_cupy(val, typ=None): 2184s """ 2184s Rough conversion function 2184s 2184s Will try to infer target type from input type if not specified. 2184s """ 2184s if typ is None: 2184s typ = resolve_cupy_type(val) 2184s 2184s if issubclass(typ, CupyArray): 2184s > import cupy as cp 2184s E ModuleNotFoundError: No module named 'cupy' 2184s 2184s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:1010: ModuleNotFoundError 2184s __________ test_view_of_view[cupy_array-array_subset-list_int_subset] __________ 2184s 2184s matrix_type = functools.partial(, typ=) 2184s subset_func = 2184s subset_func2 = 2184s 2184s def test_view_of_view(matrix_type, subset_func, subset_func2): 2184s > adata = gen_adata((30, 15), X_type=matrix_type) 2184s 2184s tests/test_views.py:531: 2184s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 2184s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:346: in gen_adata 2184s X = X_type(random_state.binomial(100, 0.005, (M, N)).astype(X_dtype)) 2184s /usr/lib/python3.13/functools.py:934: in wrapper 2184s return dispatch(args[0].__class__)(*args, **kw) 2184s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 2184s 2184s val = array([[0., 1., 0., 1., 2., 0., 1., 0., 0., 0., 1., 2., 0., 1., 0.], 2184s [0., 0., 1., 0., 1., 0., 1., 0., 1., 0., 1...0., 0., 0., 0., 0., 1., 0.], 2184s [0., 0., 1., 0., 0., 2., 0., 0., 0., 0., 0., 0., 1., 0., 0.]], 2184s dtype=float32) 2184s typ = 2184s 2184s @singledispatch 2184s def as_cupy(val, typ=None): 2184s """ 2184s Rough conversion function 2184s 2184s Will try to infer target type from input type if not specified. 2184s """ 2184s if typ is None: 2184s typ = resolve_cupy_type(val) 2184s 2184s if issubclass(typ, CupyArray): 2184s > import cupy as cp 2184s E ModuleNotFoundError: No module named 'cupy' 2184s 2184s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:1010: ModuleNotFoundError 2184s _________ test_view_of_view[cupy_array-array_subset-array_bool_subset] _________ 2184s 2184s matrix_type = functools.partial(, typ=) 2184s subset_func = 2184s subset_func2 = 2184s 2184s def test_view_of_view(matrix_type, subset_func, subset_func2): 2184s > adata = gen_adata((30, 15), X_type=matrix_type) 2184s 2184s tests/test_views.py:531: 2184s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 2184s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:346: in gen_adata 2184s X = X_type(random_state.binomial(100, 0.005, (M, N)).astype(X_dtype)) 2184s /usr/lib/python3.13/functools.py:934: in wrapper 2184s return dispatch(args[0].__class__)(*args, **kw) 2184s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 2184s 2184s val = array([[1., 1., 0., 0., 0., 0., 0., 2., 1., 0., 1., 0., 1., 0., 0.], 2184s [0., 1., 0., 2., 0., 1., 0., 1., 0., 1., 1...0., 0., 0., 0., 2., 0., 1.], 2184s [0., 0., 0., 0., 1., 0., 1., 1., 0., 0., 0., 0., 0., 0., 0.]], 2184s dtype=float32) 2184s typ = 2184s 2184s @singledispatch 2184s def as_cupy(val, typ=None): 2184s """ 2184s Rough conversion function 2184s 2184s Will try to infer target type from input type if not specified. 2184s """ 2184s if typ is None: 2184s typ = resolve_cupy_type(val) 2184s 2184s if issubclass(typ, CupyArray): 2184s > import cupy as cp 2184s E ModuleNotFoundError: No module named 'cupy' 2184s 2184s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:1010: ModuleNotFoundError 2184s _________ test_view_of_view[cupy_array-array_subset-list_bool_subset] __________ 2184s 2184s matrix_type = functools.partial(, typ=) 2184s subset_func = 2184s subset_func2 = 2184s 2184s def test_view_of_view(matrix_type, subset_func, subset_func2): 2184s > adata = gen_adata((30, 15), X_type=matrix_type) 2184s 2184s tests/test_views.py:531: 2184s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 2184s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:346: in gen_adata 2184s X = X_type(random_state.binomial(100, 0.005, (M, N)).astype(X_dtype)) 2184s /usr/lib/python3.13/functools.py:934: in wrapper 2184s return dispatch(args[0].__class__)(*args, **kw) 2184s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 2184s 2184s val = array([[0., 1., 0., 0., 0., 0., 0., 1., 0., 0., 0., 0., 0., 0., 1.], 2184s [0., 0., 0., 1., 0., 1., 0., 2., 0., 0., 1...1., 0., 1., 0., 1., 0., 0.], 2184s [0., 0., 0., 0., 0., 2., 2., 0., 0., 0., 0., 0., 0., 1., 0.]], 2184s dtype=float32) 2184s typ = 2184s 2184s @singledispatch 2184s def as_cupy(val, typ=None): 2184s """ 2184s Rough conversion function 2184s 2184s Will try to infer target type from input type if not specified. 2184s """ 2184s if typ is None: 2184s typ = resolve_cupy_type(val) 2184s 2184s if issubclass(typ, CupyArray): 2184s > import cupy as cp 2184s E ModuleNotFoundError: No module named 'cupy' 2184s 2184s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:1010: ModuleNotFoundError 2184s ________ test_view_of_view[cupy_array-array_subset-matrix_bool_subset] _________ 2184s 2184s matrix_type = functools.partial(, typ=) 2184s subset_func = 2184s subset_func2 = 2184s 2184s def test_view_of_view(matrix_type, subset_func, subset_func2): 2184s > adata = gen_adata((30, 15), X_type=matrix_type) 2184s 2184s tests/test_views.py:531: 2184s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 2184s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:346: in gen_adata 2184s X = X_type(random_state.binomial(100, 0.005, (M, N)).astype(X_dtype)) 2184s /usr/lib/python3.13/functools.py:934: in wrapper 2184s return dispatch(args[0].__class__)(*args, **kw) 2184s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 2184s 2184s val = array([[0., 0., 0., 1., 2., 0., 0., 4., 1., 1., 1., 0., 0., 0., 0.], 2184s [0., 0., 0., 0., 2., 0., 0., 0., 1., 1., 0...1., 0., 0., 0., 0., 0., 0.], 2184s [0., 0., 0., 1., 1., 1., 0., 1., 1., 0., 0., 1., 0., 0., 0.]], 2184s dtype=float32) 2184s typ = 2184s 2184s @singledispatch 2184s def as_cupy(val, typ=None): 2184s """ 2184s Rough conversion function 2184s 2184s Will try to infer target type from input type if not specified. 2184s """ 2184s if typ is None: 2184s typ = resolve_cupy_type(val) 2184s 2184s if issubclass(typ, CupyArray): 2184s > import cupy as cp 2184s E ModuleNotFoundError: No module named 'cupy' 2184s 2184s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:1010: ModuleNotFoundError 2184s _______ test_view_of_view[cupy_array-array_subset-spmatrix_bool_subset] ________ 2184s 2184s matrix_type = functools.partial(, typ=) 2184s subset_func = 2184s subset_func2 = 2184s 2184s def test_view_of_view(matrix_type, subset_func, subset_func2): 2184s > adata = gen_adata((30, 15), X_type=matrix_type) 2184s 2184s tests/test_views.py:531: 2184s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 2184s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:346: in gen_adata 2184s X = X_type(random_state.binomial(100, 0.005, (M, N)).astype(X_dtype)) 2184s /usr/lib/python3.13/functools.py:934: in wrapper 2184s return dispatch(args[0].__class__)(*args, **kw) 2184s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 2184s 2184s val = array([[0., 1., 0., 1., 1., 0., 1., 1., 0., 0., 2., 0., 0., 2., 1.], 2184s [0., 0., 1., 1., 0., 1., 0., 2., 1., 0., 0...0., 0., 2., 2., 1., 0., 1.], 2184s [0., 2., 1., 0., 0., 0., 0., 0., 0., 0., 1., 1., 0., 0., 0.]], 2184s dtype=float32) 2184s typ = 2184s 2184s @singledispatch 2184s def as_cupy(val, typ=None): 2184s """ 2184s Rough conversion function 2184s 2184s Will try to infer target type from input type if not specified. 2184s """ 2184s if typ is None: 2184s typ = resolve_cupy_type(val) 2184s 2184s if issubclass(typ, CupyArray): 2184s > import cupy as cp 2184s E ModuleNotFoundError: No module named 'cupy' 2184s 2184s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:1010: ModuleNotFoundError 2184s ________ test_view_of_view[cupy_array-array_subset-sparray_bool_subset] ________ 2184s 2184s matrix_type = functools.partial(, typ=) 2184s subset_func = 2184s subset_func2 = 2184s 2184s def test_view_of_view(matrix_type, subset_func, subset_func2): 2184s > adata = gen_adata((30, 15), X_type=matrix_type) 2184s 2184s tests/test_views.py:531: 2184s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 2184s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:346: in gen_adata 2184s X = X_type(random_state.binomial(100, 0.005, (M, N)).astype(X_dtype)) 2184s /usr/lib/python3.13/functools.py:934: in wrapper 2184s return dispatch(args[0].__class__)(*args, **kw) 2184s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 2184s 2184s val = array([[0., 1., 0., 0., 1., 0., 0., 0., 1., 0., 0., 0., 0., 1., 1.], 2184s [1., 0., 0., 1., 1., 0., 0., 0., 1., 0., 0...1., 1., 0., 0., 2., 0., 0.], 2184s [0., 0., 1., 0., 0., 0., 0., 1., 0., 1., 0., 0., 0., 0., 0.]], 2184s dtype=float32) 2184s typ = 2184s 2184s @singledispatch 2184s def as_cupy(val, typ=None): 2184s """ 2184s Rough conversion function 2184s 2184s Will try to infer target type from input type if not specified. 2184s """ 2184s if typ is None: 2184s typ = resolve_cupy_type(val) 2184s 2184s if issubclass(typ, CupyArray): 2184s > import cupy as cp 2184s E ModuleNotFoundError: No module named 'cupy' 2184s 2184s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:1010: ModuleNotFoundError 2184s ___________ test_view_of_view[cupy_array-slice_subset-array_subset] ____________ 2184s 2184s matrix_type = functools.partial(, typ=) 2184s subset_func = 2184s subset_func2 = 2184s 2184s def test_view_of_view(matrix_type, subset_func, subset_func2): 2184s > adata = gen_adata((30, 15), X_type=matrix_type) 2184s 2184s tests/test_views.py:531: 2184s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 2184s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:346: in gen_adata 2184s X = X_type(random_state.binomial(100, 0.005, (M, N)).astype(X_dtype)) 2184s /usr/lib/python3.13/functools.py:934: in wrapper 2184s return dispatch(args[0].__class__)(*args, **kw) 2184s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 2184s 2184s val = array([[1., 0., 0., 0., 0., 2., 0., 0., 0., 1., 0., 0., 0., 1., 0.], 2184s [0., 2., 2., 0., 0., 1., 0., 0., 1., 0., 0...0., 0., 1., 0., 1., 0., 1.], 2184s [1., 0., 1., 0., 1., 1., 0., 1., 0., 1., 0., 1., 0., 1., 0.]], 2184s dtype=float32) 2184s typ = 2184s 2184s @singledispatch 2184s def as_cupy(val, typ=None): 2184s """ 2184s Rough conversion function 2184s 2184s Will try to infer target type from input type if not specified. 2184s """ 2184s if typ is None: 2184s typ = resolve_cupy_type(val) 2184s 2184s if issubclass(typ, CupyArray): 2184s > import cupy as cp 2184s E ModuleNotFoundError: No module named 'cupy' 2184s 2184s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:1010: ModuleNotFoundError 2184s ___________ test_view_of_view[cupy_array-slice_subset-slice_subset] ____________ 2184s 2184s matrix_type = functools.partial(, typ=) 2184s subset_func = 2184s subset_func2 = 2184s 2184s def test_view_of_view(matrix_type, subset_func, subset_func2): 2184s > adata = gen_adata((30, 15), X_type=matrix_type) 2184s 2184s tests/test_views.py:531: 2184s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 2184s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:346: in gen_adata 2184s X = X_type(random_state.binomial(100, 0.005, (M, N)).astype(X_dtype)) 2184s /usr/lib/python3.13/functools.py:934: in wrapper 2184s return dispatch(args[0].__class__)(*args, **kw) 2184s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 2184s 2184s val = array([[0., 1., 0., 2., 0., 0., 0., 2., 0., 1., 0., 0., 2., 1., 0.], 2184s [0., 1., 1., 1., 0., 0., 0., 0., 3., 1., 1...1., 0., 0., 1., 0., 0., 0.], 2184s [1., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 1., 1., 0.]], 2184s dtype=float32) 2184s typ = 2184s 2184s @singledispatch 2184s def as_cupy(val, typ=None): 2184s """ 2184s Rough conversion function 2184s 2184s Will try to infer target type from input type if not specified. 2184s """ 2184s if typ is None: 2184s typ = resolve_cupy_type(val) 2184s 2184s if issubclass(typ, CupyArray): 2184s > import cupy as cp 2184s E ModuleNotFoundError: No module named 'cupy' 2184s 2184s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:1010: ModuleNotFoundError 2184s ___________ test_view_of_view[cupy_array-slice_subset-single_subset] ___________ 2184s 2184s matrix_type = functools.partial(, typ=) 2184s subset_func = 2184s subset_func2 = 2184s 2184s def test_view_of_view(matrix_type, subset_func, subset_func2): 2184s > adata = gen_adata((30, 15), X_type=matrix_type) 2184s 2184s tests/test_views.py:531: 2184s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 2184s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:346: in gen_adata 2184s X = X_type(random_state.binomial(100, 0.005, (M, N)).astype(X_dtype)) 2184s /usr/lib/python3.13/functools.py:934: in wrapper 2184s return dispatch(args[0].__class__)(*args, **kw) 2184s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 2184s 2184s val = array([[0., 0., 0., 0., 1., 1., 0., 0., 1., 3., 0., 0., 0., 0., 0.], 2184s [0., 0., 0., 1., 0., 0., 0., 1., 1., 0., 0...0., 0., 1., 0., 0., 1., 1.], 2184s [0., 0., 1., 0., 0., 0., 0., 1., 0., 1., 0., 2., 0., 0., 0.]], 2184s dtype=float32) 2184s typ = 2184s 2184s @singledispatch 2184s def as_cupy(val, typ=None): 2184s """ 2184s Rough conversion function 2184s 2184s Will try to infer target type from input type if not specified. 2184s """ 2184s if typ is None: 2184s typ = resolve_cupy_type(val) 2184s 2184s if issubclass(typ, CupyArray): 2184s > import cupy as cp 2184s E ModuleNotFoundError: No module named 'cupy' 2184s 2184s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:1010: ModuleNotFoundError 2184s _________ test_view_of_view[cupy_array-slice_subset-array_int_subset] __________ 2184s 2184s matrix_type = functools.partial(, typ=) 2184s subset_func = 2184s subset_func2 = 2184s 2184s def test_view_of_view(matrix_type, subset_func, subset_func2): 2184s > adata = gen_adata((30, 15), X_type=matrix_type) 2184s 2184s tests/test_views.py:531: 2184s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 2184s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:346: in gen_adata 2184s X = X_type(random_state.binomial(100, 0.005, (M, N)).astype(X_dtype)) 2184s /usr/lib/python3.13/functools.py:934: in wrapper 2184s return dispatch(args[0].__class__)(*args, **kw) 2184s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 2184s 2184s val = array([[0., 1., 0., 0., 0., 0., 0., 1., 2., 1., 0., 0., 1., 0., 0.], 2184s [0., 2., 0., 0., 0., 0., 1., 0., 2., 0., 0...1., 3., 0., 0., 1., 1., 0.], 2184s [0., 0., 2., 0., 0., 0., 0., 0., 1., 0., 1., 1., 0., 1., 0.]], 2184s dtype=float32) 2184s typ = 2184s 2184s @singledispatch 2184s def as_cupy(val, typ=None): 2184s """ 2184s Rough conversion function 2184s 2184s Will try to infer target type from input type if not specified. 2184s """ 2184s if typ is None: 2184s typ = resolve_cupy_type(val) 2184s 2184s if issubclass(typ, CupyArray): 2184s > import cupy as cp 2184s E ModuleNotFoundError: No module named 'cupy' 2184s 2184s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:1010: ModuleNotFoundError 2184s __________ test_view_of_view[cupy_array-slice_subset-list_int_subset] __________ 2184s 2184s matrix_type = functools.partial(, typ=) 2184s subset_func = 2184s subset_func2 = 2184s 2184s def test_view_of_view(matrix_type, subset_func, subset_func2): 2184s > adata = gen_adata((30, 15), X_type=matrix_type) 2184s 2184s tests/test_views.py:531: 2184s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 2184s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:346: in gen_adata 2184s X = X_type(random_state.binomial(100, 0.005, (M, N)).astype(X_dtype)) 2184s /usr/lib/python3.13/functools.py:934: in wrapper 2184s return dispatch(args[0].__class__)(*args, **kw) 2184s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 2184s 2184s val = array([[2., 0., 1., 0., 0., 0., 0., 0., 1., 1., 0., 1., 0., 1., 1.], 2184s [0., 0., 3., 0., 1., 1., 0., 1., 0., 0., 1...0., 0., 1., 1., 1., 0., 0.], 2184s [1., 0., 0., 2., 0., 1., 2., 0., 2., 1., 1., 0., 0., 0., 0.]], 2184s dtype=float32) 2184s typ = 2184s 2184s @singledispatch 2184s def as_cupy(val, typ=None): 2184s """ 2184s Rough conversion function 2184s 2184s Will try to infer target type from input type if not specified. 2184s """ 2184s if typ is None: 2184s typ = resolve_cupy_type(val) 2184s 2184s if issubclass(typ, CupyArray): 2184s > import cupy as cp 2184s E ModuleNotFoundError: No module named 'cupy' 2184s 2184s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:1010: ModuleNotFoundError 2184s _________ test_view_of_view[cupy_array-slice_subset-array_bool_subset] _________ 2184s 2184s matrix_type = functools.partial(, typ=) 2184s subset_func = 2184s subset_func2 = 2184s 2184s def test_view_of_view(matrix_type, subset_func, subset_func2): 2184s > adata = gen_adata((30, 15), X_type=matrix_type) 2184s 2184s tests/test_views.py:531: 2184s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 2184s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:346: in gen_adata 2184s X = X_type(random_state.binomial(100, 0.005, (M, N)).astype(X_dtype)) 2184s /usr/lib/python3.13/functools.py:934: in wrapper 2184s return dispatch(args[0].__class__)(*args, **kw) 2184s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 2184s 2184s val = array([[0., 0., 0., 0., 1., 0., 0., 2., 0., 0., 1., 0., 0., 0., 1.], 2184s [1., 1., 0., 0., 1., 0., 0., 1., 0., 1., 0...0., 0., 1., 0., 1., 0., 0.], 2184s [0., 0., 0., 1., 0., 0., 0., 2., 0., 0., 0., 0., 2., 0., 0.]], 2184s dtype=float32) 2184s typ = 2184s 2184s @singledispatch 2184s def as_cupy(val, typ=None): 2184s """ 2184s Rough conversion function 2184s 2184s Will try to infer target type from input type if not specified. 2184s """ 2184s if typ is None: 2184s typ = resolve_cupy_type(val) 2184s 2184s if issubclass(typ, CupyArray): 2184s > import cupy as cp 2184s E ModuleNotFoundError: No module named 'cupy' 2184s 2184s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:1010: ModuleNotFoundError 2184s _________ test_view_of_view[cupy_array-slice_subset-list_bool_subset] __________ 2184s 2184s matrix_type = functools.partial(, typ=) 2184s subset_func = 2184s subset_func2 = 2184s 2184s def test_view_of_view(matrix_type, subset_func, subset_func2): 2184s > adata = gen_adata((30, 15), X_type=matrix_type) 2184s 2184s tests/test_views.py:531: 2184s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 2184s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:346: in gen_adata 2184s X = X_type(random_state.binomial(100, 0.005, (M, N)).astype(X_dtype)) 2184s /usr/lib/python3.13/functools.py:934: in wrapper 2184s return dispatch(args[0].__class__)(*args, **kw) 2184s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 2184s 2184s val = array([[0., 1., 0., 0., 0., 2., 0., 1., 0., 1., 0., 1., 0., 0., 1.], 2184s [1., 0., 0., 0., 0., 1., 2., 0., 1., 0., 1...0., 2., 1., 0., 1., 0., 3.], 2184s [0., 0., 0., 0., 2., 0., 0., 0., 1., 0., 1., 0., 1., 0., 0.]], 2184s dtype=float32) 2184s typ = 2184s 2184s @singledispatch 2184s def as_cupy(val, typ=None): 2184s """ 2184s Rough conversion function 2184s 2184s Will try to infer target type from input type if not specified. 2184s """ 2184s if typ is None: 2184s typ = resolve_cupy_type(val) 2184s 2184s if issubclass(typ, CupyArray): 2184s > import cupy as cp 2184s E ModuleNotFoundError: No module named 'cupy' 2184s 2184s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:1010: ModuleNotFoundError 2184s ________ test_view_of_view[cupy_array-slice_subset-matrix_bool_subset] _________ 2184s 2184s matrix_type = functools.partial(, typ=) 2184s subset_func = 2184s subset_func2 = 2184s 2184s def test_view_of_view(matrix_type, subset_func, subset_func2): 2184s > adata = gen_adata((30, 15), X_type=matrix_type) 2184s 2184s tests/test_views.py:531: 2184s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 2184s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:346: in gen_adata 2184s X = X_type(random_state.binomial(100, 0.005, (M, N)).astype(X_dtype)) 2184s /usr/lib/python3.13/functools.py:934: in wrapper 2184s return dispatch(args[0].__class__)(*args, **kw) 2184s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 2184s 2184s val = array([[0., 0., 0., 0., 1., 0., 0., 1., 1., 0., 1., 0., 0., 0., 0.], 2184s [3., 1., 1., 0., 0., 2., 0., 2., 0., 2., 0...1., 0., 0., 3., 1., 0., 0.], 2184s [0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 1., 1., 0., 0.]], 2184s dtype=float32) 2184s typ = 2184s 2184s @singledispatch 2184s def as_cupy(val, typ=None): 2184s """ 2184s Rough conversion function 2184s 2184s Will try to infer target type from input type if not specified. 2184s """ 2184s if typ is None: 2184s typ = resolve_cupy_type(val) 2184s 2184s if issubclass(typ, CupyArray): 2184s > import cupy as cp 2184s E ModuleNotFoundError: No module named 'cupy' 2184s 2184s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:1010: ModuleNotFoundError 2184s _______ test_view_of_view[cupy_array-slice_subset-spmatrix_bool_subset] ________ 2184s 2184s matrix_type = functools.partial(, typ=) 2184s subset_func = 2184s subset_func2 = 2184s 2184s def test_view_of_view(matrix_type, subset_func, subset_func2): 2184s > adata = gen_adata((30, 15), X_type=matrix_type) 2184s 2184s tests/test_views.py:531: 2184s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 2184s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:346: in gen_adata 2184s X = X_type(random_state.binomial(100, 0.005, (M, N)).astype(X_dtype)) 2184s /usr/lib/python3.13/functools.py:934: in wrapper 2184s return dispatch(args[0].__class__)(*args, **kw) 2184s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 2184s 2184s val = array([[0., 0., 0., 0., 0., 0., 2., 0., 0., 1., 0., 0., 0., 1., 0.], 2184s [0., 0., 0., 0., 1., 0., 1., 0., 1., 1., 0...0., 0., 1., 0., 2., 5., 0.], 2184s [0., 0., 0., 0., 0., 2., 1., 0., 1., 0., 0., 0., 0., 0., 0.]], 2184s dtype=float32) 2184s typ = 2184s 2184s @singledispatch 2184s def as_cupy(val, typ=None): 2184s """ 2184s Rough conversion function 2184s 2184s Will try to infer target type from input type if not specified. 2184s """ 2184s if typ is None: 2184s typ = resolve_cupy_type(val) 2184s 2184s if issubclass(typ, CupyArray): 2184s > import cupy as cp 2184s E ModuleNotFoundError: No module named 'cupy' 2184s 2184s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:1010: ModuleNotFoundError 2184s ________ test_view_of_view[cupy_array-slice_subset-sparray_bool_subset] ________ 2184s 2184s matrix_type = functools.partial(, typ=) 2184s subset_func = 2184s subset_func2 = 2184s 2184s def test_view_of_view(matrix_type, subset_func, subset_func2): 2184s > adata = gen_adata((30, 15), X_type=matrix_type) 2184s 2184s tests/test_views.py:531: 2184s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 2184s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:346: in gen_adata 2184s X = X_type(random_state.binomial(100, 0.005, (M, N)).astype(X_dtype)) 2184s /usr/lib/python3.13/functools.py:934: in wrapper 2184s return dispatch(args[0].__class__)(*args, **kw) 2184s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 2184s 2184s val = array([[1., 1., 1., 0., 0., 0., 0., 1., 2., 0., 2., 2., 0., 0., 0.], 2184s [0., 0., 0., 2., 0., 0., 2., 2., 0., 0., 0...0., 0., 0., 0., 1., 0., 0.], 2184s [0., 0., 0., 1., 0., 0., 0., 1., 2., 1., 0., 3., 0., 1., 1.]], 2184s dtype=float32) 2184s typ = 2184s 2184s @singledispatch 2184s def as_cupy(val, typ=None): 2184s """ 2184s Rough conversion function 2184s 2184s Will try to infer target type from input type if not specified. 2184s """ 2184s if typ is None: 2184s typ = resolve_cupy_type(val) 2184s 2184s if issubclass(typ, CupyArray): 2184s > import cupy as cp 2184s E ModuleNotFoundError: No module named 'cupy' 2184s 2184s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:1010: ModuleNotFoundError 2184s ___________ test_view_of_view[cupy_array-single_subset-array_subset] ___________ 2184s 2184s matrix_type = functools.partial(, typ=) 2184s subset_func = 2184s subset_func2 = 2184s 2184s def test_view_of_view(matrix_type, subset_func, subset_func2): 2184s > adata = gen_adata((30, 15), X_type=matrix_type) 2184s 2184s tests/test_views.py:531: 2184s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 2184s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:346: in gen_adata 2184s X = X_type(random_state.binomial(100, 0.005, (M, N)).astype(X_dtype)) 2184s /usr/lib/python3.13/functools.py:934: in wrapper 2184s return dispatch(args[0].__class__)(*args, **kw) 2184s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 2184s 2184s val = array([[1., 0., 0., 0., 0., 1., 1., 1., 0., 1., 1., 0., 0., 1., 0.], 2184s [1., 0., 1., 1., 1., 0., 0., 0., 1., 0., 1...0., 1., 1., 1., 0., 1., 0.], 2184s [0., 0., 1., 0., 2., 2., 2., 1., 0., 1., 0., 0., 0., 0., 1.]], 2184s dtype=float32) 2184s typ = 2184s 2184s @singledispatch 2184s def as_cupy(val, typ=None): 2184s """ 2184s Rough conversion function 2184s 2184s Will try to infer target type from input type if not specified. 2184s """ 2184s if typ is None: 2184s typ = resolve_cupy_type(val) 2184s 2184s if issubclass(typ, CupyArray): 2184s > import cupy as cp 2184s E ModuleNotFoundError: No module named 'cupy' 2184s 2184s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:1010: ModuleNotFoundError 2184s ___________ test_view_of_view[cupy_array-single_subset-slice_subset] ___________ 2184s 2184s matrix_type = functools.partial(, typ=) 2184s subset_func = 2184s subset_func2 = 2184s 2184s def test_view_of_view(matrix_type, subset_func, subset_func2): 2184s > adata = gen_adata((30, 15), X_type=matrix_type) 2184s 2184s tests/test_views.py:531: 2184s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 2184s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:346: in gen_adata 2184s X = X_type(random_state.binomial(100, 0.005, (M, N)).astype(X_dtype)) 2184s /usr/lib/python3.13/functools.py:934: in wrapper 2184s return dispatch(args[0].__class__)(*args, **kw) 2184s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 2184s 2184s val = array([[0., 1., 0., 1., 0., 1., 1., 0., 0., 1., 0., 1., 0., 2., 1.], 2184s [0., 0., 0., 0., 0., 0., 0., 0., 1., 1., 2...0., 0., 0., 1., 0., 1., 0.], 2184s [0., 0., 0., 0., 0., 0., 1., 2., 0., 2., 1., 1., 0., 1., 0.]], 2184s dtype=float32) 2184s typ = 2184s 2184s @singledispatch 2184s def as_cupy(val, typ=None): 2184s """ 2184s Rough conversion function 2184s 2184s Will try to infer target type from input type if not specified. 2184s """ 2184s if typ is None: 2184s typ = resolve_cupy_type(val) 2184s 2184s if issubclass(typ, CupyArray): 2184s > import cupy as cp 2184s E ModuleNotFoundError: No module named 'cupy' 2184s 2184s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:1010: ModuleNotFoundError 2184s __________ test_view_of_view[cupy_array-single_subset-single_subset] ___________ 2184s 2184s matrix_type = functools.partial(, typ=) 2184s subset_func = 2184s subset_func2 = 2184s 2184s def test_view_of_view(matrix_type, subset_func, subset_func2): 2184s > adata = gen_adata((30, 15), X_type=matrix_type) 2184s 2184s tests/test_views.py:531: 2184s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 2184s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:346: in gen_adata 2184s X = X_type(random_state.binomial(100, 0.005, (M, N)).astype(X_dtype)) 2184s /usr/lib/python3.13/functools.py:934: in wrapper 2184s return dispatch(args[0].__class__)(*args, **kw) 2184s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 2184s 2184s val = array([[2., 0., 2., 0., 0., 1., 1., 1., 0., 0., 0., 0., 0., 0., 1.], 2184s [0., 1., 0., 0., 0., 0., 0., 0., 0., 0., 1...0., 0., 0., 1., 0., 0., 1.], 2184s [1., 1., 1., 2., 1., 1., 0., 0., 0., 0., 0., 0., 0., 1., 3.]], 2184s dtype=float32) 2184s typ = 2184s 2184s @singledispatch 2184s def as_cupy(val, typ=None): 2184s """ 2184s Rough conversion function 2184s 2184s Will try to infer target type from input type if not specified. 2184s """ 2184s if typ is None: 2184s typ = resolve_cupy_type(val) 2184s 2184s if issubclass(typ, CupyArray): 2184s > import cupy as cp 2184s E ModuleNotFoundError: No module named 'cupy' 2184s 2184s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:1010: ModuleNotFoundError 2184s _________ test_view_of_view[cupy_array-single_subset-array_int_subset] _________ 2184s 2184s matrix_type = functools.partial(, typ=) 2184s subset_func = 2184s subset_func2 = 2184s 2184s def test_view_of_view(matrix_type, subset_func, subset_func2): 2184s > adata = gen_adata((30, 15), X_type=matrix_type) 2184s 2184s tests/test_views.py:531: 2184s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 2184s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:346: in gen_adata 2184s X = X_type(random_state.binomial(100, 0.005, (M, N)).astype(X_dtype)) 2184s /usr/lib/python3.13/functools.py:934: in wrapper 2184s return dispatch(args[0].__class__)(*args, **kw) 2184s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 2184s 2184s val = array([[0., 0., 0., 0., 3., 0., 0., 0., 1., 0., 0., 1., 0., 1., 0.], 2184s [0., 1., 1., 1., 0., 2., 0., 0., 1., 1., 0...1., 2., 0., 0., 0., 0., 0.], 2184s [1., 0., 2., 0., 0., 0., 0., 0., 1., 0., 1., 1., 1., 0., 1.]], 2184s dtype=float32) 2184s typ = 2184s 2184s @singledispatch 2184s def as_cupy(val, typ=None): 2184s """ 2184s Rough conversion function 2184s 2184s Will try to infer target type from input type if not specified. 2184s """ 2184s if typ is None: 2184s typ = resolve_cupy_type(val) 2184s 2184s if issubclass(typ, CupyArray): 2184s > import cupy as cp 2184s E ModuleNotFoundError: No module named 'cupy' 2184s 2184s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:1010: ModuleNotFoundError 2184s _________ test_view_of_view[cupy_array-single_subset-list_int_subset] __________ 2184s 2184s matrix_type = functools.partial(, typ=) 2184s subset_func = 2184s subset_func2 = 2184s 2184s def test_view_of_view(matrix_type, subset_func, subset_func2): 2184s > adata = gen_adata((30, 15), X_type=matrix_type) 2184s 2184s tests/test_views.py:531: 2184s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 2184s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:346: in gen_adata 2184s X = X_type(random_state.binomial(100, 0.005, (M, N)).astype(X_dtype)) 2184s /usr/lib/python3.13/functools.py:934: in wrapper 2184s return dispatch(args[0].__class__)(*args, **kw) 2184s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 2184s 2184s val = array([[1., 0., 1., 2., 0., 0., 0., 1., 1., 0., 1., 0., 0., 0., 1.], 2184s [0., 1., 1., 0., 0., 1., 0., 1., 0., 1., 0...0., 0., 0., 1., 0., 1., 1.], 2184s [0., 0., 0., 1., 1., 0., 0., 0., 0., 1., 0., 0., 1., 0., 1.]], 2184s dtype=float32) 2184s typ = 2184s 2184s @singledispatch 2184s def as_cupy(val, typ=None): 2184s """ 2184s Rough conversion function 2184s 2184s Will try to infer target type from input type if not specified. 2184s """ 2184s if typ is None: 2184s typ = resolve_cupy_type(val) 2184s 2184s if issubclass(typ, CupyArray): 2184s > import cupy as cp 2184s E ModuleNotFoundError: No module named 'cupy' 2184s 2184s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:1010: ModuleNotFoundError 2184s ________ test_view_of_view[cupy_array-single_subset-array_bool_subset] _________ 2184s 2184s matrix_type = functools.partial(, typ=) 2184s subset_func = 2184s subset_func2 = 2184s 2184s def test_view_of_view(matrix_type, subset_func, subset_func2): 2184s > adata = gen_adata((30, 15), X_type=matrix_type) 2184s 2184s tests/test_views.py:531: 2184s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 2184s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:346: in gen_adata 2184s X = X_type(random_state.binomial(100, 0.005, (M, N)).astype(X_dtype)) 2184s /usr/lib/python3.13/functools.py:934: in wrapper 2184s return dispatch(args[0].__class__)(*args, **kw) 2184s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 2184s 2184s val = array([[0., 1., 0., 0., 1., 0., 0., 3., 2., 0., 1., 0., 0., 0., 0.], 2184s [0., 1., 0., 0., 0., 0., 0., 0., 0., 0., 0...0., 0., 0., 1., 1., 0., 0.], 2184s [1., 1., 2., 0., 1., 0., 0., 0., 0., 0., 0., 0., 1., 0., 0.]], 2184s dtype=float32) 2184s typ = 2184s 2184s @singledispatch 2184s def as_cupy(val, typ=None): 2184s """ 2184s Rough conversion function 2184s 2184s Will try to infer target type from input type if not specified. 2184s """ 2184s if typ is None: 2184s typ = resolve_cupy_type(val) 2184s 2184s if issubclass(typ, CupyArray): 2184s > import cupy as cp 2184s E ModuleNotFoundError: No module named 'cupy' 2184s 2184s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:1010: ModuleNotFoundError 2184s _________ test_view_of_view[cupy_array-single_subset-list_bool_subset] _________ 2184s 2184s matrix_type = functools.partial(, typ=) 2184s subset_func = 2184s subset_func2 = 2184s 2184s def test_view_of_view(matrix_type, subset_func, subset_func2): 2184s > adata = gen_adata((30, 15), X_type=matrix_type) 2184s 2184s tests/test_views.py:531: 2184s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 2184s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:346: in gen_adata 2184s X = X_type(random_state.binomial(100, 0.005, (M, N)).astype(X_dtype)) 2184s /usr/lib/python3.13/functools.py:934: in wrapper 2184s return dispatch(args[0].__class__)(*args, **kw) 2184s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 2184s 2184s val = array([[0., 0., 0., 0., 2., 1., 0., 0., 1., 0., 0., 0., 2., 1., 0.], 2184s [0., 2., 0., 1., 0., 0., 1., 0., 0., 0., 0...0., 0., 1., 2., 0., 2., 2.], 2184s [1., 1., 1., 0., 0., 1., 0., 0., 0., 1., 1., 0., 0., 1., 0.]], 2184s dtype=float32) 2184s typ = 2184s 2184s @singledispatch 2184s def as_cupy(val, typ=None): 2184s """ 2184s Rough conversion function 2184s 2184s Will try to infer target type from input type if not specified. 2184s """ 2184s if typ is None: 2184s typ = resolve_cupy_type(val) 2184s 2184s if issubclass(typ, CupyArray): 2184s > import cupy as cp 2184s E ModuleNotFoundError: No module named 'cupy' 2184s 2184s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:1010: ModuleNotFoundError 2184s ________ test_view_of_view[cupy_array-single_subset-matrix_bool_subset] ________ 2184s 2184s matrix_type = functools.partial(, typ=) 2184s subset_func = 2184s subset_func2 = 2184s 2184s def test_view_of_view(matrix_type, subset_func, subset_func2): 2184s > adata = gen_adata((30, 15), X_type=matrix_type) 2184s 2184s tests/test_views.py:531: 2184s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 2184s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:346: in gen_adata 2184s X = X_type(random_state.binomial(100, 0.005, (M, N)).astype(X_dtype)) 2184s /usr/lib/python3.13/functools.py:934: in wrapper 2184s return dispatch(args[0].__class__)(*args, **kw) 2184s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 2184s 2184s val = array([[0., 0., 1., 0., 0., 0., 2., 1., 0., 0., 0., 0., 1., 1., 1.], 2184s [0., 1., 0., 0., 0., 0., 0., 0., 0., 0., 0...2., 0., 4., 0., 0., 2., 1.], 2184s [0., 0., 1., 0., 1., 0., 1., 1., 0., 0., 1., 0., 1., 1., 3.]], 2184s dtype=float32) 2184s typ = 2184s 2184s @singledispatch 2184s def as_cupy(val, typ=None): 2184s """ 2184s Rough conversion function 2184s 2184s Will try to infer target type from input type if not specified. 2184s """ 2184s if typ is None: 2184s typ = resolve_cupy_type(val) 2184s 2184s if issubclass(typ, CupyArray): 2184s > import cupy as cp 2184s E ModuleNotFoundError: No module named 'cupy' 2184s 2184s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:1010: ModuleNotFoundError 2184s _______ test_view_of_view[cupy_array-single_subset-spmatrix_bool_subset] _______ 2184s 2184s matrix_type = functools.partial(, typ=) 2184s subset_func = 2184s subset_func2 = 2184s 2184s def test_view_of_view(matrix_type, subset_func, subset_func2): 2184s > adata = gen_adata((30, 15), X_type=matrix_type) 2184s 2184s tests/test_views.py:531: 2184s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 2184s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:346: in gen_adata 2184s X = X_type(random_state.binomial(100, 0.005, (M, N)).astype(X_dtype)) 2184s /usr/lib/python3.13/functools.py:934: in wrapper 2184s return dispatch(args[0].__class__)(*args, **kw) 2184s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 2184s 2184s val = array([[1., 1., 1., 0., 0., 0., 0., 2., 1., 0., 0., 0., 0., 0., 0.], 2184s [0., 1., 0., 0., 1., 0., 0., 1., 0., 1., 1...0., 1., 0., 1., 0., 0., 0.], 2184s [1., 0., 0., 0., 0., 0., 0., 0., 0., 1., 0., 1., 0., 0., 0.]], 2184s dtype=float32) 2184s typ = 2184s 2184s @singledispatch 2184s def as_cupy(val, typ=None): 2184s """ 2184s Rough conversion function 2184s 2184s Will try to infer target type from input type if not specified. 2184s """ 2184s if typ is None: 2184s typ = resolve_cupy_type(val) 2184s 2184s if issubclass(typ, CupyArray): 2184s > import cupy as cp 2184s E ModuleNotFoundError: No module named 'cupy' 2184s 2184s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:1010: ModuleNotFoundError 2184s _______ test_view_of_view[cupy_array-single_subset-sparray_bool_subset] ________ 2184s 2184s matrix_type = functools.partial(, typ=) 2184s subset_func = 2184s subset_func2 = 2184s 2184s def test_view_of_view(matrix_type, subset_func, subset_func2): 2184s > adata = gen_adata((30, 15), X_type=matrix_type) 2184s 2184s tests/test_views.py:531: 2184s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 2184s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:346: in gen_adata 2184s X = X_type(random_state.binomial(100, 0.005, (M, N)).astype(X_dtype)) 2184s /usr/lib/python3.13/functools.py:934: in wrapper 2184s return dispatch(args[0].__class__)(*args, **kw) 2184s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 2184s 2184s val = array([[0., 0., 0., 1., 0., 0., 2., 0., 0., 1., 0., 0., 0., 0., 0.], 2184s [1., 0., 0., 0., 0., 0., 0., 0., 0., 0., 2...0., 1., 0., 1., 0., 0., 0.], 2184s [0., 0., 0., 0., 1., 0., 0., 2., 0., 0., 0., 3., 0., 1., 0.]], 2184s dtype=float32) 2184s typ = 2184s 2184s @singledispatch 2184s def as_cupy(val, typ=None): 2184s """ 2184s Rough conversion function 2184s 2184s Will try to infer target type from input type if not specified. 2184s """ 2184s if typ is None: 2184s typ = resolve_cupy_type(val) 2184s 2184s if issubclass(typ, CupyArray): 2184s > import cupy as cp 2184s E ModuleNotFoundError: No module named 'cupy' 2184s 2184s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:1010: ModuleNotFoundError 2184s _________ test_view_of_view[cupy_array-array_int_subset-array_subset] __________ 2184s 2184s matrix_type = functools.partial(, typ=) 2184s subset_func = 2184s subset_func2 = 2184s 2184s def test_view_of_view(matrix_type, subset_func, subset_func2): 2184s > adata = gen_adata((30, 15), X_type=matrix_type) 2184s 2184s tests/test_views.py:531: 2184s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 2184s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:346: in gen_adata 2184s X = X_type(random_state.binomial(100, 0.005, (M, N)).astype(X_dtype)) 2184s /usr/lib/python3.13/functools.py:934: in wrapper 2184s return dispatch(args[0].__class__)(*args, **kw) 2184s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 2184s 2184s val = array([[0., 1., 0., 0., 0., 2., 0., 2., 0., 1., 1., 0., 0., 0., 1.], 2184s [1., 0., 1., 0., 2., 0., 0., 1., 1., 0., 1...2., 0., 0., 1., 0., 0., 0.], 2184s [1., 0., 1., 0., 1., 0., 1., 0., 0., 0., 0., 0., 1., 1., 0.]], 2184s dtype=float32) 2184s typ = 2184s 2184s @singledispatch 2184s def as_cupy(val, typ=None): 2184s """ 2184s Rough conversion function 2184s 2184s Will try to infer target type from input type if not specified. 2184s """ 2184s if typ is None: 2184s typ = resolve_cupy_type(val) 2184s 2184s if issubclass(typ, CupyArray): 2184s > import cupy as cp 2184s E ModuleNotFoundError: No module named 'cupy' 2184s 2184s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:1010: ModuleNotFoundError 2184s _________ test_view_of_view[cupy_array-array_int_subset-slice_subset] __________ 2184s 2184s matrix_type = functools.partial(, typ=) 2184s subset_func = 2184s subset_func2 = 2184s 2184s def test_view_of_view(matrix_type, subset_func, subset_func2): 2184s > adata = gen_adata((30, 15), X_type=matrix_type) 2184s 2184s tests/test_views.py:531: 2184s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 2184s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:346: in gen_adata 2184s X = X_type(random_state.binomial(100, 0.005, (M, N)).astype(X_dtype)) 2184s /usr/lib/python3.13/functools.py:934: in wrapper 2184s return dispatch(args[0].__class__)(*args, **kw) 2184s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 2184s 2184s val = array([[0., 1., 0., 0., 1., 0., 1., 1., 0., 1., 0., 0., 0., 1., 0.], 2184s [1., 0., 1., 0., 0., 1., 0., 0., 0., 0., 0...1., 1., 0., 0., 0., 0., 0.], 2184s [2., 0., 0., 0., 0., 1., 0., 0., 1., 0., 0., 0., 1., 0., 0.]], 2184s dtype=float32) 2184s typ = 2184s 2184s @singledispatch 2184s def as_cupy(val, typ=None): 2184s """ 2184s Rough conversion function 2184s 2184s Will try to infer target type from input type if not specified. 2184s """ 2184s if typ is None: 2184s typ = resolve_cupy_type(val) 2184s 2184s if issubclass(typ, CupyArray): 2184s > import cupy as cp 2184s E ModuleNotFoundError: No module named 'cupy' 2184s 2184s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:1010: ModuleNotFoundError 2184s _________ test_view_of_view[cupy_array-array_int_subset-single_subset] _________ 2184s 2184s matrix_type = functools.partial(, typ=) 2184s subset_func = 2184s subset_func2 = 2184s 2184s def test_view_of_view(matrix_type, subset_func, subset_func2): 2184s > adata = gen_adata((30, 15), X_type=matrix_type) 2184s 2184s tests/test_views.py:531: 2184s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 2184s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:346: in gen_adata 2184s X = X_type(random_state.binomial(100, 0.005, (M, N)).astype(X_dtype)) 2184s /usr/lib/python3.13/functools.py:934: in wrapper 2184s return dispatch(args[0].__class__)(*args, **kw) 2184s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 2184s 2184s val = array([[0., 3., 0., 0., 0., 1., 0., 1., 0., 0., 1., 2., 1., 0., 0.], 2184s [1., 0., 1., 1., 2., 0., 0., 0., 0., 0., 1...0., 1., 2., 1., 1., 0., 1.], 2184s [0., 0., 0., 1., 0., 1., 1., 1., 1., 0., 1., 1., 0., 0., 0.]], 2184s dtype=float32) 2184s typ = 2184s 2184s @singledispatch 2184s def as_cupy(val, typ=None): 2184s """ 2184s Rough conversion function 2184s 2184s Will try to infer target type from input type if not specified. 2184s """ 2184s if typ is None: 2184s typ = resolve_cupy_type(val) 2184s 2184s if issubclass(typ, CupyArray): 2184s > import cupy as cp 2184s E ModuleNotFoundError: No module named 'cupy' 2184s 2184s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:1010: ModuleNotFoundError 2184s _______ test_view_of_view[cupy_array-array_int_subset-array_int_subset] ________ 2184s 2184s matrix_type = functools.partial(, typ=) 2184s subset_func = 2184s subset_func2 = 2184s 2184s def test_view_of_view(matrix_type, subset_func, subset_func2): 2184s > adata = gen_adata((30, 15), X_type=matrix_type) 2184s 2184s tests/test_views.py:531: 2184s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 2184s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:346: in gen_adata 2184s X = X_type(random_state.binomial(100, 0.005, (M, N)).astype(X_dtype)) 2184s /usr/lib/python3.13/functools.py:934: in wrapper 2184s return dispatch(args[0].__class__)(*args, **kw) 2184s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 2184s 2184s val = array([[0., 0., 3., 0., 1., 1., 0., 0., 2., 0., 0., 0., 0., 0., 1.], 2184s [0., 1., 0., 0., 1., 0., 0., 1., 0., 0., 1...1., 0., 0., 0., 0., 1., 0.], 2184s [0., 2., 1., 0., 0., 0., 1., 1., 0., 1., 1., 0., 1., 1., 1.]], 2184s dtype=float32) 2184s typ = 2184s 2184s @singledispatch 2184s def as_cupy(val, typ=None): 2184s """ 2184s Rough conversion function 2184s 2184s Will try to infer target type from input type if not specified. 2184s """ 2184s if typ is None: 2184s typ = resolve_cupy_type(val) 2184s 2184s if issubclass(typ, CupyArray): 2184s > import cupy as cp 2184s E ModuleNotFoundError: No module named 'cupy' 2184s 2184s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:1010: ModuleNotFoundError 2184s ________ test_view_of_view[cupy_array-array_int_subset-list_int_subset] ________ 2184s 2184s matrix_type = functools.partial(, typ=) 2184s subset_func = 2184s subset_func2 = 2184s 2184s def test_view_of_view(matrix_type, subset_func, subset_func2): 2184s > adata = gen_adata((30, 15), X_type=matrix_type) 2184s 2184s tests/test_views.py:531: 2184s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 2184s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:346: in gen_adata 2184s X = X_type(random_state.binomial(100, 0.005, (M, N)).astype(X_dtype)) 2184s /usr/lib/python3.13/functools.py:934: in wrapper 2184s return dispatch(args[0].__class__)(*args, **kw) 2184s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 2184s 2184s val = array([[0., 0., 1., 0., 0., 1., 0., 2., 1., 1., 1., 0., 1., 0., 0.], 2184s [0., 0., 2., 0., 0., 0., 1., 1., 0., 1., 0...0., 1., 1., 1., 1., 0., 1.], 2184s [0., 1., 0., 0., 1., 1., 0., 0., 0., 0., 1., 0., 1., 2., 0.]], 2184s dtype=float32) 2184s typ = 2184s 2184s @singledispatch 2184s def as_cupy(val, typ=None): 2184s """ 2184s Rough conversion function 2184s 2184s Will try to infer target type from input type if not specified. 2184s """ 2184s if typ is None: 2184s typ = resolve_cupy_type(val) 2184s 2184s if issubclass(typ, CupyArray): 2184s > import cupy as cp 2184s E ModuleNotFoundError: No module named 'cupy' 2184s 2184s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:1010: ModuleNotFoundError 2184s _______ test_view_of_view[cupy_array-array_int_subset-array_bool_subset] _______ 2184s 2184s matrix_type = functools.partial(, typ=) 2184s subset_func = 2184s subset_func2 = 2184s 2184s def test_view_of_view(matrix_type, subset_func, subset_func2): 2184s > adata = gen_adata((30, 15), X_type=matrix_type) 2184s 2184s tests/test_views.py:531: 2184s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 2184s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:346: in gen_adata 2184s X = X_type(random_state.binomial(100, 0.005, (M, N)).astype(X_dtype)) 2184s /usr/lib/python3.13/functools.py:934: in wrapper 2184s return dispatch(args[0].__class__)(*args, **kw) 2184s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 2184s 2184s val = array([[0., 0., 1., 1., 1., 0., 0., 0., 1., 1., 0., 1., 1., 0., 1.], 2184s [0., 1., 1., 2., 1., 1., 1., 0., 0., 0., 0...1., 1., 0., 0., 0., 2., 1.], 2184s [1., 0., 1., 1., 1., 3., 1., 0., 0., 1., 0., 1., 1., 1., 0.]], 2184s dtype=float32) 2184s typ = 2184s 2184s @singledispatch 2184s def as_cupy(val, typ=None): 2184s """ 2184s Rough conversion function 2184s 2184s Will try to infer target type from input type if not specified. 2184s """ 2184s if typ is None: 2184s typ = resolve_cupy_type(val) 2184s 2184s if issubclass(typ, CupyArray): 2184s > import cupy as cp 2184s E ModuleNotFoundError: No module named 'cupy' 2184s 2184s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:1010: ModuleNotFoundError 2184s _______ test_view_of_view[cupy_array-array_int_subset-list_bool_subset] ________ 2184s 2184s matrix_type = functools.partial(, typ=) 2184s subset_func = 2184s subset_func2 = 2184s 2184s def test_view_of_view(matrix_type, subset_func, subset_func2): 2184s > adata = gen_adata((30, 15), X_type=matrix_type) 2184s 2184s tests/test_views.py:531: 2184s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 2184s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:346: in gen_adata 2184s X = X_type(random_state.binomial(100, 0.005, (M, N)).astype(X_dtype)) 2184s /usr/lib/python3.13/functools.py:934: in wrapper 2184s return dispatch(args[0].__class__)(*args, **kw) 2184s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 2184s 2184s val = array([[2., 0., 0., 1., 0., 0., 0., 0., 0., 0., 0., 1., 0., 0., 0.], 2184s [0., 1., 3., 0., 0., 0., 0., 2., 0., 0., 1...1., 1., 0., 0., 0., 0., 0.], 2184s [0., 0., 1., 0., 0., 0., 1., 0., 0., 0., 1., 0., 2., 0., 0.]], 2184s dtype=float32) 2184s typ = 2184s 2184s @singledispatch 2184s def as_cupy(val, typ=None): 2184s """ 2184s Rough conversion function 2184s 2184s Will try to infer target type from input type if not specified. 2184s """ 2184s if typ is None: 2184s typ = resolve_cupy_type(val) 2184s 2184s if issubclass(typ, CupyArray): 2184s > import cupy as cp 2184s E ModuleNotFoundError: No module named 'cupy' 2184s 2184s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:1010: ModuleNotFoundError 2184s ______ test_view_of_view[cupy_array-array_int_subset-matrix_bool_subset] _______ 2184s 2184s matrix_type = functools.partial(, typ=) 2184s subset_func = 2184s subset_func2 = 2184s 2184s def test_view_of_view(matrix_type, subset_func, subset_func2): 2184s > adata = gen_adata((30, 15), X_type=matrix_type) 2184s 2184s tests/test_views.py:531: 2184s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 2184s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:346: in gen_adata 2184s X = X_type(random_state.binomial(100, 0.005, (M, N)).astype(X_dtype)) 2184s /usr/lib/python3.13/functools.py:934: in wrapper 2184s return dispatch(args[0].__class__)(*args, **kw) 2184s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 2184s 2184s val = array([[0., 2., 1., 1., 0., 0., 1., 1., 1., 0., 0., 0., 0., 0., 0.], 2184s [0., 0., 0., 2., 1., 0., 0., 0., 0., 0., 1...0., 2., 0., 0., 2., 0., 0.], 2184s [0., 0., 1., 0., 0., 0., 0., 0., 0., 0., 1., 0., 0., 1., 0.]], 2184s dtype=float32) 2184s typ = 2184s 2184s @singledispatch 2184s def as_cupy(val, typ=None): 2184s """ 2184s Rough conversion function 2184s 2184s Will try to infer target type from input type if not specified. 2184s """ 2184s if typ is None: 2184s typ = resolve_cupy_type(val) 2184s 2184s if issubclass(typ, CupyArray): 2184s > import cupy as cp 2184s E ModuleNotFoundError: No module named 'cupy' 2184s 2184s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:1010: ModuleNotFoundError 2184s _____ test_view_of_view[cupy_array-array_int_subset-spmatrix_bool_subset] ______ 2184s 2184s matrix_type = functools.partial(, typ=) 2184s subset_func = 2184s subset_func2 = 2184s 2184s def test_view_of_view(matrix_type, subset_func, subset_func2): 2184s > adata = gen_adata((30, 15), X_type=matrix_type) 2184s 2184s tests/test_views.py:531: 2184s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 2184s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:346: in gen_adata 2184s X = X_type(random_state.binomial(100, 0.005, (M, N)).astype(X_dtype)) 2184s /usr/lib/python3.13/functools.py:934: in wrapper 2184s return dispatch(args[0].__class__)(*args, **kw) 2184s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 2184s 2184s val = array([[1., 0., 0., 2., 0., 0., 1., 0., 0., 0., 1., 1., 1., 0., 1.], 2184s [0., 0., 0., 0., 1., 0., 1., 0., 2., 1., 0...0., 0., 0., 0., 0., 0., 1.], 2184s [0., 0., 0., 1., 0., 0., 1., 0., 0., 2., 0., 2., 1., 1., 1.]], 2184s dtype=float32) 2184s typ = 2184s 2184s @singledispatch 2184s def as_cupy(val, typ=None): 2184s """ 2184s Rough conversion function 2184s 2184s Will try to infer target type from input type if not specified. 2184s """ 2184s if typ is None: 2184s typ = resolve_cupy_type(val) 2184s 2184s if issubclass(typ, CupyArray): 2184s > import cupy as cp 2184s E ModuleNotFoundError: No module named 'cupy' 2184s 2184s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:1010: ModuleNotFoundError 2184s ______ test_view_of_view[cupy_array-array_int_subset-sparray_bool_subset] ______ 2184s 2184s matrix_type = functools.partial(, typ=) 2184s subset_func = 2184s subset_func2 = 2184s 2184s def test_view_of_view(matrix_type, subset_func, subset_func2): 2184s > adata = gen_adata((30, 15), X_type=matrix_type) 2184s 2184s tests/test_views.py:531: 2184s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 2184s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:346: in gen_adata 2184s X = X_type(random_state.binomial(100, 0.005, (M, N)).astype(X_dtype)) 2184s /usr/lib/python3.13/functools.py:934: in wrapper 2184s return dispatch(args[0].__class__)(*args, **kw) 2184s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 2184s 2184s val = array([[1., 0., 2., 0., 1., 0., 1., 1., 2., 0., 1., 0., 0., 0., 0.], 2184s [1., 0., 1., 1., 1., 1., 1., 0., 0., 0., 1...0., 0., 0., 1., 0., 0., 0.], 2184s [1., 1., 0., 1., 0., 0., 0., 0., 1., 0., 1., 0., 0., 0., 1.]], 2184s dtype=float32) 2184s typ = 2184s 2184s @singledispatch 2184s def as_cupy(val, typ=None): 2184s """ 2184s Rough conversion function 2184s 2184s Will try to infer target type from input type if not specified. 2184s """ 2184s if typ is None: 2184s typ = resolve_cupy_type(val) 2184s 2184s if issubclass(typ, CupyArray): 2184s > import cupy as cp 2184s E ModuleNotFoundError: No module named 'cupy' 2184s 2184s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:1010: ModuleNotFoundError 2184s __________ test_view_of_view[cupy_array-list_int_subset-array_subset] __________ 2184s 2184s matrix_type = functools.partial(, typ=) 2184s subset_func = 2184s subset_func2 = 2184s 2184s def test_view_of_view(matrix_type, subset_func, subset_func2): 2184s > adata = gen_adata((30, 15), X_type=matrix_type) 2184s 2184s tests/test_views.py:531: 2184s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 2184s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:346: in gen_adata 2184s X = X_type(random_state.binomial(100, 0.005, (M, N)).astype(X_dtype)) 2184s /usr/lib/python3.13/functools.py:934: in wrapper 2184s return dispatch(args[0].__class__)(*args, **kw) 2184s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 2184s 2184s val = array([[1., 0., 1., 0., 1., 1., 0., 0., 1., 2., 1., 0., 1., 0., 0.], 2184s [0., 0., 0., 1., 0., 0., 0., 0., 2., 1., 0...1., 0., 3., 0., 0., 1., 0.], 2184s [0., 3., 0., 0., 1., 0., 0., 1., 0., 1., 0., 0., 0., 0., 0.]], 2184s dtype=float32) 2184s typ = 2184s 2184s @singledispatch 2184s def as_cupy(val, typ=None): 2184s """ 2184s Rough conversion function 2184s 2184s Will try to infer target type from input type if not specified. 2184s """ 2184s if typ is None: 2184s typ = resolve_cupy_type(val) 2184s 2184s if issubclass(typ, CupyArray): 2184s > import cupy as cp 2184s E ModuleNotFoundError: No module named 'cupy' 2184s 2184s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:1010: ModuleNotFoundError 2184s __________ test_view_of_view[cupy_array-list_int_subset-slice_subset] __________ 2184s 2184s matrix_type = functools.partial(, typ=) 2184s subset_func = 2184s subset_func2 = 2184s 2184s def test_view_of_view(matrix_type, subset_func, subset_func2): 2184s > adata = gen_adata((30, 15), X_type=matrix_type) 2184s 2184s tests/test_views.py:531: 2184s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 2184s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:346: in gen_adata 2184s X = X_type(random_state.binomial(100, 0.005, (M, N)).astype(X_dtype)) 2184s /usr/lib/python3.13/functools.py:934: in wrapper 2184s return dispatch(args[0].__class__)(*args, **kw) 2184s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 2184s 2184s val = array([[0., 1., 0., 0., 0., 1., 0., 1., 1., 1., 0., 0., 0., 0., 1.], 2184s [1., 1., 0., 0., 1., 0., 0., 0., 2., 1., 0...3., 0., 1., 1., 0., 0., 0.], 2184s [0., 0., 0., 0., 1., 0., 0., 1., 0., 1., 0., 0., 1., 0., 0.]], 2184s dtype=float32) 2184s typ = 2184s 2184s @singledispatch 2184s def as_cupy(val, typ=None): 2184s """ 2184s Rough conversion function 2184s 2184s Will try to infer target type from input type if not specified. 2184s """ 2184s if typ is None: 2184s typ = resolve_cupy_type(val) 2184s 2184s if issubclass(typ, CupyArray): 2184s > import cupy as cp 2184s E ModuleNotFoundError: No module named 'cupy' 2184s 2184s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:1010: ModuleNotFoundError 2184s _________ test_view_of_view[cupy_array-list_int_subset-single_subset] __________ 2184s 2184s matrix_type = functools.partial(, typ=) 2184s subset_func = 2184s subset_func2 = 2184s 2184s def test_view_of_view(matrix_type, subset_func, subset_func2): 2184s > adata = gen_adata((30, 15), X_type=matrix_type) 2184s 2184s tests/test_views.py:531: 2184s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 2184s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:346: in gen_adata 2184s X = X_type(random_state.binomial(100, 0.005, (M, N)).astype(X_dtype)) 2184s /usr/lib/python3.13/functools.py:934: in wrapper 2184s return dispatch(args[0].__class__)(*args, **kw) 2184s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 2184s 2184s val = array([[3., 0., 1., 0., 0., 0., 0., 0., 1., 1., 0., 0., 0., 1., 1.], 2184s [0., 1., 1., 1., 0., 0., 0., 0., 0., 0., 0...0., 1., 1., 1., 0., 0., 2.], 2184s [1., 2., 1., 0., 1., 0., 0., 0., 1., 1., 1., 1., 0., 2., 1.]], 2184s dtype=float32) 2184s typ = 2184s 2184s @singledispatch 2184s def as_cupy(val, typ=None): 2184s """ 2184s Rough conversion function 2184s 2184s Will try to infer target type from input type if not specified. 2184s """ 2184s if typ is None: 2184s typ = resolve_cupy_type(val) 2184s 2184s if issubclass(typ, CupyArray): 2184s > import cupy as cp 2184s E ModuleNotFoundError: No module named 'cupy' 2184s 2184s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:1010: ModuleNotFoundError 2184s ________ test_view_of_view[cupy_array-list_int_subset-array_int_subset] ________ 2184s 2184s matrix_type = functools.partial(, typ=) 2184s subset_func = 2184s subset_func2 = 2184s 2184s def test_view_of_view(matrix_type, subset_func, subset_func2): 2184s > adata = gen_adata((30, 15), X_type=matrix_type) 2184s 2184s tests/test_views.py:531: 2184s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 2184s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:346: in gen_adata 2184s X = X_type(random_state.binomial(100, 0.005, (M, N)).astype(X_dtype)) 2184s /usr/lib/python3.13/functools.py:934: in wrapper 2184s return dispatch(args[0].__class__)(*args, **kw) 2184s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 2184s 2184s val = array([[1., 0., 1., 0., 0., 0., 0., 0., 1., 0., 2., 1., 0., 1., 0.], 2184s [0., 0., 0., 0., 1., 1., 0., 2., 0., 0., 0...1., 0., 0., 0., 0., 0., 1.], 2184s [1., 0., 0., 0., 0., 0., 1., 1., 0., 1., 0., 1., 0., 1., 0.]], 2184s dtype=float32) 2184s typ = 2184s 2184s @singledispatch 2184s def as_cupy(val, typ=None): 2184s """ 2184s Rough conversion function 2184s 2184s Will try to infer target type from input type if not specified. 2184s """ 2184s if typ is None: 2184s typ = resolve_cupy_type(val) 2184s 2184s if issubclass(typ, CupyArray): 2184s > import cupy as cp 2184s E ModuleNotFoundError: No module named 'cupy' 2184s 2184s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:1010: ModuleNotFoundError 2184s ________ test_view_of_view[cupy_array-list_int_subset-list_int_subset] _________ 2184s 2184s matrix_type = functools.partial(, typ=) 2184s subset_func = 2184s subset_func2 = 2184s 2184s def test_view_of_view(matrix_type, subset_func, subset_func2): 2184s > adata = gen_adata((30, 15), X_type=matrix_type) 2184s 2184s tests/test_views.py:531: 2184s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 2184s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:346: in gen_adata 2184s X = X_type(random_state.binomial(100, 0.005, (M, N)).astype(X_dtype)) 2184s /usr/lib/python3.13/functools.py:934: in wrapper 2184s return dispatch(args[0].__class__)(*args, **kw) 2184s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 2184s 2184s val = array([[0., 1., 0., 0., 2., 0., 2., 1., 2., 0., 0., 0., 0., 0., 0.], 2184s [1., 0., 1., 1., 0., 1., 0., 1., 1., 3., 0...0., 0., 1., 2., 1., 0., 1.], 2184s [0., 1., 3., 1., 0., 0., 0., 0., 0., 0., 0., 0., 1., 0., 0.]], 2184s dtype=float32) 2184s typ = 2184s 2184s @singledispatch 2184s def as_cupy(val, typ=None): 2184s """ 2184s Rough conversion function 2184s 2184s Will try to infer target type from input type if not specified. 2184s """ 2184s if typ is None: 2184s typ = resolve_cupy_type(val) 2184s 2184s if issubclass(typ, CupyArray): 2184s > import cupy as cp 2184s E ModuleNotFoundError: No module named 'cupy' 2184s 2184s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:1010: ModuleNotFoundError 2184s _______ test_view_of_view[cupy_array-list_int_subset-array_bool_subset] ________ 2184s 2184s matrix_type = functools.partial(, typ=) 2184s subset_func = 2184s subset_func2 = 2184s 2184s def test_view_of_view(matrix_type, subset_func, subset_func2): 2184s > adata = gen_adata((30, 15), X_type=matrix_type) 2184s 2184s tests/test_views.py:531: 2184s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 2184s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:346: in gen_adata 2184s X = X_type(random_state.binomial(100, 0.005, (M, N)).astype(X_dtype)) 2184s /usr/lib/python3.13/functools.py:934: in wrapper 2184s return dispatch(args[0].__class__)(*args, **kw) 2184s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 2184s 2184s val = array([[1., 0., 0., 0., 0., 1., 0., 1., 0., 1., 1., 0., 0., 1., 0.], 2184s [0., 0., 0., 0., 0., 0., 0., 0., 1., 1., 2...1., 0., 1., 0., 2., 1., 1.], 2184s [1., 1., 2., 0., 1., 2., 0., 0., 1., 1., 0., 1., 0., 1., 1.]], 2184s dtype=float32) 2184s typ = 2184s 2184s @singledispatch 2184s def as_cupy(val, typ=None): 2184s """ 2184s Rough conversion function 2184s 2184s Will try to infer target type from input type if not specified. 2184s """ 2184s if typ is None: 2184s typ = resolve_cupy_type(val) 2184s 2184s if issubclass(typ, CupyArray): 2184s > import cupy as cp 2184s E ModuleNotFoundError: No module named 'cupy' 2184s 2184s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:1010: ModuleNotFoundError 2184s ________ test_view_of_view[cupy_array-list_int_subset-list_bool_subset] ________ 2184s 2184s matrix_type = functools.partial(, typ=) 2184s subset_func = 2184s subset_func2 = 2184s 2184s def test_view_of_view(matrix_type, subset_func, subset_func2): 2184s > adata = gen_adata((30, 15), X_type=matrix_type) 2184s 2184s tests/test_views.py:531: 2184s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 2184s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:346: in gen_adata 2184s X = X_type(random_state.binomial(100, 0.005, (M, N)).astype(X_dtype)) 2184s /usr/lib/python3.13/functools.py:934: in wrapper 2184s return dispatch(args[0].__class__)(*args, **kw) 2184s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 2184s 2184s val = array([[2., 0., 0., 0., 1., 1., 0., 0., 0., 0., 0., 1., 1., 2., 0.], 2184s [1., 2., 1., 2., 1., 1., 0., 1., 2., 1., 0...2., 0., 2., 1., 1., 1., 2.], 2184s [1., 0., 0., 1., 0., 1., 0., 0., 1., 0., 0., 0., 1., 2., 1.]], 2184s dtype=float32) 2184s typ = 2184s 2184s @singledispatch 2184s def as_cupy(val, typ=None): 2184s """ 2184s Rough conversion function 2184s 2184s Will try to infer target type from input type if not specified. 2184s """ 2184s if typ is None: 2184s typ = resolve_cupy_type(val) 2184s 2184s if issubclass(typ, CupyArray): 2184s > import cupy as cp 2184s E ModuleNotFoundError: No module named 'cupy' 2184s 2184s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:1010: ModuleNotFoundError 2184s _______ test_view_of_view[cupy_array-list_int_subset-matrix_bool_subset] _______ 2184s 2184s matrix_type = functools.partial(, typ=) 2184s subset_func = 2184s subset_func2 = 2184s 2184s def test_view_of_view(matrix_type, subset_func, subset_func2): 2184s > adata = gen_adata((30, 15), X_type=matrix_type) 2184s 2184s tests/test_views.py:531: 2184s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 2184s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:346: in gen_adata 2184s X = X_type(random_state.binomial(100, 0.005, (M, N)).astype(X_dtype)) 2184s /usr/lib/python3.13/functools.py:934: in wrapper 2184s return dispatch(args[0].__class__)(*args, **kw) 2184s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 2184s 2184s val = array([[0., 0., 0., 0., 0., 0., 0., 1., 1., 0., 2., 2., 1., 0., 2.], 2184s [1., 0., 1., 1., 0., 0., 1., 0., 1., 0., 1...0., 0., 0., 2., 0., 0., 0.], 2184s [1., 0., 0., 2., 0., 0., 1., 1., 2., 0., 0., 0., 0., 1., 0.]], 2184s dtype=float32) 2184s typ = 2184s 2184s @singledispatch 2184s def as_cupy(val, typ=None): 2184s """ 2184s Rough conversion function 2184s 2184s Will try to infer target type from input type if not specified. 2184s """ 2184s if typ is None: 2184s typ = resolve_cupy_type(val) 2184s 2184s if issubclass(typ, CupyArray): 2184s > import cupy as cp 2184s E ModuleNotFoundError: No module named 'cupy' 2184s 2184s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:1010: ModuleNotFoundError 2184s ______ test_view_of_view[cupy_array-list_int_subset-spmatrix_bool_subset] ______ 2184s 2184s matrix_type = functools.partial(, typ=) 2184s subset_func = 2184s subset_func2 = 2184s 2184s def test_view_of_view(matrix_type, subset_func, subset_func2): 2184s > adata = gen_adata((30, 15), X_type=matrix_type) 2184s 2184s tests/test_views.py:531: 2184s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 2184s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:346: in gen_adata 2184s X = X_type(random_state.binomial(100, 0.005, (M, N)).astype(X_dtype)) 2184s /usr/lib/python3.13/functools.py:934: in wrapper 2184s return dispatch(args[0].__class__)(*args, **kw) 2184s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 2184s 2184s val = array([[0., 1., 0., 0., 0., 1., 0., 0., 1., 1., 1., 0., 0., 1., 1.], 2184s [1., 0., 0., 1., 1., 0., 1., 0., 0., 2., 3...1., 1., 1., 0., 1., 0., 1.], 2184s [0., 0., 0., 1., 0., 0., 1., 2., 0., 0., 1., 0., 1., 1., 0.]], 2184s dtype=float32) 2184s typ = 2184s 2184s @singledispatch 2184s def as_cupy(val, typ=None): 2184s """ 2184s Rough conversion function 2184s 2184s Will try to infer target type from input type if not specified. 2184s """ 2184s if typ is None: 2184s typ = resolve_cupy_type(val) 2184s 2184s if issubclass(typ, CupyArray): 2184s > import cupy as cp 2184s E ModuleNotFoundError: No module named 'cupy' 2184s 2184s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:1010: ModuleNotFoundError 2184s ______ test_view_of_view[cupy_array-list_int_subset-sparray_bool_subset] _______ 2184s 2184s matrix_type = functools.partial(, typ=) 2184s subset_func = 2184s subset_func2 = 2184s 2184s def test_view_of_view(matrix_type, subset_func, subset_func2): 2184s > adata = gen_adata((30, 15), X_type=matrix_type) 2184s 2184s tests/test_views.py:531: 2184s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 2184s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:346: in gen_adata 2184s X = X_type(random_state.binomial(100, 0.005, (M, N)).astype(X_dtype)) 2184s /usr/lib/python3.13/functools.py:934: in wrapper 2184s return dispatch(args[0].__class__)(*args, **kw) 2184s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 2184s 2184s val = array([[0., 0., 0., 0., 0., 0., 1., 0., 2., 1., 1., 2., 0., 0., 1.], 2184s [0., 2., 1., 2., 1., 1., 2., 3., 0., 0., 0...0., 0., 0., 2., 1., 0., 0.], 2184s [0., 1., 2., 2., 0., 0., 0., 0., 1., 0., 1., 0., 0., 0., 0.]], 2184s dtype=float32) 2184s typ = 2184s 2184s @singledispatch 2184s def as_cupy(val, typ=None): 2184s """ 2184s Rough conversion function 2184s 2184s Will try to infer target type from input type if not specified. 2184s """ 2184s if typ is None: 2184s typ = resolve_cupy_type(val) 2184s 2184s if issubclass(typ, CupyArray): 2184s > import cupy as cp 2184s E ModuleNotFoundError: No module named 'cupy' 2184s 2184s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:1010: ModuleNotFoundError 2184s _________ test_view_of_view[cupy_array-array_bool_subset-array_subset] _________ 2184s 2184s matrix_type = functools.partial(, typ=) 2184s subset_func = 2184s subset_func2 = 2184s 2184s def test_view_of_view(matrix_type, subset_func, subset_func2): 2184s > adata = gen_adata((30, 15), X_type=matrix_type) 2184s 2184s tests/test_views.py:531: 2184s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 2184s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:346: in gen_adata 2184s X = X_type(random_state.binomial(100, 0.005, (M, N)).astype(X_dtype)) 2184s /usr/lib/python3.13/functools.py:934: in wrapper 2184s return dispatch(args[0].__class__)(*args, **kw) 2184s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 2184s 2184s val = array([[1., 1., 0., 2., 0., 1., 3., 0., 0., 2., 1., 0., 0., 0., 0.], 2184s [0., 0., 0., 0., 1., 1., 0., 1., 0., 0., 0...0., 0., 1., 2., 0., 0., 0.], 2184s [0., 1., 2., 2., 0., 1., 0., 0., 0., 0., 1., 0., 0., 0., 0.]], 2184s dtype=float32) 2184s typ = 2184s 2184s @singledispatch 2184s def as_cupy(val, typ=None): 2184s """ 2184s Rough conversion function 2184s 2184s Will try to infer target type from input type if not specified. 2184s """ 2184s if typ is None: 2184s typ = resolve_cupy_type(val) 2184s 2184s if issubclass(typ, CupyArray): 2184s > import cupy as cp 2184s E ModuleNotFoundError: No module named 'cupy' 2184s 2184s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:1010: ModuleNotFoundError 2184s _________ test_view_of_view[cupy_array-array_bool_subset-slice_subset] _________ 2184s 2184s matrix_type = functools.partial(, typ=) 2184s subset_func = 2184s subset_func2 = 2184s 2184s def test_view_of_view(matrix_type, subset_func, subset_func2): 2184s > adata = gen_adata((30, 15), X_type=matrix_type) 2184s 2184s tests/test_views.py:531: 2184s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 2184s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:346: in gen_adata 2184s X = X_type(random_state.binomial(100, 0.005, (M, N)).astype(X_dtype)) 2184s /usr/lib/python3.13/functools.py:934: in wrapper 2184s return dispatch(args[0].__class__)(*args, **kw) 2184s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 2184s 2184s val = array([[1., 1., 3., 2., 1., 0., 0., 0., 1., 1., 0., 0., 1., 0., 0.], 2184s [2., 0., 1., 0., 0., 2., 0., 0., 0., 0., 1...1., 0., 1., 1., 0., 0., 0.], 2184s [1., 0., 0., 2., 0., 1., 1., 0., 0., 0., 1., 0., 0., 1., 1.]], 2184s dtype=float32) 2184s typ = 2184s 2184s @singledispatch 2184s def as_cupy(val, typ=None): 2184s """ 2184s Rough conversion function 2184s 2184s Will try to infer target type from input type if not specified. 2184s """ 2184s if typ is None: 2184s typ = resolve_cupy_type(val) 2184s 2184s if issubclass(typ, CupyArray): 2184s > import cupy as cp 2184s E ModuleNotFoundError: No module named 'cupy' 2184s 2184s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:1010: ModuleNotFoundError 2184s ________ test_view_of_view[cupy_array-array_bool_subset-single_subset] _________ 2184s 2184s matrix_type = functools.partial(, typ=) 2184s subset_func = 2184s subset_func2 = 2184s 2184s def test_view_of_view(matrix_type, subset_func, subset_func2): 2184s > adata = gen_adata((30, 15), X_type=matrix_type) 2184s 2184s tests/test_views.py:531: 2184s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 2184s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:346: in gen_adata 2184s X = X_type(random_state.binomial(100, 0.005, (M, N)).astype(X_dtype)) 2184s /usr/lib/python3.13/functools.py:934: in wrapper 2184s return dispatch(args[0].__class__)(*args, **kw) 2184s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 2184s 2184s val = array([[1., 0., 0., 0., 0., 0., 0., 1., 0., 0., 1., 0., 0., 1., 1.], 2184s [0., 0., 0., 1., 0., 2., 0., 1., 2., 0., 0...1., 1., 0., 1., 2., 0., 1.], 2184s [0., 0., 0., 0., 0., 1., 1., 0., 1., 0., 0., 0., 0., 0., 0.]], 2184s dtype=float32) 2184s typ = 2184s 2184s @singledispatch 2184s def as_cupy(val, typ=None): 2184s """ 2184s Rough conversion function 2184s 2184s Will try to infer target type from input type if not specified. 2184s """ 2184s if typ is None: 2184s typ = resolve_cupy_type(val) 2184s 2184s if issubclass(typ, CupyArray): 2184s > import cupy as cp 2184s E ModuleNotFoundError: No module named 'cupy' 2184s 2184s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:1010: ModuleNotFoundError 2184s _______ test_view_of_view[cupy_array-array_bool_subset-array_int_subset] _______ 2184s 2184s matrix_type = functools.partial(, typ=) 2184s subset_func = 2184s subset_func2 = 2184s 2184s def test_view_of_view(matrix_type, subset_func, subset_func2): 2184s > adata = gen_adata((30, 15), X_type=matrix_type) 2184s 2184s tests/test_views.py:531: 2184s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 2184s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:346: in gen_adata 2184s X = X_type(random_state.binomial(100, 0.005, (M, N)).astype(X_dtype)) 2184s /usr/lib/python3.13/functools.py:934: in wrapper 2184s return dispatch(args[0].__class__)(*args, **kw) 2184s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 2184s 2184s val = array([[2., 1., 1., 0., 0., 1., 0., 1., 0., 1., 0., 0., 0., 0., 0.], 2184s [1., 2., 0., 0., 2., 0., 1., 1., 0., 0., 2...0., 0., 1., 0., 2., 1., 1.], 2184s [2., 0., 0., 0., 0., 0., 2., 0., 0., 0., 1., 0., 0., 0., 0.]], 2184s dtype=float32) 2184s typ = 2184s 2184s @singledispatch 2184s def as_cupy(val, typ=None): 2184s """ 2184s Rough conversion function 2184s 2184s Will try to infer target type from input type if not specified. 2184s """ 2184s if typ is None: 2184s typ = resolve_cupy_type(val) 2184s 2184s if issubclass(typ, CupyArray): 2184s > import cupy as cp 2184s E ModuleNotFoundError: No module named 'cupy' 2184s 2184s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:1010: ModuleNotFoundError 2184s _______ test_view_of_view[cupy_array-array_bool_subset-list_int_subset] ________ 2184s 2184s matrix_type = functools.partial(, typ=) 2184s subset_func = 2184s subset_func2 = 2184s 2184s def test_view_of_view(matrix_type, subset_func, subset_func2): 2184s > adata = gen_adata((30, 15), X_type=matrix_type) 2184s 2184s tests/test_views.py:531: 2184s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 2184s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:346: in gen_adata 2184s X = X_type(random_state.binomial(100, 0.005, (M, N)).astype(X_dtype)) 2184s /usr/lib/python3.13/functools.py:934: in wrapper 2184s return dispatch(args[0].__class__)(*args, **kw) 2184s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 2184s 2184s val = array([[1., 0., 1., 1., 0., 3., 0., 0., 0., 0., 1., 1., 0., 0., 1.], 2184s [0., 0., 0., 0., 0., 1., 2., 0., 0., 0., 0...0., 1., 1., 0., 0., 0., 1.], 2184s [0., 0., 0., 2., 1., 1., 0., 0., 1., 0., 0., 0., 0., 2., 0.]], 2184s dtype=float32) 2184s typ = 2184s 2184s @singledispatch 2184s def as_cupy(val, typ=None): 2184s """ 2184s Rough conversion function 2184s 2184s Will try to infer target type from input type if not specified. 2184s """ 2184s if typ is None: 2184s typ = resolve_cupy_type(val) 2184s 2184s if issubclass(typ, CupyArray): 2184s > import cupy as cp 2184s E ModuleNotFoundError: No module named 'cupy' 2184s 2184s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:1010: ModuleNotFoundError 2184s ______ test_view_of_view[cupy_array-array_bool_subset-array_bool_subset] _______ 2184s 2184s matrix_type = functools.partial(, typ=) 2184s subset_func = 2184s subset_func2 = 2184s 2184s def test_view_of_view(matrix_type, subset_func, subset_func2): 2184s > adata = gen_adata((30, 15), X_type=matrix_type) 2184s 2184s tests/test_views.py:531: 2184s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 2184s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:346: in gen_adata 2184s X = X_type(random_state.binomial(100, 0.005, (M, N)).astype(X_dtype)) 2184s /usr/lib/python3.13/functools.py:934: in wrapper 2184s return dispatch(args[0].__class__)(*args, **kw) 2184s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 2184s 2184s val = array([[0., 1., 0., 0., 0., 0., 0., 1., 2., 0., 0., 1., 3., 0., 0.], 2184s [1., 1., 0., 0., 1., 0., 0., 1., 1., 1., 1...0., 0., 0., 2., 0., 2., 0.], 2184s [0., 0., 0., 0., 0., 2., 0., 0., 0., 1., 1., 0., 2., 0., 1.]], 2184s dtype=float32) 2184s typ = 2184s 2184s @singledispatch 2184s def as_cupy(val, typ=None): 2184s """ 2184s Rough conversion function 2184s 2184s Will try to infer target type from input type if not specified. 2184s """ 2184s if typ is None: 2184s typ = resolve_cupy_type(val) 2184s 2184s if issubclass(typ, CupyArray): 2184s > import cupy as cp 2184s E ModuleNotFoundError: No module named 'cupy' 2184s 2184s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:1010: ModuleNotFoundError 2184s _______ test_view_of_view[cupy_array-array_bool_subset-list_bool_subset] _______ 2184s 2184s matrix_type = functools.partial(, typ=) 2184s subset_func = 2184s subset_func2 = 2184s 2184s def test_view_of_view(matrix_type, subset_func, subset_func2): 2184s > adata = gen_adata((30, 15), X_type=matrix_type) 2184s 2184s tests/test_views.py:531: 2184s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 2184s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:346: in gen_adata 2184s X = X_type(random_state.binomial(100, 0.005, (M, N)).astype(X_dtype)) 2184s /usr/lib/python3.13/functools.py:934: in wrapper 2184s return dispatch(args[0].__class__)(*args, **kw) 2184s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 2184s 2184s val = array([[1., 0., 1., 0., 0., 1., 1., 0., 1., 0., 0., 0., 0., 1., 0.], 2184s [0., 0., 1., 1., 0., 0., 1., 0., 1., 1., 0...0., 0., 1., 1., 1., 0., 1.], 2184s [1., 0., 0., 0., 1., 3., 1., 0., 0., 1., 0., 0., 0., 0., 1.]], 2184s dtype=float32) 2184s typ = 2184s 2184s @singledispatch 2184s def as_cupy(val, typ=None): 2184s """ 2184s Rough conversion function 2184s 2184s Will try to infer target type from input type if not specified. 2184s """ 2184s if typ is None: 2184s typ = resolve_cupy_type(val) 2184s 2184s if issubclass(typ, CupyArray): 2184s > import cupy as cp 2184s E ModuleNotFoundError: No module named 'cupy' 2184s 2184s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:1010: ModuleNotFoundError 2184s ______ test_view_of_view[cupy_array-array_bool_subset-matrix_bool_subset] ______ 2184s 2184s matrix_type = functools.partial(, typ=) 2184s subset_func = 2184s subset_func2 = 2184s 2184s def test_view_of_view(matrix_type, subset_func, subset_func2): 2184s > adata = gen_adata((30, 15), X_type=matrix_type) 2184s 2184s tests/test_views.py:531: 2184s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 2184s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:346: in gen_adata 2184s X = X_type(random_state.binomial(100, 0.005, (M, N)).astype(X_dtype)) 2184s /usr/lib/python3.13/functools.py:934: in wrapper 2184s return dispatch(args[0].__class__)(*args, **kw) 2184s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 2184s 2184s val = array([[0., 1., 0., 0., 1., 0., 1., 1., 0., 1., 0., 0., 0., 0., 1.], 2184s [1., 1., 0., 0., 0., 1., 0., 1., 0., 0., 0...1., 0., 0., 1., 1., 0., 0.], 2184s [0., 0., 1., 1., 1., 0., 0., 0., 1., 1., 0., 1., 0., 0., 1.]], 2184s dtype=float32) 2184s typ = 2184s 2184s @singledispatch 2184s def as_cupy(val, typ=None): 2184s """ 2184s Rough conversion function 2184s 2184s Will try to infer target type from input type if not specified. 2184s """ 2184s if typ is None: 2184s typ = resolve_cupy_type(val) 2184s 2184s if issubclass(typ, CupyArray): 2184s > import cupy as cp 2184s E ModuleNotFoundError: No module named 'cupy' 2184s 2184s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:1010: ModuleNotFoundError 2184s _____ test_view_of_view[cupy_array-array_bool_subset-spmatrix_bool_subset] _____ 2184s 2184s matrix_type = functools.partial(, typ=) 2184s subset_func = 2184s subset_func2 = 2184s 2184s def test_view_of_view(matrix_type, subset_func, subset_func2): 2184s > adata = gen_adata((30, 15), X_type=matrix_type) 2184s 2184s tests/test_views.py:531: 2184s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 2184s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:346: in gen_adata 2184s X = X_type(random_state.binomial(100, 0.005, (M, N)).astype(X_dtype)) 2184s /usr/lib/python3.13/functools.py:934: in wrapper 2184s return dispatch(args[0].__class__)(*args, **kw) 2184s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 2184s 2184s val = array([[0., 0., 1., 2., 0., 1., 0., 0., 0., 2., 0., 1., 0., 1., 0.], 2184s [0., 0., 1., 0., 0., 1., 0., 0., 0., 0., 1...2., 0., 1., 0., 0., 0., 0.], 2184s [0., 3., 1., 1., 0., 0., 1., 0., 0., 1., 0., 1., 0., 1., 1.]], 2184s dtype=float32) 2184s typ = 2184s 2184s @singledispatch 2184s def as_cupy(val, typ=None): 2184s """ 2184s Rough conversion function 2184s 2184s Will try to infer target type from input type if not specified. 2184s """ 2184s if typ is None: 2184s typ = resolve_cupy_type(val) 2184s 2184s if issubclass(typ, CupyArray): 2184s > import cupy as cp 2184s E ModuleNotFoundError: No module named 'cupy' 2184s 2184s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:1010: ModuleNotFoundError 2184s _____ test_view_of_view[cupy_array-array_bool_subset-sparray_bool_subset] ______ 2184s 2184s matrix_type = functools.partial(, typ=) 2184s subset_func = 2184s subset_func2 = 2184s 2184s def test_view_of_view(matrix_type, subset_func, subset_func2): 2184s > adata = gen_adata((30, 15), X_type=matrix_type) 2184s 2184s tests/test_views.py:531: 2184s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 2184s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:346: in gen_adata 2184s X = X_type(random_state.binomial(100, 0.005, (M, N)).astype(X_dtype)) 2184s /usr/lib/python3.13/functools.py:934: in wrapper 2184s return dispatch(args[0].__class__)(*args, **kw) 2184s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 2184s 2184s val = array([[3., 0., 1., 0., 0., 0., 0., 0., 0., 2., 1., 0., 0., 1., 0.], 2184s [0., 0., 0., 0., 0., 0., 0., 1., 1., 0., 1...0., 2., 2., 1., 1., 1., 0.], 2184s [1., 0., 1., 2., 0., 0., 0., 0., 2., 0., 0., 0., 1., 0., 1.]], 2184s dtype=float32) 2184s typ = 2184s 2184s @singledispatch 2184s def as_cupy(val, typ=None): 2184s """ 2184s Rough conversion function 2184s 2184s Will try to infer target type from input type if not specified. 2184s """ 2184s if typ is None: 2184s typ = resolve_cupy_type(val) 2184s 2184s if issubclass(typ, CupyArray): 2184s > import cupy as cp 2184s E ModuleNotFoundError: No module named 'cupy' 2184s 2184s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:1010: ModuleNotFoundError 2184s _________ test_view_of_view[cupy_array-list_bool_subset-array_subset] __________ 2184s 2184s matrix_type = functools.partial(, typ=) 2184s subset_func = 2184s subset_func2 = 2184s 2184s def test_view_of_view(matrix_type, subset_func, subset_func2): 2184s > adata = gen_adata((30, 15), X_type=matrix_type) 2184s 2184s tests/test_views.py:531: 2184s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 2184s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:346: in gen_adata 2184s X = X_type(random_state.binomial(100, 0.005, (M, N)).astype(X_dtype)) 2184s /usr/lib/python3.13/functools.py:934: in wrapper 2184s return dispatch(args[0].__class__)(*args, **kw) 2184s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 2184s 2184s val = array([[0., 0., 1., 0., 0., 1., 1., 1., 1., 0., 0., 0., 1., 1., 0.], 2184s [0., 0., 0., 1., 0., 2., 0., 2., 1., 1., 0...0., 0., 0., 0., 0., 0., 1.], 2184s [0., 0., 0., 0., 0., 2., 1., 1., 0., 1., 0., 2., 0., 1., 1.]], 2184s dtype=float32) 2184s typ = 2184s 2184s @singledispatch 2184s def as_cupy(val, typ=None): 2184s """ 2184s Rough conversion function 2184s 2184s Will try to infer target type from input type if not specified. 2184s """ 2184s if typ is None: 2184s typ = resolve_cupy_type(val) 2184s 2184s if issubclass(typ, CupyArray): 2184s > import cupy as cp 2184s E ModuleNotFoundError: No module named 'cupy' 2184s 2184s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:1010: ModuleNotFoundError 2184s _________ test_view_of_view[cupy_array-list_bool_subset-slice_subset] __________ 2184s 2184s matrix_type = functools.partial(, typ=) 2184s subset_func = 2184s subset_func2 = 2184s 2184s def test_view_of_view(matrix_type, subset_func, subset_func2): 2184s > adata = gen_adata((30, 15), X_type=matrix_type) 2184s 2184s tests/test_views.py:531: 2184s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 2184s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:346: in gen_adata 2184s X = X_type(random_state.binomial(100, 0.005, (M, N)).astype(X_dtype)) 2184s /usr/lib/python3.13/functools.py:934: in wrapper 2184s return dispatch(args[0].__class__)(*args, **kw) 2184s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 2184s 2184s val = array([[1., 0., 0., 2., 1., 1., 1., 2., 1., 0., 0., 0., 1., 1., 1.], 2184s [0., 1., 0., 1., 0., 0., 0., 1., 0., 1., 1...0., 0., 0., 0., 0., 1., 0.], 2184s [0., 2., 0., 1., 0., 0., 0., 0., 1., 1., 0., 0., 1., 0., 0.]], 2184s dtype=float32) 2184s typ = 2184s 2184s @singledispatch 2184s def as_cupy(val, typ=None): 2184s """ 2184s Rough conversion function 2184s 2184s Will try to infer target type from input type if not specified. 2184s """ 2184s if typ is None: 2184s typ = resolve_cupy_type(val) 2184s 2184s if issubclass(typ, CupyArray): 2184s > import cupy as cp 2184s E ModuleNotFoundError: No module named 'cupy' 2184s 2184s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:1010: ModuleNotFoundError 2184s _________ test_view_of_view[cupy_array-list_bool_subset-single_subset] _________ 2184s 2184s matrix_type = functools.partial(, typ=) 2184s subset_func = 2184s subset_func2 = 2184s 2184s def test_view_of_view(matrix_type, subset_func, subset_func2): 2184s > adata = gen_adata((30, 15), X_type=matrix_type) 2184s 2184s tests/test_views.py:531: 2184s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 2184s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:346: in gen_adata 2184s X = X_type(random_state.binomial(100, 0.005, (M, N)).astype(X_dtype)) 2184s /usr/lib/python3.13/functools.py:934: in wrapper 2184s return dispatch(args[0].__class__)(*args, **kw) 2184s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 2184s 2184s val = array([[1., 0., 1., 1., 0., 2., 0., 1., 0., 1., 0., 0., 0., 2., 1.], 2184s [0., 1., 1., 1., 1., 1., 0., 1., 0., 1., 1...1., 0., 0., 0., 1., 0., 0.], 2184s [1., 0., 1., 0., 0., 1., 0., 1., 0., 2., 0., 0., 2., 0., 0.]], 2184s dtype=float32) 2184s typ = 2184s 2184s @singledispatch 2184s def as_cupy(val, typ=None): 2184s """ 2184s Rough conversion function 2184s 2184s Will try to infer target type from input type if not specified. 2184s """ 2184s if typ is None: 2184s typ = resolve_cupy_type(val) 2184s 2184s if issubclass(typ, CupyArray): 2184s > import cupy as cp 2184s E ModuleNotFoundError: No module named 'cupy' 2184s 2184s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:1010: ModuleNotFoundError 2184s _______ test_view_of_view[cupy_array-list_bool_subset-array_int_subset] ________ 2184s 2184s matrix_type = functools.partial(, typ=) 2184s subset_func = 2184s subset_func2 = 2184s 2184s def test_view_of_view(matrix_type, subset_func, subset_func2): 2184s > adata = gen_adata((30, 15), X_type=matrix_type) 2184s 2184s tests/test_views.py:531: 2184s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 2184s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:346: in gen_adata 2184s X = X_type(random_state.binomial(100, 0.005, (M, N)).astype(X_dtype)) 2184s /usr/lib/python3.13/functools.py:934: in wrapper 2184s return dispatch(args[0].__class__)(*args, **kw) 2184s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 2184s 2184s val = array([[0., 2., 1., 1., 1., 0., 0., 0., 0., 0., 2., 1., 1., 1., 1.], 2184s [0., 0., 1., 0., 0., 2., 0., 0., 0., 1., 0...2., 2., 2., 3., 0., 1., 0.], 2184s [1., 1., 0., 1., 0., 0., 1., 1., 1., 0., 0., 1., 1., 2., 1.]], 2184s dtype=float32) 2184s typ = 2184s 2184s @singledispatch 2184s def as_cupy(val, typ=None): 2184s """ 2184s Rough conversion function 2184s 2184s Will try to infer target type from input type if not specified. 2184s """ 2184s if typ is None: 2184s typ = resolve_cupy_type(val) 2184s 2184s if issubclass(typ, CupyArray): 2184s > import cupy as cp 2184s E ModuleNotFoundError: No module named 'cupy' 2184s 2184s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:1010: ModuleNotFoundError 2184s ________ test_view_of_view[cupy_array-list_bool_subset-list_int_subset] ________ 2184s 2184s matrix_type = functools.partial(, typ=) 2184s subset_func = 2184s subset_func2 = 2184s 2184s def test_view_of_view(matrix_type, subset_func, subset_func2): 2184s > adata = gen_adata((30, 15), X_type=matrix_type) 2184s 2184s tests/test_views.py:531: 2184s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 2184s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:346: in gen_adata 2184s X = X_type(random_state.binomial(100, 0.005, (M, N)).astype(X_dtype)) 2184s /usr/lib/python3.13/functools.py:934: in wrapper 2184s return dispatch(args[0].__class__)(*args, **kw) 2184s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 2184s 2184s val = array([[1., 0., 1., 1., 0., 0., 1., 0., 0., 0., 0., 0., 0., 0., 0.], 2184s [1., 0., 0., 1., 0., 0., 0., 1., 0., 0., 0...0., 1., 0., 0., 0., 0., 0.], 2184s [0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 2., 0., 0., 0.]], 2184s dtype=float32) 2184s typ = 2184s 2184s @singledispatch 2184s def as_cupy(val, typ=None): 2184s """ 2184s Rough conversion function 2184s 2184s Will try to infer target type from input type if not specified. 2184s """ 2184s if typ is None: 2184s typ = resolve_cupy_type(val) 2184s 2184s if issubclass(typ, CupyArray): 2184s > import cupy as cp 2184s E ModuleNotFoundError: No module named 'cupy' 2184s 2184s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:1010: ModuleNotFoundError 2184s _______ test_view_of_view[cupy_array-list_bool_subset-array_bool_subset] _______ 2184s 2184s matrix_type = functools.partial(, typ=) 2184s subset_func = 2184s subset_func2 = 2184s 2184s def test_view_of_view(matrix_type, subset_func, subset_func2): 2184s > adata = gen_adata((30, 15), X_type=matrix_type) 2184s 2184s tests/test_views.py:531: 2184s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 2184s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:346: in gen_adata 2184s X = X_type(random_state.binomial(100, 0.005, (M, N)).astype(X_dtype)) 2184s /usr/lib/python3.13/functools.py:934: in wrapper 2184s return dispatch(args[0].__class__)(*args, **kw) 2184s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 2184s 2184s val = array([[1., 0., 1., 0., 0., 1., 1., 0., 0., 1., 0., 1., 0., 1., 0.], 2184s [1., 0., 0., 1., 1., 0., 1., 0., 0., 0., 0...0., 0., 1., 0., 0., 2., 1.], 2184s [0., 0., 0., 1., 0., 0., 1., 1., 0., 0., 1., 1., 0., 0., 0.]], 2184s dtype=float32) 2184s typ = 2184s 2184s @singledispatch 2184s def as_cupy(val, typ=None): 2184s """ 2184s Rough conversion function 2184s 2184s Will try to infer target type from input type if not specified. 2184s """ 2184s if typ is None: 2184s typ = resolve_cupy_type(val) 2184s 2184s if issubclass(typ, CupyArray): 2184s > import cupy as cp 2184s E ModuleNotFoundError: No module named 'cupy' 2184s 2184s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:1010: ModuleNotFoundError 2184s _______ test_view_of_view[cupy_array-list_bool_subset-list_bool_subset] ________ 2184s 2184s matrix_type = functools.partial(, typ=) 2184s subset_func = 2184s subset_func2 = 2184s 2184s def test_view_of_view(matrix_type, subset_func, subset_func2): 2184s > adata = gen_adata((30, 15), X_type=matrix_type) 2184s 2184s tests/test_views.py:531: 2184s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 2184s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:346: in gen_adata 2184s X = X_type(random_state.binomial(100, 0.005, (M, N)).astype(X_dtype)) 2184s /usr/lib/python3.13/functools.py:934: in wrapper 2184s return dispatch(args[0].__class__)(*args, **kw) 2184s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 2184s 2184s val = array([[0., 0., 0., 0., 0., 0., 0., 0., 0., 1., 0., 1., 1., 1., 0.], 2184s [0., 2., 0., 0., 0., 0., 0., 1., 0., 0., 1...2., 1., 0., 1., 1., 0., 1.], 2184s [0., 1., 0., 0., 0., 1., 0., 0., 0., 0., 0., 1., 0., 0., 0.]], 2184s dtype=float32) 2184s typ = 2184s 2184s @singledispatch 2184s def as_cupy(val, typ=None): 2184s """ 2184s Rough conversion function 2184s 2184s Will try to infer target type from input type if not specified. 2184s """ 2184s if typ is None: 2184s typ = resolve_cupy_type(val) 2184s 2184s if issubclass(typ, CupyArray): 2184s > import cupy as cp 2184s E ModuleNotFoundError: No module named 'cupy' 2184s 2184s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:1010: ModuleNotFoundError 2184s ______ test_view_of_view[cupy_array-list_bool_subset-matrix_bool_subset] _______ 2184s 2184s matrix_type = functools.partial(, typ=) 2184s subset_func = 2184s subset_func2 = 2184s 2184s def test_view_of_view(matrix_type, subset_func, subset_func2): 2184s > adata = gen_adata((30, 15), X_type=matrix_type) 2184s 2184s tests/test_views.py:531: 2184s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 2184s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:346: in gen_adata 2184s X = X_type(random_state.binomial(100, 0.005, (M, N)).astype(X_dtype)) 2184s /usr/lib/python3.13/functools.py:934: in wrapper 2184s return dispatch(args[0].__class__)(*args, **kw) 2184s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 2184s 2184s val = array([[0., 0., 2., 0., 0., 0., 0., 0., 1., 0., 2., 0., 0., 0., 0.], 2184s [0., 0., 1., 1., 1., 0., 0., 0., 2., 1., 0...0., 2., 0., 0., 2., 0., 1.], 2184s [0., 0., 1., 0., 1., 1., 0., 0., 2., 0., 0., 0., 0., 0., 1.]], 2184s dtype=float32) 2184s typ = 2184s 2184s @singledispatch 2184s def as_cupy(val, typ=None): 2184s """ 2184s Rough conversion function 2184s 2184s Will try to infer target type from input type if not specified. 2184s """ 2184s if typ is None: 2184s typ = resolve_cupy_type(val) 2184s 2184s if issubclass(typ, CupyArray): 2184s > import cupy as cp 2184s E ModuleNotFoundError: No module named 'cupy' 2184s 2184s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:1010: ModuleNotFoundError 2184s _____ test_view_of_view[cupy_array-list_bool_subset-spmatrix_bool_subset] ______ 2184s 2184s matrix_type = functools.partial(, typ=) 2184s subset_func = 2184s subset_func2 = 2184s 2184s def test_view_of_view(matrix_type, subset_func, subset_func2): 2184s > adata = gen_adata((30, 15), X_type=matrix_type) 2184s 2184s tests/test_views.py:531: 2184s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 2184s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:346: in gen_adata 2184s X = X_type(random_state.binomial(100, 0.005, (M, N)).astype(X_dtype)) 2184s /usr/lib/python3.13/functools.py:934: in wrapper 2184s return dispatch(args[0].__class__)(*args, **kw) 2184s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 2184s 2184s val = array([[0., 0., 0., 2., 0., 0., 0., 0., 1., 0., 0., 2., 0., 0., 0.], 2184s [0., 0., 0., 1., 0., 1., 0., 0., 0., 1., 1...4., 0., 1., 2., 0., 0., 0.], 2184s [1., 3., 0., 0., 0., 0., 2., 0., 0., 0., 0., 0., 2., 0., 0.]], 2184s dtype=float32) 2184s typ = 2184s 2184s @singledispatch 2184s def as_cupy(val, typ=None): 2184s """ 2184s Rough conversion function 2184s 2184s Will try to infer target type from input type if not specified. 2184s """ 2184s if typ is None: 2184s typ = resolve_cupy_type(val) 2184s 2184s if issubclass(typ, CupyArray): 2184s > import cupy as cp 2184s E ModuleNotFoundError: No module named 'cupy' 2184s 2184s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:1010: ModuleNotFoundError 2184s ______ test_view_of_view[cupy_array-list_bool_subset-sparray_bool_subset] ______ 2184s 2184s matrix_type = functools.partial(, typ=) 2184s subset_func = 2184s subset_func2 = 2184s 2184s def test_view_of_view(matrix_type, subset_func, subset_func2): 2184s > adata = gen_adata((30, 15), X_type=matrix_type) 2184s 2184s tests/test_views.py:531: 2184s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 2184s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:346: in gen_adata 2184s X = X_type(random_state.binomial(100, 0.005, (M, N)).astype(X_dtype)) 2184s /usr/lib/python3.13/functools.py:934: in wrapper 2184s return dispatch(args[0].__class__)(*args, **kw) 2184s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 2184s 2184s val = array([[0., 0., 0., 0., 1., 0., 1., 0., 0., 0., 1., 0., 0., 1., 0.], 2184s [0., 1., 1., 0., 0., 1., 0., 0., 1., 1., 0...1., 0., 3., 0., 0., 1., 1.], 2184s [0., 0., 1., 0., 1., 0., 0., 0., 2., 0., 0., 0., 0., 1., 3.]], 2184s dtype=float32) 2184s typ = 2184s 2184s @singledispatch 2184s def as_cupy(val, typ=None): 2184s """ 2184s Rough conversion function 2184s 2184s Will try to infer target type from input type if not specified. 2184s """ 2184s if typ is None: 2184s typ = resolve_cupy_type(val) 2184s 2184s if issubclass(typ, CupyArray): 2184s > import cupy as cp 2184s E ModuleNotFoundError: No module named 'cupy' 2184s 2184s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:1010: ModuleNotFoundError 2184s ________ test_view_of_view[cupy_array-matrix_bool_subset-array_subset] _________ 2184s 2184s matrix_type = functools.partial(, typ=) 2184s subset_func = 2184s subset_func2 = 2184s 2184s def test_view_of_view(matrix_type, subset_func, subset_func2): 2184s > adata = gen_adata((30, 15), X_type=matrix_type) 2184s 2184s tests/test_views.py:531: 2184s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 2184s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:346: in gen_adata 2184s X = X_type(random_state.binomial(100, 0.005, (M, N)).astype(X_dtype)) 2184s /usr/lib/python3.13/functools.py:934: in wrapper 2184s return dispatch(args[0].__class__)(*args, **kw) 2184s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 2184s 2184s val = array([[1., 2., 3., 0., 1., 0., 1., 0., 1., 0., 0., 0., 0., 0., 0.], 2184s [0., 1., 1., 0., 1., 1., 1., 1., 0., 2., 1...0., 1., 0., 0., 0., 0., 1.], 2184s [0., 2., 2., 2., 0., 1., 0., 1., 1., 0., 0., 1., 0., 0., 1.]], 2184s dtype=float32) 2184s typ = 2184s 2184s @singledispatch 2184s def as_cupy(val, typ=None): 2184s """ 2184s Rough conversion function 2184s 2184s Will try to infer target type from input type if not specified. 2184s """ 2184s if typ is None: 2184s typ = resolve_cupy_type(val) 2184s 2184s if issubclass(typ, CupyArray): 2184s > import cupy as cp 2184s E ModuleNotFoundError: No module named 'cupy' 2184s 2184s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:1010: ModuleNotFoundError 2184s ________ test_view_of_view[cupy_array-matrix_bool_subset-slice_subset] _________ 2184s 2184s matrix_type = functools.partial(, typ=) 2184s subset_func = 2184s subset_func2 = 2184s 2184s def test_view_of_view(matrix_type, subset_func, subset_func2): 2184s > adata = gen_adata((30, 15), X_type=matrix_type) 2184s 2184s tests/test_views.py:531: 2184s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 2184s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:346: in gen_adata 2184s X = X_type(random_state.binomial(100, 0.005, (M, N)).astype(X_dtype)) 2184s /usr/lib/python3.13/functools.py:934: in wrapper 2184s return dispatch(args[0].__class__)(*args, **kw) 2184s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 2184s 2184s val = array([[0., 0., 0., 0., 1., 0., 0., 0., 2., 3., 2., 1., 1., 0., 2.], 2184s [0., 0., 0., 0., 2., 0., 1., 1., 1., 2., 0...1., 0., 0., 0., 0., 0., 1.], 2184s [0., 1., 0., 0., 0., 0., 0., 0., 1., 0., 1., 1., 0., 1., 0.]], 2184s dtype=float32) 2184s typ = 2184s 2184s @singledispatch 2184s def as_cupy(val, typ=None): 2184s """ 2184s Rough conversion function 2184s 2184s Will try to infer target type from input type if not specified. 2184s """ 2184s if typ is None: 2184s typ = resolve_cupy_type(val) 2184s 2184s if issubclass(typ, CupyArray): 2184s > import cupy as cp 2184s E ModuleNotFoundError: No module named 'cupy' 2184s 2184s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:1010: ModuleNotFoundError 2184s ________ test_view_of_view[cupy_array-matrix_bool_subset-single_subset] ________ 2184s 2184s matrix_type = functools.partial(, typ=) 2184s subset_func = 2184s subset_func2 = 2184s 2184s def test_view_of_view(matrix_type, subset_func, subset_func2): 2184s > adata = gen_adata((30, 15), X_type=matrix_type) 2184s 2184s tests/test_views.py:531: 2184s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 2184s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:346: in gen_adata 2184s X = X_type(random_state.binomial(100, 0.005, (M, N)).astype(X_dtype)) 2184s /usr/lib/python3.13/functools.py:934: in wrapper 2184s return dispatch(args[0].__class__)(*args, **kw) 2184s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 2184s 2184s val = array([[0., 0., 1., 0., 2., 0., 0., 1., 0., 0., 1., 0., 0., 0., 0.], 2184s [0., 0., 0., 0., 0., 0., 0., 0., 1., 2., 0...0., 0., 0., 0., 2., 0., 0.], 2184s [0., 1., 0., 1., 1., 0., 0., 1., 0., 0., 0., 0., 0., 0., 0.]], 2184s dtype=float32) 2184s typ = 2184s 2184s @singledispatch 2184s def as_cupy(val, typ=None): 2184s """ 2184s Rough conversion function 2184s 2184s Will try to infer target type from input type if not specified. 2184s """ 2184s if typ is None: 2184s typ = resolve_cupy_type(val) 2184s 2184s if issubclass(typ, CupyArray): 2184s > import cupy as cp 2184s E ModuleNotFoundError: No module named 'cupy' 2184s 2184s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:1010: ModuleNotFoundError 2184s ______ test_view_of_view[cupy_array-matrix_bool_subset-array_int_subset] _______ 2184s 2184s matrix_type = functools.partial(, typ=) 2184s subset_func = 2184s subset_func2 = 2184s 2184s def test_view_of_view(matrix_type, subset_func, subset_func2): 2184s > adata = gen_adata((30, 15), X_type=matrix_type) 2184s 2184s tests/test_views.py:531: 2184s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 2184s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:346: in gen_adata 2184s X = X_type(random_state.binomial(100, 0.005, (M, N)).astype(X_dtype)) 2184s /usr/lib/python3.13/functools.py:934: in wrapper 2184s return dispatch(args[0].__class__)(*args, **kw) 2184s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 2184s 2184s val = array([[1., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 1., 2., 0.], 2184s [0., 1., 1., 0., 0., 0., 0., 0., 0., 1., 0...2., 0., 0., 1., 1., 0., 1.], 2184s [0., 0., 1., 1., 0., 1., 0., 0., 1., 0., 0., 0., 0., 0., 3.]], 2184s dtype=float32) 2184s typ = 2184s 2184s @singledispatch 2184s def as_cupy(val, typ=None): 2184s """ 2184s Rough conversion function 2184s 2184s Will try to infer target type from input type if not specified. 2184s """ 2184s if typ is None: 2184s typ = resolve_cupy_type(val) 2184s 2184s if issubclass(typ, CupyArray): 2184s > import cupy as cp 2184s E ModuleNotFoundError: No module named 'cupy' 2184s 2184s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:1010: ModuleNotFoundError 2184s _______ test_view_of_view[cupy_array-matrix_bool_subset-list_int_subset] _______ 2184s 2184s matrix_type = functools.partial(, typ=) 2184s subset_func = 2184s subset_func2 = 2184s 2184s def test_view_of_view(matrix_type, subset_func, subset_func2): 2184s > adata = gen_adata((30, 15), X_type=matrix_type) 2184s 2184s tests/test_views.py:531: 2184s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 2184s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:346: in gen_adata 2184s X = X_type(random_state.binomial(100, 0.005, (M, N)).astype(X_dtype)) 2184s /usr/lib/python3.13/functools.py:934: in wrapper 2184s return dispatch(args[0].__class__)(*args, **kw) 2184s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 2184s 2184s val = array([[0., 0., 0., 0., 0., 1., 0., 2., 2., 1., 2., 1., 0., 1., 0.], 2184s [0., 0., 0., 0., 1., 1., 0., 0., 1., 1., 0...1., 0., 0., 0., 0., 0., 1.], 2184s [0., 1., 0., 0., 0., 1., 0., 1., 0., 2., 1., 0., 0., 1., 0.]], 2184s dtype=float32) 2184s typ = 2184s 2184s @singledispatch 2184s def as_cupy(val, typ=None): 2184s """ 2184s Rough conversion function 2184s 2184s Will try to infer target type from input type if not specified. 2184s """ 2184s if typ is None: 2184s typ = resolve_cupy_type(val) 2184s 2184s if issubclass(typ, CupyArray): 2184s > import cupy as cp 2184s E ModuleNotFoundError: No module named 'cupy' 2184s 2184s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:1010: ModuleNotFoundError 2184s ______ test_view_of_view[cupy_array-matrix_bool_subset-array_bool_subset] ______ 2184s 2184s matrix_type = functools.partial(, typ=) 2184s subset_func = 2184s subset_func2 = 2184s 2184s def test_view_of_view(matrix_type, subset_func, subset_func2): 2184s > adata = gen_adata((30, 15), X_type=matrix_type) 2184s 2184s tests/test_views.py:531: 2184s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 2184s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:346: in gen_adata 2184s X = X_type(random_state.binomial(100, 0.005, (M, N)).astype(X_dtype)) 2184s /usr/lib/python3.13/functools.py:934: in wrapper 2184s return dispatch(args[0].__class__)(*args, **kw) 2184s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 2184s 2184s val = array([[1., 1., 0., 0., 0., 0., 0., 2., 0., 1., 3., 0., 0., 0., 0.], 2184s [1., 3., 0., 0., 1., 0., 1., 0., 0., 0., 0...0., 0., 0., 0., 0., 1., 0.], 2184s [2., 0., 0., 0., 1., 0., 0., 1., 1., 0., 0., 0., 0., 0., 0.]], 2184s dtype=float32) 2184s typ = 2184s 2184s @singledispatch 2184s def as_cupy(val, typ=None): 2184s """ 2184s Rough conversion function 2184s 2184s Will try to infer target type from input type if not specified. 2184s """ 2184s if typ is None: 2184s typ = resolve_cupy_type(val) 2184s 2184s if issubclass(typ, CupyArray): 2184s > import cupy as cp 2184s E ModuleNotFoundError: No module named 'cupy' 2184s 2184s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:1010: ModuleNotFoundError 2184s ______ test_view_of_view[cupy_array-matrix_bool_subset-list_bool_subset] _______ 2184s 2184s matrix_type = functools.partial(, typ=) 2184s subset_func = 2184s subset_func2 = 2184s 2184s def test_view_of_view(matrix_type, subset_func, subset_func2): 2184s > adata = gen_adata((30, 15), X_type=matrix_type) 2184s 2184s tests/test_views.py:531: 2184s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 2184s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:346: in gen_adata 2184s X = X_type(random_state.binomial(100, 0.005, (M, N)).astype(X_dtype)) 2184s /usr/lib/python3.13/functools.py:934: in wrapper 2184s return dispatch(args[0].__class__)(*args, **kw) 2184s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 2184s 2184s val = array([[0., 0., 0., 1., 0., 1., 0., 1., 0., 0., 0., 0., 0., 0., 1.], 2184s [0., 2., 0., 0., 0., 0., 0., 0., 1., 3., 0...1., 0., 2., 0., 3., 0., 0.], 2184s [0., 0., 0., 0., 0., 0., 0., 1., 1., 1., 0., 0., 0., 0., 1.]], 2184s dtype=float32) 2184s typ = 2184s 2184s @singledispatch 2184s def as_cupy(val, typ=None): 2184s """ 2184s Rough conversion function 2184s 2184s Will try to infer target type from input type if not specified. 2184s """ 2184s if typ is None: 2184s typ = resolve_cupy_type(val) 2184s 2184s if issubclass(typ, CupyArray): 2184s > import cupy as cp 2184s E ModuleNotFoundError: No module named 'cupy' 2184s 2184s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:1010: ModuleNotFoundError 2184s _____ test_view_of_view[cupy_array-matrix_bool_subset-matrix_bool_subset] ______ 2184s 2184s matrix_type = functools.partial(, typ=) 2184s subset_func = 2184s subset_func2 = 2184s 2184s def test_view_of_view(matrix_type, subset_func, subset_func2): 2184s > adata = gen_adata((30, 15), X_type=matrix_type) 2184s 2184s tests/test_views.py:531: 2184s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 2184s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:346: in gen_adata 2184s X = X_type(random_state.binomial(100, 0.005, (M, N)).astype(X_dtype)) 2184s /usr/lib/python3.13/functools.py:934: in wrapper 2184s return dispatch(args[0].__class__)(*args, **kw) 2184s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 2184s 2184s val = array([[0., 0., 0., 1., 0., 1., 0., 2., 1., 2., 0., 0., 0., 0., 1.], 2184s [1., 0., 0., 0., 0., 0., 0., 0., 1., 2., 1...0., 0., 2., 1., 2., 0., 0.], 2184s [2., 0., 1., 0., 0., 0., 1., 1., 1., 0., 0., 0., 1., 0., 1.]], 2184s dtype=float32) 2184s typ = 2184s 2184s @singledispatch 2184s def as_cupy(val, typ=None): 2184s """ 2184s Rough conversion function 2184s 2184s Will try to infer target type from input type if not specified. 2184s """ 2184s if typ is None: 2184s typ = resolve_cupy_type(val) 2184s 2184s if issubclass(typ, CupyArray): 2184s > import cupy as cp 2184s E ModuleNotFoundError: No module named 'cupy' 2184s 2184s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:1010: ModuleNotFoundError 2184s ____ test_view_of_view[cupy_array-matrix_bool_subset-spmatrix_bool_subset] _____ 2184s 2184s matrix_type = functools.partial(, typ=) 2184s subset_func = 2184s subset_func2 = 2184s 2184s def test_view_of_view(matrix_type, subset_func, subset_func2): 2184s > adata = gen_adata((30, 15), X_type=matrix_type) 2184s 2184s tests/test_views.py:531: 2184s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 2184s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:346: in gen_adata 2184s X = X_type(random_state.binomial(100, 0.005, (M, N)).astype(X_dtype)) 2184s /usr/lib/python3.13/functools.py:934: in wrapper 2184s return dispatch(args[0].__class__)(*args, **kw) 2184s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 2184s 2184s val = array([[0., 0., 0., 1., 1., 0., 2., 1., 0., 2., 1., 0., 2., 2., 0.], 2184s [0., 1., 0., 2., 0., 2., 0., 0., 3., 0., 0...0., 0., 0., 1., 0., 0., 1.], 2184s [1., 0., 0., 0., 0., 0., 0., 0., 0., 0., 1., 0., 0., 0., 0.]], 2184s dtype=float32) 2184s typ = 2184s 2184s @singledispatch 2184s def as_cupy(val, typ=None): 2184s """ 2184s Rough conversion function 2184s 2184s Will try to infer target type from input type if not specified. 2184s """ 2184s if typ is None: 2184s typ = resolve_cupy_type(val) 2184s 2184s if issubclass(typ, CupyArray): 2184s > import cupy as cp 2184s E ModuleNotFoundError: No module named 'cupy' 2184s 2184s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:1010: ModuleNotFoundError 2184s _____ test_view_of_view[cupy_array-matrix_bool_subset-sparray_bool_subset] _____ 2184s 2184s matrix_type = functools.partial(, typ=) 2184s subset_func = 2184s subset_func2 = 2184s 2184s def test_view_of_view(matrix_type, subset_func, subset_func2): 2184s > adata = gen_adata((30, 15), X_type=matrix_type) 2184s 2184s tests/test_views.py:531: 2184s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 2184s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:346: in gen_adata 2184s X = X_type(random_state.binomial(100, 0.005, (M, N)).astype(X_dtype)) 2184s /usr/lib/python3.13/functools.py:934: in wrapper 2184s return dispatch(args[0].__class__)(*args, **kw) 2184s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 2184s 2184s val = array([[0., 2., 0., 0., 2., 0., 0., 1., 0., 0., 0., 1., 0., 1., 2.], 2184s [0., 1., 0., 1., 0., 0., 0., 1., 2., 1., 0...1., 1., 0., 0., 1., 0., 1.], 2184s [0., 0., 0., 1., 0., 1., 1., 1., 1., 0., 0., 0., 1., 0., 0.]], 2184s dtype=float32) 2184s typ = 2184s 2184s @singledispatch 2184s def as_cupy(val, typ=None): 2184s """ 2184s Rough conversion function 2184s 2184s Will try to infer target type from input type if not specified. 2184s """ 2184s if typ is None: 2184s typ = resolve_cupy_type(val) 2184s 2184s if issubclass(typ, CupyArray): 2184s > import cupy as cp 2184s E ModuleNotFoundError: No module named 'cupy' 2184s 2184s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:1010: ModuleNotFoundError 2184s _______ test_view_of_view[cupy_array-spmatrix_bool_subset-array_subset] ________ 2184s 2184s matrix_type = functools.partial(, typ=) 2184s subset_func = 2184s subset_func2 = 2184s 2184s def test_view_of_view(matrix_type, subset_func, subset_func2): 2184s > adata = gen_adata((30, 15), X_type=matrix_type) 2184s 2184s tests/test_views.py:531: 2184s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 2184s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:346: in gen_adata 2184s X = X_type(random_state.binomial(100, 0.005, (M, N)).astype(X_dtype)) 2184s /usr/lib/python3.13/functools.py:934: in wrapper 2184s return dispatch(args[0].__class__)(*args, **kw) 2184s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 2184s 2184s val = array([[1., 0., 0., 3., 1., 0., 0., 0., 1., 0., 1., 1., 0., 1., 0.], 2184s [0., 1., 2., 1., 0., 0., 3., 1., 1., 0., 3...0., 1., 0., 0., 0., 1., 0.], 2184s [2., 0., 1., 1., 0., 0., 1., 0., 0., 0., 0., 0., 0., 0., 1.]], 2184s dtype=float32) 2184s typ = 2184s 2184s @singledispatch 2184s def as_cupy(val, typ=None): 2184s """ 2184s Rough conversion function 2184s 2184s Will try to infer target type from input type if not specified. 2184s """ 2184s if typ is None: 2184s typ = resolve_cupy_type(val) 2184s 2184s if issubclass(typ, CupyArray): 2184s > import cupy as cp 2184s E ModuleNotFoundError: No module named 'cupy' 2184s 2184s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:1010: ModuleNotFoundError 2184s _______ test_view_of_view[cupy_array-spmatrix_bool_subset-slice_subset] ________ 2184s 2184s matrix_type = functools.partial(, typ=) 2184s subset_func = 2184s subset_func2 = 2184s 2184s def test_view_of_view(matrix_type, subset_func, subset_func2): 2184s > adata = gen_adata((30, 15), X_type=matrix_type) 2184s 2184s tests/test_views.py:531: 2184s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 2184s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:346: in gen_adata 2184s X = X_type(random_state.binomial(100, 0.005, (M, N)).astype(X_dtype)) 2184s /usr/lib/python3.13/functools.py:934: in wrapper 2184s return dispatch(args[0].__class__)(*args, **kw) 2184s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 2184s 2184s val = array([[0., 0., 0., 0., 0., 0., 0., 0., 1., 0., 0., 0., 0., 0., 0.], 2184s [1., 2., 1., 1., 1., 0., 2., 1., 1., 0., 0...0., 0., 1., 0., 0., 1., 1.], 2184s [1., 0., 1., 1., 1., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0.]], 2184s dtype=float32) 2184s typ = 2184s 2184s @singledispatch 2184s def as_cupy(val, typ=None): 2184s """ 2184s Rough conversion function 2184s 2184s Will try to infer target type from input type if not specified. 2184s """ 2184s if typ is None: 2184s typ = resolve_cupy_type(val) 2184s 2184s if issubclass(typ, CupyArray): 2184s > import cupy as cp 2184s E ModuleNotFoundError: No module named 'cupy' 2184s 2184s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:1010: ModuleNotFoundError 2184s _______ test_view_of_view[cupy_array-spmatrix_bool_subset-single_subset] _______ 2184s 2184s matrix_type = functools.partial(, typ=) 2184s subset_func = 2184s subset_func2 = 2184s 2184s def test_view_of_view(matrix_type, subset_func, subset_func2): 2184s > adata = gen_adata((30, 15), X_type=matrix_type) 2184s 2184s tests/test_views.py:531: 2184s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 2184s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:346: in gen_adata 2184s X = X_type(random_state.binomial(100, 0.005, (M, N)).astype(X_dtype)) 2184s /usr/lib/python3.13/functools.py:934: in wrapper 2184s return dispatch(args[0].__class__)(*args, **kw) 2184s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 2184s 2184s val = array([[1., 0., 2., 1., 0., 0., 1., 0., 0., 1., 0., 1., 3., 0., 1.], 2184s [0., 0., 0., 0., 0., 0., 1., 1., 0., 0., 1...1., 1., 1., 1., 0., 0., 0.], 2184s [0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 1., 0., 0., 0.]], 2184s dtype=float32) 2184s typ = 2184s 2184s @singledispatch 2184s def as_cupy(val, typ=None): 2184s """ 2184s Rough conversion function 2184s 2184s Will try to infer target type from input type if not specified. 2184s """ 2184s if typ is None: 2184s typ = resolve_cupy_type(val) 2184s 2184s if issubclass(typ, CupyArray): 2184s > import cupy as cp 2184s E ModuleNotFoundError: No module named 'cupy' 2184s 2184s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:1010: ModuleNotFoundError 2184s _____ test_view_of_view[cupy_array-spmatrix_bool_subset-array_int_subset] ______ 2184s 2184s matrix_type = functools.partial(, typ=) 2184s subset_func = 2184s subset_func2 = 2184s 2184s def test_view_of_view(matrix_type, subset_func, subset_func2): 2184s > adata = gen_adata((30, 15), X_type=matrix_type) 2184s 2184s tests/test_views.py:531: 2184s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 2184s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:346: in gen_adata 2184s X = X_type(random_state.binomial(100, 0.005, (M, N)).astype(X_dtype)) 2184s /usr/lib/python3.13/functools.py:934: in wrapper 2184s return dispatch(args[0].__class__)(*args, **kw) 2184s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 2184s 2184s val = array([[1., 0., 0., 0., 0., 1., 0., 0., 0., 2., 0., 0., 0., 1., 2.], 2184s [0., 0., 0., 3., 0., 0., 0., 1., 0., 0., 0...0., 1., 0., 0., 1., 1., 1.], 2184s [0., 0., 1., 0., 1., 1., 0., 1., 2., 2., 0., 2., 0., 0., 0.]], 2184s dtype=float32) 2184s typ = 2184s 2184s @singledispatch 2184s def as_cupy(val, typ=None): 2184s """ 2184s Rough conversion function 2184s 2184s Will try to infer target type from input type if not specified. 2184s """ 2184s if typ is None: 2184s typ = resolve_cupy_type(val) 2184s 2184s if issubclass(typ, CupyArray): 2184s > import cupy as cp 2184s E ModuleNotFoundError: No module named 'cupy' 2184s 2184s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:1010: ModuleNotFoundError 2184s ______ test_view_of_view[cupy_array-spmatrix_bool_subset-list_int_subset] ______ 2184s 2184s matrix_type = functools.partial(, typ=) 2184s subset_func = 2184s subset_func2 = 2184s 2184s def test_view_of_view(matrix_type, subset_func, subset_func2): 2184s > adata = gen_adata((30, 15), X_type=matrix_type) 2184s 2184s tests/test_views.py:531: 2184s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 2184s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:346: in gen_adata 2184s X = X_type(random_state.binomial(100, 0.005, (M, N)).astype(X_dtype)) 2184s /usr/lib/python3.13/functools.py:934: in wrapper 2184s return dispatch(args[0].__class__)(*args, **kw) 2184s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 2184s 2184s val = array([[1., 1., 0., 1., 0., 1., 0., 0., 0., 0., 2., 3., 1., 0., 2.], 2184s [0., 0., 0., 0., 0., 0., 2., 0., 0., 0., 3...2., 0., 1., 0., 0., 1., 0.], 2184s [1., 1., 0., 0., 1., 1., 1., 1., 2., 1., 0., 1., 0., 0., 0.]], 2184s dtype=float32) 2184s typ = 2184s 2184s @singledispatch 2184s def as_cupy(val, typ=None): 2184s """ 2184s Rough conversion function 2184s 2184s Will try to infer target type from input type if not specified. 2184s """ 2184s if typ is None: 2184s typ = resolve_cupy_type(val) 2184s 2184s if issubclass(typ, CupyArray): 2184s > import cupy as cp 2184s E ModuleNotFoundError: No module named 'cupy' 2184s 2184s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:1010: ModuleNotFoundError 2184s _____ test_view_of_view[cupy_array-spmatrix_bool_subset-array_bool_subset] _____ 2184s 2184s matrix_type = functools.partial(, typ=) 2184s subset_func = 2184s subset_func2 = 2184s 2184s def test_view_of_view(matrix_type, subset_func, subset_func2): 2184s > adata = gen_adata((30, 15), X_type=matrix_type) 2184s 2184s tests/test_views.py:531: 2184s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 2184s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:346: in gen_adata 2184s X = X_type(random_state.binomial(100, 0.005, (M, N)).astype(X_dtype)) 2184s /usr/lib/python3.13/functools.py:934: in wrapper 2184s return dispatch(args[0].__class__)(*args, **kw) 2184s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 2184s 2184s val = array([[0., 1., 0., 0., 1., 0., 0., 0., 0., 0., 0., 0., 1., 1., 2.], 2184s [0., 0., 1., 0., 1., 0., 2., 0., 0., 1., 0...0., 2., 0., 2., 1., 0., 0.], 2184s [0., 1., 2., 0., 0., 0., 1., 5., 0., 1., 0., 0., 2., 0., 1.]], 2184s dtype=float32) 2184s typ = 2184s 2184s @singledispatch 2184s def as_cupy(val, typ=None): 2184s """ 2184s Rough conversion function 2184s 2184s Will try to infer target type from input type if not specified. 2184s """ 2184s if typ is None: 2184s typ = resolve_cupy_type(val) 2184s 2184s if issubclass(typ, CupyArray): 2184s > import cupy as cp 2184s E ModuleNotFoundError: No module named 'cupy' 2184s 2184s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:1010: ModuleNotFoundError 2184s _____ test_view_of_view[cupy_array-spmatrix_bool_subset-list_bool_subset] ______ 2184s 2184s matrix_type = functools.partial(, typ=) 2184s subset_func = 2184s subset_func2 = 2184s 2184s def test_view_of_view(matrix_type, subset_func, subset_func2): 2184s > adata = gen_adata((30, 15), X_type=matrix_type) 2184s 2184s tests/test_views.py:531: 2184s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 2184s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:346: in gen_adata 2184s X = X_type(random_state.binomial(100, 0.005, (M, N)).astype(X_dtype)) 2184s /usr/lib/python3.13/functools.py:934: in wrapper 2184s return dispatch(args[0].__class__)(*args, **kw) 2184s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 2184s 2184s val = array([[2., 0., 1., 0., 1., 1., 1., 0., 0., 0., 1., 0., 1., 1., 1.], 2184s [0., 1., 0., 1., 0., 0., 0., 0., 0., 0., 1...0., 0., 0., 1., 0., 1., 0.], 2184s [0., 0., 1., 0., 1., 0., 0., 3., 0., 2., 0., 0., 2., 0., 2.]], 2184s dtype=float32) 2184s typ = 2184s 2184s @singledispatch 2184s def as_cupy(val, typ=None): 2184s """ 2184s Rough conversion function 2184s 2184s Will try to infer target type from input type if not specified. 2184s """ 2184s if typ is None: 2184s typ = resolve_cupy_type(val) 2184s 2184s if issubclass(typ, CupyArray): 2184s > import cupy as cp 2184s E ModuleNotFoundError: No module named 'cupy' 2184s 2184s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:1010: ModuleNotFoundError 2184s ____ test_view_of_view[cupy_array-spmatrix_bool_subset-matrix_bool_subset] _____ 2184s 2184s matrix_type = functools.partial(, typ=) 2184s subset_func = 2184s subset_func2 = 2184s 2184s def test_view_of_view(matrix_type, subset_func, subset_func2): 2184s > adata = gen_adata((30, 15), X_type=matrix_type) 2184s 2184s tests/test_views.py:531: 2184s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 2184s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:346: in gen_adata 2184s X = X_type(random_state.binomial(100, 0.005, (M, N)).astype(X_dtype)) 2184s /usr/lib/python3.13/functools.py:934: in wrapper 2184s return dispatch(args[0].__class__)(*args, **kw) 2184s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 2184s 2184s val = array([[0., 0., 0., 0., 0., 0., 0., 1., 0., 1., 2., 1., 0., 0., 1.], 2184s [0., 0., 2., 1., 1., 1., 0., 0., 0., 0., 0...1., 0., 0., 0., 0., 0., 0.], 2184s [0., 1., 0., 0., 2., 0., 0., 0., 1., 0., 0., 0., 1., 2., 1.]], 2184s dtype=float32) 2184s typ = 2184s 2184s @singledispatch 2184s def as_cupy(val, typ=None): 2184s """ 2184s Rough conversion function 2184s 2184s Will try to infer target type from input type if not specified. 2184s """ 2184s if typ is None: 2184s typ = resolve_cupy_type(val) 2184s 2184s if issubclass(typ, CupyArray): 2184s > import cupy as cp 2184s E ModuleNotFoundError: No module named 'cupy' 2184s 2184s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:1010: ModuleNotFoundError 2184s ___ test_view_of_view[cupy_array-spmatrix_bool_subset-spmatrix_bool_subset] ____ 2184s 2184s matrix_type = functools.partial(, typ=) 2184s subset_func = 2184s subset_func2 = 2184s 2184s def test_view_of_view(matrix_type, subset_func, subset_func2): 2184s > adata = gen_adata((30, 15), X_type=matrix_type) 2184s 2184s tests/test_views.py:531: 2184s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 2184s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:346: in gen_adata 2184s X = X_type(random_state.binomial(100, 0.005, (M, N)).astype(X_dtype)) 2184s /usr/lib/python3.13/functools.py:934: in wrapper 2184s return dispatch(args[0].__class__)(*args, **kw) 2184s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 2184s 2184s val = array([[0., 0., 1., 0., 0., 0., 1., 0., 0., 0., 0., 1., 0., 0., 0.], 2184s [2., 0., 0., 0., 0., 0., 1., 3., 2., 1., 0...1., 0., 0., 0., 2., 0., 1.], 2184s [0., 0., 0., 1., 0., 0., 0., 1., 0., 1., 1., 0., 1., 0., 0.]], 2184s dtype=float32) 2184s typ = 2184s 2184s @singledispatch 2184s def as_cupy(val, typ=None): 2184s """ 2184s Rough conversion function 2184s 2184s Will try to infer target type from input type if not specified. 2184s """ 2184s if typ is None: 2184s typ = resolve_cupy_type(val) 2184s 2184s if issubclass(typ, CupyArray): 2184s > import cupy as cp 2184s E ModuleNotFoundError: No module named 'cupy' 2184s 2184s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:1010: ModuleNotFoundError 2184s ____ test_view_of_view[cupy_array-spmatrix_bool_subset-sparray_bool_subset] ____ 2184s 2184s matrix_type = functools.partial(, typ=) 2184s subset_func = 2184s subset_func2 = 2184s 2184s def test_view_of_view(matrix_type, subset_func, subset_func2): 2184s > adata = gen_adata((30, 15), X_type=matrix_type) 2184s 2184s tests/test_views.py:531: 2184s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 2184s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:346: in gen_adata 2184s X = X_type(random_state.binomial(100, 0.005, (M, N)).astype(X_dtype)) 2184s /usr/lib/python3.13/functools.py:934: in wrapper 2184s return dispatch(args[0].__class__)(*args, **kw) 2184s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 2184s 2184s val = array([[0., 2., 0., 0., 0., 0., 0., 1., 1., 1., 0., 1., 2., 0., 0.], 2184s [1., 0., 1., 0., 0., 0., 0., 0., 0., 0., 0...0., 1., 1., 0., 0., 0., 2.], 2184s [0., 1., 0., 0., 0., 0., 2., 1., 1., 1., 1., 0., 1., 1., 0.]], 2184s dtype=float32) 2184s typ = 2184s 2184s @singledispatch 2184s def as_cupy(val, typ=None): 2184s """ 2184s Rough conversion function 2184s 2184s Will try to infer target type from input type if not specified. 2184s """ 2184s if typ is None: 2184s typ = resolve_cupy_type(val) 2184s 2184s if issubclass(typ, CupyArray): 2184s > import cupy as cp 2184s E ModuleNotFoundError: No module named 'cupy' 2184s 2184s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:1010: ModuleNotFoundError 2184s ________ test_view_of_view[cupy_array-sparray_bool_subset-array_subset] ________ 2184s 2184s matrix_type = functools.partial(, typ=) 2184s subset_func = 2184s subset_func2 = 2184s 2184s def test_view_of_view(matrix_type, subset_func, subset_func2): 2184s > adata = gen_adata((30, 15), X_type=matrix_type) 2184s 2184s tests/test_views.py:531: 2184s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 2184s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:346: in gen_adata 2184s X = X_type(random_state.binomial(100, 0.005, (M, N)).astype(X_dtype)) 2184s /usr/lib/python3.13/functools.py:934: in wrapper 2184s return dispatch(args[0].__class__)(*args, **kw) 2184s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 2184s 2184s val = array([[0., 0., 1., 0., 0., 1., 0., 0., 0., 1., 1., 2., 3., 0., 0.], 2184s [0., 0., 1., 0., 0., 1., 1., 0., 1., 1., 2...1., 0., 1., 2., 0., 0., 0.], 2184s [0., 0., 0., 0., 1., 0., 2., 0., 0., 0., 1., 0., 0., 0., 2.]], 2184s dtype=float32) 2184s typ = 2184s 2184s @singledispatch 2184s def as_cupy(val, typ=None): 2184s """ 2184s Rough conversion function 2184s 2184s Will try to infer target type from input type if not specified. 2184s """ 2184s if typ is None: 2184s typ = resolve_cupy_type(val) 2184s 2184s if issubclass(typ, CupyArray): 2184s > import cupy as cp 2184s E ModuleNotFoundError: No module named 'cupy' 2184s 2184s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:1010: ModuleNotFoundError 2184s ________ test_view_of_view[cupy_array-sparray_bool_subset-slice_subset] ________ 2184s 2184s matrix_type = functools.partial(, typ=) 2184s subset_func = 2184s subset_func2 = 2184s 2184s def test_view_of_view(matrix_type, subset_func, subset_func2): 2184s > adata = gen_adata((30, 15), X_type=matrix_type) 2184s 2184s tests/test_views.py:531: 2184s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 2184s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:346: in gen_adata 2184s X = X_type(random_state.binomial(100, 0.005, (M, N)).astype(X_dtype)) 2184s /usr/lib/python3.13/functools.py:934: in wrapper 2184s return dispatch(args[0].__class__)(*args, **kw) 2184s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 2184s 2184s val = array([[0., 0., 0., 0., 0., 0., 1., 0., 0., 0., 1., 1., 0., 0., 0.], 2184s [0., 0., 0., 0., 1., 0., 0., 0., 1., 0., 0...0., 0., 0., 2., 0., 0., 0.], 2184s [0., 0., 1., 1., 0., 1., 0., 1., 0., 0., 1., 1., 1., 0., 0.]], 2184s dtype=float32) 2184s typ = 2184s 2184s @singledispatch 2184s def as_cupy(val, typ=None): 2184s """ 2184s Rough conversion function 2184s 2184s Will try to infer target type from input type if not specified. 2184s """ 2184s if typ is None: 2184s typ = resolve_cupy_type(val) 2184s 2184s if issubclass(typ, CupyArray): 2184s > import cupy as cp 2184s E ModuleNotFoundError: No module named 'cupy' 2184s 2184s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:1010: ModuleNotFoundError 2184s _______ test_view_of_view[cupy_array-sparray_bool_subset-single_subset] ________ 2184s 2184s matrix_type = functools.partial(, typ=) 2184s subset_func = 2184s subset_func2 = 2184s 2184s def test_view_of_view(matrix_type, subset_func, subset_func2): 2184s > adata = gen_adata((30, 15), X_type=matrix_type) 2184s 2184s tests/test_views.py:531: 2184s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 2184s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:346: in gen_adata 2184s X = X_type(random_state.binomial(100, 0.005, (M, N)).astype(X_dtype)) 2184s /usr/lib/python3.13/functools.py:934: in wrapper 2184s return dispatch(args[0].__class__)(*args, **kw) 2184s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 2184s 2184s val = array([[0., 1., 1., 0., 1., 0., 1., 1., 0., 2., 0., 1., 0., 2., 2.], 2184s [0., 0., 0., 0., 1., 0., 0., 1., 1., 2., 0...1., 1., 0., 0., 3., 0., 1.], 2184s [1., 3., 0., 0., 0., 1., 0., 1., 1., 0., 0., 0., 1., 1., 0.]], 2184s dtype=float32) 2184s typ = 2184s 2184s @singledispatch 2184s def as_cupy(val, typ=None): 2184s """ 2184s Rough conversion function 2184s 2184s Will try to infer target type from input type if not specified. 2184s """ 2184s if typ is None: 2184s typ = resolve_cupy_type(val) 2184s 2184s if issubclass(typ, CupyArray): 2184s > import cupy as cp 2184s E ModuleNotFoundError: No module named 'cupy' 2184s 2184s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:1010: ModuleNotFoundError 2184s ______ test_view_of_view[cupy_array-sparray_bool_subset-array_int_subset] ______ 2184s 2184s matrix_type = functools.partial(, typ=) 2184s subset_func = 2184s subset_func2 = 2184s 2184s def test_view_of_view(matrix_type, subset_func, subset_func2): 2184s > adata = gen_adata((30, 15), X_type=matrix_type) 2184s 2184s tests/test_views.py:531: 2184s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 2184s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:346: in gen_adata 2184s X = X_type(random_state.binomial(100, 0.005, (M, N)).astype(X_dtype)) 2184s /usr/lib/python3.13/functools.py:934: in wrapper 2184s return dispatch(args[0].__class__)(*args, **kw) 2184s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 2184s 2184s val = array([[0., 0., 0., 1., 1., 0., 0., 0., 0., 0., 0., 0., 0., 1., 0.], 2184s [1., 3., 1., 0., 1., 2., 1., 0., 0., 0., 0...1., 1., 1., 0., 1., 0., 1.], 2184s [1., 1., 0., 0., 1., 1., 0., 0., 0., 0., 0., 0., 0., 0., 1.]], 2184s dtype=float32) 2184s typ = 2184s 2184s @singledispatch 2184s def as_cupy(val, typ=None): 2184s """ 2184s Rough conversion function 2184s 2184s Will try to infer target type from input type if not specified. 2184s """ 2184s if typ is None: 2184s typ = resolve_cupy_type(val) 2184s 2184s if issubclass(typ, CupyArray): 2184s > import cupy as cp 2184s E ModuleNotFoundError: No module named 'cupy' 2184s 2184s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:1010: ModuleNotFoundError 2184s ______ test_view_of_view[cupy_array-sparray_bool_subset-list_int_subset] _______ 2184s 2184s matrix_type = functools.partial(, typ=) 2184s subset_func = 2184s subset_func2 = 2184s 2184s def test_view_of_view(matrix_type, subset_func, subset_func2): 2184s > adata = gen_adata((30, 15), X_type=matrix_type) 2184s 2184s tests/test_views.py:531: 2184s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 2184s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:346: in gen_adata 2184s X = X_type(random_state.binomial(100, 0.005, (M, N)).astype(X_dtype)) 2184s /usr/lib/python3.13/functools.py:934: in wrapper 2184s return dispatch(args[0].__class__)(*args, **kw) 2184s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 2184s 2184s val = array([[2., 0., 0., 0., 0., 0., 1., 0., 1., 0., 1., 0., 0., 1., 1.], 2184s [1., 0., 0., 1., 0., 0., 1., 2., 1., 0., 0...0., 0., 0., 0., 0., 0., 1.], 2184s [0., 2., 0., 1., 0., 1., 2., 1., 0., 1., 0., 1., 1., 0., 0.]], 2184s dtype=float32) 2184s typ = 2184s 2184s @singledispatch 2184s def as_cupy(val, typ=None): 2184s """ 2184s Rough conversion function 2184s 2184s Will try to infer target type from input type if not specified. 2184s """ 2184s if typ is None: 2184s typ = resolve_cupy_type(val) 2184s 2184s if issubclass(typ, CupyArray): 2184s > import cupy as cp 2184s E ModuleNotFoundError: No module named 'cupy' 2184s 2184s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:1010: ModuleNotFoundError 2184s _____ test_view_of_view[cupy_array-sparray_bool_subset-array_bool_subset] ______ 2184s 2184s matrix_type = functools.partial(, typ=) 2184s subset_func = 2184s subset_func2 = 2184s 2184s def test_view_of_view(matrix_type, subset_func, subset_func2): 2184s > adata = gen_adata((30, 15), X_type=matrix_type) 2184s 2184s tests/test_views.py:531: 2184s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 2184s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:346: in gen_adata 2184s X = X_type(random_state.binomial(100, 0.005, (M, N)).astype(X_dtype)) 2184s /usr/lib/python3.13/functools.py:934: in wrapper 2184s return dispatch(args[0].__class__)(*args, **kw) 2184s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 2184s 2184s val = array([[0., 0., 1., 1., 0., 2., 0., 1., 1., 0., 1., 1., 1., 1., 0.], 2184s [0., 0., 1., 1., 0., 1., 0., 0., 0., 0., 1...0., 1., 0., 1., 0., 0., 0.], 2184s [0., 0., 0., 0., 0., 1., 0., 0., 0., 1., 1., 1., 0., 0., 0.]], 2184s dtype=float32) 2184s typ = 2184s 2184s @singledispatch 2184s def as_cupy(val, typ=None): 2184s """ 2184s Rough conversion function 2184s 2184s Will try to infer target type from input type if not specified. 2184s """ 2184s if typ is None: 2184s typ = resolve_cupy_type(val) 2184s 2184s if issubclass(typ, CupyArray): 2184s > import cupy as cp 2184s E ModuleNotFoundError: No module named 'cupy' 2184s 2184s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:1010: ModuleNotFoundError 2184s ______ test_view_of_view[cupy_array-sparray_bool_subset-list_bool_subset] ______ 2184s 2184s matrix_type = functools.partial(, typ=) 2184s subset_func = 2184s subset_func2 = 2184s 2184s def test_view_of_view(matrix_type, subset_func, subset_func2): 2184s > adata = gen_adata((30, 15), X_type=matrix_type) 2184s 2184s tests/test_views.py:531: 2184s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 2184s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:346: in gen_adata 2184s X = X_type(random_state.binomial(100, 0.005, (M, N)).astype(X_dtype)) 2184s /usr/lib/python3.13/functools.py:934: in wrapper 2184s return dispatch(args[0].__class__)(*args, **kw) 2184s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 2184s 2184s val = array([[1., 0., 1., 0., 2., 0., 0., 0., 1., 0., 2., 0., 0., 0., 0.], 2184s [2., 0., 3., 0., 0., 0., 0., 2., 0., 4., 0...0., 1., 2., 1., 0., 0., 0.], 2184s [1., 1., 1., 1., 0., 2., 1., 0., 0., 2., 0., 0., 0., 0., 1.]], 2184s dtype=float32) 2184s typ = 2184s 2184s @singledispatch 2184s def as_cupy(val, typ=None): 2184s """ 2184s Rough conversion function 2184s 2184s Will try to infer target type from input type if not specified. 2184s """ 2184s if typ is None: 2184s typ = resolve_cupy_type(val) 2184s 2184s if issubclass(typ, CupyArray): 2184s > import cupy as cp 2184s E ModuleNotFoundError: No module named 'cupy' 2184s 2184s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:1010: ModuleNotFoundError 2184s _____ test_view_of_view[cupy_array-sparray_bool_subset-matrix_bool_subset] _____ 2184s 2184s matrix_type = functools.partial(, typ=) 2184s subset_func = 2184s subset_func2 = 2184s 2184s def test_view_of_view(matrix_type, subset_func, subset_func2): 2184s > adata = gen_adata((30, 15), X_type=matrix_type) 2184s 2184s tests/test_views.py:531: 2184s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 2184s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:346: in gen_adata 2184s X = X_type(random_state.binomial(100, 0.005, (M, N)).astype(X_dtype)) 2184s /usr/lib/python3.13/functools.py:934: in wrapper 2184s return dispatch(args[0].__class__)(*args, **kw) 2184s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 2184s 2184s val = array([[1., 0., 1., 0., 0., 1., 0., 0., 1., 0., 1., 1., 1., 0., 1.], 2184s [0., 0., 0., 0., 0., 2., 1., 1., 0., 1., 0...0., 0., 0., 0., 0., 0., 1.], 2184s [0., 0., 0., 0., 0., 0., 1., 1., 1., 0., 1., 0., 0., 0., 0.]], 2184s dtype=float32) 2184s typ = 2184s 2184s @singledispatch 2184s def as_cupy(val, typ=None): 2184s """ 2184s Rough conversion function 2184s 2184s Will try to infer target type from input type if not specified. 2184s """ 2184s if typ is None: 2184s typ = resolve_cupy_type(val) 2184s 2184s if issubclass(typ, CupyArray): 2184s > import cupy as cp 2184s E ModuleNotFoundError: No module named 'cupy' 2184s 2184s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:1010: ModuleNotFoundError 2184s ____ test_view_of_view[cupy_array-sparray_bool_subset-spmatrix_bool_subset] ____ 2184s 2184s matrix_type = functools.partial(, typ=) 2184s subset_func = 2184s subset_func2 = 2184s 2184s def test_view_of_view(matrix_type, subset_func, subset_func2): 2184s > adata = gen_adata((30, 15), X_type=matrix_type) 2184s 2184s tests/test_views.py:531: 2184s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 2184s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:346: in gen_adata 2184s X = X_type(random_state.binomial(100, 0.005, (M, N)).astype(X_dtype)) 2184s /usr/lib/python3.13/functools.py:934: in wrapper 2184s return dispatch(args[0].__class__)(*args, **kw) 2184s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 2184s 2184s val = array([[0., 0., 2., 0., 0., 0., 0., 0., 1., 0., 2., 0., 0., 2., 1.], 2184s [1., 0., 1., 1., 0., 0., 0., 0., 1., 0., 0...0., 0., 1., 1., 1., 0., 2.], 2184s [0., 0., 0., 0., 0., 0., 0., 0., 0., 1., 1., 0., 1., 0., 1.]], 2184s dtype=float32) 2184s typ = 2184s 2184s @singledispatch 2184s def as_cupy(val, typ=None): 2184s """ 2184s Rough conversion function 2184s 2184s Will try to infer target type from input type if not specified. 2184s """ 2184s if typ is None: 2184s typ = resolve_cupy_type(val) 2184s 2184s if issubclass(typ, CupyArray): 2184s > import cupy as cp 2184s E ModuleNotFoundError: No module named 'cupy' 2184s 2184s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:1010: ModuleNotFoundError 2184s ____ test_view_of_view[cupy_array-sparray_bool_subset-sparray_bool_subset] _____ 2184s 2184s matrix_type = functools.partial(, typ=) 2184s subset_func = 2184s subset_func2 = 2184s 2184s def test_view_of_view(matrix_type, subset_func, subset_func2): 2184s > adata = gen_adata((30, 15), X_type=matrix_type) 2184s 2184s tests/test_views.py:531: 2184s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 2184s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:346: in gen_adata 2184s X = X_type(random_state.binomial(100, 0.005, (M, N)).astype(X_dtype)) 2184s /usr/lib/python3.13/functools.py:934: in wrapper 2184s return dispatch(args[0].__class__)(*args, **kw) 2184s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 2184s 2184s val = array([[0., 0., 0., 1., 0., 2., 0., 0., 0., 2., 0., 1., 1., 0., 0.], 2184s [0., 0., 0., 0., 0., 0., 0., 0., 2., 0., 0...0., 0., 1., 0., 0., 1., 0.], 2184s [0., 0., 0., 0., 2., 2., 2., 1., 0., 0., 0., 2., 0., 2., 1.]], 2184s dtype=float32) 2184s typ = 2184s 2184s @singledispatch 2184s def as_cupy(val, typ=None): 2184s """ 2184s Rough conversion function 2184s 2184s Will try to infer target type from input type if not specified. 2184s """ 2184s if typ is None: 2184s typ = resolve_cupy_type(val) 2184s 2184s if issubclass(typ, CupyArray): 2184s > import cupy as cp 2184s E ModuleNotFoundError: No module named 'cupy' 2184s 2184s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:1010: ModuleNotFoundError 2184s ____________ test_view_of_view[cupy_csr-array_subset-array_subset] _____________ 2184s 2184s matrix_type = functools.partial(, typ=) 2184s subset_func = 2184s subset_func2 = 2184s 2184s def test_view_of_view(matrix_type, subset_func, subset_func2): 2184s > adata = gen_adata((30, 15), X_type=matrix_type) 2184s 2184s tests/test_views.py:531: 2184s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 2184s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:346: in gen_adata 2184s X = X_type(random_state.binomial(100, 0.005, (M, N)).astype(X_dtype)) 2184s /usr/lib/python3.13/functools.py:934: in wrapper 2184s return dispatch(args[0].__class__)(*args, **kw) 2184s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 2184s 2184s val = array([[2., 0., 1., 2., 1., 1., 1., 0., 0., 0., 0., 0., 0., 1., 0.], 2184s [1., 0., 0., 0., 1., 2., 1., 0., 0., 0., 0...0., 0., 1., 1., 1., 0., 2.], 2184s [1., 0., 0., 0., 1., 0., 0., 1., 0., 0., 0., 0., 0., 1., 0.]], 2184s dtype=float32) 2184s typ = 2184s 2184s @singledispatch 2184s def as_cupy(val, typ=None): 2184s """ 2184s Rough conversion function 2184s 2184s Will try to infer target type from input type if not specified. 2184s """ 2184s if typ is None: 2184s typ = resolve_cupy_type(val) 2184s 2184s if issubclass(typ, CupyArray): 2184s import cupy as cp 2184s 2184s if isinstance(val, CSMatrix): 2184s val = val.toarray() 2184s return cp.array(val) 2184s elif issubclass(typ, CupyCSRMatrix): 2184s > import cupy as cp 2184s E ModuleNotFoundError: No module named 'cupy' 2184s 2184s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:1016: ModuleNotFoundError 2184s ____________ test_view_of_view[cupy_csr-array_subset-slice_subset] _____________ 2184s 2184s matrix_type = functools.partial(, typ=) 2184s subset_func = 2184s subset_func2 = 2184s 2184s def test_view_of_view(matrix_type, subset_func, subset_func2): 2184s > adata = gen_adata((30, 15), X_type=matrix_type) 2184s 2184s tests/test_views.py:531: 2184s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 2184s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:346: in gen_adata 2184s X = X_type(random_state.binomial(100, 0.005, (M, N)).astype(X_dtype)) 2184s /usr/lib/python3.13/functools.py:934: in wrapper 2184s return dispatch(args[0].__class__)(*args, **kw) 2184s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 2184s 2184s val = array([[1., 1., 0., 0., 0., 0., 0., 2., 0., 0., 0., 1., 0., 1., 2.], 2184s [2., 2., 0., 0., 0., 0., 0., 0., 1., 1., 0...0., 1., 0., 0., 1., 0., 0.], 2184s [0., 0., 0., 2., 2., 1., 0., 1., 1., 0., 0., 3., 0., 0., 2.]], 2184s dtype=float32) 2184s typ = 2184s 2184s @singledispatch 2184s def as_cupy(val, typ=None): 2184s """ 2184s Rough conversion function 2184s 2184s Will try to infer target type from input type if not specified. 2184s """ 2184s if typ is None: 2184s typ = resolve_cupy_type(val) 2184s 2184s if issubclass(typ, CupyArray): 2184s import cupy as cp 2184s 2184s if isinstance(val, CSMatrix): 2184s val = val.toarray() 2184s return cp.array(val) 2184s elif issubclass(typ, CupyCSRMatrix): 2184s > import cupy as cp 2184s E ModuleNotFoundError: No module named 'cupy' 2184s 2184s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:1016: ModuleNotFoundError 2184s ____________ test_view_of_view[cupy_csr-array_subset-single_subset] ____________ 2184s 2184s matrix_type = functools.partial(, typ=) 2184s subset_func = 2184s subset_func2 = 2184s 2184s def test_view_of_view(matrix_type, subset_func, subset_func2): 2184s > adata = gen_adata((30, 15), X_type=matrix_type) 2184s 2184s tests/test_views.py:531: 2184s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 2184s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:346: in gen_adata 2184s X = X_type(random_state.binomial(100, 0.005, (M, N)).astype(X_dtype)) 2184s /usr/lib/python3.13/functools.py:934: in wrapper 2184s return dispatch(args[0].__class__)(*args, **kw) 2184s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 2184s 2184s val = array([[0., 1., 0., 0., 0., 0., 3., 0., 0., 0., 1., 0., 0., 0., 0.], 2184s [0., 3., 0., 0., 2., 0., 0., 1., 3., 0., 0...1., 2., 0., 0., 0., 0., 0.], 2184s [0., 1., 1., 0., 0., 0., 0., 0., 0., 1., 0., 0., 0., 1., 1.]], 2184s dtype=float32) 2184s typ = 2184s 2184s @singledispatch 2184s def as_cupy(val, typ=None): 2184s """ 2184s Rough conversion function 2184s 2184s Will try to infer target type from input type if not specified. 2184s """ 2184s if typ is None: 2184s typ = resolve_cupy_type(val) 2184s 2184s if issubclass(typ, CupyArray): 2184s import cupy as cp 2184s 2184s if isinstance(val, CSMatrix): 2184s val = val.toarray() 2184s return cp.array(val) 2184s elif issubclass(typ, CupyCSRMatrix): 2184s > import cupy as cp 2184s E ModuleNotFoundError: No module named 'cupy' 2184s 2184s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:1016: ModuleNotFoundError 2184s __________ test_view_of_view[cupy_csr-array_subset-array_int_subset] ___________ 2184s 2184s matrix_type = functools.partial(, typ=) 2184s subset_func = 2184s subset_func2 = 2184s 2184s def test_view_of_view(matrix_type, subset_func, subset_func2): 2184s > adata = gen_adata((30, 15), X_type=matrix_type) 2184s 2184s tests/test_views.py:531: 2184s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 2184s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:346: in gen_adata 2184s X = X_type(random_state.binomial(100, 0.005, (M, N)).astype(X_dtype)) 2184s /usr/lib/python3.13/functools.py:934: in wrapper 2184s return dispatch(args[0].__class__)(*args, **kw) 2184s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 2184s 2184s val = array([[1., 0., 0., 0., 0., 1., 0., 1., 1., 0., 1., 0., 1., 2., 0.], 2184s [0., 0., 0., 0., 0., 1., 1., 1., 1., 0., 0...1., 2., 0., 0., 0., 0., 0.], 2184s [2., 0., 0., 0., 0., 0., 0., 1., 0., 0., 0., 1., 0., 2., 0.]], 2184s dtype=float32) 2184s typ = 2184s 2184s @singledispatch 2184s def as_cupy(val, typ=None): 2184s """ 2184s Rough conversion function 2184s 2184s Will try to infer target type from input type if not specified. 2184s """ 2184s if typ is None: 2184s typ = resolve_cupy_type(val) 2184s 2184s if issubclass(typ, CupyArray): 2184s import cupy as cp 2184s 2184s if isinstance(val, CSMatrix): 2184s val = val.toarray() 2184s return cp.array(val) 2184s elif issubclass(typ, CupyCSRMatrix): 2184s > import cupy as cp 2184s E ModuleNotFoundError: No module named 'cupy' 2184s 2184s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:1016: ModuleNotFoundError 2184s ___________ test_view_of_view[cupy_csr-array_subset-list_int_subset] ___________ 2184s 2184s matrix_type = functools.partial(, typ=) 2184s subset_func = 2184s subset_func2 = 2184s 2184s def test_view_of_view(matrix_type, subset_func, subset_func2): 2184s > adata = gen_adata((30, 15), X_type=matrix_type) 2184s 2184s tests/test_views.py:531: 2184s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 2184s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:346: in gen_adata 2184s X = X_type(random_state.binomial(100, 0.005, (M, N)).astype(X_dtype)) 2184s /usr/lib/python3.13/functools.py:934: in wrapper 2184s return dispatch(args[0].__class__)(*args, **kw) 2184s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 2184s 2184s val = array([[0., 0., 0., 0., 2., 0., 2., 0., 0., 0., 0., 4., 3., 1., 0.], 2184s [0., 0., 1., 1., 0., 0., 0., 2., 0., 1., 1...0., 1., 0., 1., 1., 0., 0.], 2184s [1., 1., 0., 1., 0., 0., 0., 0., 1., 1., 2., 0., 1., 1., 0.]], 2184s dtype=float32) 2184s typ = 2184s 2184s @singledispatch 2184s def as_cupy(val, typ=None): 2184s """ 2184s Rough conversion function 2184s 2184s Will try to infer target type from input type if not specified. 2184s """ 2184s if typ is None: 2184s typ = resolve_cupy_type(val) 2184s 2184s if issubclass(typ, CupyArray): 2184s import cupy as cp 2184s 2184s if isinstance(val, CSMatrix): 2184s val = val.toarray() 2184s return cp.array(val) 2184s elif issubclass(typ, CupyCSRMatrix): 2184s > import cupy as cp 2184s E ModuleNotFoundError: No module named 'cupy' 2184s 2184s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:1016: ModuleNotFoundError 2184s __________ test_view_of_view[cupy_csr-array_subset-array_bool_subset] __________ 2184s 2184s matrix_type = functools.partial(, typ=) 2184s subset_func = 2184s subset_func2 = 2184s 2184s def test_view_of_view(matrix_type, subset_func, subset_func2): 2184s > adata = gen_adata((30, 15), X_type=matrix_type) 2184s 2184s tests/test_views.py:531: 2184s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 2184s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:346: in gen_adata 2184s X = X_type(random_state.binomial(100, 0.005, (M, N)).astype(X_dtype)) 2184s /usr/lib/python3.13/functools.py:934: in wrapper 2184s return dispatch(args[0].__class__)(*args, **kw) 2184s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 2184s 2184s val = array([[1., 0., 0., 0., 0., 0., 1., 0., 2., 0., 1., 0., 0., 0., 0.], 2184s [1., 0., 1., 0., 0., 0., 0., 2., 0., 0., 1...1., 1., 0., 2., 1., 0., 1.], 2184s [0., 1., 0., 0., 1., 1., 3., 1., 0., 1., 1., 0., 0., 1., 1.]], 2184s dtype=float32) 2184s typ = 2184s 2184s @singledispatch 2184s def as_cupy(val, typ=None): 2184s """ 2184s Rough conversion function 2184s 2184s Will try to infer target type from input type if not specified. 2184s """ 2184s if typ is None: 2184s typ = resolve_cupy_type(val) 2184s 2184s if issubclass(typ, CupyArray): 2184s import cupy as cp 2184s 2184s if isinstance(val, CSMatrix): 2184s val = val.toarray() 2184s return cp.array(val) 2184s elif issubclass(typ, CupyCSRMatrix): 2184s > import cupy as cp 2184s E ModuleNotFoundError: No module named 'cupy' 2184s 2184s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:1016: ModuleNotFoundError 2184s __________ test_view_of_view[cupy_csr-array_subset-list_bool_subset] ___________ 2184s 2184s matrix_type = functools.partial(, typ=) 2184s subset_func = 2184s subset_func2 = 2184s 2184s def test_view_of_view(matrix_type, subset_func, subset_func2): 2184s > adata = gen_adata((30, 15), X_type=matrix_type) 2184s 2184s tests/test_views.py:531: 2184s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 2184s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:346: in gen_adata 2184s X = X_type(random_state.binomial(100, 0.005, (M, N)).astype(X_dtype)) 2184s /usr/lib/python3.13/functools.py:934: in wrapper 2184s return dispatch(args[0].__class__)(*args, **kw) 2184s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 2184s 2184s val = array([[1., 2., 0., 1., 1., 0., 0., 0., 0., 0., 0., 1., 3., 1., 0.], 2184s [0., 0., 1., 0., 0., 1., 1., 0., 1., 0., 3...0., 1., 1., 0., 0., 0., 1.], 2184s [1., 1., 2., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 1., 0.]], 2184s dtype=float32) 2184s typ = 2184s 2184s @singledispatch 2184s def as_cupy(val, typ=None): 2184s """ 2184s Rough conversion function 2184s 2184s Will try to infer target type from input type if not specified. 2184s """ 2184s if typ is None: 2184s typ = resolve_cupy_type(val) 2184s 2184s if issubclass(typ, CupyArray): 2184s import cupy as cp 2184s 2184s if isinstance(val, CSMatrix): 2184s val = val.toarray() 2184s return cp.array(val) 2184s elif issubclass(typ, CupyCSRMatrix): 2184s > import cupy as cp 2184s E ModuleNotFoundError: No module named 'cupy' 2184s 2184s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:1016: ModuleNotFoundError 2184s _________ test_view_of_view[cupy_csr-array_subset-matrix_bool_subset] __________ 2184s 2184s matrix_type = functools.partial(, typ=) 2184s subset_func = 2184s subset_func2 = 2184s 2184s def test_view_of_view(matrix_type, subset_func, subset_func2): 2184s > adata = gen_adata((30, 15), X_type=matrix_type) 2184s 2184s tests/test_views.py:531: 2184s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 2184s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:346: in gen_adata 2184s X = X_type(random_state.binomial(100, 0.005, (M, N)).astype(X_dtype)) 2184s /usr/lib/python3.13/functools.py:934: in wrapper 2184s return dispatch(args[0].__class__)(*args, **kw) 2184s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 2184s 2184s val = array([[0., 0., 0., 0., 0., 1., 1., 0., 0., 0., 1., 1., 1., 1., 2.], 2184s [1., 1., 0., 0., 0., 0., 2., 0., 1., 0., 0...2., 0., 0., 0., 0., 1., 0.], 2184s [1., 0., 0., 3., 0., 0., 0., 2., 0., 1., 0., 1., 3., 1., 0.]], 2184s dtype=float32) 2184s typ = 2184s 2184s @singledispatch 2184s def as_cupy(val, typ=None): 2184s """ 2184s Rough conversion function 2184s 2184s Will try to infer target type from input type if not specified. 2184s """ 2184s if typ is None: 2184s typ = resolve_cupy_type(val) 2184s 2184s if issubclass(typ, CupyArray): 2184s import cupy as cp 2184s 2184s if isinstance(val, CSMatrix): 2184s val = val.toarray() 2184s return cp.array(val) 2184s elif issubclass(typ, CupyCSRMatrix): 2184s > import cupy as cp 2184s E ModuleNotFoundError: No module named 'cupy' 2184s 2184s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:1016: ModuleNotFoundError 2184s ________ test_view_of_view[cupy_csr-array_subset-spmatrix_bool_subset] _________ 2184s 2184s matrix_type = functools.partial(, typ=) 2184s subset_func = 2184s subset_func2 = 2184s 2184s def test_view_of_view(matrix_type, subset_func, subset_func2): 2184s > adata = gen_adata((30, 15), X_type=matrix_type) 2184s 2184s tests/test_views.py:531: 2184s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 2184s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:346: in gen_adata 2184s X = X_type(random_state.binomial(100, 0.005, (M, N)).astype(X_dtype)) 2184s /usr/lib/python3.13/functools.py:934: in wrapper 2184s return dispatch(args[0].__class__)(*args, **kw) 2184s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 2184s 2184s val = array([[1., 0., 1., 3., 0., 0., 0., 0., 0., 1., 1., 0., 2., 0., 0.], 2184s [0., 1., 1., 0., 2., 1., 0., 0., 0., 1., 0...1., 0., 1., 0., 1., 1., 0.], 2184s [0., 0., 0., 0., 0., 0., 1., 0., 1., 0., 1., 0., 0., 1., 0.]], 2184s dtype=float32) 2184s typ = 2184s 2184s @singledispatch 2184s def as_cupy(val, typ=None): 2184s """ 2184s Rough conversion function 2184s 2184s Will try to infer target type from input type if not specified. 2184s """ 2184s if typ is None: 2184s typ = resolve_cupy_type(val) 2184s 2184s if issubclass(typ, CupyArray): 2184s import cupy as cp 2184s 2184s if isinstance(val, CSMatrix): 2184s val = val.toarray() 2184s return cp.array(val) 2184s elif issubclass(typ, CupyCSRMatrix): 2184s > import cupy as cp 2184s E ModuleNotFoundError: No module named 'cupy' 2184s 2184s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:1016: ModuleNotFoundError 2184s _________ test_view_of_view[cupy_csr-array_subset-sparray_bool_subset] _________ 2184s 2184s matrix_type = functools.partial(, typ=) 2184s subset_func = 2184s subset_func2 = 2184s 2184s def test_view_of_view(matrix_type, subset_func, subset_func2): 2184s > adata = gen_adata((30, 15), X_type=matrix_type) 2184s 2184s tests/test_views.py:531: 2184s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 2184s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:346: in gen_adata 2184s X = X_type(random_state.binomial(100, 0.005, (M, N)).astype(X_dtype)) 2184s /usr/lib/python3.13/functools.py:934: in wrapper 2184s return dispatch(args[0].__class__)(*args, **kw) 2184s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 2184s 2184s val = array([[0., 0., 1., 1., 1., 0., 0., 0., 0., 1., 0., 0., 1., 0., 0.], 2184s [1., 0., 0., 0., 1., 0., 1., 2., 1., 0., 1...1., 1., 0., 1., 0., 1., 1.], 2184s [1., 0., 1., 0., 1., 0., 2., 0., 0., 0., 0., 0., 2., 2., 0.]], 2184s dtype=float32) 2184s typ = 2184s 2184s @singledispatch 2184s def as_cupy(val, typ=None): 2184s """ 2184s Rough conversion function 2184s 2184s Will try to infer target type from input type if not specified. 2184s """ 2184s if typ is None: 2184s typ = resolve_cupy_type(val) 2184s 2184s if issubclass(typ, CupyArray): 2184s import cupy as cp 2184s 2184s if isinstance(val, CSMatrix): 2184s val = val.toarray() 2184s return cp.array(val) 2184s elif issubclass(typ, CupyCSRMatrix): 2184s > import cupy as cp 2184s E ModuleNotFoundError: No module named 'cupy' 2184s 2184s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:1016: ModuleNotFoundError 2184s ____________ test_view_of_view[cupy_csr-slice_subset-array_subset] _____________ 2184s 2184s matrix_type = functools.partial(, typ=) 2184s subset_func = 2184s subset_func2 = 2184s 2184s def test_view_of_view(matrix_type, subset_func, subset_func2): 2184s > adata = gen_adata((30, 15), X_type=matrix_type) 2184s 2184s tests/test_views.py:531: 2184s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 2184s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:346: in gen_adata 2184s X = X_type(random_state.binomial(100, 0.005, (M, N)).astype(X_dtype)) 2184s /usr/lib/python3.13/functools.py:934: in wrapper 2184s return dispatch(args[0].__class__)(*args, **kw) 2184s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 2184s 2184s val = array([[1., 0., 1., 0., 0., 1., 0., 2., 3., 1., 0., 0., 1., 0., 1.], 2184s [0., 1., 1., 1., 0., 2., 1., 1., 1., 0., 1...0., 1., 1., 1., 1., 0., 0.], 2184s [0., 0., 0., 0., 2., 0., 1., 0., 0., 0., 0., 1., 0., 0., 0.]], 2184s dtype=float32) 2184s typ = 2184s 2184s @singledispatch 2184s def as_cupy(val, typ=None): 2184s """ 2184s Rough conversion function 2184s 2184s Will try to infer target type from input type if not specified. 2184s """ 2184s if typ is None: 2184s typ = resolve_cupy_type(val) 2184s 2184s if issubclass(typ, CupyArray): 2184s import cupy as cp 2184s 2184s if isinstance(val, CSMatrix): 2184s val = val.toarray() 2184s return cp.array(val) 2184s elif issubclass(typ, CupyCSRMatrix): 2184s > import cupy as cp 2184s E ModuleNotFoundError: No module named 'cupy' 2184s 2184s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:1016: ModuleNotFoundError 2184s ____________ test_view_of_view[cupy_csr-slice_subset-slice_subset] _____________ 2184s 2184s matrix_type = functools.partial(, typ=) 2184s subset_func = 2184s subset_func2 = 2184s 2184s def test_view_of_view(matrix_type, subset_func, subset_func2): 2184s > adata = gen_adata((30, 15), X_type=matrix_type) 2184s 2184s tests/test_views.py:531: 2184s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 2184s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:346: in gen_adata 2184s X = X_type(random_state.binomial(100, 0.005, (M, N)).astype(X_dtype)) 2184s /usr/lib/python3.13/functools.py:934: in wrapper 2184s return dispatch(args[0].__class__)(*args, **kw) 2184s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 2184s 2184s val = array([[1., 0., 1., 2., 0., 1., 1., 0., 0., 0., 0., 1., 0., 0., 0.], 2184s [1., 1., 0., 0., 0., 1., 1., 0., 0., 1., 1...0., 1., 0., 0., 0., 0., 2.], 2184s [0., 0., 0., 0., 2., 0., 1., 1., 0., 1., 0., 0., 0., 0., 1.]], 2184s dtype=float32) 2184s typ = 2184s 2184s @singledispatch 2184s def as_cupy(val, typ=None): 2184s """ 2184s Rough conversion function 2184s 2184s Will try to infer target type from input type if not specified. 2184s """ 2184s if typ is None: 2184s typ = resolve_cupy_type(val) 2184s 2184s if issubclass(typ, CupyArray): 2184s import cupy as cp 2184s 2184s if isinstance(val, CSMatrix): 2184s val = val.toarray() 2184s return cp.array(val) 2184s elif issubclass(typ, CupyCSRMatrix): 2184s > import cupy as cp 2184s E ModuleNotFoundError: No module named 'cupy' 2184s 2184s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:1016: ModuleNotFoundError 2184s ____________ test_view_of_view[cupy_csr-slice_subset-single_subset] ____________ 2184s 2184s matrix_type = functools.partial(, typ=) 2184s subset_func = 2184s subset_func2 = 2184s 2184s def test_view_of_view(matrix_type, subset_func, subset_func2): 2184s > adata = gen_adata((30, 15), X_type=matrix_type) 2184s 2184s tests/test_views.py:531: 2184s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 2184s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:346: in gen_adata 2184s X = X_type(random_state.binomial(100, 0.005, (M, N)).astype(X_dtype)) 2184s /usr/lib/python3.13/functools.py:934: in wrapper 2184s return dispatch(args[0].__class__)(*args, **kw) 2184s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 2184s 2184s val = array([[0., 0., 0., 1., 3., 1., 0., 2., 0., 0., 0., 0., 1., 0., 0.], 2184s [0., 0., 0., 0., 0., 1., 1., 0., 0., 1., 1...0., 2., 1., 0., 0., 1., 0.], 2184s [1., 1., 1., 1., 1., 1., 0., 1., 0., 0., 1., 0., 0., 0., 0.]], 2184s dtype=float32) 2184s typ = 2184s 2184s @singledispatch 2184s def as_cupy(val, typ=None): 2184s """ 2184s Rough conversion function 2184s 2184s Will try to infer target type from input type if not specified. 2184s """ 2184s if typ is None: 2184s typ = resolve_cupy_type(val) 2184s 2184s if issubclass(typ, CupyArray): 2184s import cupy as cp 2184s 2184s if isinstance(val, CSMatrix): 2184s val = val.toarray() 2184s return cp.array(val) 2184s elif issubclass(typ, CupyCSRMatrix): 2184s > import cupy as cp 2184s E ModuleNotFoundError: No module named 'cupy' 2184s 2184s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:1016: ModuleNotFoundError 2184s __________ test_view_of_view[cupy_csr-slice_subset-array_int_subset] ___________ 2184s 2184s matrix_type = functools.partial(, typ=) 2184s subset_func = 2184s subset_func2 = 2184s 2184s def test_view_of_view(matrix_type, subset_func, subset_func2): 2184s > adata = gen_adata((30, 15), X_type=matrix_type) 2184s 2184s tests/test_views.py:531: 2184s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 2184s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:346: in gen_adata 2184s X = X_type(random_state.binomial(100, 0.005, (M, N)).astype(X_dtype)) 2184s /usr/lib/python3.13/functools.py:934: in wrapper 2184s return dispatch(args[0].__class__)(*args, **kw) 2184s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 2184s 2184s val = array([[2., 1., 1., 0., 1., 0., 1., 2., 1., 1., 1., 0., 0., 1., 0.], 2184s [0., 0., 1., 0., 1., 1., 1., 0., 1., 2., 0...1., 0., 0., 0., 0., 0., 1.], 2184s [2., 0., 0., 1., 0., 2., 0., 0., 0., 0., 1., 2., 3., 1., 1.]], 2184s dtype=float32) 2184s typ = 2184s 2184s @singledispatch 2184s def as_cupy(val, typ=None): 2184s """ 2184s Rough conversion function 2184s 2184s Will try to infer target type from input type if not specified. 2184s """ 2184s if typ is None: 2184s typ = resolve_cupy_type(val) 2184s 2184s if issubclass(typ, CupyArray): 2184s import cupy as cp 2184s 2184s if isinstance(val, CSMatrix): 2184s val = val.toarray() 2184s return cp.array(val) 2184s elif issubclass(typ, CupyCSRMatrix): 2184s > import cupy as cp 2184s E ModuleNotFoundError: No module named 'cupy' 2184s 2184s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:1016: ModuleNotFoundError 2184s ___________ test_view_of_view[cupy_csr-slice_subset-list_int_subset] ___________ 2184s 2184s matrix_type = functools.partial(, typ=) 2184s subset_func = 2184s subset_func2 = 2184s 2184s def test_view_of_view(matrix_type, subset_func, subset_func2): 2184s > adata = gen_adata((30, 15), X_type=matrix_type) 2184s 2184s tests/test_views.py:531: 2184s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 2184s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:346: in gen_adata 2184s X = X_type(random_state.binomial(100, 0.005, (M, N)).astype(X_dtype)) 2184s /usr/lib/python3.13/functools.py:934: in wrapper 2184s return dispatch(args[0].__class__)(*args, **kw) 2184s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 2184s 2184s val = array([[1., 2., 0., 0., 0., 0., 0., 0., 3., 0., 0., 0., 1., 1., 0.], 2184s [0., 0., 0., 1., 2., 0., 1., 0., 1., 1., 0...1., 1., 0., 0., 1., 0., 1.], 2184s [0., 0., 2., 2., 0., 0., 0., 1., 1., 0., 0., 0., 0., 0., 0.]], 2184s dtype=float32) 2184s typ = 2184s 2184s @singledispatch 2184s def as_cupy(val, typ=None): 2184s """ 2184s Rough conversion function 2184s 2184s Will try to infer target type from input type if not specified. 2184s """ 2184s if typ is None: 2184s typ = resolve_cupy_type(val) 2184s 2184s if issubclass(typ, CupyArray): 2184s import cupy as cp 2184s 2184s if isinstance(val, CSMatrix): 2184s val = val.toarray() 2184s return cp.array(val) 2184s elif issubclass(typ, CupyCSRMatrix): 2184s > import cupy as cp 2184s E ModuleNotFoundError: No module named 'cupy' 2184s 2184s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:1016: ModuleNotFoundError 2184s __________ test_view_of_view[cupy_csr-slice_subset-array_bool_subset] __________ 2184s 2184s matrix_type = functools.partial(, typ=) 2184s subset_func = 2184s subset_func2 = 2184s 2184s def test_view_of_view(matrix_type, subset_func, subset_func2): 2184s > adata = gen_adata((30, 15), X_type=matrix_type) 2184s 2184s tests/test_views.py:531: 2184s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 2184s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:346: in gen_adata 2184s X = X_type(random_state.binomial(100, 0.005, (M, N)).astype(X_dtype)) 2184s /usr/lib/python3.13/functools.py:934: in wrapper 2184s return dispatch(args[0].__class__)(*args, **kw) 2184s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 2184s 2184s val = array([[3., 0., 1., 1., 0., 0., 0., 0., 0., 2., 2., 0., 0., 0., 0.], 2184s [0., 0., 0., 0., 0., 0., 0., 1., 0., 0., 1...0., 1., 0., 2., 0., 1., 1.], 2184s [0., 0., 0., 0., 0., 0., 1., 0., 1., 2., 0., 1., 2., 0., 1.]], 2184s dtype=float32) 2184s typ = 2184s 2184s @singledispatch 2184s def as_cupy(val, typ=None): 2184s """ 2184s Rough conversion function 2184s 2184s Will try to infer target type from input type if not specified. 2184s """ 2184s if typ is None: 2184s typ = resolve_cupy_type(val) 2184s 2184s if issubclass(typ, CupyArray): 2184s import cupy as cp 2184s 2184s if isinstance(val, CSMatrix): 2184s val = val.toarray() 2184s return cp.array(val) 2184s elif issubclass(typ, CupyCSRMatrix): 2184s > import cupy as cp 2184s E ModuleNotFoundError: No module named 'cupy' 2184s 2184s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:1016: ModuleNotFoundError 2184s __________ test_view_of_view[cupy_csr-slice_subset-list_bool_subset] ___________ 2184s 2184s matrix_type = functools.partial(, typ=) 2184s subset_func = 2184s subset_func2 = 2184s 2184s def test_view_of_view(matrix_type, subset_func, subset_func2): 2184s > adata = gen_adata((30, 15), X_type=matrix_type) 2184s 2184s tests/test_views.py:531: 2184s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 2184s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:346: in gen_adata 2184s X = X_type(random_state.binomial(100, 0.005, (M, N)).astype(X_dtype)) 2184s /usr/lib/python3.13/functools.py:934: in wrapper 2184s return dispatch(args[0].__class__)(*args, **kw) 2184s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 2184s 2184s val = array([[1., 0., 2., 0., 0., 2., 0., 0., 0., 0., 2., 0., 0., 0., 0.], 2184s [0., 0., 0., 0., 1., 0., 0., 1., 0., 0., 0...0., 0., 0., 0., 0., 0., 1.], 2184s [1., 1., 0., 0., 1., 0., 0., 1., 0., 0., 0., 1., 0., 1., 0.]], 2184s dtype=float32) 2184s typ = 2184s 2184s @singledispatch 2184s def as_cupy(val, typ=None): 2184s """ 2184s Rough conversion function 2184s 2184s Will try to infer target type from input type if not specified. 2184s """ 2184s if typ is None: 2184s typ = resolve_cupy_type(val) 2184s 2184s if issubclass(typ, CupyArray): 2184s import cupy as cp 2184s 2184s if isinstance(val, CSMatrix): 2184s val = val.toarray() 2184s return cp.array(val) 2184s elif issubclass(typ, CupyCSRMatrix): 2184s > import cupy as cp 2184s E ModuleNotFoundError: No module named 'cupy' 2184s 2184s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:1016: ModuleNotFoundError 2184s _________ test_view_of_view[cupy_csr-slice_subset-matrix_bool_subset] __________ 2184s 2184s matrix_type = functools.partial(, typ=) 2184s subset_func = 2184s subset_func2 = 2184s 2184s def test_view_of_view(matrix_type, subset_func, subset_func2): 2184s > adata = gen_adata((30, 15), X_type=matrix_type) 2184s 2184s tests/test_views.py:531: 2184s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 2184s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:346: in gen_adata 2184s X = X_type(random_state.binomial(100, 0.005, (M, N)).astype(X_dtype)) 2184s /usr/lib/python3.13/functools.py:934: in wrapper 2184s return dispatch(args[0].__class__)(*args, **kw) 2184s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 2184s 2184s val = array([[0., 1., 1., 1., 0., 2., 0., 1., 0., 1., 0., 0., 1., 0., 1.], 2184s [1., 0., 4., 0., 3., 0., 0., 1., 0., 1., 1...0., 0., 1., 0., 0., 0., 0.], 2184s [1., 1., 1., 2., 1., 0., 2., 1., 0., 1., 1., 1., 0., 2., 0.]], 2184s dtype=float32) 2184s typ = 2184s 2184s @singledispatch 2184s def as_cupy(val, typ=None): 2184s """ 2184s Rough conversion function 2184s 2184s Will try to infer target type from input type if not specified. 2184s """ 2184s if typ is None: 2184s typ = resolve_cupy_type(val) 2184s 2184s if issubclass(typ, CupyArray): 2184s import cupy as cp 2184s 2184s if isinstance(val, CSMatrix): 2184s val = val.toarray() 2184s return cp.array(val) 2184s elif issubclass(typ, CupyCSRMatrix): 2184s > import cupy as cp 2184s E ModuleNotFoundError: No module named 'cupy' 2184s 2184s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:1016: ModuleNotFoundError 2184s ________ test_view_of_view[cupy_csr-slice_subset-spmatrix_bool_subset] _________ 2184s 2184s matrix_type = functools.partial(, typ=) 2184s subset_func = 2184s subset_func2 = 2184s 2184s def test_view_of_view(matrix_type, subset_func, subset_func2): 2184s > adata = gen_adata((30, 15), X_type=matrix_type) 2184s 2184s tests/test_views.py:531: 2184s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 2184s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:346: in gen_adata 2184s X = X_type(random_state.binomial(100, 0.005, (M, N)).astype(X_dtype)) 2184s /usr/lib/python3.13/functools.py:934: in wrapper 2184s return dispatch(args[0].__class__)(*args, **kw) 2184s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 2184s 2184s val = array([[0., 0., 1., 0., 1., 0., 1., 1., 0., 0., 0., 0., 0., 0., 1.], 2184s [1., 1., 1., 0., 1., 1., 0., 1., 1., 1., 0...0., 0., 0., 1., 1., 2., 1.], 2184s [0., 0., 1., 1., 0., 1., 0., 2., 1., 2., 1., 0., 0., 0., 1.]], 2184s dtype=float32) 2184s typ = 2184s 2184s @singledispatch 2184s def as_cupy(val, typ=None): 2184s """ 2184s Rough conversion function 2184s 2184s Will try to infer target type from input type if not specified. 2184s """ 2184s if typ is None: 2184s typ = resolve_cupy_type(val) 2184s 2184s if issubclass(typ, CupyArray): 2184s import cupy as cp 2184s 2184s if isinstance(val, CSMatrix): 2184s val = val.toarray() 2184s return cp.array(val) 2184s elif issubclass(typ, CupyCSRMatrix): 2184s > import cupy as cp 2184s E ModuleNotFoundError: No module named 'cupy' 2184s 2184s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:1016: ModuleNotFoundError 2184s _________ test_view_of_view[cupy_csr-slice_subset-sparray_bool_subset] _________ 2184s 2184s matrix_type = functools.partial(, typ=) 2184s subset_func = 2184s subset_func2 = 2184s 2184s def test_view_of_view(matrix_type, subset_func, subset_func2): 2184s > adata = gen_adata((30, 15), X_type=matrix_type) 2184s 2184s tests/test_views.py:531: 2184s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 2184s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:346: in gen_adata 2184s X = X_type(random_state.binomial(100, 0.005, (M, N)).astype(X_dtype)) 2184s /usr/lib/python3.13/functools.py:934: in wrapper 2184s return dispatch(args[0].__class__)(*args, **kw) 2184s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 2184s 2184s val = array([[0., 0., 0., 0., 0., 0., 0., 1., 1., 1., 1., 1., 0., 0., 1.], 2184s [1., 2., 0., 0., 1., 2., 0., 1., 1., 0., 2...1., 1., 0., 1., 0., 0., 0.], 2184s [0., 1., 1., 1., 1., 0., 0., 1., 1., 0., 0., 1., 1., 0., 0.]], 2184s dtype=float32) 2184s typ = 2184s 2184s @singledispatch 2184s def as_cupy(val, typ=None): 2184s """ 2184s Rough conversion function 2184s 2184s Will try to infer target type from input type if not specified. 2184s """ 2184s if typ is None: 2184s typ = resolve_cupy_type(val) 2184s 2184s if issubclass(typ, CupyArray): 2184s import cupy as cp 2184s 2184s if isinstance(val, CSMatrix): 2184s val = val.toarray() 2184s return cp.array(val) 2184s elif issubclass(typ, CupyCSRMatrix): 2184s > import cupy as cp 2184s E ModuleNotFoundError: No module named 'cupy' 2184s 2184s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:1016: ModuleNotFoundError 2184s ____________ test_view_of_view[cupy_csr-single_subset-array_subset] ____________ 2184s 2184s matrix_type = functools.partial(, typ=) 2184s subset_func = 2184s subset_func2 = 2184s 2184s def test_view_of_view(matrix_type, subset_func, subset_func2): 2184s > adata = gen_adata((30, 15), X_type=matrix_type) 2184s 2184s tests/test_views.py:531: 2184s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 2184s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:346: in gen_adata 2184s X = X_type(random_state.binomial(100, 0.005, (M, N)).astype(X_dtype)) 2184s /usr/lib/python3.13/functools.py:934: in wrapper 2184s return dispatch(args[0].__class__)(*args, **kw) 2184s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 2184s 2184s val = array([[1., 0., 1., 0., 0., 1., 0., 1., 0., 0., 0., 0., 1., 1., 0.], 2184s [0., 0., 1., 0., 1., 0., 3., 0., 1., 1., 0...0., 2., 1., 1., 1., 0., 1.], 2184s [0., 1., 0., 0., 0., 1., 1., 1., 0., 1., 0., 1., 1., 0., 1.]], 2184s dtype=float32) 2184s typ = 2184s 2184s @singledispatch 2184s def as_cupy(val, typ=None): 2184s """ 2184s Rough conversion function 2184s 2184s Will try to infer target type from input type if not specified. 2184s """ 2184s if typ is None: 2184s typ = resolve_cupy_type(val) 2184s 2184s if issubclass(typ, CupyArray): 2184s import cupy as cp 2184s 2184s if isinstance(val, CSMatrix): 2184s val = val.toarray() 2184s return cp.array(val) 2184s elif issubclass(typ, CupyCSRMatrix): 2184s > import cupy as cp 2184s E ModuleNotFoundError: No module named 'cupy' 2184s 2184s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:1016: ModuleNotFoundError 2184s ____________ test_view_of_view[cupy_csr-single_subset-slice_subset] ____________ 2184s 2184s matrix_type = functools.partial(, typ=) 2184s subset_func = 2184s subset_func2 = 2184s 2184s def test_view_of_view(matrix_type, subset_func, subset_func2): 2184s > adata = gen_adata((30, 15), X_type=matrix_type) 2184s 2184s tests/test_views.py:531: 2184s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 2184s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:346: in gen_adata 2184s X = X_type(random_state.binomial(100, 0.005, (M, N)).astype(X_dtype)) 2184s /usr/lib/python3.13/functools.py:934: in wrapper 2184s return dispatch(args[0].__class__)(*args, **kw) 2184s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 2184s 2184s val = array([[2., 0., 1., 1., 1., 0., 0., 0., 3., 1., 0., 0., 1., 0., 1.], 2184s [1., 2., 0., 1., 0., 0., 1., 1., 1., 1., 2...0., 0., 0., 1., 0., 0., 1.], 2184s [1., 0., 0., 0., 1., 1., 0., 1., 0., 0., 0., 1., 0., 1., 0.]], 2184s dtype=float32) 2184s typ = 2184s 2184s @singledispatch 2184s def as_cupy(val, typ=None): 2184s """ 2184s Rough conversion function 2184s 2184s Will try to infer target type from input type if not specified. 2184s """ 2184s if typ is None: 2184s typ = resolve_cupy_type(val) 2184s 2184s if issubclass(typ, CupyArray): 2184s import cupy as cp 2184s 2184s if isinstance(val, CSMatrix): 2184s val = val.toarray() 2184s return cp.array(val) 2184s elif issubclass(typ, CupyCSRMatrix): 2184s > import cupy as cp 2184s E ModuleNotFoundError: No module named 'cupy' 2184s 2184s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:1016: ModuleNotFoundError 2184s ___________ test_view_of_view[cupy_csr-single_subset-single_subset] ____________ 2184s 2184s matrix_type = functools.partial(, typ=) 2184s subset_func = 2184s subset_func2 = 2184s 2184s def test_view_of_view(matrix_type, subset_func, subset_func2): 2184s > adata = gen_adata((30, 15), X_type=matrix_type) 2184s 2184s tests/test_views.py:531: 2184s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 2184s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:346: in gen_adata 2184s X = X_type(random_state.binomial(100, 0.005, (M, N)).astype(X_dtype)) 2184s /usr/lib/python3.13/functools.py:934: in wrapper 2184s return dispatch(args[0].__class__)(*args, **kw) 2184s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 2184s 2184s val = array([[0., 0., 0., 0., 1., 0., 0., 2., 0., 0., 0., 0., 0., 0., 0.], 2184s [0., 0., 1., 1., 0., 1., 2., 0., 0., 0., 0...1., 1., 0., 0., 1., 1., 2.], 2184s [0., 1., 3., 0., 1., 0., 1., 0., 1., 0., 0., 0., 1., 0., 0.]], 2184s dtype=float32) 2184s typ = 2184s 2184s @singledispatch 2184s def as_cupy(val, typ=None): 2184s """ 2184s Rough conversion function 2184s 2184s Will try to infer target type from input type if not specified. 2184s """ 2184s if typ is None: 2184s typ = resolve_cupy_type(val) 2184s 2184s if issubclass(typ, CupyArray): 2184s import cupy as cp 2184s 2184s if isinstance(val, CSMatrix): 2184s val = val.toarray() 2184s return cp.array(val) 2184s elif issubclass(typ, CupyCSRMatrix): 2184s > import cupy as cp 2184s E ModuleNotFoundError: No module named 'cupy' 2184s 2184s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:1016: ModuleNotFoundError 2184s __________ test_view_of_view[cupy_csr-single_subset-array_int_subset] __________ 2184s 2184s matrix_type = functools.partial(, typ=) 2184s subset_func = 2184s subset_func2 = 2184s 2184s def test_view_of_view(matrix_type, subset_func, subset_func2): 2184s > adata = gen_adata((30, 15), X_type=matrix_type) 2184s 2184s tests/test_views.py:531: 2184s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 2184s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:346: in gen_adata 2184s X = X_type(random_state.binomial(100, 0.005, (M, N)).astype(X_dtype)) 2184s /usr/lib/python3.13/functools.py:934: in wrapper 2184s return dispatch(args[0].__class__)(*args, **kw) 2184s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 2184s 2184s val = array([[0., 0., 0., 1., 0., 2., 0., 0., 1., 1., 1., 0., 0., 0., 0.], 2184s [0., 0., 1., 0., 1., 0., 0., 1., 2., 0., 1...1., 0., 0., 0., 0., 0., 1.], 2184s [0., 0., 1., 1., 0., 0., 0., 1., 1., 0., 0., 1., 0., 0., 0.]], 2184s dtype=float32) 2184s typ = 2184s 2184s @singledispatch 2184s def as_cupy(val, typ=None): 2184s """ 2184s Rough conversion function 2184s 2184s Will try to infer target type from input type if not specified. 2184s """ 2184s if typ is None: 2184s typ = resolve_cupy_type(val) 2184s 2184s if issubclass(typ, CupyArray): 2184s import cupy as cp 2184s 2184s if isinstance(val, CSMatrix): 2184s val = val.toarray() 2184s return cp.array(val) 2184s elif issubclass(typ, CupyCSRMatrix): 2184s > import cupy as cp 2184s E ModuleNotFoundError: No module named 'cupy' 2184s 2184s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:1016: ModuleNotFoundError 2184s __________ test_view_of_view[cupy_csr-single_subset-list_int_subset] ___________ 2184s 2184s matrix_type = functools.partial(, typ=) 2184s subset_func = 2184s subset_func2 = 2184s 2184s def test_view_of_view(matrix_type, subset_func, subset_func2): 2184s > adata = gen_adata((30, 15), X_type=matrix_type) 2184s 2184s tests/test_views.py:531: 2184s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 2184s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:346: in gen_adata 2184s X = X_type(random_state.binomial(100, 0.005, (M, N)).astype(X_dtype)) 2184s /usr/lib/python3.13/functools.py:934: in wrapper 2184s return dispatch(args[0].__class__)(*args, **kw) 2184s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 2184s 2184s val = array([[0., 0., 0., 0., 1., 1., 1., 0., 1., 0., 1., 2., 1., 0., 0.], 2184s [1., 0., 0., 1., 0., 0., 0., 0., 0., 0., 0...0., 0., 0., 1., 0., 0., 2.], 2184s [0., 0., 0., 1., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0.]], 2184s dtype=float32) 2184s typ = 2184s 2184s @singledispatch 2184s def as_cupy(val, typ=None): 2184s """ 2184s Rough conversion function 2184s 2184s Will try to infer target type from input type if not specified. 2184s """ 2184s if typ is None: 2184s typ = resolve_cupy_type(val) 2184s 2184s if issubclass(typ, CupyArray): 2184s import cupy as cp 2184s 2184s if isinstance(val, CSMatrix): 2184s val = val.toarray() 2184s return cp.array(val) 2184s elif issubclass(typ, CupyCSRMatrix): 2184s > import cupy as cp 2184s E ModuleNotFoundError: No module named 'cupy' 2184s 2184s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:1016: ModuleNotFoundError 2184s _________ test_view_of_view[cupy_csr-single_subset-array_bool_subset] __________ 2184s 2184s matrix_type = functools.partial(, typ=) 2184s subset_func = 2184s subset_func2 = 2184s 2184s def test_view_of_view(matrix_type, subset_func, subset_func2): 2184s > adata = gen_adata((30, 15), X_type=matrix_type) 2184s 2184s tests/test_views.py:531: 2184s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 2184s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:346: in gen_adata 2184s X = X_type(random_state.binomial(100, 0.005, (M, N)).astype(X_dtype)) 2184s /usr/lib/python3.13/functools.py:934: in wrapper 2184s return dispatch(args[0].__class__)(*args, **kw) 2184s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 2184s 2184s val = array([[1., 0., 0., 0., 1., 1., 0., 0., 1., 0., 0., 0., 0., 1., 0.], 2184s [3., 2., 0., 0., 0., 2., 1., 0., 1., 0., 1...0., 0., 1., 0., 2., 1., 2.], 2184s [0., 0., 0., 1., 1., 0., 1., 1., 0., 0., 1., 2., 0., 0., 0.]], 2184s dtype=float32) 2184s typ = 2184s 2184s @singledispatch 2184s def as_cupy(val, typ=None): 2184s """ 2184s Rough conversion function 2184s 2184s Will try to infer target type from input type if not specified. 2184s """ 2184s if typ is None: 2184s typ = resolve_cupy_type(val) 2184s 2184s if issubclass(typ, CupyArray): 2184s import cupy as cp 2184s 2184s if isinstance(val, CSMatrix): 2184s val = val.toarray() 2184s return cp.array(val) 2184s elif issubclass(typ, CupyCSRMatrix): 2184s > import cupy as cp 2184s E ModuleNotFoundError: No module named 'cupy' 2184s 2184s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:1016: ModuleNotFoundError 2184s __________ test_view_of_view[cupy_csr-single_subset-list_bool_subset] __________ 2184s 2184s matrix_type = functools.partial(, typ=) 2184s subset_func = 2184s subset_func2 = 2184s 2184s def test_view_of_view(matrix_type, subset_func, subset_func2): 2184s > adata = gen_adata((30, 15), X_type=matrix_type) 2184s 2184s tests/test_views.py:531: 2184s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 2184s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:346: in gen_adata 2184s X = X_type(random_state.binomial(100, 0.005, (M, N)).astype(X_dtype)) 2184s /usr/lib/python3.13/functools.py:934: in wrapper 2184s return dispatch(args[0].__class__)(*args, **kw) 2184s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 2184s 2184s val = array([[1., 2., 0., 0., 3., 0., 0., 1., 0., 1., 0., 0., 1., 1., 0.], 2184s [1., 1., 1., 0., 0., 0., 0., 1., 0., 0., 2...0., 0., 0., 0., 0., 0., 0.], 2184s [0., 0., 0., 1., 1., 1., 1., 0., 0., 0., 0., 1., 0., 1., 1.]], 2184s dtype=float32) 2184s typ = 2184s 2184s @singledispatch 2184s def as_cupy(val, typ=None): 2184s """ 2184s Rough conversion function 2184s 2184s Will try to infer target type from input type if not specified. 2184s """ 2184s if typ is None: 2184s typ = resolve_cupy_type(val) 2184s 2184s if issubclass(typ, CupyArray): 2184s import cupy as cp 2184s 2184s if isinstance(val, CSMatrix): 2184s val = val.toarray() 2184s return cp.array(val) 2184s elif issubclass(typ, CupyCSRMatrix): 2184s > import cupy as cp 2184s E ModuleNotFoundError: No module named 'cupy' 2184s 2184s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:1016: ModuleNotFoundError 2184s _________ test_view_of_view[cupy_csr-single_subset-matrix_bool_subset] _________ 2184s 2184s matrix_type = functools.partial(, typ=) 2184s subset_func = 2184s subset_func2 = 2184s 2184s def test_view_of_view(matrix_type, subset_func, subset_func2): 2184s > adata = gen_adata((30, 15), X_type=matrix_type) 2184s 2184s tests/test_views.py:531: 2184s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 2184s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:346: in gen_adata 2184s X = X_type(random_state.binomial(100, 0.005, (M, N)).astype(X_dtype)) 2184s /usr/lib/python3.13/functools.py:934: in wrapper 2184s return dispatch(args[0].__class__)(*args, **kw) 2184s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 2184s 2184s val = array([[0., 1., 0., 0., 0., 0., 0., 0., 1., 1., 0., 0., 0., 0., 0.], 2184s [0., 0., 1., 0., 1., 1., 0., 0., 1., 1., 0...0., 0., 1., 0., 1., 1., 0.], 2184s [1., 0., 1., 0., 1., 1., 0., 1., 0., 0., 3., 0., 1., 0., 1.]], 2184s dtype=float32) 2184s typ = 2184s 2184s @singledispatch 2184s def as_cupy(val, typ=None): 2184s """ 2184s Rough conversion function 2184s 2184s Will try to infer target type from input type if not specified. 2184s """ 2184s if typ is None: 2184s typ = resolve_cupy_type(val) 2184s 2184s if issubclass(typ, CupyArray): 2184s import cupy as cp 2184s 2184s if isinstance(val, CSMatrix): 2184s val = val.toarray() 2184s return cp.array(val) 2184s elif issubclass(typ, CupyCSRMatrix): 2184s > import cupy as cp 2184s E ModuleNotFoundError: No module named 'cupy' 2184s 2184s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:1016: ModuleNotFoundError 2184s ________ test_view_of_view[cupy_csr-single_subset-spmatrix_bool_subset] ________ 2184s 2184s matrix_type = functools.partial(, typ=) 2184s subset_func = 2184s subset_func2 = 2184s 2184s def test_view_of_view(matrix_type, subset_func, subset_func2): 2184s > adata = gen_adata((30, 15), X_type=matrix_type) 2184s 2184s tests/test_views.py:531: 2184s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 2184s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:346: in gen_adata 2184s X = X_type(random_state.binomial(100, 0.005, (M, N)).astype(X_dtype)) 2184s /usr/lib/python3.13/functools.py:934: in wrapper 2184s return dispatch(args[0].__class__)(*args, **kw) 2184s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 2184s 2184s val = array([[2., 0., 0., 1., 0., 1., 2., 1., 0., 1., 0., 0., 0., 1., 0.], 2184s [0., 2., 2., 0., 0., 2., 0., 0., 0., 1., 1...0., 0., 0., 1., 0., 0., 0.], 2184s [0., 1., 0., 0., 1., 0., 1., 0., 0., 1., 1., 1., 0., 2., 0.]], 2184s dtype=float32) 2184s typ = 2184s 2184s @singledispatch 2184s def as_cupy(val, typ=None): 2184s """ 2184s Rough conversion function 2184s 2184s Will try to infer target type from input type if not specified. 2184s """ 2184s if typ is None: 2184s typ = resolve_cupy_type(val) 2184s 2184s if issubclass(typ, CupyArray): 2184s import cupy as cp 2184s 2184s if isinstance(val, CSMatrix): 2184s val = val.toarray() 2184s return cp.array(val) 2184s elif issubclass(typ, CupyCSRMatrix): 2184s > import cupy as cp 2184s E ModuleNotFoundError: No module named 'cupy' 2184s 2184s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:1016: ModuleNotFoundError 2184s ________ test_view_of_view[cupy_csr-single_subset-sparray_bool_subset] _________ 2184s 2184s matrix_type = functools.partial(, typ=) 2184s subset_func = 2184s subset_func2 = 2184s 2184s def test_view_of_view(matrix_type, subset_func, subset_func2): 2184s > adata = gen_adata((30, 15), X_type=matrix_type) 2184s 2184s tests/test_views.py:531: 2184s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 2184s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:346: in gen_adata 2184s X = X_type(random_state.binomial(100, 0.005, (M, N)).astype(X_dtype)) 2184s /usr/lib/python3.13/functools.py:934: in wrapper 2184s return dispatch(args[0].__class__)(*args, **kw) 2184s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 2184s 2184s val = array([[0., 3., 0., 0., 2., 0., 1., 0., 0., 1., 0., 2., 1., 0., 2.], 2184s [1., 1., 1., 1., 0., 0., 1., 0., 0., 0., 1...1., 1., 1., 0., 0., 1., 0.], 2184s [0., 0., 0., 1., 1., 0., 0., 0., 2., 0., 0., 1., 0., 0., 3.]], 2184s dtype=float32) 2184s typ = 2184s 2184s @singledispatch 2184s def as_cupy(val, typ=None): 2184s """ 2184s Rough conversion function 2184s 2184s Will try to infer target type from input type if not specified. 2184s """ 2184s if typ is None: 2184s typ = resolve_cupy_type(val) 2184s 2184s if issubclass(typ, CupyArray): 2184s import cupy as cp 2184s 2184s if isinstance(val, CSMatrix): 2184s val = val.toarray() 2184s return cp.array(val) 2184s elif issubclass(typ, CupyCSRMatrix): 2184s > import cupy as cp 2184s E ModuleNotFoundError: No module named 'cupy' 2184s 2184s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:1016: ModuleNotFoundError 2184s __________ test_view_of_view[cupy_csr-array_int_subset-array_subset] ___________ 2184s 2184s matrix_type = functools.partial(, typ=) 2184s subset_func = 2184s subset_func2 = 2184s 2184s def test_view_of_view(matrix_type, subset_func, subset_func2): 2184s > adata = gen_adata((30, 15), X_type=matrix_type) 2184s 2184s tests/test_views.py:531: 2184s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 2184s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:346: in gen_adata 2184s X = X_type(random_state.binomial(100, 0.005, (M, N)).astype(X_dtype)) 2184s /usr/lib/python3.13/functools.py:934: in wrapper 2184s return dispatch(args[0].__class__)(*args, **kw) 2184s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 2184s 2184s val = array([[0., 0., 0., 0., 1., 1., 0., 0., 0., 0., 2., 0., 0., 0., 0.], 2184s [0., 0., 1., 0., 0., 0., 1., 1., 2., 1., 1...0., 0., 1., 0., 1., 0., 1.], 2184s [0., 0., 0., 2., 2., 0., 0., 2., 0., 1., 0., 1., 0., 0., 0.]], 2184s dtype=float32) 2184s typ = 2184s 2184s @singledispatch 2184s def as_cupy(val, typ=None): 2184s """ 2184s Rough conversion function 2184s 2184s Will try to infer target type from input type if not specified. 2184s """ 2184s if typ is None: 2184s typ = resolve_cupy_type(val) 2184s 2184s if issubclass(typ, CupyArray): 2184s import cupy as cp 2184s 2184s if isinstance(val, CSMatrix): 2184s val = val.toarray() 2184s return cp.array(val) 2184s elif issubclass(typ, CupyCSRMatrix): 2184s > import cupy as cp 2184s E ModuleNotFoundError: No module named 'cupy' 2184s 2184s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:1016: ModuleNotFoundError 2184s __________ test_view_of_view[cupy_csr-array_int_subset-slice_subset] ___________ 2184s 2184s matrix_type = functools.partial(, typ=) 2184s subset_func = 2184s subset_func2 = 2184s 2184s def test_view_of_view(matrix_type, subset_func, subset_func2): 2184s > adata = gen_adata((30, 15), X_type=matrix_type) 2184s 2184s tests/test_views.py:531: 2184s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 2184s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:346: in gen_adata 2184s X = X_type(random_state.binomial(100, 0.005, (M, N)).astype(X_dtype)) 2184s /usr/lib/python3.13/functools.py:934: in wrapper 2184s return dispatch(args[0].__class__)(*args, **kw) 2184s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 2184s 2184s val = array([[0., 0., 1., 1., 0., 2., 1., 0., 1., 1., 0., 0., 0., 0., 0.], 2184s [1., 0., 0., 0., 2., 1., 0., 1., 2., 1., 1...1., 0., 0., 1., 0., 0., 0.], 2184s [1., 0., 0., 1., 0., 0., 1., 2., 0., 0., 1., 1., 0., 0., 3.]], 2184s dtype=float32) 2184s typ = 2184s 2184s @singledispatch 2184s def as_cupy(val, typ=None): 2184s """ 2184s Rough conversion function 2184s 2184s Will try to infer target type from input type if not specified. 2184s """ 2184s if typ is None: 2184s typ = resolve_cupy_type(val) 2184s 2184s if issubclass(typ, CupyArray): 2184s import cupy as cp 2184s 2184s if isinstance(val, CSMatrix): 2184s val = val.toarray() 2184s return cp.array(val) 2184s elif issubclass(typ, CupyCSRMatrix): 2184s > import cupy as cp 2184s E ModuleNotFoundError: No module named 'cupy' 2184s 2184s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:1016: ModuleNotFoundError 2184s __________ test_view_of_view[cupy_csr-array_int_subset-single_subset] __________ 2184s 2184s matrix_type = functools.partial(, typ=) 2184s subset_func = 2184s subset_func2 = 2184s 2184s def test_view_of_view(matrix_type, subset_func, subset_func2): 2184s > adata = gen_adata((30, 15), X_type=matrix_type) 2184s 2184s tests/test_views.py:531: 2184s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 2184s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:346: in gen_adata 2184s X = X_type(random_state.binomial(100, 0.005, (M, N)).astype(X_dtype)) 2184s /usr/lib/python3.13/functools.py:934: in wrapper 2184s return dispatch(args[0].__class__)(*args, **kw) 2184s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 2184s 2184s val = array([[0., 1., 1., 0., 0., 0., 0., 0., 0., 0., 0., 1., 0., 1., 0.], 2184s [1., 1., 0., 1., 0., 1., 2., 2., 0., 0., 0...0., 0., 1., 2., 0., 1., 0.], 2184s [3., 1., 1., 0., 0., 0., 1., 1., 0., 0., 1., 0., 2., 0., 1.]], 2184s dtype=float32) 2184s typ = 2184s 2184s @singledispatch 2184s def as_cupy(val, typ=None): 2184s """ 2184s Rough conversion function 2184s 2184s Will try to infer target type from input type if not specified. 2184s """ 2184s if typ is None: 2184s typ = resolve_cupy_type(val) 2184s 2184s if issubclass(typ, CupyArray): 2184s import cupy as cp 2184s 2184s if isinstance(val, CSMatrix): 2184s val = val.toarray() 2184s return cp.array(val) 2184s elif issubclass(typ, CupyCSRMatrix): 2184s > import cupy as cp 2184s E ModuleNotFoundError: No module named 'cupy' 2184s 2184s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:1016: ModuleNotFoundError 2184s ________ test_view_of_view[cupy_csr-array_int_subset-array_int_subset] _________ 2184s 2184s matrix_type = functools.partial(, typ=) 2184s subset_func = 2184s subset_func2 = 2184s 2184s def test_view_of_view(matrix_type, subset_func, subset_func2): 2184s > adata = gen_adata((30, 15), X_type=matrix_type) 2184s 2184s tests/test_views.py:531: 2184s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 2184s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:346: in gen_adata 2184s X = X_type(random_state.binomial(100, 0.005, (M, N)).astype(X_dtype)) 2184s /usr/lib/python3.13/functools.py:934: in wrapper 2184s return dispatch(args[0].__class__)(*args, **kw) 2184s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 2184s 2184s val = array([[0., 0., 0., 1., 1., 0., 0., 0., 2., 0., 0., 0., 1., 1., 0.], 2184s [0., 0., 0., 1., 0., 2., 0., 1., 2., 0., 0...1., 0., 0., 1., 1., 1., 1.], 2184s [2., 1., 2., 0., 1., 0., 0., 0., 1., 1., 0., 0., 0., 0., 0.]], 2184s dtype=float32) 2184s typ = 2184s 2184s @singledispatch 2184s def as_cupy(val, typ=None): 2184s """ 2184s Rough conversion function 2184s 2184s Will try to infer target type from input type if not specified. 2184s """ 2184s if typ is None: 2184s typ = resolve_cupy_type(val) 2184s 2184s if issubclass(typ, CupyArray): 2184s import cupy as cp 2184s 2184s if isinstance(val, CSMatrix): 2184s val = val.toarray() 2184s return cp.array(val) 2184s elif issubclass(typ, CupyCSRMatrix): 2184s > import cupy as cp 2184s E ModuleNotFoundError: No module named 'cupy' 2184s 2184s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:1016: ModuleNotFoundError 2184s _________ test_view_of_view[cupy_csr-array_int_subset-list_int_subset] _________ 2184s 2184s matrix_type = functools.partial(, typ=) 2184s subset_func = 2184s subset_func2 = 2184s 2184s def test_view_of_view(matrix_type, subset_func, subset_func2): 2184s > adata = gen_adata((30, 15), X_type=matrix_type) 2184s 2184s tests/test_views.py:531: 2184s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 2184s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:346: in gen_adata 2184s X = X_type(random_state.binomial(100, 0.005, (M, N)).astype(X_dtype)) 2184s /usr/lib/python3.13/functools.py:934: in wrapper 2184s return dispatch(args[0].__class__)(*args, **kw) 2184s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 2184s 2184s val = array([[0., 1., 0., 0., 0., 2., 0., 1., 0., 0., 0., 0., 0., 0., 1.], 2184s [0., 0., 0., 0., 0., 0., 0., 1., 0., 1., 0...0., 0., 1., 0., 0., 0., 0.], 2184s [1., 3., 0., 0., 0., 0., 1., 1., 0., 3., 1., 0., 2., 0., 0.]], 2184s dtype=float32) 2184s typ = 2184s 2184s @singledispatch 2184s def as_cupy(val, typ=None): 2184s """ 2184s Rough conversion function 2184s 2184s Will try to infer target type from input type if not specified. 2184s """ 2184s if typ is None: 2184s typ = resolve_cupy_type(val) 2184s 2184s if issubclass(typ, CupyArray): 2184s import cupy as cp 2184s 2184s if isinstance(val, CSMatrix): 2184s val = val.toarray() 2184s return cp.array(val) 2184s elif issubclass(typ, CupyCSRMatrix): 2184s > import cupy as cp 2184s E ModuleNotFoundError: No module named 'cupy' 2184s 2184s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:1016: ModuleNotFoundError 2184s ________ test_view_of_view[cupy_csr-array_int_subset-array_bool_subset] ________ 2184s 2184s matrix_type = functools.partial(, typ=) 2184s subset_func = 2184s subset_func2 = 2184s 2184s def test_view_of_view(matrix_type, subset_func, subset_func2): 2184s > adata = gen_adata((30, 15), X_type=matrix_type) 2184s 2184s tests/test_views.py:531: 2184s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 2184s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:346: in gen_adata 2184s X = X_type(random_state.binomial(100, 0.005, (M, N)).astype(X_dtype)) 2184s /usr/lib/python3.13/functools.py:934: in wrapper 2184s return dispatch(args[0].__class__)(*args, **kw) 2184s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 2184s 2184s val = array([[1., 0., 0., 0., 2., 0., 1., 0., 0., 0., 1., 0., 0., 0., 0.], 2184s [1., 1., 0., 2., 0., 3., 1., 0., 0., 0., 0...0., 0., 1., 0., 0., 0., 0.], 2184s [0., 0., 0., 1., 0., 1., 1., 1., 1., 0., 0., 0., 1., 0., 1.]], 2184s dtype=float32) 2184s typ = 2184s 2184s @singledispatch 2184s def as_cupy(val, typ=None): 2184s """ 2184s Rough conversion function 2184s 2184s Will try to infer target type from input type if not specified. 2184s """ 2184s if typ is None: 2184s typ = resolve_cupy_type(val) 2184s 2184s if issubclass(typ, CupyArray): 2184s import cupy as cp 2184s 2184s if isinstance(val, CSMatrix): 2184s val = val.toarray() 2184s return cp.array(val) 2184s elif issubclass(typ, CupyCSRMatrix): 2184s > import cupy as cp 2184s E ModuleNotFoundError: No module named 'cupy' 2184s 2184s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:1016: ModuleNotFoundError 2184s ________ test_view_of_view[cupy_csr-array_int_subset-list_bool_subset] _________ 2184s 2184s matrix_type = functools.partial(, typ=) 2184s subset_func = 2184s subset_func2 = 2184s 2184s def test_view_of_view(matrix_type, subset_func, subset_func2): 2184s > adata = gen_adata((30, 15), X_type=matrix_type) 2184s 2184s tests/test_views.py:531: 2184s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 2184s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:346: in gen_adata 2184s X = X_type(random_state.binomial(100, 0.005, (M, N)).astype(X_dtype)) 2184s /usr/lib/python3.13/functools.py:934: in wrapper 2184s return dispatch(args[0].__class__)(*args, **kw) 2184s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 2184s 2184s val = array([[0., 1., 0., 0., 0., 1., 3., 1., 1., 0., 1., 1., 0., 1., 0.], 2184s [1., 0., 0., 1., 0., 0., 0., 0., 0., 1., 0...0., 0., 0., 0., 1., 0., 3.], 2184s [0., 0., 1., 0., 0., 0., 0., 0., 1., 1., 0., 0., 0., 0., 0.]], 2184s dtype=float32) 2184s typ = 2184s 2184s @singledispatch 2184s def as_cupy(val, typ=None): 2184s """ 2184s Rough conversion function 2184s 2184s Will try to infer target type from input type if not specified. 2184s """ 2184s if typ is None: 2184s typ = resolve_cupy_type(val) 2184s 2184s if issubclass(typ, CupyArray): 2184s import cupy as cp 2184s 2184s if isinstance(val, CSMatrix): 2184s val = val.toarray() 2184s return cp.array(val) 2184s elif issubclass(typ, CupyCSRMatrix): 2184s > import cupy as cp 2184s E ModuleNotFoundError: No module named 'cupy' 2184s 2184s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:1016: ModuleNotFoundError 2184s _______ test_view_of_view[cupy_csr-array_int_subset-matrix_bool_subset] ________ 2184s 2184s matrix_type = functools.partial(, typ=) 2184s subset_func = 2184s subset_func2 = 2184s 2184s def test_view_of_view(matrix_type, subset_func, subset_func2): 2184s > adata = gen_adata((30, 15), X_type=matrix_type) 2184s 2184s tests/test_views.py:531: 2184s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 2184s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:346: in gen_adata 2184s X = X_type(random_state.binomial(100, 0.005, (M, N)).astype(X_dtype)) 2184s /usr/lib/python3.13/functools.py:934: in wrapper 2184s return dispatch(args[0].__class__)(*args, **kw) 2184s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 2184s 2184s val = array([[1., 0., 0., 0., 1., 0., 0., 1., 1., 0., 0., 1., 0., 0., 1.], 2184s [1., 0., 1., 0., 1., 1., 1., 0., 1., 2., 0...1., 0., 0., 1., 0., 0., 0.], 2184s [0., 0., 2., 0., 0., 0., 1., 0., 0., 0., 1., 0., 1., 0., 0.]], 2184s dtype=float32) 2184s typ = 2184s 2184s @singledispatch 2184s def as_cupy(val, typ=None): 2184s """ 2184s Rough conversion function 2184s 2184s Will try to infer target type from input type if not specified. 2184s """ 2184s if typ is None: 2184s typ = resolve_cupy_type(val) 2184s 2184s if issubclass(typ, CupyArray): 2184s import cupy as cp 2184s 2184s if isinstance(val, CSMatrix): 2184s val = val.toarray() 2184s return cp.array(val) 2184s elif issubclass(typ, CupyCSRMatrix): 2184s > import cupy as cp 2184s E ModuleNotFoundError: No module named 'cupy' 2184s 2184s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:1016: ModuleNotFoundError 2184s ______ test_view_of_view[cupy_csr-array_int_subset-spmatrix_bool_subset] _______ 2184s 2184s matrix_type = functools.partial(, typ=) 2184s subset_func = 2184s subset_func2 = 2184s 2184s def test_view_of_view(matrix_type, subset_func, subset_func2): 2184s > adata = gen_adata((30, 15), X_type=matrix_type) 2184s 2184s tests/test_views.py:531: 2184s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 2184s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:346: in gen_adata 2184s X = X_type(random_state.binomial(100, 0.005, (M, N)).astype(X_dtype)) 2184s /usr/lib/python3.13/functools.py:934: in wrapper 2184s return dispatch(args[0].__class__)(*args, **kw) 2184s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 2184s 2184s val = array([[0., 1., 1., 0., 0., 2., 1., 1., 0., 0., 2., 1., 0., 0., 1.], 2184s [0., 1., 2., 0., 0., 0., 1., 1., 0., 0., 0...0., 0., 0., 1., 1., 0., 0.], 2184s [0., 1., 1., 0., 1., 1., 0., 0., 0., 1., 0., 1., 0., 0., 1.]], 2184s dtype=float32) 2184s typ = 2184s 2184s @singledispatch 2184s def as_cupy(val, typ=None): 2184s """ 2184s Rough conversion function 2184s 2184s Will try to infer target type from input type if not specified. 2184s """ 2184s if typ is None: 2184s typ = resolve_cupy_type(val) 2184s 2184s if issubclass(typ, CupyArray): 2184s import cupy as cp 2184s 2184s if isinstance(val, CSMatrix): 2184s val = val.toarray() 2184s return cp.array(val) 2184s elif issubclass(typ, CupyCSRMatrix): 2184s > import cupy as cp 2184s E ModuleNotFoundError: No module named 'cupy' 2184s 2184s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:1016: ModuleNotFoundError 2184s _______ test_view_of_view[cupy_csr-array_int_subset-sparray_bool_subset] _______ 2184s 2184s matrix_type = functools.partial(, typ=) 2184s subset_func = 2184s subset_func2 = 2184s 2184s def test_view_of_view(matrix_type, subset_func, subset_func2): 2184s > adata = gen_adata((30, 15), X_type=matrix_type) 2184s 2184s tests/test_views.py:531: 2184s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 2184s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:346: in gen_adata 2184s X = X_type(random_state.binomial(100, 0.005, (M, N)).astype(X_dtype)) 2184s /usr/lib/python3.13/functools.py:934: in wrapper 2184s return dispatch(args[0].__class__)(*args, **kw) 2184s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 2184s 2184s val = array([[1., 0., 0., 1., 0., 0., 0., 0., 0., 0., 0., 1., 0., 1., 1.], 2184s [0., 1., 1., 0., 0., 0., 1., 3., 1., 0., 1...4., 1., 1., 0., 0., 0., 1.], 2184s [1., 0., 0., 0., 0., 0., 0., 0., 1., 0., 1., 1., 0., 0., 0.]], 2184s dtype=float32) 2184s typ = 2184s 2184s @singledispatch 2184s def as_cupy(val, typ=None): 2184s """ 2184s Rough conversion function 2184s 2184s Will try to infer target type from input type if not specified. 2184s """ 2184s if typ is None: 2184s typ = resolve_cupy_type(val) 2184s 2184s if issubclass(typ, CupyArray): 2184s import cupy as cp 2184s 2184s if isinstance(val, CSMatrix): 2184s val = val.toarray() 2184s return cp.array(val) 2184s elif issubclass(typ, CupyCSRMatrix): 2184s > import cupy as cp 2184s E ModuleNotFoundError: No module named 'cupy' 2184s 2184s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:1016: ModuleNotFoundError 2184s ___________ test_view_of_view[cupy_csr-list_int_subset-array_subset] ___________ 2184s 2184s matrix_type = functools.partial(, typ=) 2184s subset_func = 2184s subset_func2 = 2184s 2184s def test_view_of_view(matrix_type, subset_func, subset_func2): 2184s > adata = gen_adata((30, 15), X_type=matrix_type) 2184s 2184s tests/test_views.py:531: 2184s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 2184s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:346: in gen_adata 2184s X = X_type(random_state.binomial(100, 0.005, (M, N)).astype(X_dtype)) 2184s /usr/lib/python3.13/functools.py:934: in wrapper 2184s return dispatch(args[0].__class__)(*args, **kw) 2184s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 2184s 2184s val = array([[1., 2., 0., 0., 2., 0., 0., 3., 2., 0., 0., 0., 1., 0., 0.], 2184s [0., 2., 0., 2., 1., 1., 2., 2., 0., 0., 0...1., 1., 0., 1., 1., 0., 0.], 2184s [0., 0., 1., 1., 0., 0., 0., 1., 0., 0., 0., 0., 1., 2., 0.]], 2184s dtype=float32) 2184s typ = 2184s 2184s @singledispatch 2184s def as_cupy(val, typ=None): 2184s """ 2184s Rough conversion function 2184s 2184s Will try to infer target type from input type if not specified. 2184s """ 2184s if typ is None: 2184s typ = resolve_cupy_type(val) 2184s 2184s if issubclass(typ, CupyArray): 2184s import cupy as cp 2184s 2184s if isinstance(val, CSMatrix): 2184s val = val.toarray() 2184s return cp.array(val) 2184s elif issubclass(typ, CupyCSRMatrix): 2184s > import cupy as cp 2184s E ModuleNotFoundError: No module named 'cupy' 2184s 2184s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:1016: ModuleNotFoundError 2184s ___________ test_view_of_view[cupy_csr-list_int_subset-slice_subset] ___________ 2184s 2184s matrix_type = functools.partial(, typ=) 2184s subset_func = 2184s subset_func2 = 2184s 2184s def test_view_of_view(matrix_type, subset_func, subset_func2): 2184s > adata = gen_adata((30, 15), X_type=matrix_type) 2184s 2184s tests/test_views.py:531: 2184s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 2184s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:346: in gen_adata 2184s X = X_type(random_state.binomial(100, 0.005, (M, N)).astype(X_dtype)) 2184s /usr/lib/python3.13/functools.py:934: in wrapper 2184s return dispatch(args[0].__class__)(*args, **kw) 2184s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 2184s 2184s val = array([[0., 0., 1., 0., 1., 0., 0., 1., 0., 1., 2., 0., 1., 2., 1.], 2184s [0., 0., 2., 1., 0., 2., 0., 1., 1., 0., 0...0., 2., 0., 0., 1., 1., 0.], 2184s [1., 1., 0., 1., 0., 0., 0., 0., 1., 0., 0., 2., 0., 1., 1.]], 2184s dtype=float32) 2184s typ = 2184s 2184s @singledispatch 2184s def as_cupy(val, typ=None): 2184s """ 2184s Rough conversion function 2184s 2184s Will try to infer target type from input type if not specified. 2184s """ 2184s if typ is None: 2184s typ = resolve_cupy_type(val) 2184s 2184s if issubclass(typ, CupyArray): 2184s import cupy as cp 2184s 2184s if isinstance(val, CSMatrix): 2184s val = val.toarray() 2184s return cp.array(val) 2184s elif issubclass(typ, CupyCSRMatrix): 2184s > import cupy as cp 2184s E ModuleNotFoundError: No module named 'cupy' 2184s 2184s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:1016: ModuleNotFoundError 2184s __________ test_view_of_view[cupy_csr-list_int_subset-single_subset] ___________ 2184s 2184s matrix_type = functools.partial(, typ=) 2184s subset_func = 2184s subset_func2 = 2184s 2184s def test_view_of_view(matrix_type, subset_func, subset_func2): 2184s > adata = gen_adata((30, 15), X_type=matrix_type) 2184s 2184s tests/test_views.py:531: 2184s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 2184s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:346: in gen_adata 2184s X = X_type(random_state.binomial(100, 0.005, (M, N)).astype(X_dtype)) 2184s /usr/lib/python3.13/functools.py:934: in wrapper 2184s return dispatch(args[0].__class__)(*args, **kw) 2184s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 2184s 2184s val = array([[1., 0., 0., 1., 1., 0., 1., 0., 2., 0., 1., 0., 0., 1., 1.], 2184s [0., 1., 1., 0., 1., 0., 0., 0., 1., 0., 0...0., 0., 1., 0., 2., 1., 1.], 2184s [0., 1., 0., 1., 0., 0., 0., 0., 0., 1., 1., 0., 0., 0., 0.]], 2184s dtype=float32) 2184s typ = 2184s 2184s @singledispatch 2184s def as_cupy(val, typ=None): 2184s """ 2184s Rough conversion function 2184s 2184s Will try to infer target type from input type if not specified. 2184s """ 2184s if typ is None: 2184s typ = resolve_cupy_type(val) 2184s 2184s if issubclass(typ, CupyArray): 2184s import cupy as cp 2184s 2184s if isinstance(val, CSMatrix): 2184s val = val.toarray() 2184s return cp.array(val) 2184s elif issubclass(typ, CupyCSRMatrix): 2184s > import cupy as cp 2184s E ModuleNotFoundError: No module named 'cupy' 2184s 2184s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:1016: ModuleNotFoundError 2184s _________ test_view_of_view[cupy_csr-list_int_subset-array_int_subset] _________ 2184s 2184s matrix_type = functools.partial(, typ=) 2184s subset_func = 2184s subset_func2 = 2184s 2184s def test_view_of_view(matrix_type, subset_func, subset_func2): 2184s > adata = gen_adata((30, 15), X_type=matrix_type) 2184s 2184s tests/test_views.py:531: 2184s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 2184s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:346: in gen_adata 2184s X = X_type(random_state.binomial(100, 0.005, (M, N)).astype(X_dtype)) 2184s /usr/lib/python3.13/functools.py:934: in wrapper 2184s return dispatch(args[0].__class__)(*args, **kw) 2184s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 2184s 2184s val = array([[1., 2., 0., 2., 0., 1., 0., 0., 3., 1., 2., 0., 0., 1., 0.], 2184s [1., 0., 0., 0., 1., 0., 1., 0., 0., 1., 1...0., 1., 0., 0., 0., 0., 0.], 2184s [1., 0., 0., 0., 1., 0., 0., 2., 0., 2., 1., 1., 0., 0., 0.]], 2184s dtype=float32) 2184s typ = 2184s 2184s @singledispatch 2184s def as_cupy(val, typ=None): 2184s """ 2184s Rough conversion function 2184s 2184s Will try to infer target type from input type if not specified. 2184s """ 2184s if typ is None: 2184s typ = resolve_cupy_type(val) 2184s 2184s if issubclass(typ, CupyArray): 2184s import cupy as cp 2184s 2184s if isinstance(val, CSMatrix): 2184s val = val.toarray() 2184s return cp.array(val) 2184s elif issubclass(typ, CupyCSRMatrix): 2184s > import cupy as cp 2184s E ModuleNotFoundError: No module named 'cupy' 2184s 2184s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:1016: ModuleNotFoundError 2184s _________ test_view_of_view[cupy_csr-list_int_subset-list_int_subset] __________ 2184s 2184s matrix_type = functools.partial(, typ=) 2184s subset_func = 2184s subset_func2 = 2184s 2184s def test_view_of_view(matrix_type, subset_func, subset_func2): 2184s > adata = gen_adata((30, 15), X_type=matrix_type) 2184s 2184s tests/test_views.py:531: 2184s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 2184s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:346: in gen_adata 2184s X = X_type(random_state.binomial(100, 0.005, (M, N)).astype(X_dtype)) 2184s /usr/lib/python3.13/functools.py:934: in wrapper 2184s return dispatch(args[0].__class__)(*args, **kw) 2184s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 2184s 2184s val = array([[0., 0., 0., 0., 2., 0., 0., 0., 0., 1., 1., 1., 0., 3., 1.], 2184s [1., 1., 2., 0., 0., 0., 1., 1., 0., 1., 1...0., 0., 0., 1., 0., 0., 0.], 2184s [0., 0., 0., 0., 0., 0., 1., 2., 0., 0., 0., 0., 1., 0., 0.]], 2184s dtype=float32) 2184s typ = 2184s 2184s @singledispatch 2184s def as_cupy(val, typ=None): 2184s """ 2184s Rough conversion function 2184s 2184s Will try to infer target type from input type if not specified. 2184s """ 2184s if typ is None: 2184s typ = resolve_cupy_type(val) 2184s 2184s if issubclass(typ, CupyArray): 2184s import cupy as cp 2184s 2184s if isinstance(val, CSMatrix): 2184s val = val.toarray() 2184s return cp.array(val) 2184s elif issubclass(typ, CupyCSRMatrix): 2184s > import cupy as cp 2184s E ModuleNotFoundError: No module named 'cupy' 2184s 2184s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:1016: ModuleNotFoundError 2184s ________ test_view_of_view[cupy_csr-list_int_subset-array_bool_subset] _________ 2184s 2184s matrix_type = functools.partial(, typ=) 2184s subset_func = 2184s subset_func2 = 2184s 2184s def test_view_of_view(matrix_type, subset_func, subset_func2): 2184s > adata = gen_adata((30, 15), X_type=matrix_type) 2184s 2184s tests/test_views.py:531: 2184s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 2184s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:346: in gen_adata 2184s X = X_type(random_state.binomial(100, 0.005, (M, N)).astype(X_dtype)) 2184s /usr/lib/python3.13/functools.py:934: in wrapper 2184s return dispatch(args[0].__class__)(*args, **kw) 2184s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 2184s 2184s val = array([[1., 0., 0., 0., 0., 1., 0., 1., 1., 2., 0., 2., 1., 0., 0.], 2184s [2., 0., 0., 0., 0., 2., 0., 1., 0., 1., 1...0., 0., 0., 1., 0., 0., 0.], 2184s [0., 0., 0., 0., 0., 1., 0., 1., 0., 2., 2., 0., 2., 0., 2.]], 2184s dtype=float32) 2184s typ = 2184s 2184s @singledispatch 2184s def as_cupy(val, typ=None): 2184s """ 2184s Rough conversion function 2184s 2184s Will try to infer target type from input type if not specified. 2184s """ 2184s if typ is None: 2184s typ = resolve_cupy_type(val) 2184s 2184s if issubclass(typ, CupyArray): 2184s import cupy as cp 2184s 2184s if isinstance(val, CSMatrix): 2184s val = val.toarray() 2184s return cp.array(val) 2184s elif issubclass(typ, CupyCSRMatrix): 2184s > import cupy as cp 2184s E ModuleNotFoundError: No module named 'cupy' 2184s 2184s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:1016: ModuleNotFoundError 2184s _________ test_view_of_view[cupy_csr-list_int_subset-list_bool_subset] _________ 2184s 2184s matrix_type = functools.partial(, typ=) 2184s subset_func = 2184s subset_func2 = 2184s 2184s def test_view_of_view(matrix_type, subset_func, subset_func2): 2184s > adata = gen_adata((30, 15), X_type=matrix_type) 2184s 2184s tests/test_views.py:531: 2184s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 2184s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:346: in gen_adata 2184s X = X_type(random_state.binomial(100, 0.005, (M, N)).astype(X_dtype)) 2184s /usr/lib/python3.13/functools.py:934: in wrapper 2184s return dispatch(args[0].__class__)(*args, **kw) 2184s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 2184s 2184s val = array([[0., 0., 0., 0., 1., 0., 2., 0., 1., 0., 2., 0., 0., 0., 2.], 2184s [0., 0., 1., 2., 0., 1., 1., 1., 1., 1., 2...0., 1., 0., 0., 0., 1., 0.], 2184s [0., 0., 0., 0., 0., 3., 0., 0., 0., 1., 0., 1., 1., 1., 1.]], 2184s dtype=float32) 2184s typ = 2184s 2184s @singledispatch 2184s def as_cupy(val, typ=None): 2184s """ 2184s Rough conversion function 2184s 2184s Will try to infer target type from input type if not specified. 2184s """ 2184s if typ is None: 2184s typ = resolve_cupy_type(val) 2184s 2184s if issubclass(typ, CupyArray): 2184s import cupy as cp 2184s 2184s if isinstance(val, CSMatrix): 2184s val = val.toarray() 2184s return cp.array(val) 2184s elif issubclass(typ, CupyCSRMatrix): 2184s > import cupy as cp 2184s E ModuleNotFoundError: No module named 'cupy' 2184s 2184s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:1016: ModuleNotFoundError 2184s ________ test_view_of_view[cupy_csr-list_int_subset-matrix_bool_subset] ________ 2184s 2184s matrix_type = functools.partial(, typ=) 2184s subset_func = 2184s subset_func2 = 2184s 2184s def test_view_of_view(matrix_type, subset_func, subset_func2): 2184s > adata = gen_adata((30, 15), X_type=matrix_type) 2184s 2184s tests/test_views.py:531: 2184s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 2184s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:346: in gen_adata 2184s X = X_type(random_state.binomial(100, 0.005, (M, N)).astype(X_dtype)) 2184s /usr/lib/python3.13/functools.py:934: in wrapper 2184s return dispatch(args[0].__class__)(*args, **kw) 2184s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 2184s 2184s val = array([[1., 0., 3., 0., 1., 1., 1., 2., 0., 0., 0., 2., 0., 0., 0.], 2184s [1., 0., 0., 0., 0., 1., 1., 0., 1., 2., 0...1., 0., 0., 0., 2., 0., 0.], 2184s [1., 0., 0., 0., 0., 1., 1., 0., 0., 1., 0., 0., 1., 0., 0.]], 2184s dtype=float32) 2184s typ = 2184s 2184s @singledispatch 2184s def as_cupy(val, typ=None): 2184s """ 2184s Rough conversion function 2184s 2184s Will try to infer target type from input type if not specified. 2184s """ 2184s if typ is None: 2184s typ = resolve_cupy_type(val) 2184s 2184s if issubclass(typ, CupyArray): 2184s import cupy as cp 2184s 2184s if isinstance(val, CSMatrix): 2184s val = val.toarray() 2184s return cp.array(val) 2184s elif issubclass(typ, CupyCSRMatrix): 2184s > import cupy as cp 2184s E ModuleNotFoundError: No module named 'cupy' 2184s 2184s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:1016: ModuleNotFoundError 2184s _______ test_view_of_view[cupy_csr-list_int_subset-spmatrix_bool_subset] _______ 2184s 2184s matrix_type = functools.partial(, typ=) 2184s subset_func = 2184s subset_func2 = 2184s 2184s def test_view_of_view(matrix_type, subset_func, subset_func2): 2184s > adata = gen_adata((30, 15), X_type=matrix_type) 2184s 2184s tests/test_views.py:531: 2184s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 2184s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:346: in gen_adata 2184s X = X_type(random_state.binomial(100, 0.005, (M, N)).astype(X_dtype)) 2184s /usr/lib/python3.13/functools.py:934: in wrapper 2184s return dispatch(args[0].__class__)(*args, **kw) 2184s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 2184s 2184s val = array([[0., 0., 0., 0., 0., 1., 0., 0., 4., 0., 0., 0., 0., 1., 2.], 2184s [3., 1., 0., 0., 0., 0., 1., 2., 0., 0., 2...0., 0., 0., 0., 1., 0., 1.], 2184s [0., 1., 0., 1., 0., 0., 1., 0., 2., 0., 1., 1., 0., 2., 0.]], 2184s dtype=float32) 2184s typ = 2184s 2184s @singledispatch 2184s def as_cupy(val, typ=None): 2184s """ 2184s Rough conversion function 2184s 2184s Will try to infer target type from input type if not specified. 2184s """ 2184s if typ is None: 2184s typ = resolve_cupy_type(val) 2184s 2184s if issubclass(typ, CupyArray): 2184s import cupy as cp 2184s 2184s if isinstance(val, CSMatrix): 2184s val = val.toarray() 2184s return cp.array(val) 2184s elif issubclass(typ, CupyCSRMatrix): 2184s > import cupy as cp 2184s E ModuleNotFoundError: No module named 'cupy' 2184s 2184s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:1016: ModuleNotFoundError 2184s _______ test_view_of_view[cupy_csr-list_int_subset-sparray_bool_subset] ________ 2184s 2184s matrix_type = functools.partial(, typ=) 2184s subset_func = 2184s subset_func2 = 2184s 2184s def test_view_of_view(matrix_type, subset_func, subset_func2): 2184s > adata = gen_adata((30, 15), X_type=matrix_type) 2184s 2184s tests/test_views.py:531: 2184s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 2184s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:346: in gen_adata 2184s X = X_type(random_state.binomial(100, 0.005, (M, N)).astype(X_dtype)) 2184s /usr/lib/python3.13/functools.py:934: in wrapper 2184s return dispatch(args[0].__class__)(*args, **kw) 2184s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 2184s 2184s val = array([[0., 1., 0., 1., 0., 0., 0., 0., 1., 0., 2., 0., 0., 1., 0.], 2184s [1., 1., 0., 1., 0., 0., 0., 0., 0., 0., 1...0., 0., 0., 1., 2., 2., 0.], 2184s [0., 0., 1., 0., 1., 1., 1., 2., 2., 0., 1., 0., 0., 1., 1.]], 2184s dtype=float32) 2184s typ = 2184s 2184s @singledispatch 2184s def as_cupy(val, typ=None): 2184s """ 2184s Rough conversion function 2184s 2184s Will try to infer target type from input type if not specified. 2184s """ 2184s if typ is None: 2184s typ = resolve_cupy_type(val) 2184s 2184s if issubclass(typ, CupyArray): 2184s import cupy as cp 2184s 2184s if isinstance(val, CSMatrix): 2184s val = val.toarray() 2184s return cp.array(val) 2184s elif issubclass(typ, CupyCSRMatrix): 2184s > import cupy as cp 2184s E ModuleNotFoundError: No module named 'cupy' 2184s 2184s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:1016: ModuleNotFoundError 2184s __________ test_view_of_view[cupy_csr-array_bool_subset-array_subset] __________ 2184s 2184s matrix_type = functools.partial(, typ=) 2184s subset_func = 2184s subset_func2 = 2184s 2184s def test_view_of_view(matrix_type, subset_func, subset_func2): 2184s > adata = gen_adata((30, 15), X_type=matrix_type) 2184s 2184s tests/test_views.py:531: 2184s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 2184s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:346: in gen_adata 2184s X = X_type(random_state.binomial(100, 0.005, (M, N)).astype(X_dtype)) 2184s /usr/lib/python3.13/functools.py:934: in wrapper 2184s return dispatch(args[0].__class__)(*args, **kw) 2184s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 2184s 2184s val = array([[0., 0., 0., 0., 1., 2., 0., 0., 0., 1., 0., 0., 0., 1., 1.], 2184s [1., 0., 0., 0., 0., 0., 0., 0., 0., 0., 2...0., 0., 0., 0., 1., 0., 1.], 2184s [0., 0., 2., 3., 0., 0., 0., 0., 0., 2., 0., 1., 1., 1., 0.]], 2184s dtype=float32) 2184s typ = 2184s 2184s @singledispatch 2184s def as_cupy(val, typ=None): 2184s """ 2184s Rough conversion function 2184s 2184s Will try to infer target type from input type if not specified. 2184s """ 2184s if typ is None: 2184s typ = resolve_cupy_type(val) 2184s 2184s if issubclass(typ, CupyArray): 2184s import cupy as cp 2184s 2184s if isinstance(val, CSMatrix): 2184s val = val.toarray() 2184s return cp.array(val) 2184s elif issubclass(typ, CupyCSRMatrix): 2184s > import cupy as cp 2184s E ModuleNotFoundError: No module named 'cupy' 2184s 2184s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:1016: ModuleNotFoundError 2184s __________ test_view_of_view[cupy_csr-array_bool_subset-slice_subset] __________ 2184s 2184s matrix_type = functools.partial(, typ=) 2184s subset_func = 2184s subset_func2 = 2184s 2184s def test_view_of_view(matrix_type, subset_func, subset_func2): 2184s > adata = gen_adata((30, 15), X_type=matrix_type) 2184s 2184s tests/test_views.py:531: 2184s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 2184s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:346: in gen_adata 2184s X = X_type(random_state.binomial(100, 0.005, (M, N)).astype(X_dtype)) 2184s /usr/lib/python3.13/functools.py:934: in wrapper 2184s return dispatch(args[0].__class__)(*args, **kw) 2184s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 2184s 2184s val = array([[1., 0., 0., 0., 0., 0., 2., 0., 0., 1., 1., 0., 0., 0., 0.], 2184s [1., 0., 0., 2., 1., 2., 0., 1., 0., 1., 0...1., 0., 1., 0., 0., 0., 1.], 2184s [1., 0., 0., 0., 0., 1., 0., 0., 0., 1., 0., 0., 0., 0., 1.]], 2184s dtype=float32) 2184s typ = 2184s 2184s @singledispatch 2184s def as_cupy(val, typ=None): 2184s """ 2184s Rough conversion function 2184s 2184s Will try to infer target type from input type if not specified. 2184s """ 2184s if typ is None: 2184s typ = resolve_cupy_type(val) 2184s 2184s if issubclass(typ, CupyArray): 2184s import cupy as cp 2184s 2184s if isinstance(val, CSMatrix): 2184s val = val.toarray() 2184s return cp.array(val) 2184s elif issubclass(typ, CupyCSRMatrix): 2184s > import cupy as cp 2184s E ModuleNotFoundError: No module named 'cupy' 2184s 2184s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:1016: ModuleNotFoundError 2184s _________ test_view_of_view[cupy_csr-array_bool_subset-single_subset] __________ 2184s 2184s matrix_type = functools.partial(, typ=) 2184s subset_func = 2184s subset_func2 = 2184s 2184s def test_view_of_view(matrix_type, subset_func, subset_func2): 2184s > adata = gen_adata((30, 15), X_type=matrix_type) 2184s 2184s tests/test_views.py:531: 2184s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 2184s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:346: in gen_adata 2184s X = X_type(random_state.binomial(100, 0.005, (M, N)).astype(X_dtype)) 2184s /usr/lib/python3.13/functools.py:934: in wrapper 2184s return dispatch(args[0].__class__)(*args, **kw) 2184s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 2184s 2184s val = array([[1., 0., 1., 3., 0., 0., 0., 0., 1., 0., 3., 0., 0., 0., 0.], 2184s [0., 1., 0., 0., 1., 2., 0., 1., 0., 1., 0...1., 1., 0., 1., 0., 1., 0.], 2184s [2., 0., 0., 0., 0., 0., 2., 0., 0., 1., 0., 0., 0., 0., 0.]], 2184s dtype=float32) 2184s typ = 2184s 2184s @singledispatch 2184s def as_cupy(val, typ=None): 2184s """ 2184s Rough conversion function 2184s 2184s Will try to infer target type from input type if not specified. 2184s """ 2184s if typ is None: 2184s typ = resolve_cupy_type(val) 2184s 2184s if issubclass(typ, CupyArray): 2184s import cupy as cp 2184s 2184s if isinstance(val, CSMatrix): 2184s val = val.toarray() 2184s return cp.array(val) 2184s elif issubclass(typ, CupyCSRMatrix): 2184s > import cupy as cp 2184s E ModuleNotFoundError: No module named 'cupy' 2184s 2184s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:1016: ModuleNotFoundError 2184s ________ test_view_of_view[cupy_csr-array_bool_subset-array_int_subset] ________ 2184s 2184s matrix_type = functools.partial(, typ=) 2184s subset_func = 2184s subset_func2 = 2184s 2184s def test_view_of_view(matrix_type, subset_func, subset_func2): 2184s > adata = gen_adata((30, 15), X_type=matrix_type) 2184s 2184s tests/test_views.py:531: 2184s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 2184s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:346: in gen_adata 2184s X = X_type(random_state.binomial(100, 0.005, (M, N)).astype(X_dtype)) 2184s /usr/lib/python3.13/functools.py:934: in wrapper 2184s return dispatch(args[0].__class__)(*args, **kw) 2184s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 2184s 2184s val = array([[2., 2., 0., 3., 2., 0., 0., 0., 2., 2., 0., 2., 0., 0., 1.], 2184s [0., 2., 1., 0., 0., 0., 0., 2., 0., 0., 0...0., 1., 0., 0., 0., 1., 0.], 2184s [1., 0., 0., 0., 0., 0., 1., 2., 0., 0., 0., 0., 1., 1., 0.]], 2184s dtype=float32) 2184s typ = 2184s 2184s @singledispatch 2184s def as_cupy(val, typ=None): 2184s """ 2184s Rough conversion function 2184s 2184s Will try to infer target type from input type if not specified. 2184s """ 2184s if typ is None: 2184s typ = resolve_cupy_type(val) 2184s 2184s if issubclass(typ, CupyArray): 2184s import cupy as cp 2184s 2184s if isinstance(val, CSMatrix): 2184s val = val.toarray() 2184s return cp.array(val) 2184s elif issubclass(typ, CupyCSRMatrix): 2184s > import cupy as cp 2184s E ModuleNotFoundError: No module named 'cupy' 2184s 2184s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:1016: ModuleNotFoundError 2184s ________ test_view_of_view[cupy_csr-array_bool_subset-list_int_subset] _________ 2184s 2184s matrix_type = functools.partial(, typ=) 2184s subset_func = 2184s subset_func2 = 2184s 2184s def test_view_of_view(matrix_type, subset_func, subset_func2): 2184s > adata = gen_adata((30, 15), X_type=matrix_type) 2184s 2184s tests/test_views.py:531: 2184s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 2184s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:346: in gen_adata 2184s X = X_type(random_state.binomial(100, 0.005, (M, N)).astype(X_dtype)) 2184s /usr/lib/python3.13/functools.py:934: in wrapper 2184s return dispatch(args[0].__class__)(*args, **kw) 2184s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 2184s 2184s val = array([[0., 0., 0., 0., 1., 3., 0., 0., 0., 1., 0., 1., 1., 0., 0.], 2184s [0., 0., 1., 1., 1., 2., 1., 0., 0., 2., 0...0., 0., 0., 2., 0., 0., 0.], 2184s [0., 1., 0., 2., 1., 0., 1., 0., 1., 0., 1., 1., 1., 0., 0.]], 2184s dtype=float32) 2184s typ = 2184s 2184s @singledispatch 2184s def as_cupy(val, typ=None): 2184s """ 2184s Rough conversion function 2184s 2184s Will try to infer target type from input type if not specified. 2184s """ 2184s if typ is None: 2184s typ = resolve_cupy_type(val) 2184s 2184s if issubclass(typ, CupyArray): 2184s import cupy as cp 2184s 2184s if isinstance(val, CSMatrix): 2184s val = val.toarray() 2184s return cp.array(val) 2184s elif issubclass(typ, CupyCSRMatrix): 2184s > import cupy as cp 2184s E ModuleNotFoundError: No module named 'cupy' 2184s 2184s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:1016: ModuleNotFoundError 2184s _______ test_view_of_view[cupy_csr-array_bool_subset-array_bool_subset] ________ 2184s 2184s matrix_type = functools.partial(, typ=) 2184s subset_func = 2184s subset_func2 = 2184s 2184s def test_view_of_view(matrix_type, subset_func, subset_func2): 2184s > adata = gen_adata((30, 15), X_type=matrix_type) 2184s 2184s tests/test_views.py:531: 2184s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 2184s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:346: in gen_adata 2184s X = X_type(random_state.binomial(100, 0.005, (M, N)).astype(X_dtype)) 2184s /usr/lib/python3.13/functools.py:934: in wrapper 2184s return dispatch(args[0].__class__)(*args, **kw) 2184s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 2184s 2184s val = array([[1., 0., 0., 2., 0., 2., 0., 0., 0., 1., 1., 0., 0., 1., 0.], 2184s [0., 1., 0., 1., 1., 0., 0., 0., 1., 0., 0...0., 4., 0., 0., 0., 0., 1.], 2184s [0., 0., 1., 0., 1., 1., 0., 1., 1., 0., 0., 0., 0., 1., 0.]], 2184s dtype=float32) 2184s typ = 2184s 2184s @singledispatch 2184s def as_cupy(val, typ=None): 2184s """ 2184s Rough conversion function 2184s 2184s Will try to infer target type from input type if not specified. 2184s """ 2184s if typ is None: 2184s typ = resolve_cupy_type(val) 2184s 2184s if issubclass(typ, CupyArray): 2184s import cupy as cp 2184s 2184s if isinstance(val, CSMatrix): 2184s val = val.toarray() 2184s return cp.array(val) 2184s elif issubclass(typ, CupyCSRMatrix): 2184s > import cupy as cp 2184s E ModuleNotFoundError: No module named 'cupy' 2184s 2184s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:1016: ModuleNotFoundError 2184s ________ test_view_of_view[cupy_csr-array_bool_subset-list_bool_subset] ________ 2184s 2184s matrix_type = functools.partial(, typ=) 2184s subset_func = 2184s subset_func2 = 2184s 2184s def test_view_of_view(matrix_type, subset_func, subset_func2): 2184s > adata = gen_adata((30, 15), X_type=matrix_type) 2184s 2184s tests/test_views.py:531: 2184s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 2184s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:346: in gen_adata 2184s X = X_type(random_state.binomial(100, 0.005, (M, N)).astype(X_dtype)) 2184s /usr/lib/python3.13/functools.py:934: in wrapper 2184s return dispatch(args[0].__class__)(*args, **kw) 2184s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 2184s 2184s val = array([[0., 0., 0., 1., 0., 1., 1., 0., 3., 1., 0., 0., 0., 2., 0.], 2184s [0., 0., 0., 0., 0., 0., 1., 0., 2., 1., 0...0., 1., 0., 0., 0., 0., 1.], 2184s [0., 0., 2., 1., 0., 0., 1., 0., 0., 0., 2., 1., 0., 0., 0.]], 2184s dtype=float32) 2184s typ = 2184s 2184s @singledispatch 2184s def as_cupy(val, typ=None): 2184s """ 2184s Rough conversion function 2184s 2184s Will try to infer target type from input type if not specified. 2184s """ 2184s if typ is None: 2184s typ = resolve_cupy_type(val) 2184s 2184s if issubclass(typ, CupyArray): 2184s import cupy as cp 2184s 2184s if isinstance(val, CSMatrix): 2184s val = val.toarray() 2184s return cp.array(val) 2184s elif issubclass(typ, CupyCSRMatrix): 2184s > import cupy as cp 2184s E ModuleNotFoundError: No module named 'cupy' 2184s 2184s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:1016: ModuleNotFoundError 2184s _______ test_view_of_view[cupy_csr-array_bool_subset-matrix_bool_subset] _______ 2184s 2184s matrix_type = functools.partial(, typ=) 2184s subset_func = 2184s subset_func2 = 2184s 2184s def test_view_of_view(matrix_type, subset_func, subset_func2): 2184s > adata = gen_adata((30, 15), X_type=matrix_type) 2184s 2184s tests/test_views.py:531: 2184s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 2184s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:346: in gen_adata 2184s X = X_type(random_state.binomial(100, 0.005, (M, N)).astype(X_dtype)) 2184s /usr/lib/python3.13/functools.py:934: in wrapper 2184s return dispatch(args[0].__class__)(*args, **kw) 2184s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 2184s 2184s val = array([[1., 0., 0., 1., 0., 0., 0., 1., 1., 2., 2., 1., 0., 1., 0.], 2184s [1., 0., 0., 0., 1., 0., 0., 0., 1., 1., 0...0., 0., 0., 0., 0., 0., 0.], 2184s [0., 2., 2., 1., 2., 0., 0., 2., 2., 0., 1., 0., 1., 0., 0.]], 2184s dtype=float32) 2184s typ = 2184s 2184s @singledispatch 2184s def as_cupy(val, typ=None): 2184s """ 2184s Rough conversion function 2184s 2184s Will try to infer target type from input type if not specified. 2184s """ 2184s if typ is None: 2184s typ = resolve_cupy_type(val) 2184s 2184s if issubclass(typ, CupyArray): 2184s import cupy as cp 2184s 2184s if isinstance(val, CSMatrix): 2184s val = val.toarray() 2184s return cp.array(val) 2184s elif issubclass(typ, CupyCSRMatrix): 2184s > import cupy as cp 2184s E ModuleNotFoundError: No module named 'cupy' 2184s 2184s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:1016: ModuleNotFoundError 2184s ______ test_view_of_view[cupy_csr-array_bool_subset-spmatrix_bool_subset] ______ 2184s 2184s matrix_type = functools.partial(, typ=) 2184s subset_func = 2184s subset_func2 = 2184s 2184s def test_view_of_view(matrix_type, subset_func, subset_func2): 2184s > adata = gen_adata((30, 15), X_type=matrix_type) 2184s 2184s tests/test_views.py:531: 2184s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 2184s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:346: in gen_adata 2184s X = X_type(random_state.binomial(100, 0.005, (M, N)).astype(X_dtype)) 2184s /usr/lib/python3.13/functools.py:934: in wrapper 2184s return dispatch(args[0].__class__)(*args, **kw) 2184s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 2184s 2184s val = array([[1., 0., 0., 0., 0., 0., 1., 1., 0., 0., 0., 3., 0., 2., 0.], 2184s [0., 0., 0., 0., 2., 0., 0., 0., 0., 0., 0...0., 0., 0., 0., 0., 0., 1.], 2184s [0., 2., 1., 0., 0., 0., 0., 2., 0., 0., 0., 1., 0., 0., 0.]], 2184s dtype=float32) 2184s typ = 2184s 2184s @singledispatch 2184s def as_cupy(val, typ=None): 2184s """ 2184s Rough conversion function 2184s 2184s Will try to infer target type from input type if not specified. 2184s """ 2184s if typ is None: 2184s typ = resolve_cupy_type(val) 2184s 2184s if issubclass(typ, CupyArray): 2184s import cupy as cp 2184s 2184s if isinstance(val, CSMatrix): 2184s val = val.toarray() 2184s return cp.array(val) 2184s elif issubclass(typ, CupyCSRMatrix): 2184s > import cupy as cp 2184s E ModuleNotFoundError: No module named 'cupy' 2184s 2184s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:1016: ModuleNotFoundError 2184s ______ test_view_of_view[cupy_csr-array_bool_subset-sparray_bool_subset] _______ 2184s 2184s matrix_type = functools.partial(, typ=) 2184s subset_func = 2184s subset_func2 = 2184s 2184s def test_view_of_view(matrix_type, subset_func, subset_func2): 2184s > adata = gen_adata((30, 15), X_type=matrix_type) 2184s 2184s tests/test_views.py:531: 2184s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 2184s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:346: in gen_adata 2184s X = X_type(random_state.binomial(100, 0.005, (M, N)).astype(X_dtype)) 2184s /usr/lib/python3.13/functools.py:934: in wrapper 2184s return dispatch(args[0].__class__)(*args, **kw) 2184s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 2184s 2184s val = array([[0., 0., 0., 0., 0., 1., 0., 0., 0., 0., 0., 1., 0., 0., 0.], 2184s [0., 0., 0., 1., 1., 0., 0., 1., 0., 0., 0...0., 0., 0., 0., 0., 2., 1.], 2184s [3., 0., 1., 2., 1., 2., 0., 0., 0., 0., 0., 0., 2., 0., 0.]], 2184s dtype=float32) 2184s typ = 2184s 2184s @singledispatch 2184s def as_cupy(val, typ=None): 2184s """ 2184s Rough conversion function 2184s 2184s Will try to infer target type from input type if not specified. 2184s """ 2184s if typ is None: 2184s typ = resolve_cupy_type(val) 2184s 2184s if issubclass(typ, CupyArray): 2184s import cupy as cp 2184s 2184s if isinstance(val, CSMatrix): 2184s val = val.toarray() 2184s return cp.array(val) 2184s elif issubclass(typ, CupyCSRMatrix): 2184s > import cupy as cp 2184s E ModuleNotFoundError: No module named 'cupy' 2184s 2184s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:1016: ModuleNotFoundError 2184s __________ test_view_of_view[cupy_csr-list_bool_subset-array_subset] ___________ 2184s 2184s matrix_type = functools.partial(, typ=) 2184s subset_func = 2184s subset_func2 = 2184s 2184s def test_view_of_view(matrix_type, subset_func, subset_func2): 2184s > adata = gen_adata((30, 15), X_type=matrix_type) 2184s 2184s tests/test_views.py:531: 2184s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 2184s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:346: in gen_adata 2184s X = X_type(random_state.binomial(100, 0.005, (M, N)).astype(X_dtype)) 2184s /usr/lib/python3.13/functools.py:934: in wrapper 2184s return dispatch(args[0].__class__)(*args, **kw) 2184s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 2184s 2184s val = array([[1., 0., 0., 2., 0., 0., 1., 0., 0., 1., 1., 0., 1., 1., 1.], 2184s [1., 1., 0., 0., 0., 1., 0., 0., 1., 0., 2...1., 0., 1., 1., 0., 0., 0.], 2184s [0., 0., 0., 0., 0., 0., 0., 1., 0., 0., 0., 0., 0., 0., 1.]], 2184s dtype=float32) 2184s typ = 2184s 2184s @singledispatch 2184s def as_cupy(val, typ=None): 2184s """ 2184s Rough conversion function 2184s 2184s Will try to infer target type from input type if not specified. 2184s """ 2184s if typ is None: 2184s typ = resolve_cupy_type(val) 2184s 2184s if issubclass(typ, CupyArray): 2184s import cupy as cp 2184s 2184s if isinstance(val, CSMatrix): 2184s val = val.toarray() 2184s return cp.array(val) 2184s elif issubclass(typ, CupyCSRMatrix): 2184s > import cupy as cp 2184s E ModuleNotFoundError: No module named 'cupy' 2184s 2184s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:1016: ModuleNotFoundError 2184s __________ test_view_of_view[cupy_csr-list_bool_subset-slice_subset] ___________ 2184s 2184s matrix_type = functools.partial(, typ=) 2184s subset_func = 2184s subset_func2 = 2184s 2184s def test_view_of_view(matrix_type, subset_func, subset_func2): 2184s > adata = gen_adata((30, 15), X_type=matrix_type) 2184s 2184s tests/test_views.py:531: 2184s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 2184s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:346: in gen_adata 2184s X = X_type(random_state.binomial(100, 0.005, (M, N)).astype(X_dtype)) 2184s /usr/lib/python3.13/functools.py:934: in wrapper 2184s return dispatch(args[0].__class__)(*args, **kw) 2184s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 2184s 2184s val = array([[0., 0., 1., 0., 1., 0., 0., 0., 0., 0., 0., 2., 0., 0., 0.], 2184s [0., 0., 1., 1., 1., 0., 0., 1., 0., 0., 0...1., 0., 1., 0., 0., 0., 0.], 2184s [0., 0., 1., 0., 1., 0., 0., 0., 1., 0., 0., 0., 1., 2., 2.]], 2184s dtype=float32) 2184s typ = 2184s 2184s @singledispatch 2184s def as_cupy(val, typ=None): 2184s """ 2184s Rough conversion function 2184s 2184s Will try to infer target type from input type if not specified. 2184s """ 2184s if typ is None: 2184s typ = resolve_cupy_type(val) 2184s 2184s if issubclass(typ, CupyArray): 2184s import cupy as cp 2184s 2184s if isinstance(val, CSMatrix): 2184s val = val.toarray() 2184s return cp.array(val) 2184s elif issubclass(typ, CupyCSRMatrix): 2184s > import cupy as cp 2184s E ModuleNotFoundError: No module named 'cupy' 2184s 2184s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:1016: ModuleNotFoundError 2184s __________ test_view_of_view[cupy_csr-list_bool_subset-single_subset] __________ 2184s 2184s matrix_type = functools.partial(, typ=) 2184s subset_func = 2184s subset_func2 = 2184s 2184s def test_view_of_view(matrix_type, subset_func, subset_func2): 2184s > adata = gen_adata((30, 15), X_type=matrix_type) 2184s 2184s tests/test_views.py:531: 2184s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 2184s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:346: in gen_adata 2184s X = X_type(random_state.binomial(100, 0.005, (M, N)).astype(X_dtype)) 2184s /usr/lib/python3.13/functools.py:934: in wrapper 2184s return dispatch(args[0].__class__)(*args, **kw) 2184s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 2184s 2184s val = array([[1., 0., 0., 1., 0., 0., 1., 1., 0., 0., 1., 0., 0., 1., 1.], 2184s [0., 0., 0., 0., 0., 3., 1., 0., 0., 3., 1...0., 1., 0., 0., 0., 0., 0.], 2184s [1., 0., 0., 0., 1., 1., 0., 1., 0., 1., 0., 2., 0., 1., 1.]], 2184s dtype=float32) 2184s typ = 2184s 2184s @singledispatch 2184s def as_cupy(val, typ=None): 2184s """ 2184s Rough conversion function 2184s 2184s Will try to infer target type from input type if not specified. 2184s """ 2184s if typ is None: 2184s typ = resolve_cupy_type(val) 2184s 2184s if issubclass(typ, CupyArray): 2184s import cupy as cp 2184s 2184s if isinstance(val, CSMatrix): 2184s val = val.toarray() 2184s return cp.array(val) 2184s elif issubclass(typ, CupyCSRMatrix): 2184s > import cupy as cp 2184s E ModuleNotFoundError: No module named 'cupy' 2184s 2184s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:1016: ModuleNotFoundError 2184s ________ test_view_of_view[cupy_csr-list_bool_subset-array_int_subset] _________ 2184s 2184s matrix_type = functools.partial(, typ=) 2184s subset_func = 2184s subset_func2 = 2184s 2184s def test_view_of_view(matrix_type, subset_func, subset_func2): 2184s > adata = gen_adata((30, 15), X_type=matrix_type) 2184s 2184s tests/test_views.py:531: 2184s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 2184s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:346: in gen_adata 2184s X = X_type(random_state.binomial(100, 0.005, (M, N)).astype(X_dtype)) 2184s /usr/lib/python3.13/functools.py:934: in wrapper 2184s return dispatch(args[0].__class__)(*args, **kw) 2184s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 2184s 2184s val = array([[0., 1., 1., 0., 0., 0., 0., 0., 0., 1., 0., 0., 0., 2., 0.], 2184s [1., 0., 2., 0., 1., 0., 1., 0., 1., 1., 2...0., 0., 0., 0., 0., 2., 0.], 2184s [0., 1., 1., 2., 0., 0., 1., 0., 2., 1., 0., 1., 2., 0., 0.]], 2184s dtype=float32) 2184s typ = 2184s 2184s @singledispatch 2184s def as_cupy(val, typ=None): 2184s """ 2184s Rough conversion function 2184s 2184s Will try to infer target type from input type if not specified. 2184s """ 2184s if typ is None: 2184s typ = resolve_cupy_type(val) 2184s 2184s if issubclass(typ, CupyArray): 2184s import cupy as cp 2184s 2184s if isinstance(val, CSMatrix): 2184s val = val.toarray() 2184s return cp.array(val) 2184s elif issubclass(typ, CupyCSRMatrix): 2184s > import cupy as cp 2184s E ModuleNotFoundError: No module named 'cupy' 2184s 2184s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:1016: ModuleNotFoundError 2184s _________ test_view_of_view[cupy_csr-list_bool_subset-list_int_subset] _________ 2184s 2184s matrix_type = functools.partial(, typ=) 2184s subset_func = 2184s subset_func2 = 2184s 2184s def test_view_of_view(matrix_type, subset_func, subset_func2): 2184s > adata = gen_adata((30, 15), X_type=matrix_type) 2184s 2184s tests/test_views.py:531: 2184s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 2184s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:346: in gen_adata 2184s X = X_type(random_state.binomial(100, 0.005, (M, N)).astype(X_dtype)) 2184s /usr/lib/python3.13/functools.py:934: in wrapper 2184s return dispatch(args[0].__class__)(*args, **kw) 2184s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 2184s 2184s val = array([[0., 1., 0., 1., 1., 0., 0., 0., 1., 0., 0., 0., 0., 1., 0.], 2184s [0., 0., 1., 0., 1., 0., 0., 1., 0., 1., 1...0., 0., 1., 2., 1., 0., 1.], 2184s [0., 0., 1., 0., 1., 0., 0., 0., 0., 1., 0., 1., 0., 0., 0.]], 2184s dtype=float32) 2184s typ = 2184s 2184s @singledispatch 2184s def as_cupy(val, typ=None): 2184s """ 2184s Rough conversion function 2184s 2184s Will try to infer target type from input type if not specified. 2184s """ 2184s if typ is None: 2184s typ = resolve_cupy_type(val) 2184s 2184s if issubclass(typ, CupyArray): 2184s import cupy as cp 2184s 2184s if isinstance(val, CSMatrix): 2184s val = val.toarray() 2184s return cp.array(val) 2184s elif issubclass(typ, CupyCSRMatrix): 2184s > import cupy as cp 2184s E ModuleNotFoundError: No module named 'cupy' 2184s 2184s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:1016: ModuleNotFoundError 2184s ________ test_view_of_view[cupy_csr-list_bool_subset-array_bool_subset] ________ 2184s 2184s matrix_type = functools.partial(, typ=) 2184s subset_func = 2184s subset_func2 = 2184s 2184s def test_view_of_view(matrix_type, subset_func, subset_func2): 2184s > adata = gen_adata((30, 15), X_type=matrix_type) 2184s 2184s tests/test_views.py:531: 2184s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 2184s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:346: in gen_adata 2184s X = X_type(random_state.binomial(100, 0.005, (M, N)).astype(X_dtype)) 2184s /usr/lib/python3.13/functools.py:934: in wrapper 2184s return dispatch(args[0].__class__)(*args, **kw) 2184s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 2184s 2184s val = array([[0., 0., 0., 0., 1., 0., 0., 1., 1., 0., 1., 0., 0., 1., 1.], 2184s [0., 1., 2., 0., 1., 0., 0., 0., 0., 0., 0...0., 1., 0., 2., 0., 1., 0.], 2184s [0., 0., 1., 1., 0., 1., 0., 1., 0., 0., 0., 2., 0., 0., 2.]], 2184s dtype=float32) 2184s typ = 2184s 2184s @singledispatch 2184s def as_cupy(val, typ=None): 2184s """ 2184s Rough conversion function 2184s 2184s Will try to infer target type from input type if not specified. 2184s """ 2184s if typ is None: 2184s typ = resolve_cupy_type(val) 2184s 2184s if issubclass(typ, CupyArray): 2184s import cupy as cp 2184s 2184s if isinstance(val, CSMatrix): 2184s val = val.toarray() 2184s return cp.array(val) 2184s elif issubclass(typ, CupyCSRMatrix): 2184s > import cupy as cp 2184s E ModuleNotFoundError: No module named 'cupy' 2184s 2184s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:1016: ModuleNotFoundError 2184s ________ test_view_of_view[cupy_csr-list_bool_subset-list_bool_subset] _________ 2184s 2184s matrix_type = functools.partial(, typ=) 2184s subset_func = 2184s subset_func2 = 2184s 2184s def test_view_of_view(matrix_type, subset_func, subset_func2): 2184s > adata = gen_adata((30, 15), X_type=matrix_type) 2184s 2184s tests/test_views.py:531: 2184s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 2184s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:346: in gen_adata 2184s X = X_type(random_state.binomial(100, 0.005, (M, N)).astype(X_dtype)) 2184s /usr/lib/python3.13/functools.py:934: in wrapper 2184s return dispatch(args[0].__class__)(*args, **kw) 2184s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 2184s 2184s val = array([[2., 0., 0., 1., 0., 1., 1., 1., 2., 0., 2., 0., 0., 2., 0.], 2184s [1., 1., 1., 0., 1., 2., 0., 1., 0., 2., 0...2., 0., 1., 1., 1., 0., 0.], 2184s [0., 2., 1., 0., 0., 0., 0., 1., 2., 0., 0., 1., 2., 3., 0.]], 2184s dtype=float32) 2184s typ = 2184s 2184s @singledispatch 2184s def as_cupy(val, typ=None): 2184s """ 2184s Rough conversion function 2184s 2184s Will try to infer target type from input type if not specified. 2184s """ 2184s if typ is None: 2184s typ = resolve_cupy_type(val) 2184s 2184s if issubclass(typ, CupyArray): 2184s import cupy as cp 2184s 2184s if isinstance(val, CSMatrix): 2184s val = val.toarray() 2184s return cp.array(val) 2184s elif issubclass(typ, CupyCSRMatrix): 2184s > import cupy as cp 2184s E ModuleNotFoundError: No module named 'cupy' 2184s 2184s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:1016: ModuleNotFoundError 2184s _______ test_view_of_view[cupy_csr-list_bool_subset-matrix_bool_subset] ________ 2184s 2184s matrix_type = functools.partial(, typ=) 2184s subset_func = 2184s subset_func2 = 2184s 2184s def test_view_of_view(matrix_type, subset_func, subset_func2): 2184s > adata = gen_adata((30, 15), X_type=matrix_type) 2184s 2184s tests/test_views.py:531: 2184s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 2184s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:346: in gen_adata 2184s X = X_type(random_state.binomial(100, 0.005, (M, N)).astype(X_dtype)) 2184s /usr/lib/python3.13/functools.py:934: in wrapper 2184s return dispatch(args[0].__class__)(*args, **kw) 2184s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 2184s 2184s val = array([[0., 0., 0., 0., 1., 0., 1., 1., 0., 0., 1., 1., 0., 0., 0.], 2184s [0., 0., 0., 1., 0., 0., 0., 0., 0., 2., 1...2., 0., 0., 1., 0., 0., 1.], 2184s [0., 1., 0., 0., 0., 1., 0., 0., 0., 1., 0., 1., 0., 0., 0.]], 2184s dtype=float32) 2184s typ = 2184s 2184s @singledispatch 2184s def as_cupy(val, typ=None): 2184s """ 2184s Rough conversion function 2184s 2184s Will try to infer target type from input type if not specified. 2184s """ 2184s if typ is None: 2184s typ = resolve_cupy_type(val) 2184s 2184s if issubclass(typ, CupyArray): 2184s import cupy as cp 2184s 2184s if isinstance(val, CSMatrix): 2184s val = val.toarray() 2184s return cp.array(val) 2184s elif issubclass(typ, CupyCSRMatrix): 2184s > import cupy as cp 2184s E ModuleNotFoundError: No module named 'cupy' 2184s 2184s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:1016: ModuleNotFoundError 2184s ______ test_view_of_view[cupy_csr-list_bool_subset-spmatrix_bool_subset] _______ 2184s 2184s matrix_type = functools.partial(, typ=) 2184s subset_func = 2184s subset_func2 = 2184s 2184s def test_view_of_view(matrix_type, subset_func, subset_func2): 2184s > adata = gen_adata((30, 15), X_type=matrix_type) 2184s 2184s tests/test_views.py:531: 2184s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 2184s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:346: in gen_adata 2184s X = X_type(random_state.binomial(100, 0.005, (M, N)).astype(X_dtype)) 2184s /usr/lib/python3.13/functools.py:934: in wrapper 2184s return dispatch(args[0].__class__)(*args, **kw) 2184s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 2184s 2184s val = array([[1., 0., 1., 0., 0., 1., 0., 0., 0., 0., 0., 1., 0., 0., 0.], 2184s [1., 0., 0., 0., 1., 1., 0., 1., 0., 0., 0...0., 1., 0., 0., 1., 2., 1.], 2184s [0., 0., 0., 0., 0., 0., 0., 1., 1., 1., 0., 0., 0., 0., 1.]], 2184s dtype=float32) 2184s typ = 2184s 2184s @singledispatch 2184s def as_cupy(val, typ=None): 2184s """ 2184s Rough conversion function 2184s 2184s Will try to infer target type from input type if not specified. 2184s """ 2184s if typ is None: 2184s typ = resolve_cupy_type(val) 2184s 2184s if issubclass(typ, CupyArray): 2184s import cupy as cp 2184s 2184s if isinstance(val, CSMatrix): 2184s val = val.toarray() 2184s return cp.array(val) 2184s elif issubclass(typ, CupyCSRMatrix): 2184s > import cupy as cp 2184s E ModuleNotFoundError: No module named 'cupy' 2184s 2184s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:1016: ModuleNotFoundError 2184s _______ test_view_of_view[cupy_csr-list_bool_subset-sparray_bool_subset] _______ 2184s 2184s matrix_type = functools.partial(, typ=) 2184s subset_func = 2184s subset_func2 = 2184s 2184s def test_view_of_view(matrix_type, subset_func, subset_func2): 2184s > adata = gen_adata((30, 15), X_type=matrix_type) 2184s 2184s tests/test_views.py:531: 2184s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 2184s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:346: in gen_adata 2184s X = X_type(random_state.binomial(100, 0.005, (M, N)).astype(X_dtype)) 2184s /usr/lib/python3.13/functools.py:934: in wrapper 2184s return dispatch(args[0].__class__)(*args, **kw) 2184s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 2184s 2184s val = array([[1., 0., 0., 0., 0., 1., 1., 1., 0., 1., 0., 0., 2., 3., 0.], 2184s [1., 0., 1., 0., 0., 2., 0., 0., 0., 1., 0...0., 0., 0., 1., 2., 0., 0.], 2184s [0., 0., 1., 0., 1., 1., 0., 0., 0., 0., 1., 0., 1., 1., 0.]], 2184s dtype=float32) 2184s typ = 2184s 2184s @singledispatch 2184s def as_cupy(val, typ=None): 2184s """ 2184s Rough conversion function 2184s 2184s Will try to infer target type from input type if not specified. 2184s """ 2184s if typ is None: 2184s typ = resolve_cupy_type(val) 2184s 2184s if issubclass(typ, CupyArray): 2184s import cupy as cp 2184s 2184s if isinstance(val, CSMatrix): 2184s val = val.toarray() 2184s return cp.array(val) 2184s elif issubclass(typ, CupyCSRMatrix): 2184s > import cupy as cp 2184s E ModuleNotFoundError: No module named 'cupy' 2184s 2184s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:1016: ModuleNotFoundError 2184s _________ test_view_of_view[cupy_csr-matrix_bool_subset-array_subset] __________ 2184s 2184s matrix_type = functools.partial(, typ=) 2184s subset_func = 2184s subset_func2 = 2184s 2184s def test_view_of_view(matrix_type, subset_func, subset_func2): 2184s > adata = gen_adata((30, 15), X_type=matrix_type) 2184s 2184s tests/test_views.py:531: 2184s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 2184s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:346: in gen_adata 2184s X = X_type(random_state.binomial(100, 0.005, (M, N)).astype(X_dtype)) 2184s /usr/lib/python3.13/functools.py:934: in wrapper 2184s return dispatch(args[0].__class__)(*args, **kw) 2184s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 2184s 2184s val = array([[0., 0., 0., 0., 2., 0., 1., 0., 0., 0., 0., 1., 0., 1., 0.], 2184s [1., 0., 2., 1., 1., 1., 0., 0., 0., 0., 0...1., 0., 1., 3., 0., 0., 2.], 2184s [1., 0., 1., 0., 0., 1., 0., 0., 1., 1., 0., 1., 1., 0., 0.]], 2184s dtype=float32) 2184s typ = 2184s 2184s @singledispatch 2184s def as_cupy(val, typ=None): 2184s """ 2184s Rough conversion function 2184s 2184s Will try to infer target type from input type if not specified. 2184s """ 2184s if typ is None: 2184s typ = resolve_cupy_type(val) 2184s 2184s if issubclass(typ, CupyArray): 2184s import cupy as cp 2184s 2184s if isinstance(val, CSMatrix): 2184s val = val.toarray() 2184s return cp.array(val) 2184s elif issubclass(typ, CupyCSRMatrix): 2184s > import cupy as cp 2184s E ModuleNotFoundError: No module named 'cupy' 2184s 2184s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:1016: ModuleNotFoundError 2184s _________ test_view_of_view[cupy_csr-matrix_bool_subset-slice_subset] __________ 2184s 2184s matrix_type = functools.partial(, typ=) 2184s subset_func = 2184s subset_func2 = 2184s 2184s def test_view_of_view(matrix_type, subset_func, subset_func2): 2184s > adata = gen_adata((30, 15), X_type=matrix_type) 2184s 2184s tests/test_views.py:531: 2184s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 2184s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:346: in gen_adata 2184s X = X_type(random_state.binomial(100, 0.005, (M, N)).astype(X_dtype)) 2184s /usr/lib/python3.13/functools.py:934: in wrapper 2184s return dispatch(args[0].__class__)(*args, **kw) 2184s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 2184s 2184s val = array([[1., 2., 0., 0., 2., 0., 0., 0., 1., 1., 0., 0., 1., 1., 1.], 2184s [0., 0., 1., 0., 0., 0., 0., 1., 0., 0., 1...1., 1., 1., 0., 0., 0., 0.], 2184s [2., 0., 0., 0., 0., 2., 1., 0., 0., 1., 2., 0., 1., 2., 0.]], 2184s dtype=float32) 2184s typ = 2184s 2184s @singledispatch 2184s def as_cupy(val, typ=None): 2184s """ 2184s Rough conversion function 2184s 2184s Will try to infer target type from input type if not specified. 2184s """ 2184s if typ is None: 2184s typ = resolve_cupy_type(val) 2184s 2184s if issubclass(typ, CupyArray): 2184s import cupy as cp 2184s 2184s if isinstance(val, CSMatrix): 2184s val = val.toarray() 2184s return cp.array(val) 2184s elif issubclass(typ, CupyCSRMatrix): 2184s > import cupy as cp 2184s E ModuleNotFoundError: No module named 'cupy' 2184s 2184s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:1016: ModuleNotFoundError 2184s _________ test_view_of_view[cupy_csr-matrix_bool_subset-single_subset] _________ 2184s 2184s matrix_type = functools.partial(, typ=) 2184s subset_func = 2184s subset_func2 = 2184s 2184s def test_view_of_view(matrix_type, subset_func, subset_func2): 2184s > adata = gen_adata((30, 15), X_type=matrix_type) 2184s 2184s tests/test_views.py:531: 2184s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 2184s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:346: in gen_adata 2184s X = X_type(random_state.binomial(100, 0.005, (M, N)).astype(X_dtype)) 2184s /usr/lib/python3.13/functools.py:934: in wrapper 2184s return dispatch(args[0].__class__)(*args, **kw) 2184s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 2184s 2184s val = array([[0., 0., 0., 1., 1., 1., 0., 1., 0., 0., 0., 0., 1., 2., 1.], 2184s [1., 0., 0., 1., 0., 0., 0., 1., 1., 0., 0...0., 0., 1., 1., 2., 0., 0.], 2184s [1., 0., 0., 2., 0., 1., 1., 1., 0., 0., 2., 1., 0., 0., 1.]], 2184s dtype=float32) 2184s typ = 2184s 2184s @singledispatch 2184s def as_cupy(val, typ=None): 2184s """ 2184s Rough conversion function 2184s 2184s Will try to infer target type from input type if not specified. 2184s """ 2184s if typ is None: 2184s typ = resolve_cupy_type(val) 2184s 2184s if issubclass(typ, CupyArray): 2184s import cupy as cp 2184s 2184s if isinstance(val, CSMatrix): 2184s val = val.toarray() 2184s return cp.array(val) 2184s elif issubclass(typ, CupyCSRMatrix): 2184s > import cupy as cp 2184s E ModuleNotFoundError: No module named 'cupy' 2184s 2184s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:1016: ModuleNotFoundError 2184s _______ test_view_of_view[cupy_csr-matrix_bool_subset-array_int_subset] ________ 2184s 2184s matrix_type = functools.partial(, typ=) 2184s subset_func = 2184s subset_func2 = 2184s 2184s def test_view_of_view(matrix_type, subset_func, subset_func2): 2184s > adata = gen_adata((30, 15), X_type=matrix_type) 2184s 2184s tests/test_views.py:531: 2184s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 2184s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:346: in gen_adata 2184s X = X_type(random_state.binomial(100, 0.005, (M, N)).astype(X_dtype)) 2184s /usr/lib/python3.13/functools.py:934: in wrapper 2184s return dispatch(args[0].__class__)(*args, **kw) 2184s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 2184s 2184s val = array([[0., 1., 0., 0., 0., 0., 0., 1., 0., 1., 0., 0., 1., 0., 3.], 2184s [0., 1., 0., 0., 1., 1., 1., 2., 2., 1., 2...0., 0., 0., 1., 0., 0., 1.], 2184s [0., 2., 0., 0., 0., 0., 1., 0., 0., 0., 1., 1., 1., 0., 0.]], 2184s dtype=float32) 2184s typ = 2184s 2184s @singledispatch 2184s def as_cupy(val, typ=None): 2184s """ 2184s Rough conversion function 2184s 2184s Will try to infer target type from input type if not specified. 2184s """ 2184s if typ is None: 2184s typ = resolve_cupy_type(val) 2184s 2184s if issubclass(typ, CupyArray): 2184s import cupy as cp 2184s 2184s if isinstance(val, CSMatrix): 2184s val = val.toarray() 2184s return cp.array(val) 2184s elif issubclass(typ, CupyCSRMatrix): 2184s > import cupy as cp 2184s E ModuleNotFoundError: No module named 'cupy' 2184s 2184s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:1016: ModuleNotFoundError 2184s ________ test_view_of_view[cupy_csr-matrix_bool_subset-list_int_subset] ________ 2184s 2184s matrix_type = functools.partial(, typ=) 2184s subset_func = 2184s subset_func2 = 2184s 2184s def test_view_of_view(matrix_type, subset_func, subset_func2): 2184s > adata = gen_adata((30, 15), X_type=matrix_type) 2184s 2184s tests/test_views.py:531: 2184s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 2184s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:346: in gen_adata 2184s X = X_type(random_state.binomial(100, 0.005, (M, N)).astype(X_dtype)) 2184s /usr/lib/python3.13/functools.py:934: in wrapper 2184s return dispatch(args[0].__class__)(*args, **kw) 2184s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 2184s 2184s val = array([[0., 1., 1., 0., 1., 0., 0., 0., 0., 0., 0., 0., 0., 0., 3.], 2184s [0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 1...0., 3., 1., 2., 0., 1., 1.], 2184s [0., 1., 3., 0., 0., 0., 4., 2., 0., 1., 3., 0., 1., 1., 0.]], 2184s dtype=float32) 2184s typ = 2184s 2184s @singledispatch 2184s def as_cupy(val, typ=None): 2184s """ 2184s Rough conversion function 2184s 2184s Will try to infer target type from input type if not specified. 2184s """ 2184s if typ is None: 2184s typ = resolve_cupy_type(val) 2184s 2184s if issubclass(typ, CupyArray): 2184s import cupy as cp 2184s 2184s if isinstance(val, CSMatrix): 2184s val = val.toarray() 2184s return cp.array(val) 2184s elif issubclass(typ, CupyCSRMatrix): 2184s > import cupy as cp 2184s E ModuleNotFoundError: No module named 'cupy' 2184s 2184s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:1016: ModuleNotFoundError 2184s _______ test_view_of_view[cupy_csr-matrix_bool_subset-array_bool_subset] _______ 2184s 2184s matrix_type = functools.partial(, typ=) 2184s subset_func = 2184s subset_func2 = 2184s 2184s def test_view_of_view(matrix_type, subset_func, subset_func2): 2184s > adata = gen_adata((30, 15), X_type=matrix_type) 2184s 2184s tests/test_views.py:531: 2184s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 2184s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:346: in gen_adata 2184s X = X_type(random_state.binomial(100, 0.005, (M, N)).astype(X_dtype)) 2184s /usr/lib/python3.13/functools.py:934: in wrapper 2184s return dispatch(args[0].__class__)(*args, **kw) 2184s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 2184s 2184s val = array([[0., 0., 0., 0., 0., 1., 0., 0., 0., 0., 0., 2., 0., 0., 1.], 2184s [0., 1., 1., 0., 0., 0., 1., 1., 2., 0., 1...0., 2., 0., 0., 0., 0., 0.], 2184s [0., 1., 0., 0., 0., 0., 0., 0., 0., 0., 1., 0., 0., 0., 1.]], 2184s dtype=float32) 2184s typ = 2184s 2184s @singledispatch 2184s def as_cupy(val, typ=None): 2184s """ 2184s Rough conversion function 2184s 2184s Will try to infer target type from input type if not specified. 2184s """ 2184s if typ is None: 2184s typ = resolve_cupy_type(val) 2184s 2184s if issubclass(typ, CupyArray): 2184s import cupy as cp 2184s 2184s if isinstance(val, CSMatrix): 2184s val = val.toarray() 2184s return cp.array(val) 2184s elif issubclass(typ, CupyCSRMatrix): 2184s > import cupy as cp 2184s E ModuleNotFoundError: No module named 'cupy' 2184s 2184s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:1016: ModuleNotFoundError 2184s _______ test_view_of_view[cupy_csr-matrix_bool_subset-list_bool_subset] ________ 2184s 2184s matrix_type = functools.partial(, typ=) 2184s subset_func = 2184s subset_func2 = 2184s 2184s def test_view_of_view(matrix_type, subset_func, subset_func2): 2184s > adata = gen_adata((30, 15), X_type=matrix_type) 2184s 2184s tests/test_views.py:531: 2184s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 2184s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:346: in gen_adata 2184s X = X_type(random_state.binomial(100, 0.005, (M, N)).astype(X_dtype)) 2184s /usr/lib/python3.13/functools.py:934: in wrapper 2184s return dispatch(args[0].__class__)(*args, **kw) 2184s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 2184s 2184s val = array([[1., 2., 0., 0., 0., 0., 0., 1., 1., 0., 2., 0., 0., 1., 1.], 2184s [2., 2., 2., 1., 0., 1., 0., 0., 1., 0., 0...1., 1., 1., 0., 1., 0., 0.], 2184s [0., 0., 1., 1., 0., 0., 1., 1., 0., 2., 0., 1., 0., 2., 1.]], 2184s dtype=float32) 2184s typ = 2184s 2184s @singledispatch 2184s def as_cupy(val, typ=None): 2184s """ 2184s Rough conversion function 2184s 2184s Will try to infer target type from input type if not specified. 2184s """ 2184s if typ is None: 2184s typ = resolve_cupy_type(val) 2184s 2184s if issubclass(typ, CupyArray): 2184s import cupy as cp 2184s 2184s if isinstance(val, CSMatrix): 2184s val = val.toarray() 2184s return cp.array(val) 2184s elif issubclass(typ, CupyCSRMatrix): 2184s > import cupy as cp 2184s E ModuleNotFoundError: No module named 'cupy' 2184s 2184s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:1016: ModuleNotFoundError 2184s ______ test_view_of_view[cupy_csr-matrix_bool_subset-matrix_bool_subset] _______ 2184s 2184s matrix_type = functools.partial(, typ=) 2184s subset_func = 2184s subset_func2 = 2184s 2184s def test_view_of_view(matrix_type, subset_func, subset_func2): 2184s > adata = gen_adata((30, 15), X_type=matrix_type) 2184s 2184s tests/test_views.py:531: 2184s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 2184s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:346: in gen_adata 2184s X = X_type(random_state.binomial(100, 0.005, (M, N)).astype(X_dtype)) 2184s /usr/lib/python3.13/functools.py:934: in wrapper 2184s return dispatch(args[0].__class__)(*args, **kw) 2184s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 2184s 2184s val = array([[1., 1., 1., 1., 0., 1., 0., 1., 0., 1., 0., 0., 1., 1., 1.], 2184s [1., 1., 0., 1., 1., 0., 0., 0., 0., 0., 1...0., 0., 0., 0., 1., 0., 0.], 2184s [1., 1., 0., 1., 1., 2., 1., 0., 1., 2., 0., 2., 0., 1., 2.]], 2184s dtype=float32) 2184s typ = 2184s 2184s @singledispatch 2184s def as_cupy(val, typ=None): 2184s """ 2184s Rough conversion function 2184s 2184s Will try to infer target type from input type if not specified. 2184s """ 2184s if typ is None: 2184s typ = resolve_cupy_type(val) 2184s 2184s if issubclass(typ, CupyArray): 2184s import cupy as cp 2184s 2184s if isinstance(val, CSMatrix): 2184s val = val.toarray() 2184s return cp.array(val) 2184s elif issubclass(typ, CupyCSRMatrix): 2184s > import cupy as cp 2184s E ModuleNotFoundError: No module named 'cupy' 2184s 2184s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:1016: ModuleNotFoundError 2184s _____ test_view_of_view[cupy_csr-matrix_bool_subset-spmatrix_bool_subset] ______ 2184s 2184s matrix_type = functools.partial(, typ=) 2184s subset_func = 2184s subset_func2 = 2184s 2184s def test_view_of_view(matrix_type, subset_func, subset_func2): 2184s > adata = gen_adata((30, 15), X_type=matrix_type) 2184s 2184s tests/test_views.py:531: 2184s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 2184s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:346: in gen_adata 2184s X = X_type(random_state.binomial(100, 0.005, (M, N)).astype(X_dtype)) 2184s /usr/lib/python3.13/functools.py:934: in wrapper 2184s return dispatch(args[0].__class__)(*args, **kw) 2184s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 2184s 2184s val = array([[4., 0., 1., 1., 0., 0., 1., 0., 0., 0., 0., 1., 0., 1., 0.], 2184s [1., 0., 0., 0., 0., 0., 0., 2., 0., 0., 0...0., 0., 0., 1., 1., 1., 1.], 2184s [0., 0., 0., 1., 1., 0., 2., 0., 0., 1., 0., 1., 0., 0., 1.]], 2184s dtype=float32) 2184s typ = 2184s 2184s @singledispatch 2184s def as_cupy(val, typ=None): 2184s """ 2184s Rough conversion function 2184s 2184s Will try to infer target type from input type if not specified. 2184s """ 2184s if typ is None: 2184s typ = resolve_cupy_type(val) 2184s 2184s if issubclass(typ, CupyArray): 2184s import cupy as cp 2184s 2184s if isinstance(val, CSMatrix): 2184s val = val.toarray() 2184s return cp.array(val) 2184s elif issubclass(typ, CupyCSRMatrix): 2184s > import cupy as cp 2184s E ModuleNotFoundError: No module named 'cupy' 2184s 2184s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:1016: ModuleNotFoundError 2184s ______ test_view_of_view[cupy_csr-matrix_bool_subset-sparray_bool_subset] ______ 2184s 2184s matrix_type = functools.partial(, typ=) 2184s subset_func = 2184s subset_func2 = 2184s 2184s def test_view_of_view(matrix_type, subset_func, subset_func2): 2184s > adata = gen_adata((30, 15), X_type=matrix_type) 2184s 2184s tests/test_views.py:531: 2184s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 2184s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:346: in gen_adata 2184s X = X_type(random_state.binomial(100, 0.005, (M, N)).astype(X_dtype)) 2184s /usr/lib/python3.13/functools.py:934: in wrapper 2184s return dispatch(args[0].__class__)(*args, **kw) 2184s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 2184s 2184s val = array([[0., 0., 0., 0., 0., 2., 0., 1., 0., 0., 0., 0., 0., 0., 1.], 2184s [1., 2., 1., 0., 0., 0., 1., 0., 0., 1., 1...0., 1., 1., 1., 1., 0., 0.], 2184s [0., 0., 0., 0., 0., 1., 1., 0., 0., 1., 0., 0., 1., 0., 0.]], 2184s dtype=float32) 2184s typ = 2184s 2184s @singledispatch 2184s def as_cupy(val, typ=None): 2184s """ 2184s Rough conversion function 2184s 2184s Will try to infer target type from input type if not specified. 2184s """ 2184s if typ is None: 2184s typ = resolve_cupy_type(val) 2184s 2184s if issubclass(typ, CupyArray): 2184s import cupy as cp 2184s 2184s if isinstance(val, CSMatrix): 2184s val = val.toarray() 2184s return cp.array(val) 2184s elif issubclass(typ, CupyCSRMatrix): 2184s > import cupy as cp 2184s E ModuleNotFoundError: No module named 'cupy' 2184s 2184s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:1016: ModuleNotFoundError 2184s ________ test_view_of_view[cupy_csr-spmatrix_bool_subset-array_subset] _________ 2184s 2184s matrix_type = functools.partial(, typ=) 2184s subset_func = 2184s subset_func2 = 2184s 2184s def test_view_of_view(matrix_type, subset_func, subset_func2): 2184s > adata = gen_adata((30, 15), X_type=matrix_type) 2184s 2184s tests/test_views.py:531: 2184s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 2184s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:346: in gen_adata 2184s X = X_type(random_state.binomial(100, 0.005, (M, N)).astype(X_dtype)) 2184s /usr/lib/python3.13/functools.py:934: in wrapper 2184s return dispatch(args[0].__class__)(*args, **kw) 2184s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 2184s 2184s val = array([[0., 1., 0., 0., 1., 3., 0., 1., 0., 1., 0., 0., 0., 0., 1.], 2184s [1., 0., 0., 3., 1., 1., 0., 1., 0., 0., 1...0., 0., 0., 0., 0., 0., 0.], 2184s [0., 0., 1., 0., 0., 1., 1., 1., 0., 0., 0., 2., 0., 0., 1.]], 2184s dtype=float32) 2184s typ = 2184s 2184s @singledispatch 2184s def as_cupy(val, typ=None): 2184s """ 2184s Rough conversion function 2184s 2184s Will try to infer target type from input type if not specified. 2184s """ 2184s if typ is None: 2184s typ = resolve_cupy_type(val) 2184s 2184s if issubclass(typ, CupyArray): 2184s import cupy as cp 2184s 2184s if isinstance(val, CSMatrix): 2184s val = val.toarray() 2184s return cp.array(val) 2184s elif issubclass(typ, CupyCSRMatrix): 2184s > import cupy as cp 2184s E ModuleNotFoundError: No module named 'cupy' 2184s 2184s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:1016: ModuleNotFoundError 2184s ________ test_view_of_view[cupy_csr-spmatrix_bool_subset-slice_subset] _________ 2184s 2184s matrix_type = functools.partial(, typ=) 2184s subset_func = 2184s subset_func2 = 2184s 2184s def test_view_of_view(matrix_type, subset_func, subset_func2): 2184s > adata = gen_adata((30, 15), X_type=matrix_type) 2184s 2184s tests/test_views.py:531: 2184s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 2184s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:346: in gen_adata 2184s X = X_type(random_state.binomial(100, 0.005, (M, N)).astype(X_dtype)) 2184s /usr/lib/python3.13/functools.py:934: in wrapper 2184s return dispatch(args[0].__class__)(*args, **kw) 2184s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 2184s 2184s val = array([[0., 0., 0., 1., 0., 1., 0., 0., 0., 1., 0., 0., 1., 0., 0.], 2184s [0., 0., 0., 0., 0., 0., 0., 2., 1., 0., 1...0., 0., 1., 0., 1., 1., 0.], 2184s [0., 0., 2., 1., 3., 1., 1., 0., 0., 1., 1., 2., 0., 0., 0.]], 2184s dtype=float32) 2184s typ = 2184s 2184s @singledispatch 2184s def as_cupy(val, typ=None): 2184s """ 2184s Rough conversion function 2184s 2184s Will try to infer target type from input type if not specified. 2184s """ 2184s if typ is None: 2184s typ = resolve_cupy_type(val) 2184s 2184s if issubclass(typ, CupyArray): 2184s import cupy as cp 2184s 2184s if isinstance(val, CSMatrix): 2184s val = val.toarray() 2184s return cp.array(val) 2184s elif issubclass(typ, CupyCSRMatrix): 2184s > import cupy as cp 2184s E ModuleNotFoundError: No module named 'cupy' 2184s 2184s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:1016: ModuleNotFoundError 2184s ________ test_view_of_view[cupy_csr-spmatrix_bool_subset-single_subset] ________ 2184s 2184s matrix_type = functools.partial(, typ=) 2184s subset_func = 2184s subset_func2 = 2184s 2184s def test_view_of_view(matrix_type, subset_func, subset_func2): 2184s > adata = gen_adata((30, 15), X_type=matrix_type) 2184s 2184s tests/test_views.py:531: 2184s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 2184s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:346: in gen_adata 2184s X = X_type(random_state.binomial(100, 0.005, (M, N)).astype(X_dtype)) 2184s /usr/lib/python3.13/functools.py:934: in wrapper 2184s return dispatch(args[0].__class__)(*args, **kw) 2184s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 2184s 2184s val = array([[1., 0., 1., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 3., 0.], 2184s [0., 0., 0., 2., 1., 1., 0., 0., 1., 1., 0...0., 0., 0., 0., 0., 0., 0.], 2184s [1., 0., 1., 1., 0., 0., 1., 0., 0., 0., 1., 3., 1., 0., 0.]], 2184s dtype=float32) 2184s typ = 2184s 2184s @singledispatch 2184s def as_cupy(val, typ=None): 2184s """ 2184s Rough conversion function 2184s 2184s Will try to infer target type from input type if not specified. 2184s """ 2184s if typ is None: 2184s typ = resolve_cupy_type(val) 2184s 2184s if issubclass(typ, CupyArray): 2184s import cupy as cp 2184s 2184s if isinstance(val, CSMatrix): 2184s val = val.toarray() 2184s return cp.array(val) 2184s elif issubclass(typ, CupyCSRMatrix): 2184s > import cupy as cp 2184s E ModuleNotFoundError: No module named 'cupy' 2184s 2184s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:1016: ModuleNotFoundError 2184s ______ test_view_of_view[cupy_csr-spmatrix_bool_subset-array_int_subset] _______ 2184s 2184s matrix_type = functools.partial(, typ=) 2184s subset_func = 2184s subset_func2 = 2184s 2184s def test_view_of_view(matrix_type, subset_func, subset_func2): 2184s > adata = gen_adata((30, 15), X_type=matrix_type) 2184s 2184s tests/test_views.py:531: 2184s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 2184s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:346: in gen_adata 2184s X = X_type(random_state.binomial(100, 0.005, (M, N)).astype(X_dtype)) 2184s /usr/lib/python3.13/functools.py:934: in wrapper 2184s return dispatch(args[0].__class__)(*args, **kw) 2184s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 2184s 2184s val = array([[0., 0., 0., 1., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0.], 2184s [0., 0., 1., 0., 0., 0., 1., 0., 0., 0., 0...0., 0., 0., 1., 0., 0., 0.], 2184s [0., 0., 0., 0., 2., 0., 1., 1., 0., 0., 1., 1., 2., 0., 1.]], 2184s dtype=float32) 2184s typ = 2184s 2184s @singledispatch 2184s def as_cupy(val, typ=None): 2184s """ 2184s Rough conversion function 2184s 2184s Will try to infer target type from input type if not specified. 2184s """ 2184s if typ is None: 2184s typ = resolve_cupy_type(val) 2184s 2184s if issubclass(typ, CupyArray): 2184s import cupy as cp 2184s 2184s if isinstance(val, CSMatrix): 2184s val = val.toarray() 2184s return cp.array(val) 2184s elif issubclass(typ, CupyCSRMatrix): 2184s > import cupy as cp 2184s E ModuleNotFoundError: No module named 'cupy' 2184s 2184s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:1016: ModuleNotFoundError 2184s _______ test_view_of_view[cupy_csr-spmatrix_bool_subset-list_int_subset] _______ 2184s 2184s matrix_type = functools.partial(, typ=) 2184s subset_func = 2184s subset_func2 = 2184s 2184s def test_view_of_view(matrix_type, subset_func, subset_func2): 2184s > adata = gen_adata((30, 15), X_type=matrix_type) 2184s 2184s tests/test_views.py:531: 2184s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 2184s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:346: in gen_adata 2184s X = X_type(random_state.binomial(100, 0.005, (M, N)).astype(X_dtype)) 2184s /usr/lib/python3.13/functools.py:934: in wrapper 2184s return dispatch(args[0].__class__)(*args, **kw) 2184s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 2184s 2184s val = array([[0., 1., 0., 0., 2., 0., 0., 0., 0., 2., 0., 1., 0., 1., 1.], 2184s [0., 0., 0., 0., 0., 0., 0., 2., 1., 0., 1...0., 0., 0., 0., 0., 1., 1.], 2184s [0., 1., 0., 2., 0., 1., 1., 0., 1., 0., 0., 0., 0., 0., 0.]], 2184s dtype=float32) 2184s typ = 2184s 2184s @singledispatch 2184s def as_cupy(val, typ=None): 2184s """ 2184s Rough conversion function 2184s 2184s Will try to infer target type from input type if not specified. 2184s """ 2184s if typ is None: 2184s typ = resolve_cupy_type(val) 2184s 2184s if issubclass(typ, CupyArray): 2184s import cupy as cp 2184s 2184s if isinstance(val, CSMatrix): 2184s val = val.toarray() 2184s return cp.array(val) 2184s elif issubclass(typ, CupyCSRMatrix): 2184s > import cupy as cp 2184s E ModuleNotFoundError: No module named 'cupy' 2184s 2184s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:1016: ModuleNotFoundError 2184s ______ test_view_of_view[cupy_csr-spmatrix_bool_subset-array_bool_subset] ______ 2184s 2184s matrix_type = functools.partial(, typ=) 2184s subset_func = 2184s subset_func2 = 2184s 2184s def test_view_of_view(matrix_type, subset_func, subset_func2): 2184s > adata = gen_adata((30, 15), X_type=matrix_type) 2184s 2184s tests/test_views.py:531: 2184s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 2184s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:346: in gen_adata 2184s X = X_type(random_state.binomial(100, 0.005, (M, N)).astype(X_dtype)) 2184s /usr/lib/python3.13/functools.py:934: in wrapper 2184s return dispatch(args[0].__class__)(*args, **kw) 2184s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 2184s 2184s val = array([[0., 0., 3., 0., 2., 2., 1., 1., 0., 0., 1., 1., 0., 0., 1.], 2184s [1., 0., 1., 2., 0., 1., 0., 2., 0., 1., 0...0., 0., 0., 1., 1., 1., 0.], 2184s [0., 0., 0., 1., 1., 0., 2., 0., 0., 0., 1., 0., 1., 0., 0.]], 2184s dtype=float32) 2184s typ = 2184s 2184s @singledispatch 2184s def as_cupy(val, typ=None): 2184s """ 2184s Rough conversion function 2184s 2184s Will try to infer target type from input type if not specified. 2184s """ 2184s if typ is None: 2184s typ = resolve_cupy_type(val) 2184s 2184s if issubclass(typ, CupyArray): 2184s import cupy as cp 2184s 2184s if isinstance(val, CSMatrix): 2184s val = val.toarray() 2184s return cp.array(val) 2184s elif issubclass(typ, CupyCSRMatrix): 2184s > import cupy as cp 2184s E ModuleNotFoundError: No module named 'cupy' 2184s 2184s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:1016: ModuleNotFoundError 2184s ______ test_view_of_view[cupy_csr-spmatrix_bool_subset-list_bool_subset] _______ 2184s 2184s matrix_type = functools.partial(, typ=) 2184s subset_func = 2184s subset_func2 = 2184s 2184s def test_view_of_view(matrix_type, subset_func, subset_func2): 2184s > adata = gen_adata((30, 15), X_type=matrix_type) 2184s 2184s tests/test_views.py:531: 2184s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 2184s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:346: in gen_adata 2184s X = X_type(random_state.binomial(100, 0.005, (M, N)).astype(X_dtype)) 2184s /usr/lib/python3.13/functools.py:934: in wrapper 2184s return dispatch(args[0].__class__)(*args, **kw) 2184s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 2184s 2184s val = array([[0., 2., 0., 0., 0., 0., 2., 0., 1., 0., 0., 0., 3., 3., 0.], 2184s [0., 1., 0., 0., 0., 0., 0., 1., 0., 0., 1...0., 1., 0., 1., 2., 2., 1.], 2184s [0., 0., 2., 1., 1., 3., 0., 1., 1., 1., 0., 1., 0., 0., 1.]], 2184s dtype=float32) 2184s typ = 2184s 2184s @singledispatch 2184s def as_cupy(val, typ=None): 2184s """ 2184s Rough conversion function 2184s 2184s Will try to infer target type from input type if not specified. 2184s """ 2184s if typ is None: 2184s typ = resolve_cupy_type(val) 2184s 2184s if issubclass(typ, CupyArray): 2184s import cupy as cp 2184s 2184s if isinstance(val, CSMatrix): 2184s val = val.toarray() 2184s return cp.array(val) 2184s elif issubclass(typ, CupyCSRMatrix): 2184s > import cupy as cp 2184s E ModuleNotFoundError: No module named 'cupy' 2184s 2184s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:1016: ModuleNotFoundError 2184s _____ test_view_of_view[cupy_csr-spmatrix_bool_subset-matrix_bool_subset] ______ 2184s 2184s matrix_type = functools.partial(, typ=) 2184s subset_func = 2184s subset_func2 = 2184s 2184s def test_view_of_view(matrix_type, subset_func, subset_func2): 2184s > adata = gen_adata((30, 15), X_type=matrix_type) 2184s 2184s tests/test_views.py:531: 2184s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 2184s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:346: in gen_adata 2184s X = X_type(random_state.binomial(100, 0.005, (M, N)).astype(X_dtype)) 2184s /usr/lib/python3.13/functools.py:934: in wrapper 2184s return dispatch(args[0].__class__)(*args, **kw) 2184s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 2184s 2184s val = array([[1., 0., 0., 1., 1., 1., 0., 2., 0., 0., 0., 0., 1., 0., 0.], 2184s [0., 1., 1., 0., 3., 2., 1., 0., 0., 1., 1...1., 1., 0., 0., 1., 1., 0.], 2184s [0., 0., 0., 0., 0., 0., 0., 1., 0., 0., 0., 1., 1., 0., 0.]], 2184s dtype=float32) 2184s typ = 2184s 2184s @singledispatch 2184s def as_cupy(val, typ=None): 2184s """ 2184s Rough conversion function 2184s 2184s Will try to infer target type from input type if not specified. 2184s """ 2184s if typ is None: 2184s typ = resolve_cupy_type(val) 2184s 2184s if issubclass(typ, CupyArray): 2184s import cupy as cp 2184s 2184s if isinstance(val, CSMatrix): 2184s val = val.toarray() 2184s return cp.array(val) 2184s elif issubclass(typ, CupyCSRMatrix): 2184s > import cupy as cp 2184s E ModuleNotFoundError: No module named 'cupy' 2184s 2184s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:1016: ModuleNotFoundError 2184s ____ test_view_of_view[cupy_csr-spmatrix_bool_subset-spmatrix_bool_subset] _____ 2184s 2184s matrix_type = functools.partial(, typ=) 2184s subset_func = 2184s subset_func2 = 2184s 2184s def test_view_of_view(matrix_type, subset_func, subset_func2): 2184s > adata = gen_adata((30, 15), X_type=matrix_type) 2184s 2184s tests/test_views.py:531: 2184s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 2184s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:346: in gen_adata 2184s X = X_type(random_state.binomial(100, 0.005, (M, N)).astype(X_dtype)) 2184s /usr/lib/python3.13/functools.py:934: in wrapper 2184s return dispatch(args[0].__class__)(*args, **kw) 2184s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 2184s 2184s val = array([[0., 1., 0., 0., 1., 0., 0., 0., 1., 0., 1., 0., 0., 0., 1.], 2184s [0., 0., 1., 1., 0., 0., 1., 0., 0., 0., 1...0., 0., 1., 0., 0., 0., 0.], 2184s [1., 1., 0., 0., 2., 0., 0., 0., 1., 0., 1., 0., 2., 1., 1.]], 2184s dtype=float32) 2184s typ = 2184s 2184s @singledispatch 2184s def as_cupy(val, typ=None): 2184s """ 2184s Rough conversion function 2184s 2184s Will try to infer target type from input type if not specified. 2184s """ 2184s if typ is None: 2184s typ = resolve_cupy_type(val) 2184s 2184s if issubclass(typ, CupyArray): 2184s import cupy as cp 2184s 2184s if isinstance(val, CSMatrix): 2184s val = val.toarray() 2184s return cp.array(val) 2184s elif issubclass(typ, CupyCSRMatrix): 2184s > import cupy as cp 2184s E ModuleNotFoundError: No module named 'cupy' 2184s 2184s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:1016: ModuleNotFoundError 2184s _____ test_view_of_view[cupy_csr-spmatrix_bool_subset-sparray_bool_subset] _____ 2184s 2184s matrix_type = functools.partial(, typ=) 2184s subset_func = 2184s subset_func2 = 2184s 2184s def test_view_of_view(matrix_type, subset_func, subset_func2): 2184s > adata = gen_adata((30, 15), X_type=matrix_type) 2184s 2184s tests/test_views.py:531: 2184s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 2184s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:346: in gen_adata 2184s X = X_type(random_state.binomial(100, 0.005, (M, N)).astype(X_dtype)) 2184s /usr/lib/python3.13/functools.py:934: in wrapper 2184s return dispatch(args[0].__class__)(*args, **kw) 2184s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 2184s 2184s val = array([[2., 0., 0., 0., 0., 2., 1., 1., 2., 0., 1., 1., 2., 0., 1.], 2184s [1., 0., 1., 1., 2., 0., 1., 2., 0., 0., 0...1., 2., 1., 0., 0., 1., 0.], 2184s [2., 0., 0., 0., 0., 0., 1., 0., 0., 0., 0., 1., 0., 0., 1.]], 2184s dtype=float32) 2184s typ = 2184s 2184s @singledispatch 2184s def as_cupy(val, typ=None): 2184s """ 2184s Rough conversion function 2184s 2184s Will try to infer target type from input type if not specified. 2184s """ 2184s if typ is None: 2184s typ = resolve_cupy_type(val) 2184s 2184s if issubclass(typ, CupyArray): 2184s import cupy as cp 2184s 2184s if isinstance(val, CSMatrix): 2184s val = val.toarray() 2184s return cp.array(val) 2184s elif issubclass(typ, CupyCSRMatrix): 2184s > import cupy as cp 2184s E ModuleNotFoundError: No module named 'cupy' 2184s 2184s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:1016: ModuleNotFoundError 2184s _________ test_view_of_view[cupy_csr-sparray_bool_subset-array_subset] _________ 2184s 2184s matrix_type = functools.partial(, typ=) 2184s subset_func = 2184s subset_func2 = 2184s 2184s def test_view_of_view(matrix_type, subset_func, subset_func2): 2184s > adata = gen_adata((30, 15), X_type=matrix_type) 2184s 2184s tests/test_views.py:531: 2184s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 2184s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:346: in gen_adata 2184s X = X_type(random_state.binomial(100, 0.005, (M, N)).astype(X_dtype)) 2184s /usr/lib/python3.13/functools.py:934: in wrapper 2184s return dispatch(args[0].__class__)(*args, **kw) 2184s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 2184s 2184s val = array([[0., 1., 0., 0., 0., 0., 0., 1., 1., 1., 2., 1., 0., 2., 0.], 2184s [0., 0., 0., 0., 0., 1., 3., 2., 1., 0., 1...0., 0., 0., 1., 0., 0., 1.], 2184s [0., 0., 1., 1., 1., 0., 0., 1., 0., 0., 0., 0., 1., 0., 0.]], 2184s dtype=float32) 2184s typ = 2184s 2184s @singledispatch 2184s def as_cupy(val, typ=None): 2184s """ 2184s Rough conversion function 2184s 2184s Will try to infer target type from input type if not specified. 2184s """ 2184s if typ is None: 2184s typ = resolve_cupy_type(val) 2184s 2184s if issubclass(typ, CupyArray): 2184s import cupy as cp 2184s 2184s if isinstance(val, CSMatrix): 2184s val = val.toarray() 2184s return cp.array(val) 2184s elif issubclass(typ, CupyCSRMatrix): 2184s > import cupy as cp 2184s E ModuleNotFoundError: No module named 'cupy' 2184s 2184s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:1016: ModuleNotFoundError 2184s _________ test_view_of_view[cupy_csr-sparray_bool_subset-slice_subset] _________ 2184s 2184s matrix_type = functools.partial(, typ=) 2184s subset_func = 2184s subset_func2 = 2184s 2184s def test_view_of_view(matrix_type, subset_func, subset_func2): 2184s > adata = gen_adata((30, 15), X_type=matrix_type) 2184s 2184s tests/test_views.py:531: 2184s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 2184s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:346: in gen_adata 2184s X = X_type(random_state.binomial(100, 0.005, (M, N)).astype(X_dtype)) 2184s /usr/lib/python3.13/functools.py:934: in wrapper 2184s return dispatch(args[0].__class__)(*args, **kw) 2184s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 2184s 2184s val = array([[0., 0., 0., 0., 0., 0., 2., 0., 0., 0., 0., 0., 0., 0., 0.], 2184s [0., 2., 0., 0., 1., 0., 0., 1., 0., 0., 0...1., 1., 1., 0., 0., 0., 0.], 2184s [0., 0., 0., 1., 1., 0., 1., 0., 1., 1., 0., 0., 2., 1., 0.]], 2184s dtype=float32) 2184s typ = 2184s 2184s @singledispatch 2184s def as_cupy(val, typ=None): 2184s """ 2184s Rough conversion function 2184s 2184s Will try to infer target type from input type if not specified. 2184s """ 2184s if typ is None: 2184s typ = resolve_cupy_type(val) 2184s 2184s if issubclass(typ, CupyArray): 2184s import cupy as cp 2184s 2184s if isinstance(val, CSMatrix): 2184s val = val.toarray() 2184s return cp.array(val) 2184s elif issubclass(typ, CupyCSRMatrix): 2184s > import cupy as cp 2184s E ModuleNotFoundError: No module named 'cupy' 2184s 2184s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:1016: ModuleNotFoundError 2184s ________ test_view_of_view[cupy_csr-sparray_bool_subset-single_subset] _________ 2184s 2184s matrix_type = functools.partial(, typ=) 2184s subset_func = 2184s subset_func2 = 2184s 2184s def test_view_of_view(matrix_type, subset_func, subset_func2): 2184s > adata = gen_adata((30, 15), X_type=matrix_type) 2184s 2184s tests/test_views.py:531: 2184s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 2184s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:346: in gen_adata 2184s X = X_type(random_state.binomial(100, 0.005, (M, N)).astype(X_dtype)) 2184s /usr/lib/python3.13/functools.py:934: in wrapper 2184s return dispatch(args[0].__class__)(*args, **kw) 2184s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 2184s 2184s val = array([[1., 1., 1., 1., 1., 0., 0., 0., 1., 1., 1., 0., 1., 0., 0.], 2184s [0., 1., 0., 0., 0., 0., 1., 0., 0., 0., 0...0., 0., 1., 1., 0., 0., 0.], 2184s [2., 0., 0., 0., 0., 0., 2., 0., 1., 0., 0., 1., 0., 0., 0.]], 2184s dtype=float32) 2184s typ = 2184s 2184s @singledispatch 2184s def as_cupy(val, typ=None): 2184s """ 2184s Rough conversion function 2184s 2184s Will try to infer target type from input type if not specified. 2184s """ 2184s if typ is None: 2184s typ = resolve_cupy_type(val) 2184s 2184s if issubclass(typ, CupyArray): 2184s import cupy as cp 2184s 2184s if isinstance(val, CSMatrix): 2184s val = val.toarray() 2184s return cp.array(val) 2184s elif issubclass(typ, CupyCSRMatrix): 2184s > import cupy as cp 2184s E ModuleNotFoundError: No module named 'cupy' 2184s 2184s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:1016: ModuleNotFoundError 2184s _______ test_view_of_view[cupy_csr-sparray_bool_subset-array_int_subset] _______ 2184s 2184s matrix_type = functools.partial(, typ=) 2184s subset_func = 2184s subset_func2 = 2184s 2184s def test_view_of_view(matrix_type, subset_func, subset_func2): 2184s > adata = gen_adata((30, 15), X_type=matrix_type) 2184s 2184s tests/test_views.py:531: 2184s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 2184s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:346: in gen_adata 2184s X = X_type(random_state.binomial(100, 0.005, (M, N)).astype(X_dtype)) 2184s /usr/lib/python3.13/functools.py:934: in wrapper 2184s return dispatch(args[0].__class__)(*args, **kw) 2184s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 2184s 2184s val = array([[0., 0., 1., 3., 1., 0., 0., 0., 0., 1., 0., 0., 0., 1., 0.], 2184s [0., 0., 0., 2., 0., 0., 0., 1., 3., 1., 0...0., 0., 1., 0., 1., 1., 1.], 2184s [0., 0., 1., 0., 0., 2., 0., 0., 2., 0., 1., 0., 0., 0., 0.]], 2184s dtype=float32) 2184s typ = 2184s 2184s @singledispatch 2184s def as_cupy(val, typ=None): 2184s """ 2184s Rough conversion function 2184s 2184s Will try to infer target type from input type if not specified. 2184s """ 2184s if typ is None: 2184s typ = resolve_cupy_type(val) 2184s 2184s if issubclass(typ, CupyArray): 2184s import cupy as cp 2184s 2184s if isinstance(val, CSMatrix): 2184s val = val.toarray() 2184s return cp.array(val) 2184s elif issubclass(typ, CupyCSRMatrix): 2184s > import cupy as cp 2184s E ModuleNotFoundError: No module named 'cupy' 2184s 2184s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:1016: ModuleNotFoundError 2184s _______ test_view_of_view[cupy_csr-sparray_bool_subset-list_int_subset] ________ 2184s 2184s matrix_type = functools.partial(, typ=) 2184s subset_func = 2184s subset_func2 = 2184s 2184s def test_view_of_view(matrix_type, subset_func, subset_func2): 2184s > adata = gen_adata((30, 15), X_type=matrix_type) 2184s 2184s tests/test_views.py:531: 2184s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 2184s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:346: in gen_adata 2184s X = X_type(random_state.binomial(100, 0.005, (M, N)).astype(X_dtype)) 2184s /usr/lib/python3.13/functools.py:934: in wrapper 2184s return dispatch(args[0].__class__)(*args, **kw) 2184s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 2184s 2184s val = array([[0., 0., 0., 1., 0., 1., 0., 0., 0., 0., 2., 0., 1., 0., 0.], 2184s [0., 2., 0., 0., 0., 0., 0., 3., 0., 1., 0...1., 0., 0., 1., 1., 0., 0.], 2184s [0., 3., 0., 1., 1., 1., 1., 2., 0., 0., 0., 0., 1., 0., 1.]], 2184s dtype=float32) 2184s typ = 2184s 2184s @singledispatch 2184s def as_cupy(val, typ=None): 2184s """ 2184s Rough conversion function 2184s 2184s Will try to infer target type from input type if not specified. 2184s """ 2184s if typ is None: 2184s typ = resolve_cupy_type(val) 2184s 2184s if issubclass(typ, CupyArray): 2184s import cupy as cp 2184s 2184s if isinstance(val, CSMatrix): 2184s val = val.toarray() 2184s return cp.array(val) 2184s elif issubclass(typ, CupyCSRMatrix): 2184s > import cupy as cp 2184s E ModuleNotFoundError: No module named 'cupy' 2184s 2184s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:1016: ModuleNotFoundError 2184s ______ test_view_of_view[cupy_csr-sparray_bool_subset-array_bool_subset] _______ 2184s 2184s matrix_type = functools.partial(, typ=) 2184s subset_func = 2184s subset_func2 = 2184s 2184s def test_view_of_view(matrix_type, subset_func, subset_func2): 2184s > adata = gen_adata((30, 15), X_type=matrix_type) 2184s 2184s tests/test_views.py:531: 2184s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 2184s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:346: in gen_adata 2184s X = X_type(random_state.binomial(100, 0.005, (M, N)).astype(X_dtype)) 2184s /usr/lib/python3.13/functools.py:934: in wrapper 2184s return dispatch(args[0].__class__)(*args, **kw) 2184s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 2184s 2184s val = array([[0., 1., 1., 0., 3., 0., 1., 0., 0., 0., 1., 0., 1., 0., 0.], 2184s [0., 1., 0., 0., 0., 0., 0., 0., 0., 0., 0...3., 0., 0., 2., 1., 1., 1.], 2184s [0., 0., 0., 0., 0., 0., 1., 0., 1., 0., 0., 0., 1., 2., 1.]], 2184s dtype=float32) 2184s typ = 2184s 2184s @singledispatch 2184s def as_cupy(val, typ=None): 2184s """ 2184s Rough conversion function 2184s 2184s Will try to infer target type from input type if not specified. 2184s """ 2184s if typ is None: 2184s typ = resolve_cupy_type(val) 2184s 2184s if issubclass(typ, CupyArray): 2184s import cupy as cp 2184s 2184s if isinstance(val, CSMatrix): 2184s val = val.toarray() 2184s return cp.array(val) 2184s elif issubclass(typ, CupyCSRMatrix): 2184s > import cupy as cp 2184s E ModuleNotFoundError: No module named 'cupy' 2184s 2184s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:1016: ModuleNotFoundError 2184s _______ test_view_of_view[cupy_csr-sparray_bool_subset-list_bool_subset] _______ 2184s 2184s matrix_type = functools.partial(, typ=) 2184s subset_func = 2184s subset_func2 = 2184s 2184s def test_view_of_view(matrix_type, subset_func, subset_func2): 2184s > adata = gen_adata((30, 15), X_type=matrix_type) 2184s 2184s tests/test_views.py:531: 2184s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 2184s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:346: in gen_adata 2184s X = X_type(random_state.binomial(100, 0.005, (M, N)).astype(X_dtype)) 2184s /usr/lib/python3.13/functools.py:934: in wrapper 2184s return dispatch(args[0].__class__)(*args, **kw) 2184s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 2184s 2184s val = array([[1., 0., 0., 0., 1., 1., 1., 0., 0., 0., 0., 0., 0., 0., 0.], 2184s [1., 0., 1., 1., 0., 0., 0., 3., 0., 0., 0...0., 0., 0., 1., 0., 0., 1.], 2184s [0., 1., 0., 1., 0., 0., 0., 1., 0., 0., 1., 0., 1., 0., 1.]], 2184s dtype=float32) 2184s typ = 2184s 2184s @singledispatch 2184s def as_cupy(val, typ=None): 2184s """ 2184s Rough conversion function 2184s 2184s Will try to infer target type from input type if not specified. 2184s """ 2184s if typ is None: 2184s typ = resolve_cupy_type(val) 2184s 2184s if issubclass(typ, CupyArray): 2184s import cupy as cp 2184s 2184s if isinstance(val, CSMatrix): 2184s val = val.toarray() 2184s return cp.array(val) 2184s elif issubclass(typ, CupyCSRMatrix): 2184s > import cupy as cp 2184s E ModuleNotFoundError: No module named 'cupy' 2184s 2184s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:1016: ModuleNotFoundError 2184s ______ test_view_of_view[cupy_csr-sparray_bool_subset-matrix_bool_subset] ______ 2184s 2184s matrix_type = functools.partial(, typ=) 2184s subset_func = 2184s subset_func2 = 2184s 2184s def test_view_of_view(matrix_type, subset_func, subset_func2): 2184s > adata = gen_adata((30, 15), X_type=matrix_type) 2184s 2184s tests/test_views.py:531: 2184s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 2184s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:346: in gen_adata 2184s X = X_type(random_state.binomial(100, 0.005, (M, N)).astype(X_dtype)) 2184s /usr/lib/python3.13/functools.py:934: in wrapper 2184s return dispatch(args[0].__class__)(*args, **kw) 2184s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 2184s 2184s val = array([[2., 0., 1., 0., 1., 0., 1., 1., 1., 0., 2., 2., 0., 1., 1.], 2184s [0., 0., 1., 0., 0., 0., 1., 1., 1., 0., 0...0., 0., 1., 1., 0., 1., 0.], 2184s [1., 1., 0., 0., 1., 0., 1., 0., 0., 0., 0., 0., 0., 1., 1.]], 2184s dtype=float32) 2184s typ = 2184s 2184s @singledispatch 2184s def as_cupy(val, typ=None): 2184s """ 2184s Rough conversion function 2184s 2184s Will try to infer target type from input type if not specified. 2184s """ 2184s if typ is None: 2184s typ = resolve_cupy_type(val) 2184s 2184s if issubclass(typ, CupyArray): 2184s import cupy as cp 2184s 2184s if isinstance(val, CSMatrix): 2184s val = val.toarray() 2184s return cp.array(val) 2184s elif issubclass(typ, CupyCSRMatrix): 2184s > import cupy as cp 2184s E ModuleNotFoundError: No module named 'cupy' 2184s 2184s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:1016: ModuleNotFoundError 2184s _____ test_view_of_view[cupy_csr-sparray_bool_subset-spmatrix_bool_subset] _____ 2184s 2184s matrix_type = functools.partial(, typ=) 2184s subset_func = 2184s subset_func2 = 2184s 2184s def test_view_of_view(matrix_type, subset_func, subset_func2): 2184s > adata = gen_adata((30, 15), X_type=matrix_type) 2184s 2184s tests/test_views.py:531: 2184s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 2184s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:346: in gen_adata 2184s X = X_type(random_state.binomial(100, 0.005, (M, N)).astype(X_dtype)) 2184s /usr/lib/python3.13/functools.py:934: in wrapper 2184s return dispatch(args[0].__class__)(*args, **kw) 2184s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 2184s 2184s val = array([[0., 0., 0., 1., 1., 0., 0., 1., 0., 0., 3., 1., 2., 0., 1.], 2184s [0., 0., 0., 0., 1., 1., 0., 0., 0., 2., 2...0., 0., 0., 2., 1., 1., 0.], 2184s [0., 0., 1., 0., 0., 0., 1., 0., 1., 0., 0., 0., 0., 0., 1.]], 2184s dtype=float32) 2184s typ = 2184s 2184s @singledispatch 2184s def as_cupy(val, typ=None): 2184s """ 2184s Rough conversion function 2184s 2184s Will try to infer target type from input type if not specified. 2184s """ 2184s if typ is None: 2184s typ = resolve_cupy_type(val) 2184s 2184s if issubclass(typ, CupyArray): 2184s import cupy as cp 2184s 2184s if isinstance(val, CSMatrix): 2184s val = val.toarray() 2184s return cp.array(val) 2184s elif issubclass(typ, CupyCSRMatrix): 2184s > import cupy as cp 2184s E ModuleNotFoundError: No module named 'cupy' 2184s 2184s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:1016: ModuleNotFoundError 2184s _____ test_view_of_view[cupy_csr-sparray_bool_subset-sparray_bool_subset] ______ 2184s 2184s matrix_type = functools.partial(, typ=) 2184s subset_func = 2184s subset_func2 = 2184s 2184s def test_view_of_view(matrix_type, subset_func, subset_func2): 2184s > adata = gen_adata((30, 15), X_type=matrix_type) 2184s 2184s tests/test_views.py:531: 2184s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 2184s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:346: in gen_adata 2184s X = X_type(random_state.binomial(100, 0.005, (M, N)).astype(X_dtype)) 2184s /usr/lib/python3.13/functools.py:934: in wrapper 2184s return dispatch(args[0].__class__)(*args, **kw) 2184s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 2184s 2184s val = array([[0., 0., 0., 0., 0., 2., 0., 0., 1., 0., 1., 0., 2., 0., 0.], 2184s [2., 0., 0., 0., 0., 1., 0., 0., 0., 0., 1...0., 0., 0., 0., 0., 0., 1.], 2184s [0., 3., 0., 1., 0., 1., 0., 0., 0., 0., 1., 0., 0., 1., 0.]], 2184s dtype=float32) 2184s typ = 2184s 2184s @singledispatch 2184s def as_cupy(val, typ=None): 2184s """ 2184s Rough conversion function 2184s 2184s Will try to infer target type from input type if not specified. 2184s """ 2184s if typ is None: 2184s typ = resolve_cupy_type(val) 2184s 2184s if issubclass(typ, CupyArray): 2184s import cupy as cp 2184s 2184s if isinstance(val, CSMatrix): 2184s val = val.toarray() 2184s return cp.array(val) 2184s elif issubclass(typ, CupyCSRMatrix): 2184s > import cupy as cp 2184s E ModuleNotFoundError: No module named 'cupy' 2184s 2184s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:1016: ModuleNotFoundError 2184s ____________ test_view_of_view[cupy_csc-array_subset-array_subset] _____________ 2184s 2184s matrix_type = functools.partial(, typ=) 2184s subset_func = 2184s subset_func2 = 2184s 2184s def test_view_of_view(matrix_type, subset_func, subset_func2): 2184s > adata = gen_adata((30, 15), X_type=matrix_type) 2184s 2184s tests/test_views.py:531: 2184s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 2184s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:346: in gen_adata 2184s X = X_type(random_state.binomial(100, 0.005, (M, N)).astype(X_dtype)) 2184s /usr/lib/python3.13/functools.py:934: in wrapper 2184s return dispatch(args[0].__class__)(*args, **kw) 2184s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 2184s 2184s val = array([[2., 0., 2., 0., 0., 1., 0., 0., 1., 0., 0., 1., 0., 0., 0.], 2184s [0., 0., 1., 0., 1., 0., 0., 1., 1., 0., 0...1., 3., 0., 1., 0., 0., 0.], 2184s [0., 0., 0., 0., 2., 2., 0., 0., 2., 0., 0., 0., 1., 0., 0.]], 2184s dtype=float32) 2184s typ = 2184s 2184s @singledispatch 2184s def as_cupy(val, typ=None): 2184s """ 2184s Rough conversion function 2184s 2184s Will try to infer target type from input type if not specified. 2184s """ 2184s if typ is None: 2184s typ = resolve_cupy_type(val) 2184s 2184s if issubclass(typ, CupyArray): 2184s import cupy as cp 2184s 2184s if isinstance(val, CSMatrix): 2184s val = val.toarray() 2184s return cp.array(val) 2184s elif issubclass(typ, CupyCSRMatrix): 2184s import cupy as cp 2184s import cupyx.scipy.sparse as cpsparse 2184s 2184s if isinstance(val, np.ndarray): 2184s return cpsparse.csr_matrix(cp.array(val)) 2184s else: 2184s return cpsparse.csr_matrix(val) 2184s elif issubclass(typ, CupyCSCMatrix): 2184s > import cupy as cp 2184s E ModuleNotFoundError: No module named 'cupy' 2184s 2184s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:1024: ModuleNotFoundError 2184s ____________ test_view_of_view[cupy_csc-array_subset-slice_subset] _____________ 2184s 2184s matrix_type = functools.partial(, typ=) 2184s subset_func = 2184s subset_func2 = 2184s 2184s def test_view_of_view(matrix_type, subset_func, subset_func2): 2184s > adata = gen_adata((30, 15), X_type=matrix_type) 2184s 2184s tests/test_views.py:531: 2184s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 2184s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:346: in gen_adata 2184s X = X_type(random_state.binomial(100, 0.005, (M, N)).astype(X_dtype)) 2184s /usr/lib/python3.13/functools.py:934: in wrapper 2184s return dispatch(args[0].__class__)(*args, **kw) 2184s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 2184s 2184s val = array([[1., 0., 1., 0., 0., 1., 0., 0., 1., 1., 1., 0., 0., 2., 0.], 2184s [1., 1., 1., 2., 0., 0., 0., 0., 1., 0., 0...1., 0., 1., 1., 0., 0., 1.], 2184s [0., 0., 0., 0., 0., 0., 0., 2., 1., 1., 1., 0., 0., 1., 0.]], 2184s dtype=float32) 2184s typ = 2184s 2184s @singledispatch 2184s def as_cupy(val, typ=None): 2184s """ 2184s Rough conversion function 2184s 2184s Will try to infer target type from input type if not specified. 2184s """ 2184s if typ is None: 2184s typ = resolve_cupy_type(val) 2184s 2184s if issubclass(typ, CupyArray): 2184s import cupy as cp 2184s 2184s if isinstance(val, CSMatrix): 2184s val = val.toarray() 2184s return cp.array(val) 2184s elif issubclass(typ, CupyCSRMatrix): 2184s import cupy as cp 2184s import cupyx.scipy.sparse as cpsparse 2184s 2184s if isinstance(val, np.ndarray): 2184s return cpsparse.csr_matrix(cp.array(val)) 2184s else: 2184s return cpsparse.csr_matrix(val) 2184s elif issubclass(typ, CupyCSCMatrix): 2184s > import cupy as cp 2184s E ModuleNotFoundError: No module named 'cupy' 2184s 2184s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:1024: ModuleNotFoundError 2184s ____________ test_view_of_view[cupy_csc-array_subset-single_subset] ____________ 2184s 2184s matrix_type = functools.partial(, typ=) 2184s subset_func = 2184s subset_func2 = 2184s 2184s def test_view_of_view(matrix_type, subset_func, subset_func2): 2184s > adata = gen_adata((30, 15), X_type=matrix_type) 2184s 2184s tests/test_views.py:531: 2184s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 2184s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:346: in gen_adata 2184s X = X_type(random_state.binomial(100, 0.005, (M, N)).astype(X_dtype)) 2184s /usr/lib/python3.13/functools.py:934: in wrapper 2184s return dispatch(args[0].__class__)(*args, **kw) 2184s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 2184s 2184s val = array([[0., 0., 3., 0., 0., 0., 1., 1., 1., 0., 0., 0., 1., 1., 1.], 2184s [0., 0., 0., 0., 0., 0., 0., 1., 1., 0., 0...0., 0., 1., 1., 0., 1., 0.], 2184s [0., 1., 0., 0., 2., 0., 0., 0., 1., 2., 2., 0., 0., 2., 0.]], 2184s dtype=float32) 2184s typ = 2184s 2184s @singledispatch 2184s def as_cupy(val, typ=None): 2184s """ 2184s Rough conversion function 2184s 2184s Will try to infer target type from input type if not specified. 2184s """ 2184s if typ is None: 2184s typ = resolve_cupy_type(val) 2184s 2184s if issubclass(typ, CupyArray): 2184s import cupy as cp 2184s 2184s if isinstance(val, CSMatrix): 2184s val = val.toarray() 2184s return cp.array(val) 2184s elif issubclass(typ, CupyCSRMatrix): 2184s import cupy as cp 2184s import cupyx.scipy.sparse as cpsparse 2184s 2184s if isinstance(val, np.ndarray): 2184s return cpsparse.csr_matrix(cp.array(val)) 2184s else: 2184s return cpsparse.csr_matrix(val) 2184s elif issubclass(typ, CupyCSCMatrix): 2184s > import cupy as cp 2184s E ModuleNotFoundError: No module named 'cupy' 2184s 2184s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:1024: ModuleNotFoundError 2184s __________ test_view_of_view[cupy_csc-array_subset-array_int_subset] ___________ 2184s 2184s matrix_type = functools.partial(, typ=) 2184s subset_func = 2184s subset_func2 = 2184s 2184s def test_view_of_view(matrix_type, subset_func, subset_func2): 2184s > adata = gen_adata((30, 15), X_type=matrix_type) 2184s 2184s tests/test_views.py:531: 2184s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 2184s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:346: in gen_adata 2184s X = X_type(random_state.binomial(100, 0.005, (M, N)).astype(X_dtype)) 2184s /usr/lib/python3.13/functools.py:934: in wrapper 2184s return dispatch(args[0].__class__)(*args, **kw) 2184s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 2184s 2184s val = array([[0., 0., 0., 0., 0., 1., 0., 1., 0., 1., 0., 2., 0., 2., 2.], 2184s [1., 0., 0., 0., 2., 0., 0., 0., 0., 0., 0...0., 0., 1., 2., 0., 0., 1.], 2184s [0., 0., 1., 0., 1., 0., 0., 0., 0., 1., 0., 1., 0., 1., 0.]], 2184s dtype=float32) 2184s typ = 2184s 2184s @singledispatch 2184s def as_cupy(val, typ=None): 2184s """ 2184s Rough conversion function 2184s 2184s Will try to infer target type from input type if not specified. 2184s """ 2184s if typ is None: 2184s typ = resolve_cupy_type(val) 2184s 2184s if issubclass(typ, CupyArray): 2184s import cupy as cp 2184s 2184s if isinstance(val, CSMatrix): 2184s val = val.toarray() 2184s return cp.array(val) 2184s elif issubclass(typ, CupyCSRMatrix): 2184s import cupy as cp 2184s import cupyx.scipy.sparse as cpsparse 2184s 2184s if isinstance(val, np.ndarray): 2184s return cpsparse.csr_matrix(cp.array(val)) 2184s else: 2184s return cpsparse.csr_matrix(val) 2184s elif issubclass(typ, CupyCSCMatrix): 2184s > import cupy as cp 2184s E ModuleNotFoundError: No module named 'cupy' 2184s 2184s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:1024: ModuleNotFoundError 2184s ___________ test_view_of_view[cupy_csc-array_subset-list_int_subset] ___________ 2184s 2184s matrix_type = functools.partial(, typ=) 2184s subset_func = 2184s subset_func2 = 2184s 2184s def test_view_of_view(matrix_type, subset_func, subset_func2): 2184s > adata = gen_adata((30, 15), X_type=matrix_type) 2184s 2184s tests/test_views.py:531: 2184s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 2184s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:346: in gen_adata 2184s X = X_type(random_state.binomial(100, 0.005, (M, N)).astype(X_dtype)) 2184s /usr/lib/python3.13/functools.py:934: in wrapper 2184s return dispatch(args[0].__class__)(*args, **kw) 2184s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 2184s 2184s val = array([[0., 2., 1., 0., 1., 0., 2., 0., 0., 1., 0., 0., 3., 1., 0.], 2184s [0., 0., 0., 0., 1., 1., 0., 0., 0., 0., 0...0., 0., 2., 2., 1., 0., 1.], 2184s [0., 0., 0., 0., 0., 1., 1., 1., 0., 0., 1., 0., 1., 0., 0.]], 2184s dtype=float32) 2184s typ = 2184s 2184s @singledispatch 2184s def as_cupy(val, typ=None): 2184s """ 2184s Rough conversion function 2184s 2184s Will try to infer target type from input type if not specified. 2184s """ 2184s if typ is None: 2184s typ = resolve_cupy_type(val) 2184s 2184s if issubclass(typ, CupyArray): 2184s import cupy as cp 2184s 2184s if isinstance(val, CSMatrix): 2184s val = val.toarray() 2184s return cp.array(val) 2184s elif issubclass(typ, CupyCSRMatrix): 2184s import cupy as cp 2184s import cupyx.scipy.sparse as cpsparse 2184s 2184s if isinstance(val, np.ndarray): 2184s return cpsparse.csr_matrix(cp.array(val)) 2184s else: 2184s return cpsparse.csr_matrix(val) 2184s elif issubclass(typ, CupyCSCMatrix): 2184s > import cupy as cp 2184s E ModuleNotFoundError: No module named 'cupy' 2184s 2184s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:1024: ModuleNotFoundError 2184s __________ test_view_of_view[cupy_csc-array_subset-array_bool_subset] __________ 2184s 2184s matrix_type = functools.partial(, typ=) 2184s subset_func = 2184s subset_func2 = 2184s 2184s def test_view_of_view(matrix_type, subset_func, subset_func2): 2184s > adata = gen_adata((30, 15), X_type=matrix_type) 2184s 2184s tests/test_views.py:531: 2184s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 2184s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:346: in gen_adata 2184s X = X_type(random_state.binomial(100, 0.005, (M, N)).astype(X_dtype)) 2184s /usr/lib/python3.13/functools.py:934: in wrapper 2184s return dispatch(args[0].__class__)(*args, **kw) 2184s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 2184s 2184s val = array([[1., 0., 0., 0., 0., 2., 2., 2., 0., 0., 1., 3., 0., 2., 0.], 2184s [1., 0., 1., 0., 0., 2., 0., 1., 0., 3., 1...0., 1., 1., 0., 1., 1., 0.], 2184s [0., 0., 1., 0., 0., 0., 1., 0., 0., 1., 1., 0., 1., 1., 0.]], 2184s dtype=float32) 2184s typ = 2184s 2184s @singledispatch 2184s def as_cupy(val, typ=None): 2184s """ 2184s Rough conversion function 2184s 2184s Will try to infer target type from input type if not specified. 2184s """ 2184s if typ is None: 2184s typ = resolve_cupy_type(val) 2184s 2184s if issubclass(typ, CupyArray): 2184s import cupy as cp 2184s 2184s if isinstance(val, CSMatrix): 2184s val = val.toarray() 2184s return cp.array(val) 2184s elif issubclass(typ, CupyCSRMatrix): 2184s import cupy as cp 2184s import cupyx.scipy.sparse as cpsparse 2184s 2184s if isinstance(val, np.ndarray): 2184s return cpsparse.csr_matrix(cp.array(val)) 2184s else: 2184s return cpsparse.csr_matrix(val) 2184s elif issubclass(typ, CupyCSCMatrix): 2184s > import cupy as cp 2184s E ModuleNotFoundError: No module named 'cupy' 2184s 2184s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:1024: ModuleNotFoundError 2184s __________ test_view_of_view[cupy_csc-array_subset-list_bool_subset] ___________ 2184s 2184s matrix_type = functools.partial(, typ=) 2184s subset_func = 2184s subset_func2 = 2184s 2184s def test_view_of_view(matrix_type, subset_func, subset_func2): 2184s > adata = gen_adata((30, 15), X_type=matrix_type) 2184s 2184s tests/test_views.py:531: 2184s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 2184s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:346: in gen_adata 2184s X = X_type(random_state.binomial(100, 0.005, (M, N)).astype(X_dtype)) 2184s /usr/lib/python3.13/functools.py:934: in wrapper 2184s return dispatch(args[0].__class__)(*args, **kw) 2184s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 2184s 2184s val = array([[0., 2., 0., 0., 0., 0., 0., 0., 0., 2., 1., 0., 1., 0., 0.], 2184s [0., 2., 1., 0., 2., 0., 1., 0., 0., 0., 0...2., 1., 0., 0., 1., 0., 1.], 2184s [0., 0., 0., 0., 0., 0., 1., 0., 0., 0., 0., 0., 0., 0., 0.]], 2184s dtype=float32) 2184s typ = 2184s 2184s @singledispatch 2184s def as_cupy(val, typ=None): 2184s """ 2184s Rough conversion function 2184s 2184s Will try to infer target type from input type if not specified. 2184s """ 2184s if typ is None: 2184s typ = resolve_cupy_type(val) 2184s 2184s if issubclass(typ, CupyArray): 2184s import cupy as cp 2184s 2184s if isinstance(val, CSMatrix): 2184s val = val.toarray() 2184s return cp.array(val) 2184s elif issubclass(typ, CupyCSRMatrix): 2184s import cupy as cp 2184s import cupyx.scipy.sparse as cpsparse 2184s 2184s if isinstance(val, np.ndarray): 2184s return cpsparse.csr_matrix(cp.array(val)) 2184s else: 2184s return cpsparse.csr_matrix(val) 2184s elif issubclass(typ, CupyCSCMatrix): 2184s > import cupy as cp 2184s E ModuleNotFoundError: No module named 'cupy' 2184s 2184s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:1024: ModuleNotFoundError 2184s _________ test_view_of_view[cupy_csc-array_subset-matrix_bool_subset] __________ 2184s 2184s matrix_type = functools.partial(, typ=) 2184s subset_func = 2184s subset_func2 = 2184s 2184s def test_view_of_view(matrix_type, subset_func, subset_func2): 2184s > adata = gen_adata((30, 15), X_type=matrix_type) 2184s 2184s tests/test_views.py:531: 2184s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 2184s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:346: in gen_adata 2184s X = X_type(random_state.binomial(100, 0.005, (M, N)).astype(X_dtype)) 2184s /usr/lib/python3.13/functools.py:934: in wrapper 2184s return dispatch(args[0].__class__)(*args, **kw) 2184s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 2184s 2184s val = array([[1., 0., 0., 0., 0., 0., 1., 1., 0., 0., 0., 0., 0., 1., 0.], 2184s [1., 1., 1., 1., 1., 0., 0., 0., 0., 0., 1...1., 0., 1., 0., 0., 0., 0.], 2184s [0., 0., 2., 1., 0., 1., 0., 0., 0., 0., 1., 3., 1., 0., 0.]], 2184s dtype=float32) 2184s typ = 2184s 2184s @singledispatch 2184s def as_cupy(val, typ=None): 2184s """ 2184s Rough conversion function 2184s 2184s Will try to infer target type from input type if not specified. 2184s """ 2184s if typ is None: 2184s typ = resolve_cupy_type(val) 2184s 2184s if issubclass(typ, CupyArray): 2184s import cupy as cp 2184s 2184s if isinstance(val, CSMatrix): 2184s val = val.toarray() 2184s return cp.array(val) 2184s elif issubclass(typ, CupyCSRMatrix): 2184s import cupy as cp 2184s import cupyx.scipy.sparse as cpsparse 2184s 2184s if isinstance(val, np.ndarray): 2184s return cpsparse.csr_matrix(cp.array(val)) 2184s else: 2184s return cpsparse.csr_matrix(val) 2184s elif issubclass(typ, CupyCSCMatrix): 2184s > import cupy as cp 2184s E ModuleNotFoundError: No module named 'cupy' 2184s 2184s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:1024: ModuleNotFoundError 2184s ________ test_view_of_view[cupy_csc-array_subset-spmatrix_bool_subset] _________ 2184s 2184s matrix_type = functools.partial(, typ=) 2184s subset_func = 2184s subset_func2 = 2184s 2184s def test_view_of_view(matrix_type, subset_func, subset_func2): 2184s > adata = gen_adata((30, 15), X_type=matrix_type) 2184s 2184s tests/test_views.py:531: 2184s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 2184s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:346: in gen_adata 2184s X = X_type(random_state.binomial(100, 0.005, (M, N)).astype(X_dtype)) 2184s /usr/lib/python3.13/functools.py:934: in wrapper 2184s return dispatch(args[0].__class__)(*args, **kw) 2184s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 2184s 2184s val = array([[1., 0., 0., 0., 1., 0., 1., 0., 1., 1., 0., 0., 0., 0., 1.], 2184s [0., 0., 1., 1., 0., 1., 0., 1., 1., 0., 0...1., 1., 0., 0., 1., 1., 0.], 2184s [0., 0., 1., 0., 0., 0., 0., 0., 0., 0., 1., 1., 0., 0., 1.]], 2184s dtype=float32) 2184s typ = 2184s 2184s @singledispatch 2184s def as_cupy(val, typ=None): 2184s """ 2184s Rough conversion function 2184s 2184s Will try to infer target type from input type if not specified. 2184s """ 2184s if typ is None: 2184s typ = resolve_cupy_type(val) 2184s 2184s if issubclass(typ, CupyArray): 2184s import cupy as cp 2184s 2184s if isinstance(val, CSMatrix): 2184s val = val.toarray() 2184s return cp.array(val) 2184s elif issubclass(typ, CupyCSRMatrix): 2184s import cupy as cp 2184s import cupyx.scipy.sparse as cpsparse 2184s 2184s if isinstance(val, np.ndarray): 2184s return cpsparse.csr_matrix(cp.array(val)) 2184s else: 2184s return cpsparse.csr_matrix(val) 2184s elif issubclass(typ, CupyCSCMatrix): 2184s > import cupy as cp 2184s E ModuleNotFoundError: No module named 'cupy' 2184s 2184s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:1024: ModuleNotFoundError 2184s _________ test_view_of_view[cupy_csc-array_subset-sparray_bool_subset] _________ 2184s 2184s matrix_type = functools.partial(, typ=) 2184s subset_func = 2184s subset_func2 = 2184s 2184s def test_view_of_view(matrix_type, subset_func, subset_func2): 2184s > adata = gen_adata((30, 15), X_type=matrix_type) 2184s 2184s tests/test_views.py:531: 2184s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 2184s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:346: in gen_adata 2184s X = X_type(random_state.binomial(100, 0.005, (M, N)).astype(X_dtype)) 2184s /usr/lib/python3.13/functools.py:934: in wrapper 2184s return dispatch(args[0].__class__)(*args, **kw) 2184s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 2184s 2184s val = array([[0., 2., 0., 0., 1., 0., 2., 0., 2., 1., 1., 0., 0., 0., 0.], 2184s [0., 0., 1., 1., 0., 0., 0., 0., 1., 0., 0...0., 0., 0., 0., 0., 1., 0.], 2184s [0., 0., 0., 1., 0., 0., 2., 0., 0., 0., 0., 0., 0., 1., 1.]], 2184s dtype=float32) 2184s typ = 2184s 2184s @singledispatch 2184s def as_cupy(val, typ=None): 2184s """ 2184s Rough conversion function 2184s 2184s Will try to infer target type from input type if not specified. 2184s """ 2184s if typ is None: 2184s typ = resolve_cupy_type(val) 2184s 2184s if issubclass(typ, CupyArray): 2184s import cupy as cp 2184s 2184s if isinstance(val, CSMatrix): 2184s val = val.toarray() 2184s return cp.array(val) 2184s elif issubclass(typ, CupyCSRMatrix): 2184s import cupy as cp 2184s import cupyx.scipy.sparse as cpsparse 2184s 2184s if isinstance(val, np.ndarray): 2184s return cpsparse.csr_matrix(cp.array(val)) 2184s else: 2184s return cpsparse.csr_matrix(val) 2184s elif issubclass(typ, CupyCSCMatrix): 2184s > import cupy as cp 2184s E ModuleNotFoundError: No module named 'cupy' 2184s 2184s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:1024: ModuleNotFoundError 2184s ____________ test_view_of_view[cupy_csc-slice_subset-array_subset] _____________ 2184s 2184s matrix_type = functools.partial(, typ=) 2184s subset_func = 2184s subset_func2 = 2184s 2184s def test_view_of_view(matrix_type, subset_func, subset_func2): 2184s > adata = gen_adata((30, 15), X_type=matrix_type) 2184s 2184s tests/test_views.py:531: 2184s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 2184s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:346: in gen_adata 2184s X = X_type(random_state.binomial(100, 0.005, (M, N)).astype(X_dtype)) 2184s /usr/lib/python3.13/functools.py:934: in wrapper 2184s return dispatch(args[0].__class__)(*args, **kw) 2184s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 2184s 2184s val = array([[0., 0., 2., 0., 1., 0., 1., 0., 0., 0., 0., 1., 0., 0., 0.], 2184s [1., 0., 0., 1., 0., 1., 1., 0., 0., 0., 0...1., 0., 1., 0., 1., 0., 1.], 2184s [0., 0., 0., 0., 0., 1., 0., 0., 1., 1., 0., 3., 0., 1., 1.]], 2184s dtype=float32) 2184s typ = 2184s 2184s @singledispatch 2184s def as_cupy(val, typ=None): 2184s """ 2184s Rough conversion function 2184s 2184s Will try to infer target type from input type if not specified. 2184s """ 2184s if typ is None: 2184s typ = resolve_cupy_type(val) 2184s 2184s if issubclass(typ, CupyArray): 2184s import cupy as cp 2184s 2184s if isinstance(val, CSMatrix): 2184s val = val.toarray() 2184s return cp.array(val) 2184s elif issubclass(typ, CupyCSRMatrix): 2184s import cupy as cp 2184s import cupyx.scipy.sparse as cpsparse 2184s 2184s if isinstance(val, np.ndarray): 2184s return cpsparse.csr_matrix(cp.array(val)) 2184s else: 2184s return cpsparse.csr_matrix(val) 2184s elif issubclass(typ, CupyCSCMatrix): 2184s > import cupy as cp 2184s E ModuleNotFoundError: No module named 'cupy' 2184s 2184s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:1024: ModuleNotFoundError 2184s ____________ test_view_of_view[cupy_csc-slice_subset-slice_subset] _____________ 2184s 2184s matrix_type = functools.partial(, typ=) 2184s subset_func = 2184s subset_func2 = 2184s 2184s def test_view_of_view(matrix_type, subset_func, subset_func2): 2184s > adata = gen_adata((30, 15), X_type=matrix_type) 2184s 2184s tests/test_views.py:531: 2184s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 2184s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:346: in gen_adata 2184s X = X_type(random_state.binomial(100, 0.005, (M, N)).astype(X_dtype)) 2184s /usr/lib/python3.13/functools.py:934: in wrapper 2184s return dispatch(args[0].__class__)(*args, **kw) 2184s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 2184s 2184s val = array([[0., 0., 0., 1., 1., 0., 0., 0., 3., 0., 2., 0., 0., 1., 1.], 2184s [3., 0., 1., 0., 0., 0., 1., 1., 0., 0., 1...1., 0., 0., 0., 0., 1., 0.], 2184s [1., 0., 0., 0., 1., 2., 1., 0., 0., 0., 2., 0., 0., 2., 0.]], 2184s dtype=float32) 2184s typ = 2184s 2184s @singledispatch 2184s def as_cupy(val, typ=None): 2184s """ 2184s Rough conversion function 2184s 2184s Will try to infer target type from input type if not specified. 2184s """ 2184s if typ is None: 2184s typ = resolve_cupy_type(val) 2184s 2184s if issubclass(typ, CupyArray): 2184s import cupy as cp 2184s 2184s if isinstance(val, CSMatrix): 2184s val = val.toarray() 2184s return cp.array(val) 2184s elif issubclass(typ, CupyCSRMatrix): 2184s import cupy as cp 2184s import cupyx.scipy.sparse as cpsparse 2184s 2184s if isinstance(val, np.ndarray): 2184s return cpsparse.csr_matrix(cp.array(val)) 2184s else: 2184s return cpsparse.csr_matrix(val) 2184s elif issubclass(typ, CupyCSCMatrix): 2184s > import cupy as cp 2184s E ModuleNotFoundError: No module named 'cupy' 2184s 2184s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:1024: ModuleNotFoundError 2184s ____________ test_view_of_view[cupy_csc-slice_subset-single_subset] ____________ 2184s 2184s matrix_type = functools.partial(, typ=) 2184s subset_func = 2184s subset_func2 = 2184s 2184s def test_view_of_view(matrix_type, subset_func, subset_func2): 2184s > adata = gen_adata((30, 15), X_type=matrix_type) 2184s 2184s tests/test_views.py:531: 2184s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 2184s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:346: in gen_adata 2184s X = X_type(random_state.binomial(100, 0.005, (M, N)).astype(X_dtype)) 2184s /usr/lib/python3.13/functools.py:934: in wrapper 2184s return dispatch(args[0].__class__)(*args, **kw) 2184s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 2184s 2184s val = array([[1., 0., 2., 1., 0., 1., 1., 1., 0., 1., 0., 0., 1., 0., 0.], 2184s [0., 0., 1., 1., 1., 1., 1., 0., 0., 0., 0...0., 0., 0., 1., 1., 1., 0.], 2184s [1., 0., 0., 1., 1., 0., 0., 1., 0., 0., 1., 1., 0., 2., 0.]], 2184s dtype=float32) 2184s typ = 2184s 2184s @singledispatch 2184s def as_cupy(val, typ=None): 2184s """ 2184s Rough conversion function 2184s 2184s Will try to infer target type from input type if not specified. 2184s """ 2184s if typ is None: 2184s typ = resolve_cupy_type(val) 2184s 2184s if issubclass(typ, CupyArray): 2184s import cupy as cp 2184s 2184s if isinstance(val, CSMatrix): 2184s val = val.toarray() 2184s return cp.array(val) 2184s elif issubclass(typ, CupyCSRMatrix): 2184s import cupy as cp 2184s import cupyx.scipy.sparse as cpsparse 2184s 2184s if isinstance(val, np.ndarray): 2184s return cpsparse.csr_matrix(cp.array(val)) 2184s else: 2184s return cpsparse.csr_matrix(val) 2184s elif issubclass(typ, CupyCSCMatrix): 2184s > import cupy as cp 2184s E ModuleNotFoundError: No module named 'cupy' 2184s 2184s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:1024: ModuleNotFoundError 2184s __________ test_view_of_view[cupy_csc-slice_subset-array_int_subset] ___________ 2184s 2184s matrix_type = functools.partial(, typ=) 2184s subset_func = 2184s subset_func2 = 2184s 2184s def test_view_of_view(matrix_type, subset_func, subset_func2): 2184s > adata = gen_adata((30, 15), X_type=matrix_type) 2184s 2184s tests/test_views.py:531: 2184s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 2184s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:346: in gen_adata 2184s X = X_type(random_state.binomial(100, 0.005, (M, N)).astype(X_dtype)) 2184s /usr/lib/python3.13/functools.py:934: in wrapper 2184s return dispatch(args[0].__class__)(*args, **kw) 2184s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 2184s 2184s val = array([[1., 0., 1., 0., 0., 1., 0., 0., 1., 0., 1., 0., 0., 1., 0.], 2184s [0., 2., 3., 0., 0., 0., 0., 0., 1., 0., 1...0., 0., 0., 0., 1., 1., 1.], 2184s [1., 1., 1., 1., 1., 0., 1., 0., 0., 0., 0., 0., 0., 1., 1.]], 2184s dtype=float32) 2184s typ = 2184s 2184s @singledispatch 2184s def as_cupy(val, typ=None): 2184s """ 2184s Rough conversion function 2184s 2184s Will try to infer target type from input type if not specified. 2184s """ 2184s if typ is None: 2184s typ = resolve_cupy_type(val) 2184s 2184s if issubclass(typ, CupyArray): 2184s import cupy as cp 2184s 2184s if isinstance(val, CSMatrix): 2184s val = val.toarray() 2184s return cp.array(val) 2184s elif issubclass(typ, CupyCSRMatrix): 2184s import cupy as cp 2184s import cupyx.scipy.sparse as cpsparse 2184s 2184s if isinstance(val, np.ndarray): 2184s return cpsparse.csr_matrix(cp.array(val)) 2184s else: 2184s return cpsparse.csr_matrix(val) 2184s elif issubclass(typ, CupyCSCMatrix): 2184s > import cupy as cp 2184s E ModuleNotFoundError: No module named 'cupy' 2184s 2184s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:1024: ModuleNotFoundError 2184s ___________ test_view_of_view[cupy_csc-slice_subset-list_int_subset] ___________ 2184s 2184s matrix_type = functools.partial(, typ=) 2184s subset_func = 2184s subset_func2 = 2184s 2184s def test_view_of_view(matrix_type, subset_func, subset_func2): 2184s > adata = gen_adata((30, 15), X_type=matrix_type) 2184s 2184s tests/test_views.py:531: 2184s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 2184s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:346: in gen_adata 2184s X = X_type(random_state.binomial(100, 0.005, (M, N)).astype(X_dtype)) 2184s /usr/lib/python3.13/functools.py:934: in wrapper 2184s return dispatch(args[0].__class__)(*args, **kw) 2184s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 2184s 2184s val = array([[0., 2., 0., 0., 1., 1., 0., 1., 1., 1., 0., 0., 0., 1., 1.], 2184s [0., 1., 0., 1., 0., 0., 0., 2., 0., 0., 0...0., 1., 1., 1., 1., 1., 2.], 2184s [0., 1., 0., 2., 0., 2., 0., 1., 1., 1., 1., 0., 0., 0., 0.]], 2184s dtype=float32) 2184s typ = 2184s 2184s @singledispatch 2184s def as_cupy(val, typ=None): 2184s """ 2184s Rough conversion function 2184s 2184s Will try to infer target type from input type if not specified. 2184s """ 2184s if typ is None: 2184s typ = resolve_cupy_type(val) 2184s 2184s if issubclass(typ, CupyArray): 2184s import cupy as cp 2184s 2184s if isinstance(val, CSMatrix): 2184s val = val.toarray() 2184s return cp.array(val) 2184s elif issubclass(typ, CupyCSRMatrix): 2184s import cupy as cp 2184s import cupyx.scipy.sparse as cpsparse 2184s 2184s if isinstance(val, np.ndarray): 2184s return cpsparse.csr_matrix(cp.array(val)) 2184s else: 2184s return cpsparse.csr_matrix(val) 2184s elif issubclass(typ, CupyCSCMatrix): 2184s > import cupy as cp 2184s E ModuleNotFoundError: No module named 'cupy' 2184s 2184s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:1024: ModuleNotFoundError 2184s __________ test_view_of_view[cupy_csc-slice_subset-array_bool_subset] __________ 2184s 2184s matrix_type = functools.partial(, typ=) 2184s subset_func = 2184s subset_func2 = 2184s 2184s def test_view_of_view(matrix_type, subset_func, subset_func2): 2184s > adata = gen_adata((30, 15), X_type=matrix_type) 2184s 2184s tests/test_views.py:531: 2184s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 2184s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:346: in gen_adata 2184s X = X_type(random_state.binomial(100, 0.005, (M, N)).astype(X_dtype)) 2184s /usr/lib/python3.13/functools.py:934: in wrapper 2184s return dispatch(args[0].__class__)(*args, **kw) 2184s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 2184s 2184s val = array([[0., 2., 1., 2., 0., 0., 1., 0., 0., 0., 1., 0., 0., 2., 0.], 2184s [2., 0., 0., 0., 0., 1., 2., 0., 0., 0., 1...0., 0., 1., 1., 2., 0., 1.], 2184s [0., 0., 1., 2., 0., 1., 1., 0., 1., 0., 0., 0., 0., 0., 0.]], 2184s dtype=float32) 2184s typ = 2184s 2184s @singledispatch 2184s def as_cupy(val, typ=None): 2184s """ 2184s Rough conversion function 2184s 2184s Will try to infer target type from input type if not specified. 2184s """ 2184s if typ is None: 2184s typ = resolve_cupy_type(val) 2184s 2184s if issubclass(typ, CupyArray): 2184s import cupy as cp 2184s 2184s if isinstance(val, CSMatrix): 2184s val = val.toarray() 2184s return cp.array(val) 2184s elif issubclass(typ, CupyCSRMatrix): 2184s import cupy as cp 2184s import cupyx.scipy.sparse as cpsparse 2184s 2184s if isinstance(val, np.ndarray): 2184s return cpsparse.csr_matrix(cp.array(val)) 2184s else: 2184s return cpsparse.csr_matrix(val) 2184s elif issubclass(typ, CupyCSCMatrix): 2184s > import cupy as cp 2184s E ModuleNotFoundError: No module named 'cupy' 2184s 2184s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:1024: ModuleNotFoundError 2184s __________ test_view_of_view[cupy_csc-slice_subset-list_bool_subset] ___________ 2184s 2184s matrix_type = functools.partial(, typ=) 2184s subset_func = 2184s subset_func2 = 2184s 2184s def test_view_of_view(matrix_type, subset_func, subset_func2): 2184s > adata = gen_adata((30, 15), X_type=matrix_type) 2184s 2184s tests/test_views.py:531: 2184s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 2184s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:346: in gen_adata 2184s X = X_type(random_state.binomial(100, 0.005, (M, N)).astype(X_dtype)) 2184s /usr/lib/python3.13/functools.py:934: in wrapper 2184s return dispatch(args[0].__class__)(*args, **kw) 2184s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 2184s 2184s val = array([[1., 1., 1., 0., 1., 0., 1., 0., 1., 1., 1., 2., 0., 2., 0.], 2184s [2., 1., 1., 0., 1., 0., 0., 0., 1., 0., 0...1., 0., 0., 0., 0., 0., 0.], 2184s [0., 0., 1., 0., 0., 0., 1., 1., 1., 1., 1., 0., 1., 0., 1.]], 2184s dtype=float32) 2184s typ = 2184s 2184s @singledispatch 2184s def as_cupy(val, typ=None): 2184s """ 2184s Rough conversion function 2184s 2184s Will try to infer target type from input type if not specified. 2184s """ 2184s if typ is None: 2184s typ = resolve_cupy_type(val) 2184s 2184s if issubclass(typ, CupyArray): 2184s import cupy as cp 2184s 2184s if isinstance(val, CSMatrix): 2184s val = val.toarray() 2184s return cp.array(val) 2184s elif issubclass(typ, CupyCSRMatrix): 2184s import cupy as cp 2184s import cupyx.scipy.sparse as cpsparse 2184s 2184s if isinstance(val, np.ndarray): 2184s return cpsparse.csr_matrix(cp.array(val)) 2184s else: 2184s return cpsparse.csr_matrix(val) 2184s elif issubclass(typ, CupyCSCMatrix): 2184s > import cupy as cp 2184s E ModuleNotFoundError: No module named 'cupy' 2184s 2184s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:1024: ModuleNotFoundError 2184s _________ test_view_of_view[cupy_csc-slice_subset-matrix_bool_subset] __________ 2184s 2184s matrix_type = functools.partial(, typ=) 2184s subset_func = 2184s subset_func2 = 2184s 2184s def test_view_of_view(matrix_type, subset_func, subset_func2): 2184s > adata = gen_adata((30, 15), X_type=matrix_type) 2184s 2184s tests/test_views.py:531: 2184s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 2184s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:346: in gen_adata 2184s X = X_type(random_state.binomial(100, 0.005, (M, N)).astype(X_dtype)) 2184s /usr/lib/python3.13/functools.py:934: in wrapper 2184s return dispatch(args[0].__class__)(*args, **kw) 2184s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 2184s 2184s val = array([[0., 1., 0., 0., 1., 1., 1., 2., 2., 0., 0., 0., 0., 1., 0.], 2184s [0., 2., 0., 1., 1., 0., 0., 0., 0., 0., 0...0., 0., 0., 2., 0., 0., 0.], 2184s [0., 1., 1., 1., 2., 2., 1., 1., 0., 0., 0., 0., 0., 3., 1.]], 2184s dtype=float32) 2184s typ = 2184s 2184s @singledispatch 2184s def as_cupy(val, typ=None): 2184s """ 2184s Rough conversion function 2184s 2184s Will try to infer target type from input type if not specified. 2184s """ 2184s if typ is None: 2184s typ = resolve_cupy_type(val) 2184s 2184s if issubclass(typ, CupyArray): 2184s import cupy as cp 2184s 2184s if isinstance(val, CSMatrix): 2184s val = val.toarray() 2184s return cp.array(val) 2184s elif issubclass(typ, CupyCSRMatrix): 2184s import cupy as cp 2184s import cupyx.scipy.sparse as cpsparse 2184s 2184s if isinstance(val, np.ndarray): 2184s return cpsparse.csr_matrix(cp.array(val)) 2184s else: 2184s return cpsparse.csr_matrix(val) 2184s elif issubclass(typ, CupyCSCMatrix): 2184s > import cupy as cp 2184s E ModuleNotFoundError: No module named 'cupy' 2184s 2184s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:1024: ModuleNotFoundError 2184s ________ test_view_of_view[cupy_csc-slice_subset-spmatrix_bool_subset] _________ 2184s 2184s matrix_type = functools.partial(, typ=) 2184s subset_func = 2184s subset_func2 = 2184s 2184s def test_view_of_view(matrix_type, subset_func, subset_func2): 2184s > adata = gen_adata((30, 15), X_type=matrix_type) 2184s 2184s tests/test_views.py:531: 2184s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 2184s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:346: in gen_adata 2184s X = X_type(random_state.binomial(100, 0.005, (M, N)).astype(X_dtype)) 2184s /usr/lib/python3.13/functools.py:934: in wrapper 2184s return dispatch(args[0].__class__)(*args, **kw) 2184s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 2184s 2184s val = array([[0., 0., 0., 1., 1., 1., 0., 1., 1., 1., 0., 1., 0., 1., 0.], 2184s [0., 1., 1., 1., 0., 1., 0., 0., 2., 0., 1...0., 1., 0., 0., 0., 0., 0.], 2184s [0., 0., 1., 2., 0., 0., 0., 0., 0., 0., 1., 1., 0., 1., 2.]], 2184s dtype=float32) 2184s typ = 2184s 2184s @singledispatch 2184s def as_cupy(val, typ=None): 2184s """ 2184s Rough conversion function 2184s 2184s Will try to infer target type from input type if not specified. 2184s """ 2184s if typ is None: 2184s typ = resolve_cupy_type(val) 2184s 2184s if issubclass(typ, CupyArray): 2184s import cupy as cp 2184s 2184s if isinstance(val, CSMatrix): 2184s val = val.toarray() 2184s return cp.array(val) 2184s elif issubclass(typ, CupyCSRMatrix): 2184s import cupy as cp 2184s import cupyx.scipy.sparse as cpsparse 2184s 2184s if isinstance(val, np.ndarray): 2184s return cpsparse.csr_matrix(cp.array(val)) 2184s else: 2184s return cpsparse.csr_matrix(val) 2184s elif issubclass(typ, CupyCSCMatrix): 2184s > import cupy as cp 2184s E ModuleNotFoundError: No module named 'cupy' 2184s 2184s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:1024: ModuleNotFoundError 2184s _________ test_view_of_view[cupy_csc-slice_subset-sparray_bool_subset] _________ 2184s 2184s matrix_type = functools.partial(, typ=) 2184s subset_func = 2184s subset_func2 = 2184s 2184s def test_view_of_view(matrix_type, subset_func, subset_func2): 2184s > adata = gen_adata((30, 15), X_type=matrix_type) 2184s 2184s tests/test_views.py:531: 2184s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 2184s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:346: in gen_adata 2184s X = X_type(random_state.binomial(100, 0.005, (M, N)).astype(X_dtype)) 2184s /usr/lib/python3.13/functools.py:934: in wrapper 2184s return dispatch(args[0].__class__)(*args, **kw) 2184s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 2184s 2184s val = array([[0., 0., 0., 2., 1., 1., 0., 1., 0., 0., 1., 0., 1., 0., 1.], 2184s [1., 0., 0., 0., 0., 1., 0., 0., 0., 0., 0...0., 1., 1., 1., 0., 1., 0.], 2184s [0., 1., 0., 0., 0., 0., 0., 1., 1., 0., 2., 0., 1., 0., 1.]], 2184s dtype=float32) 2184s typ = 2184s 2184s @singledispatch 2184s def as_cupy(val, typ=None): 2184s """ 2184s Rough conversion function 2184s 2184s Will try to infer target type from input type if not specified. 2184s """ 2184s if typ is None: 2184s typ = resolve_cupy_type(val) 2184s 2184s if issubclass(typ, CupyArray): 2184s import cupy as cp 2184s 2184s if isinstance(val, CSMatrix): 2184s val = val.toarray() 2184s return cp.array(val) 2184s elif issubclass(typ, CupyCSRMatrix): 2184s import cupy as cp 2184s import cupyx.scipy.sparse as cpsparse 2184s 2184s if isinstance(val, np.ndarray): 2184s return cpsparse.csr_matrix(cp.array(val)) 2184s else: 2184s return cpsparse.csr_matrix(val) 2184s elif issubclass(typ, CupyCSCMatrix): 2184s > import cupy as cp 2184s E ModuleNotFoundError: No module named 'cupy' 2184s 2184s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:1024: ModuleNotFoundError 2184s ____________ test_view_of_view[cupy_csc-single_subset-array_subset] ____________ 2184s 2184s matrix_type = functools.partial(, typ=) 2184s subset_func = 2184s subset_func2 = 2184s 2184s def test_view_of_view(matrix_type, subset_func, subset_func2): 2184s > adata = gen_adata((30, 15), X_type=matrix_type) 2184s 2184s tests/test_views.py:531: 2184s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 2184s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:346: in gen_adata 2184s X = X_type(random_state.binomial(100, 0.005, (M, N)).astype(X_dtype)) 2184s /usr/lib/python3.13/functools.py:934: in wrapper 2184s return dispatch(args[0].__class__)(*args, **kw) 2184s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 2184s 2184s val = array([[0., 0., 0., 1., 0., 4., 0., 0., 0., 1., 2., 1., 1., 1., 2.], 2184s [1., 2., 1., 0., 0., 0., 1., 1., 0., 0., 1...0., 0., 2., 4., 0., 1., 0.], 2184s [1., 0., 0., 1., 0., 0., 0., 1., 0., 0., 1., 0., 1., 1., 0.]], 2184s dtype=float32) 2184s typ = 2184s 2184s @singledispatch 2184s def as_cupy(val, typ=None): 2184s """ 2184s Rough conversion function 2184s 2184s Will try to infer target type from input type if not specified. 2184s """ 2184s if typ is None: 2184s typ = resolve_cupy_type(val) 2184s 2184s if issubclass(typ, CupyArray): 2184s import cupy as cp 2184s 2184s if isinstance(val, CSMatrix): 2184s val = val.toarray() 2184s return cp.array(val) 2184s elif issubclass(typ, CupyCSRMatrix): 2184s import cupy as cp 2184s import cupyx.scipy.sparse as cpsparse 2184s 2184s if isinstance(val, np.ndarray): 2184s return cpsparse.csr_matrix(cp.array(val)) 2184s else: 2184s return cpsparse.csr_matrix(val) 2184s elif issubclass(typ, CupyCSCMatrix): 2184s > import cupy as cp 2184s E ModuleNotFoundError: No module named 'cupy' 2184s 2184s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:1024: ModuleNotFoundError 2184s ____________ test_view_of_view[cupy_csc-single_subset-slice_subset] ____________ 2184s 2184s matrix_type = functools.partial(, typ=) 2184s subset_func = 2184s subset_func2 = 2184s 2184s def test_view_of_view(matrix_type, subset_func, subset_func2): 2184s > adata = gen_adata((30, 15), X_type=matrix_type) 2184s 2184s tests/test_views.py:531: 2184s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 2184s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:346: in gen_adata 2184s X = X_type(random_state.binomial(100, 0.005, (M, N)).astype(X_dtype)) 2184s /usr/lib/python3.13/functools.py:934: in wrapper 2184s return dispatch(args[0].__class__)(*args, **kw) 2184s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 2184s 2184s val = array([[0., 0., 0., 0., 0., 1., 1., 1., 0., 1., 0., 1., 0., 1., 0.], 2184s [0., 0., 1., 1., 0., 0., 0., 1., 0., 0., 0...0., 0., 0., 0., 0., 2., 0.], 2184s [0., 2., 0., 0., 1., 0., 1., 1., 1., 1., 1., 0., 0., 0., 2.]], 2184s dtype=float32) 2184s typ = 2184s 2184s @singledispatch 2184s def as_cupy(val, typ=None): 2184s """ 2184s Rough conversion function 2184s 2184s Will try to infer target type from input type if not specified. 2184s """ 2184s if typ is None: 2184s typ = resolve_cupy_type(val) 2184s 2184s if issubclass(typ, CupyArray): 2184s import cupy as cp 2184s 2184s if isinstance(val, CSMatrix): 2184s val = val.toarray() 2184s return cp.array(val) 2184s elif issubclass(typ, CupyCSRMatrix): 2184s import cupy as cp 2184s import cupyx.scipy.sparse as cpsparse 2184s 2184s if isinstance(val, np.ndarray): 2184s return cpsparse.csr_matrix(cp.array(val)) 2184s else: 2184s return cpsparse.csr_matrix(val) 2184s elif issubclass(typ, CupyCSCMatrix): 2184s > import cupy as cp 2184s E ModuleNotFoundError: No module named 'cupy' 2184s 2184s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:1024: ModuleNotFoundError 2184s ___________ test_view_of_view[cupy_csc-single_subset-single_subset] ____________ 2184s 2184s matrix_type = functools.partial(, typ=) 2184s subset_func = 2184s subset_func2 = 2184s 2184s def test_view_of_view(matrix_type, subset_func, subset_func2): 2184s > adata = gen_adata((30, 15), X_type=matrix_type) 2184s 2184s tests/test_views.py:531: 2184s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 2184s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:346: in gen_adata 2184s X = X_type(random_state.binomial(100, 0.005, (M, N)).astype(X_dtype)) 2184s /usr/lib/python3.13/functools.py:934: in wrapper 2184s return dispatch(args[0].__class__)(*args, **kw) 2184s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 2184s 2184s val = array([[1., 0., 1., 0., 0., 1., 0., 1., 0., 0., 0., 1., 0., 0., 0.], 2184s [1., 1., 0., 1., 0., 0., 0., 0., 0., 0., 0...0., 1., 0., 0., 0., 0., 2.], 2184s [1., 0., 0., 0., 1., 0., 0., 0., 1., 1., 0., 0., 2., 1., 0.]], 2184s dtype=float32) 2184s typ = 2184s 2184s @singledispatch 2184s def as_cupy(val, typ=None): 2184s """ 2184s Rough conversion function 2184s 2184s Will try to infer target type from input type if not specified. 2184s """ 2184s if typ is None: 2184s typ = resolve_cupy_type(val) 2184s 2184s if issubclass(typ, CupyArray): 2184s import cupy as cp 2184s 2184s if isinstance(val, CSMatrix): 2184s val = val.toarray() 2184s return cp.array(val) 2184s elif issubclass(typ, CupyCSRMatrix): 2184s import cupy as cp 2184s import cupyx.scipy.sparse as cpsparse 2184s 2184s if isinstance(val, np.ndarray): 2184s return cpsparse.csr_matrix(cp.array(val)) 2184s else: 2184s return cpsparse.csr_matrix(val) 2184s elif issubclass(typ, CupyCSCMatrix): 2184s > import cupy as cp 2184s E ModuleNotFoundError: No module named 'cupy' 2184s 2184s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:1024: ModuleNotFoundError 2184s __________ test_view_of_view[cupy_csc-single_subset-array_int_subset] __________ 2184s 2184s matrix_type = functools.partial(, typ=) 2184s subset_func = 2184s subset_func2 = 2184s 2184s def test_view_of_view(matrix_type, subset_func, subset_func2): 2184s > adata = gen_adata((30, 15), X_type=matrix_type) 2184s 2184s tests/test_views.py:531: 2184s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 2184s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:346: in gen_adata 2184s X = X_type(random_state.binomial(100, 0.005, (M, N)).astype(X_dtype)) 2184s /usr/lib/python3.13/functools.py:934: in wrapper 2184s return dispatch(args[0].__class__)(*args, **kw) 2184s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 2184s 2184s val = array([[0., 0., 0., 0., 0., 0., 0., 1., 0., 1., 1., 0., 0., 0., 0.], 2184s [1., 0., 0., 0., 1., 1., 2., 0., 0., 0., 0...0., 0., 2., 0., 0., 1., 0.], 2184s [0., 1., 1., 0., 2., 0., 0., 0., 0., 0., 0., 0., 1., 0., 0.]], 2184s dtype=float32) 2184s typ = 2184s 2184s @singledispatch 2184s def as_cupy(val, typ=None): 2184s """ 2184s Rough conversion function 2184s 2184s Will try to infer target type from input type if not specified. 2184s """ 2184s if typ is None: 2184s typ = resolve_cupy_type(val) 2184s 2184s if issubclass(typ, CupyArray): 2184s import cupy as cp 2184s 2184s if isinstance(val, CSMatrix): 2184s val = val.toarray() 2184s return cp.array(val) 2184s elif issubclass(typ, CupyCSRMatrix): 2184s import cupy as cp 2184s import cupyx.scipy.sparse as cpsparse 2184s 2184s if isinstance(val, np.ndarray): 2184s return cpsparse.csr_matrix(cp.array(val)) 2184s else: 2184s return cpsparse.csr_matrix(val) 2184s elif issubclass(typ, CupyCSCMatrix): 2184s > import cupy as cp 2184s E ModuleNotFoundError: No module named 'cupy' 2184s 2184s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:1024: ModuleNotFoundError 2184s __________ test_view_of_view[cupy_csc-single_subset-list_int_subset] ___________ 2184s 2184s matrix_type = functools.partial(, typ=) 2184s subset_func = 2184s subset_func2 = 2184s 2184s def test_view_of_view(matrix_type, subset_func, subset_func2): 2184s > adata = gen_adata((30, 15), X_type=matrix_type) 2184s 2184s tests/test_views.py:531: 2184s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 2184s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:346: in gen_adata 2184s X = X_type(random_state.binomial(100, 0.005, (M, N)).astype(X_dtype)) 2184s /usr/lib/python3.13/functools.py:934: in wrapper 2184s return dispatch(args[0].__class__)(*args, **kw) 2184s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 2184s 2184s val = array([[0., 1., 0., 0., 0., 1., 1., 0., 0., 0., 0., 0., 0., 0., 2.], 2184s [1., 0., 1., 0., 0., 0., 0., 2., 1., 2., 0...1., 1., 0., 0., 0., 2., 1.], 2184s [1., 0., 1., 0., 0., 0., 1., 0., 0., 1., 0., 0., 0., 0., 1.]], 2184s dtype=float32) 2184s typ = 2184s 2184s @singledispatch 2184s def as_cupy(val, typ=None): 2184s """ 2184s Rough conversion function 2184s 2184s Will try to infer target type from input type if not specified. 2184s """ 2184s if typ is None: 2184s typ = resolve_cupy_type(val) 2184s 2184s if issubclass(typ, CupyArray): 2184s import cupy as cp 2184s 2184s if isinstance(val, CSMatrix): 2184s val = val.toarray() 2184s return cp.array(val) 2184s elif issubclass(typ, CupyCSRMatrix): 2184s import cupy as cp 2184s import cupyx.scipy.sparse as cpsparse 2184s 2184s if isinstance(val, np.ndarray): 2184s return cpsparse.csr_matrix(cp.array(val)) 2184s else: 2184s return cpsparse.csr_matrix(val) 2184s elif issubclass(typ, CupyCSCMatrix): 2184s > import cupy as cp 2184s E ModuleNotFoundError: No module named 'cupy' 2184s 2184s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:1024: ModuleNotFoundError 2184s _________ test_view_of_view[cupy_csc-single_subset-array_bool_subset] __________ 2184s 2184s matrix_type = functools.partial(, typ=) 2184s subset_func = 2184s subset_func2 = 2184s 2184s def test_view_of_view(matrix_type, subset_func, subset_func2): 2184s > adata = gen_adata((30, 15), X_type=matrix_type) 2184s 2184s tests/test_views.py:531: 2184s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 2184s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:346: in gen_adata 2184s X = X_type(random_state.binomial(100, 0.005, (M, N)).astype(X_dtype)) 2184s /usr/lib/python3.13/functools.py:934: in wrapper 2184s return dispatch(args[0].__class__)(*args, **kw) 2184s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 2184s 2184s val = array([[0., 0., 1., 0., 0., 1., 0., 0., 1., 0., 0., 0., 0., 3., 1.], 2184s [0., 1., 2., 1., 0., 0., 0., 1., 0., 2., 0...0., 0., 0., 1., 2., 0., 1.], 2184s [0., 0., 0., 0., 0., 1., 0., 1., 0., 0., 1., 0., 0., 0., 0.]], 2184s dtype=float32) 2184s typ = 2184s 2184s @singledispatch 2184s def as_cupy(val, typ=None): 2184s """ 2184s Rough conversion function 2184s 2184s Will try to infer target type from input type if not specified. 2184s """ 2184s if typ is None: 2184s typ = resolve_cupy_type(val) 2184s 2184s if issubclass(typ, CupyArray): 2184s import cupy as cp 2184s 2184s if isinstance(val, CSMatrix): 2184s val = val.toarray() 2184s return cp.array(val) 2184s elif issubclass(typ, CupyCSRMatrix): 2184s import cupy as cp 2184s import cupyx.scipy.sparse as cpsparse 2184s 2184s if isinstance(val, np.ndarray): 2184s return cpsparse.csr_matrix(cp.array(val)) 2184s else: 2184s return cpsparse.csr_matrix(val) 2184s elif issubclass(typ, CupyCSCMatrix): 2184s > import cupy as cp 2184s E ModuleNotFoundError: No module named 'cupy' 2184s 2184s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:1024: ModuleNotFoundError 2184s __________ test_view_of_view[cupy_csc-single_subset-list_bool_subset] __________ 2184s 2184s matrix_type = functools.partial(, typ=) 2184s subset_func = 2184s subset_func2 = 2184s 2184s def test_view_of_view(matrix_type, subset_func, subset_func2): 2184s > adata = gen_adata((30, 15), X_type=matrix_type) 2184s 2184s tests/test_views.py:531: 2184s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 2184s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:346: in gen_adata 2184s X = X_type(random_state.binomial(100, 0.005, (M, N)).astype(X_dtype)) 2184s /usr/lib/python3.13/functools.py:934: in wrapper 2184s return dispatch(args[0].__class__)(*args, **kw) 2184s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 2184s 2184s val = array([[0., 0., 1., 0., 0., 0., 0., 0., 1., 1., 0., 2., 0., 0., 0.], 2184s [0., 2., 1., 0., 0., 0., 0., 0., 0., 2., 0...0., 2., 1., 1., 0., 0., 1.], 2184s [0., 1., 1., 2., 1., 0., 1., 0., 1., 1., 1., 1., 2., 0., 0.]], 2184s dtype=float32) 2184s typ = 2184s 2184s @singledispatch 2184s def as_cupy(val, typ=None): 2184s """ 2184s Rough conversion function 2184s 2184s Will try to infer target type from input type if not specified. 2184s """ 2184s if typ is None: 2184s typ = resolve_cupy_type(val) 2184s 2184s if issubclass(typ, CupyArray): 2184s import cupy as cp 2184s 2184s if isinstance(val, CSMatrix): 2184s val = val.toarray() 2184s return cp.array(val) 2184s elif issubclass(typ, CupyCSRMatrix): 2184s import cupy as cp 2184s import cupyx.scipy.sparse as cpsparse 2184s 2184s if isinstance(val, np.ndarray): 2184s return cpsparse.csr_matrix(cp.array(val)) 2184s else: 2184s return cpsparse.csr_matrix(val) 2184s elif issubclass(typ, CupyCSCMatrix): 2184s > import cupy as cp 2184s E ModuleNotFoundError: No module named 'cupy' 2184s 2184s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:1024: ModuleNotFoundError 2184s _________ test_view_of_view[cupy_csc-single_subset-matrix_bool_subset] _________ 2184s 2184s matrix_type = functools.partial(, typ=) 2184s subset_func = 2184s subset_func2 = 2184s 2184s def test_view_of_view(matrix_type, subset_func, subset_func2): 2184s > adata = gen_adata((30, 15), X_type=matrix_type) 2184s 2184s tests/test_views.py:531: 2184s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 2184s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:346: in gen_adata 2184s X = X_type(random_state.binomial(100, 0.005, (M, N)).astype(X_dtype)) 2184s /usr/lib/python3.13/functools.py:934: in wrapper 2184s return dispatch(args[0].__class__)(*args, **kw) 2184s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 2184s 2184s val = array([[0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 2., 1., 1.], 2184s [1., 0., 1., 0., 0., 0., 0., 0., 1., 1., 1...0., 0., 0., 0., 1., 2., 1.], 2184s [0., 0., 0., 0., 0., 0., 0., 1., 1., 1., 1., 0., 1., 0., 0.]], 2184s dtype=float32) 2184s typ = 2184s 2184s @singledispatch 2184s def as_cupy(val, typ=None): 2184s """ 2184s Rough conversion function 2184s 2184s Will try to infer target type from input type if not specified. 2184s """ 2184s if typ is None: 2184s typ = resolve_cupy_type(val) 2184s 2184s if issubclass(typ, CupyArray): 2184s import cupy as cp 2184s 2184s if isinstance(val, CSMatrix): 2184s val = val.toarray() 2184s return cp.array(val) 2184s elif issubclass(typ, CupyCSRMatrix): 2184s import cupy as cp 2184s import cupyx.scipy.sparse as cpsparse 2184s 2184s if isinstance(val, np.ndarray): 2184s return cpsparse.csr_matrix(cp.array(val)) 2184s else: 2184s return cpsparse.csr_matrix(val) 2184s elif issubclass(typ, CupyCSCMatrix): 2184s > import cupy as cp 2184s E ModuleNotFoundError: No module named 'cupy' 2184s 2184s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:1024: ModuleNotFoundError 2184s ________ test_view_of_view[cupy_csc-single_subset-spmatrix_bool_subset] ________ 2184s 2184s matrix_type = functools.partial(, typ=) 2184s subset_func = 2184s subset_func2 = 2184s 2184s def test_view_of_view(matrix_type, subset_func, subset_func2): 2184s > adata = gen_adata((30, 15), X_type=matrix_type) 2184s 2184s tests/test_views.py:531: 2184s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 2184s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:346: in gen_adata 2184s X = X_type(random_state.binomial(100, 0.005, (M, N)).astype(X_dtype)) 2184s /usr/lib/python3.13/functools.py:934: in wrapper 2184s return dispatch(args[0].__class__)(*args, **kw) 2184s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 2184s 2184s val = array([[0., 0., 0., 0., 0., 0., 0., 1., 0., 1., 0., 2., 2., 0., 0.], 2184s [1., 1., 0., 2., 0., 1., 1., 0., 0., 1., 0...1., 3., 2., 0., 0., 0., 0.], 2184s [0., 2., 2., 2., 0., 1., 1., 0., 0., 0., 0., 1., 0., 0., 0.]], 2184s dtype=float32) 2184s typ = 2184s 2184s @singledispatch 2184s def as_cupy(val, typ=None): 2184s """ 2184s Rough conversion function 2184s 2184s Will try to infer target type from input type if not specified. 2184s """ 2184s if typ is None: 2184s typ = resolve_cupy_type(val) 2184s 2184s if issubclass(typ, CupyArray): 2184s import cupy as cp 2184s 2184s if isinstance(val, CSMatrix): 2184s val = val.toarray() 2184s return cp.array(val) 2184s elif issubclass(typ, CupyCSRMatrix): 2184s import cupy as cp 2184s import cupyx.scipy.sparse as cpsparse 2184s 2184s if isinstance(val, np.ndarray): 2184s return cpsparse.csr_matrix(cp.array(val)) 2184s else: 2184s return cpsparse.csr_matrix(val) 2184s elif issubclass(typ, CupyCSCMatrix): 2184s > import cupy as cp 2184s E ModuleNotFoundError: No module named 'cupy' 2184s 2184s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:1024: ModuleNotFoundError 2184s ________ test_view_of_view[cupy_csc-single_subset-sparray_bool_subset] _________ 2184s 2184s matrix_type = functools.partial(, typ=) 2184s subset_func = 2184s subset_func2 = 2184s 2184s def test_view_of_view(matrix_type, subset_func, subset_func2): 2184s > adata = gen_adata((30, 15), X_type=matrix_type) 2184s 2184s tests/test_views.py:531: 2184s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 2184s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:346: in gen_adata 2184s X = X_type(random_state.binomial(100, 0.005, (M, N)).astype(X_dtype)) 2184s /usr/lib/python3.13/functools.py:934: in wrapper 2184s return dispatch(args[0].__class__)(*args, **kw) 2184s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 2184s 2184s val = array([[0., 0., 1., 1., 0., 0., 1., 0., 1., 0., 0., 1., 1., 0., 0.], 2184s [0., 0., 0., 1., 0., 0., 0., 0., 1., 0., 0...0., 1., 0., 0., 1., 1., 0.], 2184s [1., 0., 0., 0., 1., 0., 0., 0., 1., 1., 0., 0., 0., 0., 1.]], 2184s dtype=float32) 2184s typ = 2184s 2184s @singledispatch 2184s def as_cupy(val, typ=None): 2184s """ 2184s Rough conversion function 2184s 2184s Will try to infer target type from input type if not specified. 2184s """ 2184s if typ is None: 2184s typ = resolve_cupy_type(val) 2184s 2184s if issubclass(typ, CupyArray): 2184s import cupy as cp 2184s 2184s if isinstance(val, CSMatrix): 2184s val = val.toarray() 2184s return cp.array(val) 2184s elif issubclass(typ, CupyCSRMatrix): 2184s import cupy as cp 2184s import cupyx.scipy.sparse as cpsparse 2184s 2184s if isinstance(val, np.ndarray): 2184s return cpsparse.csr_matrix(cp.array(val)) 2184s else: 2184s return cpsparse.csr_matrix(val) 2184s elif issubclass(typ, CupyCSCMatrix): 2184s > import cupy as cp 2184s E ModuleNotFoundError: No module named 'cupy' 2184s 2184s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:1024: ModuleNotFoundError 2184s __________ test_view_of_view[cupy_csc-array_int_subset-array_subset] ___________ 2184s 2184s matrix_type = functools.partial(, typ=) 2184s subset_func = 2184s subset_func2 = 2184s 2184s def test_view_of_view(matrix_type, subset_func, subset_func2): 2184s > adata = gen_adata((30, 15), X_type=matrix_type) 2184s 2184s tests/test_views.py:531: 2184s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 2184s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:346: in gen_adata 2184s X = X_type(random_state.binomial(100, 0.005, (M, N)).astype(X_dtype)) 2184s /usr/lib/python3.13/functools.py:934: in wrapper 2184s return dispatch(args[0].__class__)(*args, **kw) 2184s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 2184s 2184s val = array([[1., 1., 0., 1., 1., 0., 0., 0., 1., 1., 0., 0., 0., 0., 0.], 2184s [1., 0., 2., 2., 1., 0., 0., 0., 1., 1., 1...0., 2., 0., 2., 0., 1., 1.], 2184s [0., 0., 1., 0., 0., 0., 2., 0., 0., 0., 0., 0., 0., 3., 0.]], 2184s dtype=float32) 2184s typ = 2184s 2184s @singledispatch 2184s def as_cupy(val, typ=None): 2184s """ 2184s Rough conversion function 2184s 2184s Will try to infer target type from input type if not specified. 2184s """ 2184s if typ is None: 2184s typ = resolve_cupy_type(val) 2184s 2184s if issubclass(typ, CupyArray): 2184s import cupy as cp 2184s 2184s if isinstance(val, CSMatrix): 2184s val = val.toarray() 2184s return cp.array(val) 2184s elif issubclass(typ, CupyCSRMatrix): 2184s import cupy as cp 2184s import cupyx.scipy.sparse as cpsparse 2184s 2184s if isinstance(val, np.ndarray): 2184s return cpsparse.csr_matrix(cp.array(val)) 2184s else: 2184s return cpsparse.csr_matrix(val) 2184s elif issubclass(typ, CupyCSCMatrix): 2184s > import cupy as cp 2184s E ModuleNotFoundError: No module named 'cupy' 2184s 2184s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:1024: ModuleNotFoundError 2184s __________ test_view_of_view[cupy_csc-array_int_subset-slice_subset] ___________ 2184s 2184s matrix_type = functools.partial(, typ=) 2184s subset_func = 2184s subset_func2 = 2184s 2184s def test_view_of_view(matrix_type, subset_func, subset_func2): 2184s > adata = gen_adata((30, 15), X_type=matrix_type) 2184s 2184s tests/test_views.py:531: 2184s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 2184s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:346: in gen_adata 2184s X = X_type(random_state.binomial(100, 0.005, (M, N)).astype(X_dtype)) 2184s /usr/lib/python3.13/functools.py:934: in wrapper 2184s return dispatch(args[0].__class__)(*args, **kw) 2184s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 2184s 2184s val = array([[1., 0., 0., 2., 0., 2., 1., 1., 2., 1., 3., 1., 0., 0., 1.], 2184s [0., 1., 0., 0., 0., 1., 0., 0., 1., 0., 0...2., 0., 0., 0., 0., 1., 0.], 2184s [1., 0., 0., 1., 1., 0., 0., 0., 0., 0., 0., 2., 0., 0., 1.]], 2184s dtype=float32) 2184s typ = 2184s 2184s @singledispatch 2184s def as_cupy(val, typ=None): 2184s """ 2184s Rough conversion function 2184s 2184s Will try to infer target type from input type if not specified. 2184s """ 2184s if typ is None: 2184s typ = resolve_cupy_type(val) 2184s 2184s if issubclass(typ, CupyArray): 2184s import cupy as cp 2184s 2184s if isinstance(val, CSMatrix): 2184s val = val.toarray() 2184s return cp.array(val) 2184s elif issubclass(typ, CupyCSRMatrix): 2184s import cupy as cp 2184s import cupyx.scipy.sparse as cpsparse 2184s 2184s if isinstance(val, np.ndarray): 2184s return cpsparse.csr_matrix(cp.array(val)) 2184s else: 2184s return cpsparse.csr_matrix(val) 2184s elif issubclass(typ, CupyCSCMatrix): 2184s > import cupy as cp 2184s E ModuleNotFoundError: No module named 'cupy' 2184s 2184s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:1024: ModuleNotFoundError 2184s __________ test_view_of_view[cupy_csc-array_int_subset-single_subset] __________ 2184s 2184s matrix_type = functools.partial(, typ=) 2184s subset_func = 2184s subset_func2 = 2184s 2184s def test_view_of_view(matrix_type, subset_func, subset_func2): 2184s > adata = gen_adata((30, 15), X_type=matrix_type) 2184s 2184s tests/test_views.py:531: 2184s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 2184s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:346: in gen_adata 2184s X = X_type(random_state.binomial(100, 0.005, (M, N)).astype(X_dtype)) 2184s /usr/lib/python3.13/functools.py:934: in wrapper 2184s return dispatch(args[0].__class__)(*args, **kw) 2184s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 2184s 2184s val = array([[0., 1., 1., 0., 0., 0., 1., 2., 0., 0., 1., 0., 2., 0., 1.], 2184s [0., 1., 0., 0., 0., 0., 0., 0., 0., 0., 0...0., 0., 3., 1., 0., 0., 2.], 2184s [1., 1., 0., 3., 1., 2., 0., 0., 0., 0., 0., 1., 1., 2., 1.]], 2184s dtype=float32) 2184s typ = 2184s 2184s @singledispatch 2184s def as_cupy(val, typ=None): 2184s """ 2184s Rough conversion function 2184s 2184s Will try to infer target type from input type if not specified. 2184s """ 2184s if typ is None: 2184s typ = resolve_cupy_type(val) 2184s 2184s if issubclass(typ, CupyArray): 2184s import cupy as cp 2184s 2184s if isinstance(val, CSMatrix): 2184s val = val.toarray() 2184s return cp.array(val) 2184s elif issubclass(typ, CupyCSRMatrix): 2184s import cupy as cp 2184s import cupyx.scipy.sparse as cpsparse 2184s 2184s if isinstance(val, np.ndarray): 2184s return cpsparse.csr_matrix(cp.array(val)) 2184s else: 2184s return cpsparse.csr_matrix(val) 2184s elif issubclass(typ, CupyCSCMatrix): 2184s > import cupy as cp 2184s E ModuleNotFoundError: No module named 'cupy' 2184s 2184s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:1024: ModuleNotFoundError 2184s ________ test_view_of_view[cupy_csc-array_int_subset-array_int_subset] _________ 2184s 2184s matrix_type = functools.partial(, typ=) 2184s subset_func = 2184s subset_func2 = 2184s 2184s def test_view_of_view(matrix_type, subset_func, subset_func2): 2184s > adata = gen_adata((30, 15), X_type=matrix_type) 2184s 2184s tests/test_views.py:531: 2184s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 2184s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:346: in gen_adata 2184s X = X_type(random_state.binomial(100, 0.005, (M, N)).astype(X_dtype)) 2184s /usr/lib/python3.13/functools.py:934: in wrapper 2184s return dispatch(args[0].__class__)(*args, **kw) 2184s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 2184s 2184s val = array([[0., 0., 0., 0., 0., 1., 0., 1., 3., 0., 1., 3., 0., 0., 2.], 2184s [1., 1., 0., 1., 0., 1., 0., 1., 0., 1., 0...0., 1., 0., 3., 1., 0., 0.], 2184s [0., 1., 0., 0., 0., 0., 1., 0., 0., 0., 1., 1., 1., 1., 1.]], 2184s dtype=float32) 2184s typ = 2184s 2184s @singledispatch 2184s def as_cupy(val, typ=None): 2184s """ 2184s Rough conversion function 2184s 2184s Will try to infer target type from input type if not specified. 2184s """ 2184s if typ is None: 2184s typ = resolve_cupy_type(val) 2184s 2184s if issubclass(typ, CupyArray): 2184s import cupy as cp 2184s 2184s if isinstance(val, CSMatrix): 2184s val = val.toarray() 2184s return cp.array(val) 2184s elif issubclass(typ, CupyCSRMatrix): 2184s import cupy as cp 2184s import cupyx.scipy.sparse as cpsparse 2184s 2184s if isinstance(val, np.ndarray): 2184s return cpsparse.csr_matrix(cp.array(val)) 2184s else: 2184s return cpsparse.csr_matrix(val) 2184s elif issubclass(typ, CupyCSCMatrix): 2184s > import cupy as cp 2184s E ModuleNotFoundError: No module named 'cupy' 2184s 2184s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:1024: ModuleNotFoundError 2184s _________ test_view_of_view[cupy_csc-array_int_subset-list_int_subset] _________ 2184s 2184s matrix_type = functools.partial(, typ=) 2184s subset_func = 2184s subset_func2 = 2184s 2184s def test_view_of_view(matrix_type, subset_func, subset_func2): 2184s > adata = gen_adata((30, 15), X_type=matrix_type) 2184s 2184s tests/test_views.py:531: 2184s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 2184s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:346: in gen_adata 2184s X = X_type(random_state.binomial(100, 0.005, (M, N)).astype(X_dtype)) 2184s /usr/lib/python3.13/functools.py:934: in wrapper 2184s return dispatch(args[0].__class__)(*args, **kw) 2184s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 2184s 2184s val = array([[0., 1., 0., 0., 0., 0., 0., 1., 1., 0., 0., 0., 0., 1., 3.], 2184s [1., 1., 1., 3., 1., 2., 1., 0., 0., 1., 0...0., 0., 2., 0., 0., 2., 0.], 2184s [2., 1., 0., 0., 0., 1., 0., 0., 0., 0., 1., 1., 0., 1., 1.]], 2184s dtype=float32) 2184s typ = 2184s 2184s @singledispatch 2184s def as_cupy(val, typ=None): 2184s """ 2184s Rough conversion function 2184s 2184s Will try to infer target type from input type if not specified. 2184s """ 2184s if typ is None: 2184s typ = resolve_cupy_type(val) 2184s 2184s if issubclass(typ, CupyArray): 2184s import cupy as cp 2184s 2184s if isinstance(val, CSMatrix): 2184s val = val.toarray() 2184s return cp.array(val) 2184s elif issubclass(typ, CupyCSRMatrix): 2184s import cupy as cp 2184s import cupyx.scipy.sparse as cpsparse 2184s 2184s if isinstance(val, np.ndarray): 2184s return cpsparse.csr_matrix(cp.array(val)) 2184s else: 2184s return cpsparse.csr_matrix(val) 2184s elif issubclass(typ, CupyCSCMatrix): 2184s > import cupy as cp 2184s E ModuleNotFoundError: No module named 'cupy' 2184s 2184s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:1024: ModuleNotFoundError 2184s ________ test_view_of_view[cupy_csc-array_int_subset-array_bool_subset] ________ 2184s 2184s matrix_type = functools.partial(, typ=) 2184s subset_func = 2184s subset_func2 = 2184s 2184s def test_view_of_view(matrix_type, subset_func, subset_func2): 2184s > adata = gen_adata((30, 15), X_type=matrix_type) 2184s 2184s tests/test_views.py:531: 2184s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 2184s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:346: in gen_adata 2184s X = X_type(random_state.binomial(100, 0.005, (M, N)).astype(X_dtype)) 2184s /usr/lib/python3.13/functools.py:934: in wrapper 2184s return dispatch(args[0].__class__)(*args, **kw) 2184s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 2184s 2184s val = array([[0., 0., 0., 1., 1., 1., 0., 1., 0., 0., 0., 0., 0., 2., 0.], 2184s [0., 0., 0., 0., 0., 0., 1., 0., 0., 0., 0...0., 0., 0., 1., 0., 0., 1.], 2184s [0., 2., 0., 1., 1., 0., 1., 0., 1., 0., 0., 0., 0., 0., 0.]], 2184s dtype=float32) 2184s typ = 2184s 2184s @singledispatch 2184s def as_cupy(val, typ=None): 2184s """ 2184s Rough conversion function 2184s 2184s Will try to infer target type from input type if not specified. 2184s """ 2184s if typ is None: 2184s typ = resolve_cupy_type(val) 2184s 2184s if issubclass(typ, CupyArray): 2184s import cupy as cp 2184s 2184s if isinstance(val, CSMatrix): 2184s val = val.toarray() 2184s return cp.array(val) 2184s elif issubclass(typ, CupyCSRMatrix): 2184s import cupy as cp 2184s import cupyx.scipy.sparse as cpsparse 2184s 2184s if isinstance(val, np.ndarray): 2184s return cpsparse.csr_matrix(cp.array(val)) 2184s else: 2184s return cpsparse.csr_matrix(val) 2184s elif issubclass(typ, CupyCSCMatrix): 2184s > import cupy as cp 2184s E ModuleNotFoundError: No module named 'cupy' 2184s 2184s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:1024: ModuleNotFoundError 2184s ________ test_view_of_view[cupy_csc-array_int_subset-list_bool_subset] _________ 2184s 2184s matrix_type = functools.partial(, typ=) 2184s subset_func = 2184s subset_func2 = 2184s 2184s def test_view_of_view(matrix_type, subset_func, subset_func2): 2184s > adata = gen_adata((30, 15), X_type=matrix_type) 2184s 2184s tests/test_views.py:531: 2184s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 2184s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:346: in gen_adata 2184s X = X_type(random_state.binomial(100, 0.005, (M, N)).astype(X_dtype)) 2184s /usr/lib/python3.13/functools.py:934: in wrapper 2184s return dispatch(args[0].__class__)(*args, **kw) 2184s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 2184s 2184s val = array([[2., 0., 0., 0., 1., 0., 2., 1., 0., 0., 0., 0., 0., 0., 0.], 2184s [0., 2., 1., 0., 1., 0., 0., 0., 1., 0., 0...0., 3., 0., 2., 0., 1., 1.], 2184s [1., 0., 0., 1., 0., 0., 0., 2., 0., 1., 0., 0., 2., 1., 0.]], 2184s dtype=float32) 2184s typ = 2184s 2184s @singledispatch 2184s def as_cupy(val, typ=None): 2184s """ 2184s Rough conversion function 2184s 2184s Will try to infer target type from input type if not specified. 2184s """ 2184s if typ is None: 2184s typ = resolve_cupy_type(val) 2184s 2184s if issubclass(typ, CupyArray): 2184s import cupy as cp 2184s 2184s if isinstance(val, CSMatrix): 2184s val = val.toarray() 2184s return cp.array(val) 2184s elif issubclass(typ, CupyCSRMatrix): 2184s import cupy as cp 2184s import cupyx.scipy.sparse as cpsparse 2184s 2184s if isinstance(val, np.ndarray): 2184s return cpsparse.csr_matrix(cp.array(val)) 2184s else: 2184s return cpsparse.csr_matrix(val) 2184s elif issubclass(typ, CupyCSCMatrix): 2184s > import cupy as cp 2184s E ModuleNotFoundError: No module named 'cupy' 2184s 2184s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:1024: ModuleNotFoundError 2184s _______ test_view_of_view[cupy_csc-array_int_subset-matrix_bool_subset] ________ 2184s 2184s matrix_type = functools.partial(, typ=) 2184s subset_func = 2184s subset_func2 = 2184s 2184s def test_view_of_view(matrix_type, subset_func, subset_func2): 2184s > adata = gen_adata((30, 15), X_type=matrix_type) 2184s 2184s tests/test_views.py:531: 2184s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 2184s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:346: in gen_adata 2184s X = X_type(random_state.binomial(100, 0.005, (M, N)).astype(X_dtype)) 2184s /usr/lib/python3.13/functools.py:934: in wrapper 2184s return dispatch(args[0].__class__)(*args, **kw) 2184s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 2184s 2184s val = array([[1., 0., 0., 0., 0., 0., 0., 0., 0., 1., 0., 1., 0., 1., 1.], 2184s [0., 1., 1., 0., 1., 0., 0., 1., 0., 2., 1...1., 0., 0., 0., 0., 0., 0.], 2184s [0., 0., 0., 0., 1., 0., 1., 1., 1., 1., 0., 0., 1., 0., 0.]], 2184s dtype=float32) 2184s typ = 2184s 2184s @singledispatch 2184s def as_cupy(val, typ=None): 2184s """ 2184s Rough conversion function 2184s 2184s Will try to infer target type from input type if not specified. 2184s """ 2184s if typ is None: 2184s typ = resolve_cupy_type(val) 2184s 2184s if issubclass(typ, CupyArray): 2184s import cupy as cp 2184s 2184s if isinstance(val, CSMatrix): 2184s val = val.toarray() 2184s return cp.array(val) 2184s elif issubclass(typ, CupyCSRMatrix): 2184s import cupy as cp 2184s import cupyx.scipy.sparse as cpsparse 2184s 2184s if isinstance(val, np.ndarray): 2184s return cpsparse.csr_matrix(cp.array(val)) 2184s else: 2184s return cpsparse.csr_matrix(val) 2184s elif issubclass(typ, CupyCSCMatrix): 2184s > import cupy as cp 2184s E ModuleNotFoundError: No module named 'cupy' 2184s 2184s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:1024: ModuleNotFoundError 2184s ______ test_view_of_view[cupy_csc-array_int_subset-spmatrix_bool_subset] _______ 2184s 2184s matrix_type = functools.partial(, typ=) 2184s subset_func = 2184s subset_func2 = 2184s 2184s def test_view_of_view(matrix_type, subset_func, subset_func2): 2184s > adata = gen_adata((30, 15), X_type=matrix_type) 2184s 2184s tests/test_views.py:531: 2184s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 2184s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:346: in gen_adata 2184s X = X_type(random_state.binomial(100, 0.005, (M, N)).astype(X_dtype)) 2184s /usr/lib/python3.13/functools.py:934: in wrapper 2184s return dispatch(args[0].__class__)(*args, **kw) 2184s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 2184s 2184s val = array([[0., 0., 1., 0., 2., 0., 2., 3., 0., 0., 0., 0., 0., 0., 1.], 2184s [1., 0., 0., 0., 0., 0., 0., 0., 2., 0., 1...0., 0., 1., 1., 1., 0., 1.], 2184s [0., 0., 0., 0., 1., 0., 0., 0., 0., 0., 1., 0., 2., 0., 0.]], 2184s dtype=float32) 2184s typ = 2184s 2184s @singledispatch 2184s def as_cupy(val, typ=None): 2184s """ 2184s Rough conversion function 2184s 2184s Will try to infer target type from input type if not specified. 2184s """ 2184s if typ is None: 2184s typ = resolve_cupy_type(val) 2184s 2184s if issubclass(typ, CupyArray): 2184s import cupy as cp 2184s 2184s if isinstance(val, CSMatrix): 2184s val = val.toarray() 2184s return cp.array(val) 2184s elif issubclass(typ, CupyCSRMatrix): 2184s import cupy as cp 2184s import cupyx.scipy.sparse as cpsparse 2184s 2184s if isinstance(val, np.ndarray): 2184s return cpsparse.csr_matrix(cp.array(val)) 2184s else: 2184s return cpsparse.csr_matrix(val) 2184s elif issubclass(typ, CupyCSCMatrix): 2184s > import cupy as cp 2184s E ModuleNotFoundError: No module named 'cupy' 2184s 2184s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:1024: ModuleNotFoundError 2184s _______ test_view_of_view[cupy_csc-array_int_subset-sparray_bool_subset] _______ 2184s 2184s matrix_type = functools.partial(, typ=) 2184s subset_func = 2184s subset_func2 = 2184s 2184s def test_view_of_view(matrix_type, subset_func, subset_func2): 2184s > adata = gen_adata((30, 15), X_type=matrix_type) 2184s 2184s tests/test_views.py:531: 2184s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 2184s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:346: in gen_adata 2184s X = X_type(random_state.binomial(100, 0.005, (M, N)).astype(X_dtype)) 2184s /usr/lib/python3.13/functools.py:934: in wrapper 2184s return dispatch(args[0].__class__)(*args, **kw) 2184s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 2184s 2184s val = array([[0., 0., 1., 0., 0., 1., 0., 1., 0., 0., 0., 0., 0., 0., 2.], 2184s [0., 0., 0., 0., 0., 0., 0., 0., 1., 0., 0...0., 0., 0., 0., 0., 2., 0.], 2184s [2., 1., 0., 0., 1., 1., 1., 0., 0., 1., 1., 1., 0., 0., 3.]], 2184s dtype=float32) 2184s typ = 2184s 2184s @singledispatch 2184s def as_cupy(val, typ=None): 2184s """ 2184s Rough conversion function 2184s 2184s Will try to infer target type from input type if not specified. 2184s """ 2184s if typ is None: 2184s typ = resolve_cupy_type(val) 2184s 2184s if issubclass(typ, CupyArray): 2184s import cupy as cp 2184s 2184s if isinstance(val, CSMatrix): 2184s val = val.toarray() 2184s return cp.array(val) 2184s elif issubclass(typ, CupyCSRMatrix): 2184s import cupy as cp 2184s import cupyx.scipy.sparse as cpsparse 2184s 2184s if isinstance(val, np.ndarray): 2184s return cpsparse.csr_matrix(cp.array(val)) 2184s else: 2184s return cpsparse.csr_matrix(val) 2184s elif issubclass(typ, CupyCSCMatrix): 2184s > import cupy as cp 2184s E ModuleNotFoundError: No module named 'cupy' 2184s 2184s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:1024: ModuleNotFoundError 2184s ___________ test_view_of_view[cupy_csc-list_int_subset-array_subset] ___________ 2184s 2184s matrix_type = functools.partial(, typ=) 2184s subset_func = 2184s subset_func2 = 2184s 2184s def test_view_of_view(matrix_type, subset_func, subset_func2): 2184s > adata = gen_adata((30, 15), X_type=matrix_type) 2184s 2184s tests/test_views.py:531: 2184s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 2184s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:346: in gen_adata 2184s X = X_type(random_state.binomial(100, 0.005, (M, N)).astype(X_dtype)) 2184s /usr/lib/python3.13/functools.py:934: in wrapper 2184s return dispatch(args[0].__class__)(*args, **kw) 2184s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 2184s 2184s val = array([[1., 0., 1., 0., 0., 0., 1., 0., 1., 0., 1., 1., 0., 1., 0.], 2184s [0., 0., 1., 0., 0., 0., 1., 2., 0., 2., 0...0., 1., 0., 0., 0., 0., 0.], 2184s [0., 1., 0., 0., 1., 0., 1., 0., 0., 0., 0., 0., 0., 0., 1.]], 2184s dtype=float32) 2184s typ = 2184s 2184s @singledispatch 2184s def as_cupy(val, typ=None): 2184s """ 2184s Rough conversion function 2184s 2184s Will try to infer target type from input type if not specified. 2184s """ 2184s if typ is None: 2184s typ = resolve_cupy_type(val) 2184s 2184s if issubclass(typ, CupyArray): 2184s import cupy as cp 2184s 2184s if isinstance(val, CSMatrix): 2184s val = val.toarray() 2184s return cp.array(val) 2184s elif issubclass(typ, CupyCSRMatrix): 2184s import cupy as cp 2184s import cupyx.scipy.sparse as cpsparse 2184s 2184s if isinstance(val, np.ndarray): 2184s return cpsparse.csr_matrix(cp.array(val)) 2184s else: 2184s return cpsparse.csr_matrix(val) 2184s elif issubclass(typ, CupyCSCMatrix): 2184s > import cupy as cp 2184s E ModuleNotFoundError: No module named 'cupy' 2184s 2184s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:1024: ModuleNotFoundError 2184s ___________ test_view_of_view[cupy_csc-list_int_subset-slice_subset] ___________ 2184s 2184s matrix_type = functools.partial(, typ=) 2184s subset_func = 2184s subset_func2 = 2184s 2184s def test_view_of_view(matrix_type, subset_func, subset_func2): 2184s > adata = gen_adata((30, 15), X_type=matrix_type) 2184s 2184s tests/test_views.py:531: 2184s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 2184s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:346: in gen_adata 2184s X = X_type(random_state.binomial(100, 0.005, (M, N)).astype(X_dtype)) 2184s /usr/lib/python3.13/functools.py:934: in wrapper 2184s return dispatch(args[0].__class__)(*args, **kw) 2184s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 2184s 2184s val = array([[1., 1., 0., 1., 0., 0., 0., 0., 0., 0., 0., 0., 1., 0., 0.], 2184s [1., 0., 1., 0., 0., 1., 0., 2., 0., 0., 1...0., 0., 1., 0., 0., 1., 1.], 2184s [0., 0., 0., 0., 2., 2., 1., 1., 0., 0., 0., 0., 0., 0., 0.]], 2184s dtype=float32) 2184s typ = 2184s 2184s @singledispatch 2184s def as_cupy(val, typ=None): 2184s """ 2184s Rough conversion function 2184s 2184s Will try to infer target type from input type if not specified. 2184s """ 2184s if typ is None: 2184s typ = resolve_cupy_type(val) 2184s 2184s if issubclass(typ, CupyArray): 2184s import cupy as cp 2184s 2184s if isinstance(val, CSMatrix): 2184s val = val.toarray() 2184s return cp.array(val) 2184s elif issubclass(typ, CupyCSRMatrix): 2184s import cupy as cp 2184s import cupyx.scipy.sparse as cpsparse 2184s 2184s if isinstance(val, np.ndarray): 2184s return cpsparse.csr_matrix(cp.array(val)) 2184s else: 2184s return cpsparse.csr_matrix(val) 2184s elif issubclass(typ, CupyCSCMatrix): 2184s > import cupy as cp 2184s E ModuleNotFoundError: No module named 'cupy' 2184s 2184s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:1024: ModuleNotFoundError 2184s __________ test_view_of_view[cupy_csc-list_int_subset-single_subset] ___________ 2184s 2184s matrix_type = functools.partial(, typ=) 2184s subset_func = 2184s subset_func2 = 2184s 2184s def test_view_of_view(matrix_type, subset_func, subset_func2): 2184s > adata = gen_adata((30, 15), X_type=matrix_type) 2184s 2184s tests/test_views.py:531: 2184s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 2184s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:346: in gen_adata 2184s X = X_type(random_state.binomial(100, 0.005, (M, N)).astype(X_dtype)) 2184s /usr/lib/python3.13/functools.py:934: in wrapper 2184s return dispatch(args[0].__class__)(*args, **kw) 2184s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 2184s 2184s val = array([[1., 1., 0., 1., 0., 0., 0., 0., 0., 0., 0., 1., 0., 1., 0.], 2184s [0., 1., 0., 0., 2., 0., 1., 1., 0., 1., 0...2., 0., 1., 1., 1., 0., 0.], 2184s [1., 1., 0., 1., 0., 0., 0., 0., 0., 0., 0., 2., 1., 0., 1.]], 2184s dtype=float32) 2184s typ = 2184s 2184s @singledispatch 2184s def as_cupy(val, typ=None): 2184s """ 2184s Rough conversion function 2184s 2184s Will try to infer target type from input type if not specified. 2184s """ 2184s if typ is None: 2184s typ = resolve_cupy_type(val) 2184s 2184s if issubclass(typ, CupyArray): 2184s import cupy as cp 2184s 2184s if isinstance(val, CSMatrix): 2184s val = val.toarray() 2184s return cp.array(val) 2184s elif issubclass(typ, CupyCSRMatrix): 2184s import cupy as cp 2184s import cupyx.scipy.sparse as cpsparse 2184s 2184s if isinstance(val, np.ndarray): 2184s return cpsparse.csr_matrix(cp.array(val)) 2184s else: 2184s return cpsparse.csr_matrix(val) 2184s elif issubclass(typ, CupyCSCMatrix): 2184s > import cupy as cp 2184s E ModuleNotFoundError: No module named 'cupy' 2184s 2184s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:1024: ModuleNotFoundError 2184s _________ test_view_of_view[cupy_csc-list_int_subset-array_int_subset] _________ 2184s 2184s matrix_type = functools.partial(, typ=) 2184s subset_func = 2184s subset_func2 = 2184s 2184s def test_view_of_view(matrix_type, subset_func, subset_func2): 2184s > adata = gen_adata((30, 15), X_type=matrix_type) 2184s 2184s tests/test_views.py:531: 2184s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 2184s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:346: in gen_adata 2184s X = X_type(random_state.binomial(100, 0.005, (M, N)).astype(X_dtype)) 2184s /usr/lib/python3.13/functools.py:934: in wrapper 2184s return dispatch(args[0].__class__)(*args, **kw) 2184s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 2184s 2184s val = array([[1., 1., 0., 1., 1., 0., 0., 1., 2., 0., 1., 0., 0., 1., 1.], 2184s [2., 1., 0., 0., 0., 0., 0., 0., 0., 2., 0...1., 1., 0., 1., 0., 0., 0.], 2184s [0., 0., 0., 3., 1., 0., 0., 1., 2., 1., 0., 1., 0., 1., 1.]], 2184s dtype=float32) 2184s typ = 2184s 2184s @singledispatch 2184s def as_cupy(val, typ=None): 2184s """ 2184s Rough conversion function 2184s 2184s Will try to infer target type from input type if not specified. 2184s """ 2184s if typ is None: 2184s typ = resolve_cupy_type(val) 2184s 2184s if issubclass(typ, CupyArray): 2184s import cupy as cp 2184s 2184s if isinstance(val, CSMatrix): 2184s val = val.toarray() 2184s return cp.array(val) 2184s elif issubclass(typ, CupyCSRMatrix): 2184s import cupy as cp 2184s import cupyx.scipy.sparse as cpsparse 2184s 2184s if isinstance(val, np.ndarray): 2184s return cpsparse.csr_matrix(cp.array(val)) 2184s else: 2184s return cpsparse.csr_matrix(val) 2184s elif issubclass(typ, CupyCSCMatrix): 2184s > import cupy as cp 2184s E ModuleNotFoundError: No module named 'cupy' 2184s 2184s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:1024: ModuleNotFoundError 2184s _________ test_view_of_view[cupy_csc-list_int_subset-list_int_subset] __________ 2184s 2184s matrix_type = functools.partial(, typ=) 2184s subset_func = 2184s subset_func2 = 2184s 2184s def test_view_of_view(matrix_type, subset_func, subset_func2): 2184s > adata = gen_adata((30, 15), X_type=matrix_type) 2184s 2184s tests/test_views.py:531: 2184s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 2184s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:346: in gen_adata 2184s X = X_type(random_state.binomial(100, 0.005, (M, N)).astype(X_dtype)) 2184s /usr/lib/python3.13/functools.py:934: in wrapper 2184s return dispatch(args[0].__class__)(*args, **kw) 2184s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 2184s 2184s val = array([[2., 1., 1., 1., 0., 1., 0., 1., 0., 1., 0., 1., 0., 1., 1.], 2184s [0., 0., 0., 1., 1., 1., 0., 1., 1., 0., 0...0., 1., 2., 2., 2., 0., 0.], 2184s [1., 0., 0., 1., 0., 1., 0., 1., 0., 0., 1., 0., 1., 0., 0.]], 2184s dtype=float32) 2184s typ = 2184s 2184s @singledispatch 2184s def as_cupy(val, typ=None): 2184s """ 2184s Rough conversion function 2184s 2184s Will try to infer target type from input type if not specified. 2184s """ 2184s if typ is None: 2184s typ = resolve_cupy_type(val) 2184s 2184s if issubclass(typ, CupyArray): 2184s import cupy as cp 2184s 2184s if isinstance(val, CSMatrix): 2184s val = val.toarray() 2184s return cp.array(val) 2184s elif issubclass(typ, CupyCSRMatrix): 2184s import cupy as cp 2184s import cupyx.scipy.sparse as cpsparse 2184s 2184s if isinstance(val, np.ndarray): 2184s return cpsparse.csr_matrix(cp.array(val)) 2184s else: 2184s return cpsparse.csr_matrix(val) 2184s elif issubclass(typ, CupyCSCMatrix): 2184s > import cupy as cp 2184s E ModuleNotFoundError: No module named 'cupy' 2184s 2184s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:1024: ModuleNotFoundError 2184s ________ test_view_of_view[cupy_csc-list_int_subset-array_bool_subset] _________ 2184s 2184s matrix_type = functools.partial(, typ=) 2184s subset_func = 2184s subset_func2 = 2184s 2184s def test_view_of_view(matrix_type, subset_func, subset_func2): 2184s > adata = gen_adata((30, 15), X_type=matrix_type) 2184s 2184s tests/test_views.py:531: 2184s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 2184s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:346: in gen_adata 2184s X = X_type(random_state.binomial(100, 0.005, (M, N)).astype(X_dtype)) 2184s /usr/lib/python3.13/functools.py:934: in wrapper 2184s return dispatch(args[0].__class__)(*args, **kw) 2184s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 2184s 2184s val = array([[0., 0., 0., 0., 0., 0., 1., 0., 0., 0., 0., 0., 3., 0., 1.], 2184s [0., 1., 0., 0., 0., 1., 0., 0., 0., 0., 1...0., 3., 0., 0., 0., 0., 1.], 2184s [0., 2., 0., 0., 0., 0., 3., 0., 0., 0., 0., 1., 0., 0., 2.]], 2184s dtype=float32) 2184s typ = 2184s 2184s @singledispatch 2184s def as_cupy(val, typ=None): 2184s """ 2184s Rough conversion function 2184s 2184s Will try to infer target type from input type if not specified. 2184s """ 2184s if typ is None: 2184s typ = resolve_cupy_type(val) 2184s 2184s if issubclass(typ, CupyArray): 2184s import cupy as cp 2184s 2184s if isinstance(val, CSMatrix): 2184s val = val.toarray() 2184s return cp.array(val) 2184s elif issubclass(typ, CupyCSRMatrix): 2184s import cupy as cp 2184s import cupyx.scipy.sparse as cpsparse 2184s 2184s if isinstance(val, np.ndarray): 2184s return cpsparse.csr_matrix(cp.array(val)) 2184s else: 2184s return cpsparse.csr_matrix(val) 2184s elif issubclass(typ, CupyCSCMatrix): 2184s > import cupy as cp 2184s E ModuleNotFoundError: No module named 'cupy' 2184s 2184s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:1024: ModuleNotFoundError 2184s _________ test_view_of_view[cupy_csc-list_int_subset-list_bool_subset] _________ 2184s 2184s matrix_type = functools.partial(, typ=) 2184s subset_func = 2184s subset_func2 = 2184s 2184s def test_view_of_view(matrix_type, subset_func, subset_func2): 2184s > adata = gen_adata((30, 15), X_type=matrix_type) 2184s 2184s tests/test_views.py:531: 2184s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 2184s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:346: in gen_adata 2184s X = X_type(random_state.binomial(100, 0.005, (M, N)).astype(X_dtype)) 2184s /usr/lib/python3.13/functools.py:934: in wrapper 2184s return dispatch(args[0].__class__)(*args, **kw) 2184s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 2184s 2184s val = array([[0., 1., 1., 1., 0., 2., 0., 0., 2., 0., 1., 2., 3., 0., 0.], 2184s [0., 0., 1., 0., 1., 1., 1., 0., 0., 0., 0...0., 0., 1., 1., 1., 0., 1.], 2184s [0., 0., 0., 0., 1., 1., 0., 0., 1., 0., 1., 1., 0., 0., 1.]], 2184s dtype=float32) 2184s typ = 2184s 2184s @singledispatch 2184s def as_cupy(val, typ=None): 2184s """ 2184s Rough conversion function 2184s 2184s Will try to infer target type from input type if not specified. 2184s """ 2184s if typ is None: 2184s typ = resolve_cupy_type(val) 2184s 2184s if issubclass(typ, CupyArray): 2184s import cupy as cp 2184s 2184s if isinstance(val, CSMatrix): 2184s val = val.toarray() 2184s return cp.array(val) 2184s elif issubclass(typ, CupyCSRMatrix): 2184s import cupy as cp 2184s import cupyx.scipy.sparse as cpsparse 2184s 2184s if isinstance(val, np.ndarray): 2184s return cpsparse.csr_matrix(cp.array(val)) 2184s else: 2184s return cpsparse.csr_matrix(val) 2184s elif issubclass(typ, CupyCSCMatrix): 2184s > import cupy as cp 2184s E ModuleNotFoundError: No module named 'cupy' 2184s 2184s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:1024: ModuleNotFoundError 2184s ________ test_view_of_view[cupy_csc-list_int_subset-matrix_bool_subset] ________ 2184s 2184s matrix_type = functools.partial(, typ=) 2184s subset_func = 2184s subset_func2 = 2184s 2184s def test_view_of_view(matrix_type, subset_func, subset_func2): 2184s > adata = gen_adata((30, 15), X_type=matrix_type) 2184s 2184s tests/test_views.py:531: 2184s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 2184s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:346: in gen_adata 2184s X = X_type(random_state.binomial(100, 0.005, (M, N)).astype(X_dtype)) 2184s /usr/lib/python3.13/functools.py:934: in wrapper 2184s return dispatch(args[0].__class__)(*args, **kw) 2184s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 2184s 2184s val = array([[1., 0., 0., 1., 0., 0., 0., 0., 0., 1., 0., 1., 1., 0., 0.], 2184s [0., 2., 0., 1., 0., 2., 0., 0., 0., 0., 0...3., 0., 0., 1., 0., 1., 1.], 2184s [0., 0., 0., 1., 1., 1., 0., 1., 0., 0., 2., 0., 0., 1., 0.]], 2184s dtype=float32) 2184s typ = 2184s 2184s @singledispatch 2184s def as_cupy(val, typ=None): 2184s """ 2184s Rough conversion function 2184s 2184s Will try to infer target type from input type if not specified. 2184s """ 2184s if typ is None: 2184s typ = resolve_cupy_type(val) 2184s 2184s if issubclass(typ, CupyArray): 2184s import cupy as cp 2184s 2184s if isinstance(val, CSMatrix): 2184s val = val.toarray() 2184s return cp.array(val) 2184s elif issubclass(typ, CupyCSRMatrix): 2184s import cupy as cp 2184s import cupyx.scipy.sparse as cpsparse 2184s 2184s if isinstance(val, np.ndarray): 2184s return cpsparse.csr_matrix(cp.array(val)) 2184s else: 2184s return cpsparse.csr_matrix(val) 2184s elif issubclass(typ, CupyCSCMatrix): 2184s > import cupy as cp 2184s E ModuleNotFoundError: No module named 'cupy' 2184s 2184s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:1024: ModuleNotFoundError 2184s _______ test_view_of_view[cupy_csc-list_int_subset-spmatrix_bool_subset] _______ 2184s 2184s matrix_type = functools.partial(, typ=) 2184s subset_func = 2184s subset_func2 = 2184s 2184s def test_view_of_view(matrix_type, subset_func, subset_func2): 2184s > adata = gen_adata((30, 15), X_type=matrix_type) 2184s 2184s tests/test_views.py:531: 2184s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 2184s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:346: in gen_adata 2184s X = X_type(random_state.binomial(100, 0.005, (M, N)).astype(X_dtype)) 2184s /usr/lib/python3.13/functools.py:934: in wrapper 2184s return dispatch(args[0].__class__)(*args, **kw) 2184s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 2184s 2184s val = array([[0., 1., 0., 0., 0., 1., 0., 0., 0., 1., 0., 1., 1., 1., 1.], 2184s [1., 1., 1., 0., 0., 0., 0., 1., 0., 0., 1...0., 0., 0., 0., 0., 0., 1.], 2184s [0., 2., 1., 3., 0., 0., 1., 1., 0., 1., 0., 0., 3., 1., 1.]], 2184s dtype=float32) 2184s typ = 2184s 2184s @singledispatch 2184s def as_cupy(val, typ=None): 2184s """ 2184s Rough conversion function 2184s 2184s Will try to infer target type from input type if not specified. 2184s """ 2184s if typ is None: 2184s typ = resolve_cupy_type(val) 2184s 2184s if issubclass(typ, CupyArray): 2184s import cupy as cp 2184s 2184s if isinstance(val, CSMatrix): 2184s val = val.toarray() 2184s return cp.array(val) 2184s elif issubclass(typ, CupyCSRMatrix): 2184s import cupy as cp 2184s import cupyx.scipy.sparse as cpsparse 2184s 2184s if isinstance(val, np.ndarray): 2184s return cpsparse.csr_matrix(cp.array(val)) 2184s else: 2184s return cpsparse.csr_matrix(val) 2184s elif issubclass(typ, CupyCSCMatrix): 2184s > import cupy as cp 2184s E ModuleNotFoundError: No module named 'cupy' 2184s 2184s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:1024: ModuleNotFoundError 2184s _______ test_view_of_view[cupy_csc-list_int_subset-sparray_bool_subset] ________ 2184s 2184s matrix_type = functools.partial(, typ=) 2184s subset_func = 2184s subset_func2 = 2184s 2184s def test_view_of_view(matrix_type, subset_func, subset_func2): 2184s > adata = gen_adata((30, 15), X_type=matrix_type) 2184s 2184s tests/test_views.py:531: 2184s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 2184s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:346: in gen_adata 2184s X = X_type(random_state.binomial(100, 0.005, (M, N)).astype(X_dtype)) 2184s /usr/lib/python3.13/functools.py:934: in wrapper 2184s return dispatch(args[0].__class__)(*args, **kw) 2184s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 2184s 2184s val = array([[0., 0., 0., 1., 0., 0., 1., 0., 0., 0., 2., 0., 1., 0., 1.], 2184s [1., 1., 0., 1., 0., 0., 0., 0., 1., 0., 1...0., 0., 0., 1., 1., 0., 0.], 2184s [0., 1., 0., 1., 0., 2., 3., 0., 0., 1., 1., 0., 0., 1., 0.]], 2184s dtype=float32) 2184s typ = 2184s 2184s @singledispatch 2184s def as_cupy(val, typ=None): 2184s """ 2184s Rough conversion function 2184s 2184s Will try to infer target type from input type if not specified. 2184s """ 2184s if typ is None: 2184s typ = resolve_cupy_type(val) 2184s 2184s if issubclass(typ, CupyArray): 2184s import cupy as cp 2184s 2184s if isinstance(val, CSMatrix): 2184s val = val.toarray() 2184s return cp.array(val) 2184s elif issubclass(typ, CupyCSRMatrix): 2184s import cupy as cp 2184s import cupyx.scipy.sparse as cpsparse 2184s 2184s if isinstance(val, np.ndarray): 2184s return cpsparse.csr_matrix(cp.array(val)) 2184s else: 2184s return cpsparse.csr_matrix(val) 2184s elif issubclass(typ, CupyCSCMatrix): 2184s > import cupy as cp 2184s E ModuleNotFoundError: No module named 'cupy' 2184s 2184s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:1024: ModuleNotFoundError 2184s __________ test_view_of_view[cupy_csc-array_bool_subset-array_subset] __________ 2184s 2184s matrix_type = functools.partial(, typ=) 2184s subset_func = 2184s subset_func2 = 2184s 2184s def test_view_of_view(matrix_type, subset_func, subset_func2): 2184s > adata = gen_adata((30, 15), X_type=matrix_type) 2184s 2184s tests/test_views.py:531: 2184s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 2184s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:346: in gen_adata 2184s X = X_type(random_state.binomial(100, 0.005, (M, N)).astype(X_dtype)) 2184s /usr/lib/python3.13/functools.py:934: in wrapper 2184s return dispatch(args[0].__class__)(*args, **kw) 2184s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 2184s 2184s val = array([[1., 0., 0., 0., 1., 0., 0., 0., 0., 1., 0., 1., 1., 1., 0.], 2184s [1., 0., 1., 0., 0., 0., 1., 0., 0., 0., 0...0., 0., 0., 0., 0., 1., 1.], 2184s [0., 0., 1., 1., 1., 0., 1., 1., 0., 0., 1., 0., 0., 2., 0.]], 2184s dtype=float32) 2184s typ = 2184s 2184s @singledispatch 2184s def as_cupy(val, typ=None): 2184s """ 2184s Rough conversion function 2184s 2184s Will try to infer target type from input type if not specified. 2184s """ 2184s if typ is None: 2184s typ = resolve_cupy_type(val) 2184s 2184s if issubclass(typ, CupyArray): 2184s import cupy as cp 2184s 2184s if isinstance(val, CSMatrix): 2184s val = val.toarray() 2184s return cp.array(val) 2184s elif issubclass(typ, CupyCSRMatrix): 2184s import cupy as cp 2184s import cupyx.scipy.sparse as cpsparse 2184s 2184s if isinstance(val, np.ndarray): 2184s return cpsparse.csr_matrix(cp.array(val)) 2184s else: 2184s return cpsparse.csr_matrix(val) 2184s elif issubclass(typ, CupyCSCMatrix): 2184s > import cupy as cp 2184s E ModuleNotFoundError: No module named 'cupy' 2184s 2184s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:1024: ModuleNotFoundError 2184s __________ test_view_of_view[cupy_csc-array_bool_subset-slice_subset] __________ 2184s 2184s matrix_type = functools.partial(, typ=) 2184s subset_func = 2184s subset_func2 = 2184s 2184s def test_view_of_view(matrix_type, subset_func, subset_func2): 2184s > adata = gen_adata((30, 15), X_type=matrix_type) 2184s 2184s tests/test_views.py:531: 2184s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 2184s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:346: in gen_adata 2184s X = X_type(random_state.binomial(100, 0.005, (M, N)).astype(X_dtype)) 2184s /usr/lib/python3.13/functools.py:934: in wrapper 2184s return dispatch(args[0].__class__)(*args, **kw) 2184s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 2184s 2184s val = array([[0., 0., 2., 0., 1., 0., 0., 1., 0., 0., 0., 0., 0., 1., 1.], 2184s [1., 0., 0., 0., 1., 2., 2., 0., 0., 1., 0...1., 0., 0., 0., 0., 1., 0.], 2184s [1., 1., 0., 0., 2., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0.]], 2184s dtype=float32) 2184s typ = 2184s 2184s @singledispatch 2184s def as_cupy(val, typ=None): 2184s """ 2184s Rough conversion function 2184s 2184s Will try to infer target type from input type if not specified. 2184s """ 2184s if typ is None: 2184s typ = resolve_cupy_type(val) 2184s 2184s if issubclass(typ, CupyArray): 2184s import cupy as cp 2184s 2184s if isinstance(val, CSMatrix): 2184s val = val.toarray() 2184s return cp.array(val) 2184s elif issubclass(typ, CupyCSRMatrix): 2184s import cupy as cp 2184s import cupyx.scipy.sparse as cpsparse 2184s 2184s if isinstance(val, np.ndarray): 2184s return cpsparse.csr_matrix(cp.array(val)) 2184s else: 2184s return cpsparse.csr_matrix(val) 2184s elif issubclass(typ, CupyCSCMatrix): 2184s > import cupy as cp 2184s E ModuleNotFoundError: No module named 'cupy' 2184s 2184s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:1024: ModuleNotFoundError 2184s _________ test_view_of_view[cupy_csc-array_bool_subset-single_subset] __________ 2184s 2184s matrix_type = functools.partial(, typ=) 2184s subset_func = 2184s subset_func2 = 2184s 2184s def test_view_of_view(matrix_type, subset_func, subset_func2): 2184s > adata = gen_adata((30, 15), X_type=matrix_type) 2184s 2184s tests/test_views.py:531: 2184s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 2184s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:346: in gen_adata 2184s X = X_type(random_state.binomial(100, 0.005, (M, N)).astype(X_dtype)) 2184s /usr/lib/python3.13/functools.py:934: in wrapper 2184s return dispatch(args[0].__class__)(*args, **kw) 2184s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 2184s 2184s val = array([[1., 0., 1., 0., 0., 0., 0., 1., 2., 1., 3., 2., 0., 0., 0.], 2184s [0., 0., 0., 1., 0., 0., 0., 1., 1., 0., 0...1., 2., 0., 0., 2., 2., 2.], 2184s [1., 2., 0., 2., 0., 0., 0., 0., 1., 1., 1., 0., 0., 0., 1.]], 2184s dtype=float32) 2184s typ = 2184s 2184s @singledispatch 2184s def as_cupy(val, typ=None): 2184s """ 2184s Rough conversion function 2184s 2184s Will try to infer target type from input type if not specified. 2184s """ 2184s if typ is None: 2184s typ = resolve_cupy_type(val) 2184s 2184s if issubclass(typ, CupyArray): 2184s import cupy as cp 2184s 2184s if isinstance(val, CSMatrix): 2184s val = val.toarray() 2184s return cp.array(val) 2184s elif issubclass(typ, CupyCSRMatrix): 2184s import cupy as cp 2184s import cupyx.scipy.sparse as cpsparse 2184s 2184s if isinstance(val, np.ndarray): 2184s return cpsparse.csr_matrix(cp.array(val)) 2184s else: 2184s return cpsparse.csr_matrix(val) 2184s elif issubclass(typ, CupyCSCMatrix): 2184s > import cupy as cp 2184s E ModuleNotFoundError: No module named 'cupy' 2184s 2184s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:1024: ModuleNotFoundError 2184s ________ test_view_of_view[cupy_csc-array_bool_subset-array_int_subset] ________ 2184s 2184s matrix_type = functools.partial(, typ=) 2184s subset_func = 2184s subset_func2 = 2184s 2184s def test_view_of_view(matrix_type, subset_func, subset_func2): 2184s > adata = gen_adata((30, 15), X_type=matrix_type) 2184s 2184s tests/test_views.py:531: 2184s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 2184s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:346: in gen_adata 2184s X = X_type(random_state.binomial(100, 0.005, (M, N)).astype(X_dtype)) 2184s /usr/lib/python3.13/functools.py:934: in wrapper 2184s return dispatch(args[0].__class__)(*args, **kw) 2184s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 2184s 2184s val = array([[1., 0., 0., 0., 1., 0., 1., 0., 0., 0., 1., 2., 0., 1., 0.], 2184s [0., 1., 1., 0., 0., 0., 1., 0., 0., 0., 0...0., 0., 2., 0., 1., 0., 0.], 2184s [1., 0., 1., 0., 0., 0., 0., 0., 1., 1., 0., 0., 1., 0., 0.]], 2184s dtype=float32) 2184s typ = 2184s 2184s @singledispatch 2184s def as_cupy(val, typ=None): 2184s """ 2184s Rough conversion function 2184s 2184s Will try to infer target type from input type if not specified. 2184s """ 2184s if typ is None: 2184s typ = resolve_cupy_type(val) 2184s 2184s if issubclass(typ, CupyArray): 2184s import cupy as cp 2184s 2184s if isinstance(val, CSMatrix): 2184s val = val.toarray() 2184s return cp.array(val) 2184s elif issubclass(typ, CupyCSRMatrix): 2184s import cupy as cp 2184s import cupyx.scipy.sparse as cpsparse 2184s 2184s if isinstance(val, np.ndarray): 2184s return cpsparse.csr_matrix(cp.array(val)) 2184s else: 2184s return cpsparse.csr_matrix(val) 2184s elif issubclass(typ, CupyCSCMatrix): 2184s > import cupy as cp 2184s E ModuleNotFoundError: No module named 'cupy' 2184s 2184s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:1024: ModuleNotFoundError 2184s ________ test_view_of_view[cupy_csc-array_bool_subset-list_int_subset] _________ 2184s 2184s matrix_type = functools.partial(, typ=) 2184s subset_func = 2184s subset_func2 = 2184s 2184s def test_view_of_view(matrix_type, subset_func, subset_func2): 2184s > adata = gen_adata((30, 15), X_type=matrix_type) 2184s 2184s tests/test_views.py:531: 2184s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 2184s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:346: in gen_adata 2184s X = X_type(random_state.binomial(100, 0.005, (M, N)).astype(X_dtype)) 2184s /usr/lib/python3.13/functools.py:934: in wrapper 2184s return dispatch(args[0].__class__)(*args, **kw) 2184s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 2184s 2184s val = array([[0., 0., 0., 1., 2., 1., 0., 0., 1., 0., 0., 0., 1., 0., 1.], 2184s [0., 0., 0., 1., 0., 2., 0., 0., 1., 2., 0...1., 1., 1., 0., 1., 1., 1.], 2184s [0., 0., 1., 0., 0., 0., 1., 1., 0., 0., 1., 0., 1., 0., 2.]], 2184s dtype=float32) 2184s typ = 2184s 2184s @singledispatch 2184s def as_cupy(val, typ=None): 2184s """ 2184s Rough conversion function 2184s 2184s Will try to infer target type from input type if not specified. 2184s """ 2184s if typ is None: 2184s typ = resolve_cupy_type(val) 2184s 2184s if issubclass(typ, CupyArray): 2184s import cupy as cp 2184s 2184s if isinstance(val, CSMatrix): 2184s val = val.toarray() 2184s return cp.array(val) 2184s elif issubclass(typ, CupyCSRMatrix): 2184s import cupy as cp 2184s import cupyx.scipy.sparse as cpsparse 2184s 2184s if isinstance(val, np.ndarray): 2184s return cpsparse.csr_matrix(cp.array(val)) 2184s else: 2184s return cpsparse.csr_matrix(val) 2184s elif issubclass(typ, CupyCSCMatrix): 2184s > import cupy as cp 2184s E ModuleNotFoundError: No module named 'cupy' 2184s 2184s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:1024: ModuleNotFoundError 2184s _______ test_view_of_view[cupy_csc-array_bool_subset-array_bool_subset] ________ 2184s 2184s matrix_type = functools.partial(, typ=) 2184s subset_func = 2184s subset_func2 = 2184s 2184s def test_view_of_view(matrix_type, subset_func, subset_func2): 2184s > adata = gen_adata((30, 15), X_type=matrix_type) 2184s 2184s tests/test_views.py:531: 2184s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 2184s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:346: in gen_adata 2184s X = X_type(random_state.binomial(100, 0.005, (M, N)).astype(X_dtype)) 2184s /usr/lib/python3.13/functools.py:934: in wrapper 2184s return dispatch(args[0].__class__)(*args, **kw) 2184s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 2184s 2184s val = array([[0., 0., 1., 0., 0., 0., 0., 0., 0., 0., 2., 0., 1., 0., 0.], 2184s [0., 0., 1., 0., 1., 2., 0., 1., 0., 1., 0...0., 0., 0., 1., 0., 0., 0.], 2184s [0., 0., 1., 0., 1., 2., 0., 0., 0., 0., 0., 2., 0., 0., 0.]], 2184s dtype=float32) 2184s typ = 2184s 2184s @singledispatch 2184s def as_cupy(val, typ=None): 2184s """ 2184s Rough conversion function 2184s 2184s Will try to infer target type from input type if not specified. 2184s """ 2184s if typ is None: 2184s typ = resolve_cupy_type(val) 2184s 2184s if issubclass(typ, CupyArray): 2184s import cupy as cp 2184s 2184s if isinstance(val, CSMatrix): 2184s val = val.toarray() 2184s return cp.array(val) 2184s elif issubclass(typ, CupyCSRMatrix): 2184s import cupy as cp 2184s import cupyx.scipy.sparse as cpsparse 2184s 2184s if isinstance(val, np.ndarray): 2184s return cpsparse.csr_matrix(cp.array(val)) 2184s else: 2184s return cpsparse.csr_matrix(val) 2184s elif issubclass(typ, CupyCSCMatrix): 2184s > import cupy as cp 2184s E ModuleNotFoundError: No module named 'cupy' 2184s 2184s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:1024: ModuleNotFoundError 2184s ________ test_view_of_view[cupy_csc-array_bool_subset-list_bool_subset] ________ 2184s 2184s matrix_type = functools.partial(, typ=) 2184s subset_func = 2184s subset_func2 = 2184s 2184s def test_view_of_view(matrix_type, subset_func, subset_func2): 2184s > adata = gen_adata((30, 15), X_type=matrix_type) 2184s 2184s tests/test_views.py:531: 2184s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 2184s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:346: in gen_adata 2184s X = X_type(random_state.binomial(100, 0.005, (M, N)).astype(X_dtype)) 2184s /usr/lib/python3.13/functools.py:934: in wrapper 2184s return dispatch(args[0].__class__)(*args, **kw) 2184s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 2184s 2184s val = array([[0., 0., 0., 0., 0., 0., 0., 1., 1., 0., 0., 0., 1., 0., 0.], 2184s [0., 0., 1., 0., 2., 0., 0., 2., 1., 1., 0...0., 1., 0., 0., 0., 0., 0.], 2184s [1., 0., 0., 0., 0., 0., 1., 0., 1., 0., 0., 0., 0., 0., 1.]], 2184s dtype=float32) 2184s typ = 2184s 2184s @singledispatch 2184s def as_cupy(val, typ=None): 2184s """ 2184s Rough conversion function 2184s 2184s Will try to infer target type from input type if not specified. 2184s """ 2184s if typ is None: 2184s typ = resolve_cupy_type(val) 2184s 2184s if issubclass(typ, CupyArray): 2184s import cupy as cp 2184s 2184s if isinstance(val, CSMatrix): 2184s val = val.toarray() 2184s return cp.array(val) 2184s elif issubclass(typ, CupyCSRMatrix): 2184s import cupy as cp 2184s import cupyx.scipy.sparse as cpsparse 2184s 2184s if isinstance(val, np.ndarray): 2184s return cpsparse.csr_matrix(cp.array(val)) 2184s else: 2184s return cpsparse.csr_matrix(val) 2184s elif issubclass(typ, CupyCSCMatrix): 2184s > import cupy as cp 2184s E ModuleNotFoundError: No module named 'cupy' 2184s 2184s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:1024: ModuleNotFoundError 2184s _______ test_view_of_view[cupy_csc-array_bool_subset-matrix_bool_subset] _______ 2184s 2184s matrix_type = functools.partial(, typ=) 2184s subset_func = 2184s subset_func2 = 2184s 2184s def test_view_of_view(matrix_type, subset_func, subset_func2): 2184s > adata = gen_adata((30, 15), X_type=matrix_type) 2184s 2184s tests/test_views.py:531: 2184s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 2184s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:346: in gen_adata 2184s X = X_type(random_state.binomial(100, 0.005, (M, N)).astype(X_dtype)) 2184s /usr/lib/python3.13/functools.py:934: in wrapper 2184s return dispatch(args[0].__class__)(*args, **kw) 2184s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 2184s 2184s val = array([[0., 1., 0., 0., 0., 1., 0., 2., 0., 0., 0., 1., 0., 1., 0.], 2184s [0., 1., 0., 1., 0., 1., 1., 1., 0., 0., 0...1., 0., 0., 0., 0., 0., 1.], 2184s [1., 0., 1., 1., 0., 1., 0., 1., 3., 1., 1., 1., 1., 0., 1.]], 2184s dtype=float32) 2184s typ = 2184s 2184s @singledispatch 2184s def as_cupy(val, typ=None): 2184s """ 2184s Rough conversion function 2184s 2184s Will try to infer target type from input type if not specified. 2184s """ 2184s if typ is None: 2184s typ = resolve_cupy_type(val) 2184s 2184s if issubclass(typ, CupyArray): 2184s import cupy as cp 2184s 2184s if isinstance(val, CSMatrix): 2184s val = val.toarray() 2184s return cp.array(val) 2184s elif issubclass(typ, CupyCSRMatrix): 2184s import cupy as cp 2184s import cupyx.scipy.sparse as cpsparse 2184s 2184s if isinstance(val, np.ndarray): 2184s return cpsparse.csr_matrix(cp.array(val)) 2184s else: 2184s return cpsparse.csr_matrix(val) 2184s elif issubclass(typ, CupyCSCMatrix): 2184s > import cupy as cp 2184s E ModuleNotFoundError: No module named 'cupy' 2184s 2184s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:1024: ModuleNotFoundError 2184s ______ test_view_of_view[cupy_csc-array_bool_subset-spmatrix_bool_subset] ______ 2184s 2184s matrix_type = functools.partial(, typ=) 2184s subset_func = 2184s subset_func2 = 2184s 2184s def test_view_of_view(matrix_type, subset_func, subset_func2): 2184s > adata = gen_adata((30, 15), X_type=matrix_type) 2184s 2184s tests/test_views.py:531: 2184s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 2184s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:346: in gen_adata 2184s X = X_type(random_state.binomial(100, 0.005, (M, N)).astype(X_dtype)) 2184s /usr/lib/python3.13/functools.py:934: in wrapper 2184s return dispatch(args[0].__class__)(*args, **kw) 2184s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 2184s 2184s val = array([[2., 0., 2., 1., 0., 1., 0., 0., 0., 0., 0., 0., 0., 0., 1.], 2184s [0., 1., 0., 1., 0., 0., 0., 0., 0., 0., 0...2., 0., 1., 1., 0., 0., 1.], 2184s [0., 0., 0., 0., 0., 0., 0., 0., 1., 1., 0., 1., 1., 2., 4.]], 2184s dtype=float32) 2184s typ = 2184s 2184s @singledispatch 2184s def as_cupy(val, typ=None): 2184s """ 2184s Rough conversion function 2184s 2184s Will try to infer target type from input type if not specified. 2184s """ 2184s if typ is None: 2184s typ = resolve_cupy_type(val) 2184s 2184s if issubclass(typ, CupyArray): 2184s import cupy as cp 2184s 2184s if isinstance(val, CSMatrix): 2184s val = val.toarray() 2184s return cp.array(val) 2184s elif issubclass(typ, CupyCSRMatrix): 2184s import cupy as cp 2184s import cupyx.scipy.sparse as cpsparse 2184s 2184s if isinstance(val, np.ndarray): 2184s return cpsparse.csr_matrix(cp.array(val)) 2184s else: 2184s return cpsparse.csr_matrix(val) 2184s elif issubclass(typ, CupyCSCMatrix): 2184s > import cupy as cp 2184s E ModuleNotFoundError: No module named 'cupy' 2184s 2184s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:1024: ModuleNotFoundError 2184s ______ test_view_of_view[cupy_csc-array_bool_subset-sparray_bool_subset] _______ 2184s 2184s matrix_type = functools.partial(, typ=) 2184s subset_func = 2184s subset_func2 = 2184s 2184s def test_view_of_view(matrix_type, subset_func, subset_func2): 2184s > adata = gen_adata((30, 15), X_type=matrix_type) 2184s 2184s tests/test_views.py:531: 2184s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 2184s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:346: in gen_adata 2184s X = X_type(random_state.binomial(100, 0.005, (M, N)).astype(X_dtype)) 2184s /usr/lib/python3.13/functools.py:934: in wrapper 2184s return dispatch(args[0].__class__)(*args, **kw) 2184s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 2184s 2184s val = array([[1., 0., 0., 0., 0., 0., 2., 0., 0., 0., 1., 2., 2., 0., 0.], 2184s [0., 0., 0., 0., 0., 1., 1., 0., 0., 0., 2...1., 0., 0., 1., 0., 0., 1.], 2184s [0., 1., 1., 2., 0., 0., 0., 0., 0., 0., 3., 0., 0., 0., 0.]], 2184s dtype=float32) 2184s typ = 2184s 2184s @singledispatch 2184s def as_cupy(val, typ=None): 2184s """ 2184s Rough conversion function 2184s 2184s Will try to infer target type from input type if not specified. 2184s """ 2184s if typ is None: 2184s typ = resolve_cupy_type(val) 2184s 2184s if issubclass(typ, CupyArray): 2184s import cupy as cp 2184s 2184s if isinstance(val, CSMatrix): 2184s val = val.toarray() 2184s return cp.array(val) 2184s elif issubclass(typ, CupyCSRMatrix): 2184s import cupy as cp 2184s import cupyx.scipy.sparse as cpsparse 2184s 2184s if isinstance(val, np.ndarray): 2184s return cpsparse.csr_matrix(cp.array(val)) 2184s else: 2184s return cpsparse.csr_matrix(val) 2184s elif issubclass(typ, CupyCSCMatrix): 2184s > import cupy as cp 2184s E ModuleNotFoundError: No module named 'cupy' 2184s 2184s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:1024: ModuleNotFoundError 2184s __________ test_view_of_view[cupy_csc-list_bool_subset-array_subset] ___________ 2184s 2184s matrix_type = functools.partial(, typ=) 2184s subset_func = 2184s subset_func2 = 2184s 2184s def test_view_of_view(matrix_type, subset_func, subset_func2): 2184s > adata = gen_adata((30, 15), X_type=matrix_type) 2184s 2184s tests/test_views.py:531: 2184s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 2184s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:346: in gen_adata 2184s X = X_type(random_state.binomial(100, 0.005, (M, N)).astype(X_dtype)) 2184s /usr/lib/python3.13/functools.py:934: in wrapper 2184s return dispatch(args[0].__class__)(*args, **kw) 2184s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 2184s 2184s val = array([[0., 2., 1., 1., 0., 1., 1., 0., 2., 1., 1., 2., 0., 1., 1.], 2184s [1., 0., 0., 0., 0., 0., 0., 0., 0., 1., 0...0., 0., 1., 1., 0., 0., 0.], 2184s [2., 0., 0., 0., 0., 0., 2., 0., 1., 0., 0., 0., 0., 0., 1.]], 2184s dtype=float32) 2184s typ = 2184s 2184s @singledispatch 2184s def as_cupy(val, typ=None): 2184s """ 2184s Rough conversion function 2184s 2184s Will try to infer target type from input type if not specified. 2184s """ 2184s if typ is None: 2184s typ = resolve_cupy_type(val) 2184s 2184s if issubclass(typ, CupyArray): 2184s import cupy as cp 2184s 2184s if isinstance(val, CSMatrix): 2184s val = val.toarray() 2184s return cp.array(val) 2184s elif issubclass(typ, CupyCSRMatrix): 2184s import cupy as cp 2184s import cupyx.scipy.sparse as cpsparse 2184s 2184s if isinstance(val, np.ndarray): 2184s return cpsparse.csr_matrix(cp.array(val)) 2184s else: 2184s return cpsparse.csr_matrix(val) 2184s elif issubclass(typ, CupyCSCMatrix): 2184s > import cupy as cp 2184s E ModuleNotFoundError: No module named 'cupy' 2184s 2184s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:1024: ModuleNotFoundError 2184s __________ test_view_of_view[cupy_csc-list_bool_subset-slice_subset] ___________ 2184s 2184s matrix_type = functools.partial(, typ=) 2184s subset_func = 2184s subset_func2 = 2184s 2184s def test_view_of_view(matrix_type, subset_func, subset_func2): 2184s > adata = gen_adata((30, 15), X_type=matrix_type) 2184s 2184s tests/test_views.py:531: 2184s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 2184s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:346: in gen_adata 2184s X = X_type(random_state.binomial(100, 0.005, (M, N)).astype(X_dtype)) 2184s /usr/lib/python3.13/functools.py:934: in wrapper 2184s return dispatch(args[0].__class__)(*args, **kw) 2184s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 2184s 2184s val = array([[0., 0., 1., 0., 0., 0., 0., 1., 1., 0., 1., 1., 1., 1., 1.], 2184s [1., 0., 2., 1., 0., 0., 1., 1., 1., 2., 0...1., 1., 0., 0., 0., 0., 0.], 2184s [0., 1., 1., 0., 0., 2., 0., 0., 0., 0., 0., 1., 0., 0., 0.]], 2184s dtype=float32) 2184s typ = 2184s 2184s @singledispatch 2184s def as_cupy(val, typ=None): 2184s """ 2184s Rough conversion function 2184s 2184s Will try to infer target type from input type if not specified. 2184s """ 2184s if typ is None: 2184s typ = resolve_cupy_type(val) 2184s 2184s if issubclass(typ, CupyArray): 2184s import cupy as cp 2184s 2184s if isinstance(val, CSMatrix): 2184s val = val.toarray() 2184s return cp.array(val) 2184s elif issubclass(typ, CupyCSRMatrix): 2184s import cupy as cp 2184s import cupyx.scipy.sparse as cpsparse 2184s 2184s if isinstance(val, np.ndarray): 2184s return cpsparse.csr_matrix(cp.array(val)) 2184s else: 2184s return cpsparse.csr_matrix(val) 2184s elif issubclass(typ, CupyCSCMatrix): 2184s > import cupy as cp 2184s E ModuleNotFoundError: No module named 'cupy' 2184s 2184s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:1024: ModuleNotFoundError 2184s __________ test_view_of_view[cupy_csc-list_bool_subset-single_subset] __________ 2184s 2184s matrix_type = functools.partial(, typ=) 2184s subset_func = 2184s subset_func2 = 2184s 2184s def test_view_of_view(matrix_type, subset_func, subset_func2): 2184s > adata = gen_adata((30, 15), X_type=matrix_type) 2184s 2184s tests/test_views.py:531: 2184s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 2184s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:346: in gen_adata 2184s X = X_type(random_state.binomial(100, 0.005, (M, N)).astype(X_dtype)) 2184s /usr/lib/python3.13/functools.py:934: in wrapper 2184s return dispatch(args[0].__class__)(*args, **kw) 2184s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 2184s 2184s val = array([[0., 0., 1., 2., 3., 0., 1., 1., 0., 0., 0., 0., 0., 0., 0.], 2184s [1., 1., 0., 0., 0., 1., 0., 0., 0., 0., 0...0., 2., 0., 0., 0., 0., 1.], 2184s [1., 0., 0., 0., 1., 0., 2., 1., 0., 0., 2., 0., 0., 0., 0.]], 2185s dtype=float32) 2185s typ = 2185s 2185s @singledispatch 2185s def as_cupy(val, typ=None): 2185s """ 2185s Rough conversion function 2185s 2185s Will try to infer target type from input type if not specified. 2185s """ 2185s if typ is None: 2185s typ = resolve_cupy_type(val) 2185s 2185s if issubclass(typ, CupyArray): 2185s import cupy as cp 2185s 2185s if isinstance(val, CSMatrix): 2185s val = val.toarray() 2185s return cp.array(val) 2185s elif issubclass(typ, CupyCSRMatrix): 2185s import cupy as cp 2185s import cupyx.scipy.sparse as cpsparse 2185s 2185s if isinstance(val, np.ndarray): 2185s return cpsparse.csr_matrix(cp.array(val)) 2185s else: 2185s return cpsparse.csr_matrix(val) 2185s elif issubclass(typ, CupyCSCMatrix): 2185s > import cupy as cp 2185s E ModuleNotFoundError: No module named 'cupy' 2185s 2185s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:1024: ModuleNotFoundError 2185s ________ test_view_of_view[cupy_csc-list_bool_subset-array_int_subset] _________ 2185s 2185s matrix_type = functools.partial(, typ=) 2185s subset_func = 2185s subset_func2 = 2185s 2185s def test_view_of_view(matrix_type, subset_func, subset_func2): 2185s > adata = gen_adata((30, 15), X_type=matrix_type) 2185s 2185s tests/test_views.py:531: 2185s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 2185s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:346: in gen_adata 2185s X = X_type(random_state.binomial(100, 0.005, (M, N)).astype(X_dtype)) 2185s /usr/lib/python3.13/functools.py:934: in wrapper 2185s return dispatch(args[0].__class__)(*args, **kw) 2185s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 2185s 2185s val = array([[0., 2., 0., 0., 1., 0., 2., 1., 0., 0., 0., 0., 1., 0., 1.], 2185s [2., 1., 2., 1., 0., 1., 0., 0., 0., 1., 0...3., 0., 0., 0., 1., 0., 1.], 2185s [1., 0., 0., 2., 0., 1., 0., 0., 0., 0., 1., 1., 2., 0., 1.]], 2185s dtype=float32) 2185s typ = 2185s 2185s @singledispatch 2185s def as_cupy(val, typ=None): 2185s """ 2185s Rough conversion function 2185s 2185s Will try to infer target type from input type if not specified. 2185s """ 2185s if typ is None: 2185s typ = resolve_cupy_type(val) 2185s 2185s if issubclass(typ, CupyArray): 2185s import cupy as cp 2185s 2185s if isinstance(val, CSMatrix): 2185s val = val.toarray() 2185s return cp.array(val) 2185s elif issubclass(typ, CupyCSRMatrix): 2185s import cupy as cp 2185s import cupyx.scipy.sparse as cpsparse 2185s 2185s if isinstance(val, np.ndarray): 2185s return cpsparse.csr_matrix(cp.array(val)) 2185s else: 2185s return cpsparse.csr_matrix(val) 2185s elif issubclass(typ, CupyCSCMatrix): 2185s > import cupy as cp 2185s E ModuleNotFoundError: No module named 'cupy' 2185s 2185s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:1024: ModuleNotFoundError 2185s _________ test_view_of_view[cupy_csc-list_bool_subset-list_int_subset] _________ 2185s 2185s matrix_type = functools.partial(, typ=) 2185s subset_func = 2185s subset_func2 = 2185s 2185s def test_view_of_view(matrix_type, subset_func, subset_func2): 2185s > adata = gen_adata((30, 15), X_type=matrix_type) 2185s 2185s tests/test_views.py:531: 2185s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 2185s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:346: in gen_adata 2185s X = X_type(random_state.binomial(100, 0.005, (M, N)).astype(X_dtype)) 2185s /usr/lib/python3.13/functools.py:934: in wrapper 2185s return dispatch(args[0].__class__)(*args, **kw) 2185s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 2185s 2185s val = array([[0., 1., 0., 0., 0., 0., 0., 0., 0., 0., 2., 0., 1., 0., 0.], 2185s [0., 0., 2., 1., 0., 2., 1., 0., 0., 0., 0...0., 0., 0., 1., 0., 0., 0.], 2185s [1., 0., 0., 1., 0., 1., 0., 1., 1., 0., 1., 1., 0., 0., 0.]], 2185s dtype=float32) 2185s typ = 2185s 2185s @singledispatch 2185s def as_cupy(val, typ=None): 2185s """ 2185s Rough conversion function 2185s 2185s Will try to infer target type from input type if not specified. 2185s """ 2185s if typ is None: 2185s typ = resolve_cupy_type(val) 2185s 2185s if issubclass(typ, CupyArray): 2185s import cupy as cp 2185s 2185s if isinstance(val, CSMatrix): 2185s val = val.toarray() 2185s return cp.array(val) 2185s elif issubclass(typ, CupyCSRMatrix): 2185s import cupy as cp 2185s import cupyx.scipy.sparse as cpsparse 2185s 2185s if isinstance(val, np.ndarray): 2185s return cpsparse.csr_matrix(cp.array(val)) 2185s else: 2185s return cpsparse.csr_matrix(val) 2185s elif issubclass(typ, CupyCSCMatrix): 2185s > import cupy as cp 2185s E ModuleNotFoundError: No module named 'cupy' 2185s 2185s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:1024: ModuleNotFoundError 2185s ________ test_view_of_view[cupy_csc-list_bool_subset-array_bool_subset] ________ 2185s 2185s matrix_type = functools.partial(, typ=) 2185s subset_func = 2185s subset_func2 = 2185s 2185s def test_view_of_view(matrix_type, subset_func, subset_func2): 2185s > adata = gen_adata((30, 15), X_type=matrix_type) 2185s 2185s tests/test_views.py:531: 2185s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 2185s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:346: in gen_adata 2185s X = X_type(random_state.binomial(100, 0.005, (M, N)).astype(X_dtype)) 2185s /usr/lib/python3.13/functools.py:934: in wrapper 2185s return dispatch(args[0].__class__)(*args, **kw) 2185s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 2185s 2185s val = array([[0., 0., 0., 1., 1., 1., 0., 0., 0., 0., 1., 0., 2., 0., 0.], 2185s [1., 1., 0., 0., 0., 0., 1., 0., 0., 0., 0...0., 0., 1., 0., 0., 0., 0.], 2185s [0., 2., 0., 0., 0., 0., 0., 0., 1., 0., 0., 0., 1., 1., 1.]], 2185s dtype=float32) 2185s typ = 2185s 2185s @singledispatch 2185s def as_cupy(val, typ=None): 2185s """ 2185s Rough conversion function 2185s 2185s Will try to infer target type from input type if not specified. 2185s """ 2185s if typ is None: 2185s typ = resolve_cupy_type(val) 2185s 2185s if issubclass(typ, CupyArray): 2185s import cupy as cp 2185s 2185s if isinstance(val, CSMatrix): 2185s val = val.toarray() 2185s return cp.array(val) 2185s elif issubclass(typ, CupyCSRMatrix): 2185s import cupy as cp 2185s import cupyx.scipy.sparse as cpsparse 2185s 2185s if isinstance(val, np.ndarray): 2185s return cpsparse.csr_matrix(cp.array(val)) 2185s else: 2185s return cpsparse.csr_matrix(val) 2185s elif issubclass(typ, CupyCSCMatrix): 2185s > import cupy as cp 2185s E ModuleNotFoundError: No module named 'cupy' 2185s 2185s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:1024: ModuleNotFoundError 2185s ________ test_view_of_view[cupy_csc-list_bool_subset-list_bool_subset] _________ 2185s 2185s matrix_type = functools.partial(, typ=) 2185s subset_func = 2185s subset_func2 = 2185s 2185s def test_view_of_view(matrix_type, subset_func, subset_func2): 2185s > adata = gen_adata((30, 15), X_type=matrix_type) 2185s 2185s tests/test_views.py:531: 2185s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 2185s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:346: in gen_adata 2185s X = X_type(random_state.binomial(100, 0.005, (M, N)).astype(X_dtype)) 2185s /usr/lib/python3.13/functools.py:934: in wrapper 2185s return dispatch(args[0].__class__)(*args, **kw) 2185s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 2185s 2185s val = array([[1., 1., 0., 1., 2., 0., 0., 0., 0., 0., 1., 0., 0., 0., 1.], 2185s [0., 1., 1., 0., 0., 0., 0., 0., 0., 0., 0...0., 0., 1., 0., 0., 0., 0.], 2185s [0., 0., 0., 1., 0., 0., 0., 0., 0., 0., 0., 1., 1., 0., 0.]], 2185s dtype=float32) 2185s typ = 2185s 2185s @singledispatch 2185s def as_cupy(val, typ=None): 2185s """ 2185s Rough conversion function 2185s 2185s Will try to infer target type from input type if not specified. 2185s """ 2185s if typ is None: 2185s typ = resolve_cupy_type(val) 2185s 2185s if issubclass(typ, CupyArray): 2185s import cupy as cp 2185s 2185s if isinstance(val, CSMatrix): 2185s val = val.toarray() 2185s return cp.array(val) 2185s elif issubclass(typ, CupyCSRMatrix): 2185s import cupy as cp 2185s import cupyx.scipy.sparse as cpsparse 2185s 2185s if isinstance(val, np.ndarray): 2185s return cpsparse.csr_matrix(cp.array(val)) 2185s else: 2185s return cpsparse.csr_matrix(val) 2185s elif issubclass(typ, CupyCSCMatrix): 2185s > import cupy as cp 2185s E ModuleNotFoundError: No module named 'cupy' 2185s 2185s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:1024: ModuleNotFoundError 2185s _______ test_view_of_view[cupy_csc-list_bool_subset-matrix_bool_subset] ________ 2185s 2185s matrix_type = functools.partial(, typ=) 2185s subset_func = 2185s subset_func2 = 2185s 2185s def test_view_of_view(matrix_type, subset_func, subset_func2): 2185s > adata = gen_adata((30, 15), X_type=matrix_type) 2185s 2185s tests/test_views.py:531: 2185s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 2185s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:346: in gen_adata 2185s X = X_type(random_state.binomial(100, 0.005, (M, N)).astype(X_dtype)) 2185s /usr/lib/python3.13/functools.py:934: in wrapper 2185s return dispatch(args[0].__class__)(*args, **kw) 2185s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 2185s 2185s val = array([[0., 1., 1., 1., 0., 1., 1., 1., 0., 0., 0., 0., 2., 0., 0.], 2185s [0., 0., 0., 2., 1., 0., 0., 1., 0., 0., 1...1., 1., 1., 2., 0., 0., 0.], 2185s [1., 0., 0., 1., 1., 0., 0., 0., 1., 1., 0., 0., 1., 0., 0.]], 2185s dtype=float32) 2185s typ = 2185s 2185s @singledispatch 2185s def as_cupy(val, typ=None): 2185s """ 2185s Rough conversion function 2185s 2185s Will try to infer target type from input type if not specified. 2185s """ 2185s if typ is None: 2185s typ = resolve_cupy_type(val) 2185s 2185s if issubclass(typ, CupyArray): 2185s import cupy as cp 2185s 2185s if isinstance(val, CSMatrix): 2185s val = val.toarray() 2185s return cp.array(val) 2185s elif issubclass(typ, CupyCSRMatrix): 2185s import cupy as cp 2185s import cupyx.scipy.sparse as cpsparse 2185s 2185s if isinstance(val, np.ndarray): 2185s return cpsparse.csr_matrix(cp.array(val)) 2185s else: 2185s return cpsparse.csr_matrix(val) 2185s elif issubclass(typ, CupyCSCMatrix): 2185s > import cupy as cp 2185s E ModuleNotFoundError: No module named 'cupy' 2185s 2185s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:1024: ModuleNotFoundError 2185s ______ test_view_of_view[cupy_csc-list_bool_subset-spmatrix_bool_subset] _______ 2185s 2185s matrix_type = functools.partial(, typ=) 2185s subset_func = 2185s subset_func2 = 2185s 2185s def test_view_of_view(matrix_type, subset_func, subset_func2): 2185s > adata = gen_adata((30, 15), X_type=matrix_type) 2185s 2185s tests/test_views.py:531: 2185s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 2185s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:346: in gen_adata 2185s X = X_type(random_state.binomial(100, 0.005, (M, N)).astype(X_dtype)) 2185s /usr/lib/python3.13/functools.py:934: in wrapper 2185s return dispatch(args[0].__class__)(*args, **kw) 2185s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 2185s 2185s val = array([[0., 1., 0., 1., 0., 1., 0., 0., 0., 1., 1., 1., 0., 0., 0.], 2185s [1., 0., 1., 0., 1., 0., 0., 0., 0., 0., 0...1., 0., 1., 1., 3., 3., 1.], 2185s [2., 0., 0., 1., 0., 0., 0., 0., 0., 0., 0., 1., 0., 0., 2.]], 2185s dtype=float32) 2185s typ = 2185s 2185s @singledispatch 2185s def as_cupy(val, typ=None): 2185s """ 2185s Rough conversion function 2185s 2185s Will try to infer target type from input type if not specified. 2185s """ 2185s if typ is None: 2185s typ = resolve_cupy_type(val) 2185s 2185s if issubclass(typ, CupyArray): 2185s import cupy as cp 2185s 2185s if isinstance(val, CSMatrix): 2185s val = val.toarray() 2185s return cp.array(val) 2185s elif issubclass(typ, CupyCSRMatrix): 2185s import cupy as cp 2185s import cupyx.scipy.sparse as cpsparse 2185s 2185s if isinstance(val, np.ndarray): 2185s return cpsparse.csr_matrix(cp.array(val)) 2185s else: 2185s return cpsparse.csr_matrix(val) 2185s elif issubclass(typ, CupyCSCMatrix): 2185s > import cupy as cp 2185s E ModuleNotFoundError: No module named 'cupy' 2185s 2185s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:1024: ModuleNotFoundError 2185s _______ test_view_of_view[cupy_csc-list_bool_subset-sparray_bool_subset] _______ 2185s 2185s matrix_type = functools.partial(, typ=) 2185s subset_func = 2185s subset_func2 = 2185s 2185s def test_view_of_view(matrix_type, subset_func, subset_func2): 2185s > adata = gen_adata((30, 15), X_type=matrix_type) 2185s 2185s tests/test_views.py:531: 2185s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 2185s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:346: in gen_adata 2185s X = X_type(random_state.binomial(100, 0.005, (M, N)).astype(X_dtype)) 2185s /usr/lib/python3.13/functools.py:934: in wrapper 2185s return dispatch(args[0].__class__)(*args, **kw) 2185s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 2185s 2185s val = array([[0., 1., 1., 2., 0., 0., 0., 0., 0., 0., 0., 1., 0., 0., 0.], 2185s [0., 1., 0., 1., 0., 0., 0., 0., 1., 0., 1...0., 0., 1., 0., 0., 0., 2.], 2185s [0., 0., 0., 0., 2., 0., 0., 1., 0., 1., 1., 0., 0., 2., 0.]], 2185s dtype=float32) 2185s typ = 2185s 2185s @singledispatch 2185s def as_cupy(val, typ=None): 2185s """ 2185s Rough conversion function 2185s 2185s Will try to infer target type from input type if not specified. 2185s """ 2185s if typ is None: 2185s typ = resolve_cupy_type(val) 2185s 2185s if issubclass(typ, CupyArray): 2185s import cupy as cp 2185s 2185s if isinstance(val, CSMatrix): 2185s val = val.toarray() 2185s return cp.array(val) 2185s elif issubclass(typ, CupyCSRMatrix): 2185s import cupy as cp 2185s import cupyx.scipy.sparse as cpsparse 2185s 2185s if isinstance(val, np.ndarray): 2185s return cpsparse.csr_matrix(cp.array(val)) 2185s else: 2185s return cpsparse.csr_matrix(val) 2185s elif issubclass(typ, CupyCSCMatrix): 2185s > import cupy as cp 2185s E ModuleNotFoundError: No module named 'cupy' 2185s 2185s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:1024: ModuleNotFoundError 2185s _________ test_view_of_view[cupy_csc-matrix_bool_subset-array_subset] __________ 2185s 2185s matrix_type = functools.partial(, typ=) 2185s subset_func = 2185s subset_func2 = 2185s 2185s def test_view_of_view(matrix_type, subset_func, subset_func2): 2185s > adata = gen_adata((30, 15), X_type=matrix_type) 2185s 2185s tests/test_views.py:531: 2185s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 2185s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:346: in gen_adata 2185s X = X_type(random_state.binomial(100, 0.005, (M, N)).astype(X_dtype)) 2185s /usr/lib/python3.13/functools.py:934: in wrapper 2185s return dispatch(args[0].__class__)(*args, **kw) 2185s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 2185s 2185s val = array([[0., 1., 0., 1., 1., 0., 1., 1., 0., 1., 1., 1., 0., 0., 1.], 2185s [0., 0., 1., 0., 1., 0., 0., 0., 0., 3., 0...1., 1., 0., 1., 2., 1., 1.], 2185s [0., 1., 1., 0., 0., 1., 1., 0., 3., 0., 1., 2., 2., 3., 0.]], 2185s dtype=float32) 2185s typ = 2185s 2185s @singledispatch 2185s def as_cupy(val, typ=None): 2185s """ 2185s Rough conversion function 2185s 2185s Will try to infer target type from input type if not specified. 2185s """ 2185s if typ is None: 2185s typ = resolve_cupy_type(val) 2185s 2185s if issubclass(typ, CupyArray): 2185s import cupy as cp 2185s 2185s if isinstance(val, CSMatrix): 2185s val = val.toarray() 2185s return cp.array(val) 2185s elif issubclass(typ, CupyCSRMatrix): 2185s import cupy as cp 2185s import cupyx.scipy.sparse as cpsparse 2185s 2185s if isinstance(val, np.ndarray): 2185s return cpsparse.csr_matrix(cp.array(val)) 2185s else: 2185s return cpsparse.csr_matrix(val) 2185s elif issubclass(typ, CupyCSCMatrix): 2185s > import cupy as cp 2185s E ModuleNotFoundError: No module named 'cupy' 2185s 2185s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:1024: ModuleNotFoundError 2185s _________ test_view_of_view[cupy_csc-matrix_bool_subset-slice_subset] __________ 2185s 2185s matrix_type = functools.partial(, typ=) 2185s subset_func = 2185s subset_func2 = 2185s 2185s def test_view_of_view(matrix_type, subset_func, subset_func2): 2185s > adata = gen_adata((30, 15), X_type=matrix_type) 2185s 2185s tests/test_views.py:531: 2185s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 2185s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:346: in gen_adata 2185s X = X_type(random_state.binomial(100, 0.005, (M, N)).astype(X_dtype)) 2185s /usr/lib/python3.13/functools.py:934: in wrapper 2185s return dispatch(args[0].__class__)(*args, **kw) 2185s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 2185s 2185s val = array([[1., 1., 2., 1., 0., 0., 1., 0., 0., 0., 0., 1., 1., 0., 1.], 2185s [0., 1., 0., 0., 1., 0., 0., 1., 1., 0., 1...0., 1., 0., 1., 2., 0., 0.], 2185s [1., 0., 2., 0., 0., 0., 0., 0., 0., 2., 0., 0., 0., 0., 1.]], 2185s dtype=float32) 2185s typ = 2185s 2185s @singledispatch 2185s def as_cupy(val, typ=None): 2185s """ 2185s Rough conversion function 2185s 2185s Will try to infer target type from input type if not specified. 2185s """ 2185s if typ is None: 2185s typ = resolve_cupy_type(val) 2185s 2185s if issubclass(typ, CupyArray): 2185s import cupy as cp 2185s 2185s if isinstance(val, CSMatrix): 2185s val = val.toarray() 2185s return cp.array(val) 2185s elif issubclass(typ, CupyCSRMatrix): 2185s import cupy as cp 2185s import cupyx.scipy.sparse as cpsparse 2185s 2185s if isinstance(val, np.ndarray): 2185s return cpsparse.csr_matrix(cp.array(val)) 2185s else: 2185s return cpsparse.csr_matrix(val) 2185s elif issubclass(typ, CupyCSCMatrix): 2185s > import cupy as cp 2185s E ModuleNotFoundError: No module named 'cupy' 2185s 2185s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:1024: ModuleNotFoundError 2185s _________ test_view_of_view[cupy_csc-matrix_bool_subset-single_subset] _________ 2185s 2185s matrix_type = functools.partial(, typ=) 2185s subset_func = 2185s subset_func2 = 2185s 2185s def test_view_of_view(matrix_type, subset_func, subset_func2): 2185s > adata = gen_adata((30, 15), X_type=matrix_type) 2185s 2185s tests/test_views.py:531: 2185s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 2185s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:346: in gen_adata 2185s X = X_type(random_state.binomial(100, 0.005, (M, N)).astype(X_dtype)) 2185s /usr/lib/python3.13/functools.py:934: in wrapper 2185s return dispatch(args[0].__class__)(*args, **kw) 2185s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 2185s 2185s val = array([[0., 0., 0., 0., 2., 0., 0., 0., 0., 0., 0., 1., 0., 0., 0.], 2185s [1., 0., 0., 0., 1., 0., 2., 0., 2., 1., 0...1., 0., 0., 0., 0., 0., 0.], 2185s [0., 0., 0., 0., 1., 0., 1., 2., 0., 0., 0., 1., 0., 1., 0.]], 2185s dtype=float32) 2185s typ = 2185s 2185s @singledispatch 2185s def as_cupy(val, typ=None): 2185s """ 2185s Rough conversion function 2185s 2185s Will try to infer target type from input type if not specified. 2185s """ 2185s if typ is None: 2185s typ = resolve_cupy_type(val) 2185s 2185s if issubclass(typ, CupyArray): 2185s import cupy as cp 2185s 2185s if isinstance(val, CSMatrix): 2185s val = val.toarray() 2185s return cp.array(val) 2185s elif issubclass(typ, CupyCSRMatrix): 2185s import cupy as cp 2185s import cupyx.scipy.sparse as cpsparse 2185s 2185s if isinstance(val, np.ndarray): 2185s return cpsparse.csr_matrix(cp.array(val)) 2185s else: 2185s return cpsparse.csr_matrix(val) 2185s elif issubclass(typ, CupyCSCMatrix): 2185s > import cupy as cp 2185s E ModuleNotFoundError: No module named 'cupy' 2185s 2185s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:1024: ModuleNotFoundError 2185s _______ test_view_of_view[cupy_csc-matrix_bool_subset-array_int_subset] ________ 2185s 2185s matrix_type = functools.partial(, typ=) 2185s subset_func = 2185s subset_func2 = 2185s 2185s def test_view_of_view(matrix_type, subset_func, subset_func2): 2185s > adata = gen_adata((30, 15), X_type=matrix_type) 2185s 2185s tests/test_views.py:531: 2185s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 2185s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:346: in gen_adata 2185s X = X_type(random_state.binomial(100, 0.005, (M, N)).astype(X_dtype)) 2185s /usr/lib/python3.13/functools.py:934: in wrapper 2185s return dispatch(args[0].__class__)(*args, **kw) 2185s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 2185s 2185s val = array([[0., 1., 2., 0., 0., 0., 0., 1., 0., 1., 0., 0., 1., 0., 1.], 2185s [0., 0., 0., 0., 0., 1., 0., 1., 2., 1., 0...0., 2., 2., 0., 0., 2., 0.], 2185s [1., 1., 0., 0., 0., 1., 1., 0., 1., 1., 0., 0., 0., 0., 0.]], 2185s dtype=float32) 2185s typ = 2185s 2185s @singledispatch 2185s def as_cupy(val, typ=None): 2185s """ 2185s Rough conversion function 2185s 2185s Will try to infer target type from input type if not specified. 2185s """ 2185s if typ is None: 2185s typ = resolve_cupy_type(val) 2185s 2185s if issubclass(typ, CupyArray): 2185s import cupy as cp 2185s 2185s if isinstance(val, CSMatrix): 2185s val = val.toarray() 2185s return cp.array(val) 2185s elif issubclass(typ, CupyCSRMatrix): 2185s import cupy as cp 2185s import cupyx.scipy.sparse as cpsparse 2185s 2185s if isinstance(val, np.ndarray): 2185s return cpsparse.csr_matrix(cp.array(val)) 2185s else: 2185s return cpsparse.csr_matrix(val) 2185s elif issubclass(typ, CupyCSCMatrix): 2185s > import cupy as cp 2185s E ModuleNotFoundError: No module named 'cupy' 2185s 2185s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:1024: ModuleNotFoundError 2185s ________ test_view_of_view[cupy_csc-matrix_bool_subset-list_int_subset] ________ 2185s 2185s matrix_type = functools.partial(, typ=) 2185s subset_func = 2185s subset_func2 = 2185s 2185s def test_view_of_view(matrix_type, subset_func, subset_func2): 2185s > adata = gen_adata((30, 15), X_type=matrix_type) 2185s 2185s tests/test_views.py:531: 2185s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 2185s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:346: in gen_adata 2185s X = X_type(random_state.binomial(100, 0.005, (M, N)).astype(X_dtype)) 2185s /usr/lib/python3.13/functools.py:934: in wrapper 2185s return dispatch(args[0].__class__)(*args, **kw) 2185s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 2185s 2185s val = array([[0., 0., 0., 1., 0., 0., 2., 0., 1., 0., 0., 0., 2., 1., 1.], 2185s [0., 2., 0., 2., 0., 4., 0., 0., 0., 0., 1...0., 0., 0., 1., 0., 0., 0.], 2185s [0., 0., 0., 1., 0., 0., 0., 1., 0., 0., 0., 0., 2., 0., 0.]], 2185s dtype=float32) 2185s typ = 2185s 2185s @singledispatch 2185s def as_cupy(val, typ=None): 2185s """ 2185s Rough conversion function 2185s 2185s Will try to infer target type from input type if not specified. 2185s """ 2185s if typ is None: 2185s typ = resolve_cupy_type(val) 2185s 2185s if issubclass(typ, CupyArray): 2185s import cupy as cp 2185s 2185s if isinstance(val, CSMatrix): 2185s val = val.toarray() 2185s return cp.array(val) 2185s elif issubclass(typ, CupyCSRMatrix): 2185s import cupy as cp 2185s import cupyx.scipy.sparse as cpsparse 2185s 2185s if isinstance(val, np.ndarray): 2185s return cpsparse.csr_matrix(cp.array(val)) 2185s else: 2185s return cpsparse.csr_matrix(val) 2185s elif issubclass(typ, CupyCSCMatrix): 2185s > import cupy as cp 2185s E ModuleNotFoundError: No module named 'cupy' 2185s 2185s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:1024: ModuleNotFoundError 2185s _______ test_view_of_view[cupy_csc-matrix_bool_subset-array_bool_subset] _______ 2185s 2185s matrix_type = functools.partial(, typ=) 2185s subset_func = 2185s subset_func2 = 2185s 2185s def test_view_of_view(matrix_type, subset_func, subset_func2): 2185s > adata = gen_adata((30, 15), X_type=matrix_type) 2185s 2185s tests/test_views.py:531: 2185s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 2185s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:346: in gen_adata 2185s X = X_type(random_state.binomial(100, 0.005, (M, N)).astype(X_dtype)) 2185s /usr/lib/python3.13/functools.py:934: in wrapper 2185s return dispatch(args[0].__class__)(*args, **kw) 2185s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 2185s 2185s val = array([[0., 0., 1., 0., 0., 2., 1., 0., 0., 0., 0., 1., 0., 1., 0.], 2185s [0., 1., 1., 1., 2., 0., 0., 0., 1., 0., 0...0., 0., 1., 0., 0., 0., 0.], 2185s [0., 0., 1., 0., 1., 0., 0., 0., 0., 0., 1., 3., 0., 0., 1.]], 2185s dtype=float32) 2185s typ = 2185s 2185s @singledispatch 2185s def as_cupy(val, typ=None): 2185s """ 2185s Rough conversion function 2185s 2185s Will try to infer target type from input type if not specified. 2185s """ 2185s if typ is None: 2185s typ = resolve_cupy_type(val) 2185s 2185s if issubclass(typ, CupyArray): 2185s import cupy as cp 2185s 2185s if isinstance(val, CSMatrix): 2185s val = val.toarray() 2185s return cp.array(val) 2185s elif issubclass(typ, CupyCSRMatrix): 2185s import cupy as cp 2185s import cupyx.scipy.sparse as cpsparse 2185s 2185s if isinstance(val, np.ndarray): 2185s return cpsparse.csr_matrix(cp.array(val)) 2185s else: 2185s return cpsparse.csr_matrix(val) 2185s elif issubclass(typ, CupyCSCMatrix): 2185s > import cupy as cp 2185s E ModuleNotFoundError: No module named 'cupy' 2185s 2185s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:1024: ModuleNotFoundError 2185s _______ test_view_of_view[cupy_csc-matrix_bool_subset-list_bool_subset] ________ 2185s 2185s matrix_type = functools.partial(, typ=) 2185s subset_func = 2185s subset_func2 = 2185s 2185s def test_view_of_view(matrix_type, subset_func, subset_func2): 2185s > adata = gen_adata((30, 15), X_type=matrix_type) 2185s 2185s tests/test_views.py:531: 2185s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 2185s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:346: in gen_adata 2185s X = X_type(random_state.binomial(100, 0.005, (M, N)).astype(X_dtype)) 2185s /usr/lib/python3.13/functools.py:934: in wrapper 2185s return dispatch(args[0].__class__)(*args, **kw) 2185s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 2185s 2185s val = array([[0., 2., 0., 1., 0., 1., 0., 0., 0., 2., 0., 0., 0., 0., 0.], 2185s [0., 0., 2., 0., 3., 0., 0., 0., 0., 0., 1...0., 0., 0., 1., 0., 1., 1.], 2185s [0., 2., 0., 1., 0., 0., 2., 0., 0., 0., 0., 0., 0., 0., 0.]], 2185s dtype=float32) 2185s typ = 2185s 2185s @singledispatch 2185s def as_cupy(val, typ=None): 2185s """ 2185s Rough conversion function 2185s 2185s Will try to infer target type from input type if not specified. 2185s """ 2185s if typ is None: 2185s typ = resolve_cupy_type(val) 2185s 2185s if issubclass(typ, CupyArray): 2185s import cupy as cp 2185s 2185s if isinstance(val, CSMatrix): 2185s val = val.toarray() 2185s return cp.array(val) 2185s elif issubclass(typ, CupyCSRMatrix): 2185s import cupy as cp 2185s import cupyx.scipy.sparse as cpsparse 2185s 2185s if isinstance(val, np.ndarray): 2185s return cpsparse.csr_matrix(cp.array(val)) 2185s else: 2185s return cpsparse.csr_matrix(val) 2185s elif issubclass(typ, CupyCSCMatrix): 2185s > import cupy as cp 2185s E ModuleNotFoundError: No module named 'cupy' 2185s 2185s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:1024: ModuleNotFoundError 2185s ______ test_view_of_view[cupy_csc-matrix_bool_subset-matrix_bool_subset] _______ 2185s 2185s matrix_type = functools.partial(, typ=) 2185s subset_func = 2185s subset_func2 = 2185s 2185s def test_view_of_view(matrix_type, subset_func, subset_func2): 2185s > adata = gen_adata((30, 15), X_type=matrix_type) 2185s 2185s tests/test_views.py:531: 2185s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 2185s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:346: in gen_adata 2185s X = X_type(random_state.binomial(100, 0.005, (M, N)).astype(X_dtype)) 2185s /usr/lib/python3.13/functools.py:934: in wrapper 2185s return dispatch(args[0].__class__)(*args, **kw) 2185s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 2185s 2185s val = array([[0., 0., 0., 1., 2., 1., 0., 1., 1., 0., 0., 1., 0., 0., 0.], 2185s [1., 0., 0., 0., 1., 0., 1., 0., 0., 0., 0...0., 1., 0., 1., 0., 2., 1.], 2185s [1., 0., 1., 0., 1., 0., 1., 1., 0., 2., 1., 0., 0., 2., 1.]], 2185s dtype=float32) 2185s typ = 2185s 2185s @singledispatch 2185s def as_cupy(val, typ=None): 2185s """ 2185s Rough conversion function 2185s 2185s Will try to infer target type from input type if not specified. 2185s """ 2185s if typ is None: 2185s typ = resolve_cupy_type(val) 2185s 2185s if issubclass(typ, CupyArray): 2185s import cupy as cp 2185s 2185s if isinstance(val, CSMatrix): 2185s val = val.toarray() 2185s return cp.array(val) 2185s elif issubclass(typ, CupyCSRMatrix): 2185s import cupy as cp 2185s import cupyx.scipy.sparse as cpsparse 2185s 2185s if isinstance(val, np.ndarray): 2185s return cpsparse.csr_matrix(cp.array(val)) 2185s else: 2185s return cpsparse.csr_matrix(val) 2185s elif issubclass(typ, CupyCSCMatrix): 2185s > import cupy as cp 2185s E ModuleNotFoundError: No module named 'cupy' 2185s 2185s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:1024: ModuleNotFoundError 2185s _____ test_view_of_view[cupy_csc-matrix_bool_subset-spmatrix_bool_subset] ______ 2185s 2185s matrix_type = functools.partial(, typ=) 2185s subset_func = 2185s subset_func2 = 2185s 2185s def test_view_of_view(matrix_type, subset_func, subset_func2): 2185s > adata = gen_adata((30, 15), X_type=matrix_type) 2185s 2185s tests/test_views.py:531: 2185s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 2185s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:346: in gen_adata 2185s X = X_type(random_state.binomial(100, 0.005, (M, N)).astype(X_dtype)) 2185s /usr/lib/python3.13/functools.py:934: in wrapper 2185s return dispatch(args[0].__class__)(*args, **kw) 2185s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 2185s 2185s val = array([[0., 0., 0., 1., 0., 2., 0., 0., 0., 0., 1., 0., 1., 1., 1.], 2185s [0., 1., 2., 1., 0., 0., 0., 0., 0., 0., 1...1., 0., 1., 0., 1., 0., 0.], 2185s [1., 0., 0., 1., 2., 1., 0., 1., 1., 1., 0., 1., 1., 1., 2.]], 2185s dtype=float32) 2185s typ = 2185s 2185s @singledispatch 2185s def as_cupy(val, typ=None): 2185s """ 2185s Rough conversion function 2185s 2185s Will try to infer target type from input type if not specified. 2185s """ 2185s if typ is None: 2185s typ = resolve_cupy_type(val) 2185s 2185s if issubclass(typ, CupyArray): 2185s import cupy as cp 2185s 2185s if isinstance(val, CSMatrix): 2185s val = val.toarray() 2185s return cp.array(val) 2185s elif issubclass(typ, CupyCSRMatrix): 2185s import cupy as cp 2185s import cupyx.scipy.sparse as cpsparse 2185s 2185s if isinstance(val, np.ndarray): 2185s return cpsparse.csr_matrix(cp.array(val)) 2185s else: 2185s return cpsparse.csr_matrix(val) 2185s elif issubclass(typ, CupyCSCMatrix): 2185s > import cupy as cp 2185s E ModuleNotFoundError: No module named 'cupy' 2185s 2185s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:1024: ModuleNotFoundError 2185s ______ test_view_of_view[cupy_csc-matrix_bool_subset-sparray_bool_subset] ______ 2185s 2185s matrix_type = functools.partial(, typ=) 2185s subset_func = 2185s subset_func2 = 2185s 2185s def test_view_of_view(matrix_type, subset_func, subset_func2): 2185s > adata = gen_adata((30, 15), X_type=matrix_type) 2185s 2185s tests/test_views.py:531: 2185s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 2185s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:346: in gen_adata 2185s X = X_type(random_state.binomial(100, 0.005, (M, N)).astype(X_dtype)) 2185s /usr/lib/python3.13/functools.py:934: in wrapper 2185s return dispatch(args[0].__class__)(*args, **kw) 2185s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 2185s 2185s val = array([[0., 1., 1., 1., 0., 0., 0., 1., 0., 1., 1., 0., 1., 0., 1.], 2185s [1., 0., 1., 1., 2., 2., 1., 0., 1., 0., 1...0., 0., 1., 0., 1., 0., 2.], 2185s [0., 0., 0., 2., 0., 1., 1., 0., 0., 0., 1., 1., 2., 0., 1.]], 2185s dtype=float32) 2185s typ = 2185s 2185s @singledispatch 2185s def as_cupy(val, typ=None): 2185s """ 2185s Rough conversion function 2185s 2185s Will try to infer target type from input type if not specified. 2185s """ 2185s if typ is None: 2185s typ = resolve_cupy_type(val) 2185s 2185s if issubclass(typ, CupyArray): 2185s import cupy as cp 2185s 2185s if isinstance(val, CSMatrix): 2185s val = val.toarray() 2185s return cp.array(val) 2185s elif issubclass(typ, CupyCSRMatrix): 2185s import cupy as cp 2185s import cupyx.scipy.sparse as cpsparse 2185s 2185s if isinstance(val, np.ndarray): 2185s return cpsparse.csr_matrix(cp.array(val)) 2185s else: 2185s return cpsparse.csr_matrix(val) 2185s elif issubclass(typ, CupyCSCMatrix): 2185s > import cupy as cp 2185s E ModuleNotFoundError: No module named 'cupy' 2185s 2185s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:1024: ModuleNotFoundError 2185s ________ test_view_of_view[cupy_csc-spmatrix_bool_subset-array_subset] _________ 2185s 2185s matrix_type = functools.partial(, typ=) 2185s subset_func = 2185s subset_func2 = 2185s 2185s def test_view_of_view(matrix_type, subset_func, subset_func2): 2185s > adata = gen_adata((30, 15), X_type=matrix_type) 2185s 2185s tests/test_views.py:531: 2185s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 2185s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:346: in gen_adata 2185s X = X_type(random_state.binomial(100, 0.005, (M, N)).astype(X_dtype)) 2185s /usr/lib/python3.13/functools.py:934: in wrapper 2185s return dispatch(args[0].__class__)(*args, **kw) 2185s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 2185s 2185s val = array([[0., 0., 0., 1., 0., 0., 0., 1., 1., 1., 1., 0., 1., 0., 1.], 2185s [1., 1., 0., 0., 0., 0., 1., 1., 1., 2., 0...0., 0., 0., 1., 0., 1., 1.], 2185s [0., 0., 0., 0., 1., 0., 0., 0., 0., 0., 1., 2., 0., 0., 0.]], 2185s dtype=float32) 2185s typ = 2185s 2185s @singledispatch 2185s def as_cupy(val, typ=None): 2185s """ 2185s Rough conversion function 2185s 2185s Will try to infer target type from input type if not specified. 2185s """ 2185s if typ is None: 2185s typ = resolve_cupy_type(val) 2185s 2185s if issubclass(typ, CupyArray): 2185s import cupy as cp 2185s 2185s if isinstance(val, CSMatrix): 2185s val = val.toarray() 2185s return cp.array(val) 2185s elif issubclass(typ, CupyCSRMatrix): 2185s import cupy as cp 2185s import cupyx.scipy.sparse as cpsparse 2185s 2185s if isinstance(val, np.ndarray): 2185s return cpsparse.csr_matrix(cp.array(val)) 2185s else: 2185s return cpsparse.csr_matrix(val) 2185s elif issubclass(typ, CupyCSCMatrix): 2185s > import cupy as cp 2185s E ModuleNotFoundError: No module named 'cupy' 2185s 2185s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:1024: ModuleNotFoundError 2185s ________ test_view_of_view[cupy_csc-spmatrix_bool_subset-slice_subset] _________ 2185s 2185s matrix_type = functools.partial(, typ=) 2185s subset_func = 2185s subset_func2 = 2185s 2185s def test_view_of_view(matrix_type, subset_func, subset_func2): 2185s > adata = gen_adata((30, 15), X_type=matrix_type) 2185s 2185s tests/test_views.py:531: 2185s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 2185s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:346: in gen_adata 2185s X = X_type(random_state.binomial(100, 0.005, (M, N)).astype(X_dtype)) 2185s /usr/lib/python3.13/functools.py:934: in wrapper 2185s return dispatch(args[0].__class__)(*args, **kw) 2185s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 2185s 2185s val = array([[1., 1., 1., 1., 2., 0., 0., 0., 2., 0., 1., 0., 1., 0., 0.], 2185s [0., 0., 1., 1., 2., 0., 2., 1., 2., 0., 0...2., 0., 1., 1., 1., 0., 0.], 2185s [1., 1., 0., 1., 1., 0., 1., 0., 0., 2., 0., 0., 0., 1., 0.]], 2185s dtype=float32) 2185s typ = 2185s 2185s @singledispatch 2185s def as_cupy(val, typ=None): 2185s """ 2185s Rough conversion function 2185s 2185s Will try to infer target type from input type if not specified. 2185s """ 2185s if typ is None: 2185s typ = resolve_cupy_type(val) 2185s 2185s if issubclass(typ, CupyArray): 2185s import cupy as cp 2185s 2185s if isinstance(val, CSMatrix): 2185s val = val.toarray() 2185s return cp.array(val) 2185s elif issubclass(typ, CupyCSRMatrix): 2185s import cupy as cp 2185s import cupyx.scipy.sparse as cpsparse 2185s 2185s if isinstance(val, np.ndarray): 2185s return cpsparse.csr_matrix(cp.array(val)) 2185s else: 2185s return cpsparse.csr_matrix(val) 2185s elif issubclass(typ, CupyCSCMatrix): 2185s > import cupy as cp 2185s E ModuleNotFoundError: No module named 'cupy' 2185s 2185s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:1024: ModuleNotFoundError 2185s ________ test_view_of_view[cupy_csc-spmatrix_bool_subset-single_subset] ________ 2185s 2185s matrix_type = functools.partial(, typ=) 2185s subset_func = 2185s subset_func2 = 2185s 2185s def test_view_of_view(matrix_type, subset_func, subset_func2): 2185s > adata = gen_adata((30, 15), X_type=matrix_type) 2185s 2185s tests/test_views.py:531: 2185s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 2185s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:346: in gen_adata 2185s X = X_type(random_state.binomial(100, 0.005, (M, N)).astype(X_dtype)) 2185s /usr/lib/python3.13/functools.py:934: in wrapper 2185s return dispatch(args[0].__class__)(*args, **kw) 2185s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 2185s 2185s val = array([[1., 0., 0., 1., 0., 0., 1., 0., 0., 0., 0., 1., 0., 0., 0.], 2185s [0., 0., 1., 0., 0., 1., 1., 0., 2., 1., 0...1., 0., 0., 0., 1., 0., 0.], 2185s [2., 0., 0., 0., 0., 0., 0., 1., 0., 2., 1., 0., 0., 0., 1.]], 2185s dtype=float32) 2185s typ = 2185s 2185s @singledispatch 2185s def as_cupy(val, typ=None): 2185s """ 2185s Rough conversion function 2185s 2185s Will try to infer target type from input type if not specified. 2185s """ 2185s if typ is None: 2185s typ = resolve_cupy_type(val) 2185s 2185s if issubclass(typ, CupyArray): 2185s import cupy as cp 2185s 2185s if isinstance(val, CSMatrix): 2185s val = val.toarray() 2185s return cp.array(val) 2185s elif issubclass(typ, CupyCSRMatrix): 2185s import cupy as cp 2185s import cupyx.scipy.sparse as cpsparse 2185s 2185s if isinstance(val, np.ndarray): 2185s return cpsparse.csr_matrix(cp.array(val)) 2185s else: 2185s return cpsparse.csr_matrix(val) 2185s elif issubclass(typ, CupyCSCMatrix): 2185s > import cupy as cp 2185s E ModuleNotFoundError: No module named 'cupy' 2185s 2185s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:1024: ModuleNotFoundError 2185s ______ test_view_of_view[cupy_csc-spmatrix_bool_subset-array_int_subset] _______ 2185s 2185s matrix_type = functools.partial(, typ=) 2185s subset_func = 2185s subset_func2 = 2185s 2185s def test_view_of_view(matrix_type, subset_func, subset_func2): 2185s > adata = gen_adata((30, 15), X_type=matrix_type) 2185s 2185s tests/test_views.py:531: 2185s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 2185s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:346: in gen_adata 2185s X = X_type(random_state.binomial(100, 0.005, (M, N)).astype(X_dtype)) 2185s /usr/lib/python3.13/functools.py:934: in wrapper 2185s return dispatch(args[0].__class__)(*args, **kw) 2185s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 2185s 2185s val = array([[0., 0., 0., 0., 2., 0., 1., 0., 0., 0., 0., 0., 0., 0., 0.], 2185s [2., 0., 1., 0., 0., 1., 0., 2., 0., 1., 0...0., 1., 0., 2., 0., 0., 1.], 2185s [0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 1., 0., 0.]], 2185s dtype=float32) 2185s typ = 2185s 2185s @singledispatch 2185s def as_cupy(val, typ=None): 2185s """ 2185s Rough conversion function 2185s 2185s Will try to infer target type from input type if not specified. 2185s """ 2185s if typ is None: 2185s typ = resolve_cupy_type(val) 2185s 2185s if issubclass(typ, CupyArray): 2185s import cupy as cp 2185s 2185s if isinstance(val, CSMatrix): 2185s val = val.toarray() 2185s return cp.array(val) 2185s elif issubclass(typ, CupyCSRMatrix): 2185s import cupy as cp 2185s import cupyx.scipy.sparse as cpsparse 2185s 2185s if isinstance(val, np.ndarray): 2185s return cpsparse.csr_matrix(cp.array(val)) 2185s else: 2185s return cpsparse.csr_matrix(val) 2185s elif issubclass(typ, CupyCSCMatrix): 2185s > import cupy as cp 2185s E ModuleNotFoundError: No module named 'cupy' 2185s 2185s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:1024: ModuleNotFoundError 2185s _______ test_view_of_view[cupy_csc-spmatrix_bool_subset-list_int_subset] _______ 2185s 2185s matrix_type = functools.partial(, typ=) 2185s subset_func = 2185s subset_func2 = 2185s 2185s def test_view_of_view(matrix_type, subset_func, subset_func2): 2185s > adata = gen_adata((30, 15), X_type=matrix_type) 2185s 2185s tests/test_views.py:531: 2185s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 2185s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:346: in gen_adata 2185s X = X_type(random_state.binomial(100, 0.005, (M, N)).astype(X_dtype)) 2185s /usr/lib/python3.13/functools.py:934: in wrapper 2185s return dispatch(args[0].__class__)(*args, **kw) 2185s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 2185s 2185s val = array([[0., 0., 0., 1., 0., 0., 1., 0., 0., 1., 0., 1., 1., 0., 0.], 2185s [1., 1., 0., 0., 0., 2., 1., 0., 0., 0., 0...0., 0., 0., 0., 2., 1., 1.], 2185s [0., 1., 0., 0., 0., 2., 2., 2., 3., 0., 0., 0., 0., 0., 0.]], 2185s dtype=float32) 2185s typ = 2185s 2185s @singledispatch 2185s def as_cupy(val, typ=None): 2185s """ 2185s Rough conversion function 2185s 2185s Will try to infer target type from input type if not specified. 2185s """ 2185s if typ is None: 2185s typ = resolve_cupy_type(val) 2185s 2185s if issubclass(typ, CupyArray): 2185s import cupy as cp 2185s 2185s if isinstance(val, CSMatrix): 2185s val = val.toarray() 2185s return cp.array(val) 2185s elif issubclass(typ, CupyCSRMatrix): 2185s import cupy as cp 2185s import cupyx.scipy.sparse as cpsparse 2185s 2185s if isinstance(val, np.ndarray): 2185s return cpsparse.csr_matrix(cp.array(val)) 2185s else: 2185s return cpsparse.csr_matrix(val) 2185s elif issubclass(typ, CupyCSCMatrix): 2185s > import cupy as cp 2185s E ModuleNotFoundError: No module named 'cupy' 2185s 2185s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:1024: ModuleNotFoundError 2185s ______ test_view_of_view[cupy_csc-spmatrix_bool_subset-array_bool_subset] ______ 2185s 2185s matrix_type = functools.partial(, typ=) 2185s subset_func = 2185s subset_func2 = 2185s 2185s def test_view_of_view(matrix_type, subset_func, subset_func2): 2185s > adata = gen_adata((30, 15), X_type=matrix_type) 2185s 2185s tests/test_views.py:531: 2185s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 2185s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:346: in gen_adata 2185s X = X_type(random_state.binomial(100, 0.005, (M, N)).astype(X_dtype)) 2185s /usr/lib/python3.13/functools.py:934: in wrapper 2185s return dispatch(args[0].__class__)(*args, **kw) 2185s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 2185s 2185s val = array([[1., 1., 1., 1., 2., 0., 1., 2., 2., 0., 1., 0., 1., 0., 1.], 2185s [1., 2., 0., 0., 0., 0., 0., 1., 0., 0., 0...3., 1., 0., 1., 0., 0., 1.], 2185s [0., 0., 0., 1., 1., 0., 0., 0., 0., 2., 1., 0., 0., 0., 0.]], 2185s dtype=float32) 2185s typ = 2185s 2185s @singledispatch 2185s def as_cupy(val, typ=None): 2185s """ 2185s Rough conversion function 2185s 2185s Will try to infer target type from input type if not specified. 2185s """ 2185s if typ is None: 2185s typ = resolve_cupy_type(val) 2185s 2185s if issubclass(typ, CupyArray): 2185s import cupy as cp 2185s 2185s if isinstance(val, CSMatrix): 2185s val = val.toarray() 2185s return cp.array(val) 2185s elif issubclass(typ, CupyCSRMatrix): 2185s import cupy as cp 2185s import cupyx.scipy.sparse as cpsparse 2185s 2185s if isinstance(val, np.ndarray): 2185s return cpsparse.csr_matrix(cp.array(val)) 2185s else: 2185s return cpsparse.csr_matrix(val) 2185s elif issubclass(typ, CupyCSCMatrix): 2185s > import cupy as cp 2185s E ModuleNotFoundError: No module named 'cupy' 2185s 2185s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:1024: ModuleNotFoundError 2185s ______ test_view_of_view[cupy_csc-spmatrix_bool_subset-list_bool_subset] _______ 2185s 2185s matrix_type = functools.partial(, typ=) 2185s subset_func = 2185s subset_func2 = 2185s 2185s def test_view_of_view(matrix_type, subset_func, subset_func2): 2185s > adata = gen_adata((30, 15), X_type=matrix_type) 2185s 2185s tests/test_views.py:531: 2185s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 2185s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:346: in gen_adata 2185s X = X_type(random_state.binomial(100, 0.005, (M, N)).astype(X_dtype)) 2185s /usr/lib/python3.13/functools.py:934: in wrapper 2185s return dispatch(args[0].__class__)(*args, **kw) 2185s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 2185s 2185s val = array([[2., 1., 0., 1., 0., 0., 0., 1., 0., 0., 0., 1., 1., 0., 0.], 2185s [0., 1., 1., 0., 0., 0., 0., 0., 1., 1., 0...0., 0., 0., 0., 0., 0., 1.], 2185s [1., 0., 2., 0., 0., 0., 0., 1., 0., 0., 0., 1., 0., 1., 1.]], 2185s dtype=float32) 2185s typ = 2185s 2185s @singledispatch 2185s def as_cupy(val, typ=None): 2185s """ 2185s Rough conversion function 2185s 2185s Will try to infer target type from input type if not specified. 2185s """ 2185s if typ is None: 2185s typ = resolve_cupy_type(val) 2185s 2185s if issubclass(typ, CupyArray): 2185s import cupy as cp 2185s 2185s if isinstance(val, CSMatrix): 2185s val = val.toarray() 2185s return cp.array(val) 2185s elif issubclass(typ, CupyCSRMatrix): 2185s import cupy as cp 2185s import cupyx.scipy.sparse as cpsparse 2185s 2185s if isinstance(val, np.ndarray): 2185s return cpsparse.csr_matrix(cp.array(val)) 2185s else: 2185s return cpsparse.csr_matrix(val) 2185s elif issubclass(typ, CupyCSCMatrix): 2185s > import cupy as cp 2185s E ModuleNotFoundError: No module named 'cupy' 2185s 2185s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:1024: ModuleNotFoundError 2185s _____ test_view_of_view[cupy_csc-spmatrix_bool_subset-matrix_bool_subset] ______ 2185s 2185s matrix_type = functools.partial(, typ=) 2185s subset_func = 2185s subset_func2 = 2185s 2185s def test_view_of_view(matrix_type, subset_func, subset_func2): 2185s > adata = gen_adata((30, 15), X_type=matrix_type) 2185s 2185s tests/test_views.py:531: 2185s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 2185s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:346: in gen_adata 2185s X = X_type(random_state.binomial(100, 0.005, (M, N)).astype(X_dtype)) 2185s /usr/lib/python3.13/functools.py:934: in wrapper 2185s return dispatch(args[0].__class__)(*args, **kw) 2185s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 2185s 2185s val = array([[1., 1., 0., 0., 0., 0., 1., 0., 1., 1., 0., 0., 0., 0., 0.], 2185s [0., 0., 1., 1., 0., 0., 0., 0., 0., 1., 0...0., 0., 3., 2., 0., 0., 0.], 2185s [0., 0., 0., 0., 1., 1., 1., 0., 3., 1., 1., 0., 0., 0., 1.]], 2185s dtype=float32) 2185s typ = 2185s 2185s @singledispatch 2185s def as_cupy(val, typ=None): 2185s """ 2185s Rough conversion function 2185s 2185s Will try to infer target type from input type if not specified. 2185s """ 2185s if typ is None: 2185s typ = resolve_cupy_type(val) 2185s 2185s if issubclass(typ, CupyArray): 2185s import cupy as cp 2185s 2185s if isinstance(val, CSMatrix): 2185s val = val.toarray() 2185s return cp.array(val) 2185s elif issubclass(typ, CupyCSRMatrix): 2185s import cupy as cp 2185s import cupyx.scipy.sparse as cpsparse 2185s 2185s if isinstance(val, np.ndarray): 2185s return cpsparse.csr_matrix(cp.array(val)) 2185s else: 2185s return cpsparse.csr_matrix(val) 2185s elif issubclass(typ, CupyCSCMatrix): 2185s > import cupy as cp 2185s E ModuleNotFoundError: No module named 'cupy' 2185s 2185s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:1024: ModuleNotFoundError 2185s ____ test_view_of_view[cupy_csc-spmatrix_bool_subset-spmatrix_bool_subset] _____ 2185s 2185s matrix_type = functools.partial(, typ=) 2185s subset_func = 2185s subset_func2 = 2185s 2185s def test_view_of_view(matrix_type, subset_func, subset_func2): 2185s > adata = gen_adata((30, 15), X_type=matrix_type) 2185s 2185s tests/test_views.py:531: 2185s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 2185s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:346: in gen_adata 2185s X = X_type(random_state.binomial(100, 0.005, (M, N)).astype(X_dtype)) 2185s /usr/lib/python3.13/functools.py:934: in wrapper 2185s return dispatch(args[0].__class__)(*args, **kw) 2185s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 2185s 2185s val = array([[0., 0., 0., 0., 0., 1., 0., 2., 0., 0., 0., 0., 0., 0., 0.], 2185s [0., 0., 1., 0., 0., 0., 1., 0., 0., 0., 0...1., 2., 0., 2., 0., 0., 0.], 2185s [0., 1., 0., 1., 0., 1., 0., 0., 0., 2., 1., 0., 1., 0., 0.]], 2185s dtype=float32) 2185s typ = 2185s 2185s @singledispatch 2185s def as_cupy(val, typ=None): 2185s """ 2185s Rough conversion function 2185s 2185s Will try to infer target type from input type if not specified. 2185s """ 2185s if typ is None: 2185s typ = resolve_cupy_type(val) 2185s 2185s if issubclass(typ, CupyArray): 2185s import cupy as cp 2185s 2185s if isinstance(val, CSMatrix): 2185s val = val.toarray() 2185s return cp.array(val) 2185s elif issubclass(typ, CupyCSRMatrix): 2185s import cupy as cp 2185s import cupyx.scipy.sparse as cpsparse 2185s 2185s if isinstance(val, np.ndarray): 2185s return cpsparse.csr_matrix(cp.array(val)) 2185s else: 2185s return cpsparse.csr_matrix(val) 2185s elif issubclass(typ, CupyCSCMatrix): 2185s > import cupy as cp 2185s E ModuleNotFoundError: No module named 'cupy' 2185s 2185s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:1024: ModuleNotFoundError 2185s _____ test_view_of_view[cupy_csc-spmatrix_bool_subset-sparray_bool_subset] _____ 2185s 2185s matrix_type = functools.partial(, typ=) 2185s subset_func = 2185s subset_func2 = 2185s 2185s def test_view_of_view(matrix_type, subset_func, subset_func2): 2185s > adata = gen_adata((30, 15), X_type=matrix_type) 2185s 2185s tests/test_views.py:531: 2185s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 2185s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:346: in gen_adata 2185s X = X_type(random_state.binomial(100, 0.005, (M, N)).astype(X_dtype)) 2185s /usr/lib/python3.13/functools.py:934: in wrapper 2185s return dispatch(args[0].__class__)(*args, **kw) 2185s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 2185s 2185s val = array([[0., 0., 0., 1., 0., 1., 1., 0., 0., 0., 0., 0., 0., 1., 0.], 2185s [0., 0., 0., 0., 1., 0., 1., 0., 0., 0., 1...0., 2., 1., 1., 1., 1., 2.], 2185s [0., 0., 1., 0., 0., 0., 0., 1., 0., 0., 1., 3., 1., 2., 0.]], 2185s dtype=float32) 2185s typ = 2185s 2185s @singledispatch 2185s def as_cupy(val, typ=None): 2185s """ 2185s Rough conversion function 2185s 2185s Will try to infer target type from input type if not specified. 2185s """ 2185s if typ is None: 2185s typ = resolve_cupy_type(val) 2185s 2185s if issubclass(typ, CupyArray): 2185s import cupy as cp 2185s 2185s if isinstance(val, CSMatrix): 2185s val = val.toarray() 2185s return cp.array(val) 2185s elif issubclass(typ, CupyCSRMatrix): 2185s import cupy as cp 2185s import cupyx.scipy.sparse as cpsparse 2185s 2185s if isinstance(val, np.ndarray): 2185s return cpsparse.csr_matrix(cp.array(val)) 2185s else: 2185s return cpsparse.csr_matrix(val) 2185s elif issubclass(typ, CupyCSCMatrix): 2185s > import cupy as cp 2185s E ModuleNotFoundError: No module named 'cupy' 2185s 2185s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:1024: ModuleNotFoundError 2185s _________ test_view_of_view[cupy_csc-sparray_bool_subset-array_subset] _________ 2185s 2185s matrix_type = functools.partial(, typ=) 2185s subset_func = 2185s subset_func2 = 2185s 2185s def test_view_of_view(matrix_type, subset_func, subset_func2): 2185s > adata = gen_adata((30, 15), X_type=matrix_type) 2185s 2185s tests/test_views.py:531: 2185s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 2185s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:346: in gen_adata 2185s X = X_type(random_state.binomial(100, 0.005, (M, N)).astype(X_dtype)) 2185s /usr/lib/python3.13/functools.py:934: in wrapper 2185s return dispatch(args[0].__class__)(*args, **kw) 2185s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 2185s 2185s val = array([[0., 0., 0., 0., 2., 1., 0., 0., 0., 0., 0., 0., 1., 1., 2.], 2185s [1., 1., 0., 1., 2., 2., 0., 1., 0., 0., 0...0., 0., 0., 0., 1., 0., 1.], 2185s [0., 0., 0., 0., 0., 1., 0., 0., 0., 1., 1., 0., 0., 0., 1.]], 2185s dtype=float32) 2185s typ = 2185s 2185s @singledispatch 2185s def as_cupy(val, typ=None): 2185s """ 2185s Rough conversion function 2185s 2185s Will try to infer target type from input type if not specified. 2185s """ 2185s if typ is None: 2185s typ = resolve_cupy_type(val) 2185s 2185s if issubclass(typ, CupyArray): 2185s import cupy as cp 2185s 2185s if isinstance(val, CSMatrix): 2185s val = val.toarray() 2185s return cp.array(val) 2185s elif issubclass(typ, CupyCSRMatrix): 2185s import cupy as cp 2185s import cupyx.scipy.sparse as cpsparse 2185s 2185s if isinstance(val, np.ndarray): 2185s return cpsparse.csr_matrix(cp.array(val)) 2185s else: 2185s return cpsparse.csr_matrix(val) 2185s elif issubclass(typ, CupyCSCMatrix): 2185s > import cupy as cp 2185s E ModuleNotFoundError: No module named 'cupy' 2185s 2185s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:1024: ModuleNotFoundError 2185s _________ test_view_of_view[cupy_csc-sparray_bool_subset-slice_subset] _________ 2185s 2185s matrix_type = functools.partial(, typ=) 2185s subset_func = 2185s subset_func2 = 2185s 2185s def test_view_of_view(matrix_type, subset_func, subset_func2): 2185s > adata = gen_adata((30, 15), X_type=matrix_type) 2185s 2185s tests/test_views.py:531: 2185s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 2185s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:346: in gen_adata 2185s X = X_type(random_state.binomial(100, 0.005, (M, N)).astype(X_dtype)) 2185s /usr/lib/python3.13/functools.py:934: in wrapper 2185s return dispatch(args[0].__class__)(*args, **kw) 2185s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 2185s 2185s val = array([[0., 0., 1., 1., 0., 0., 0., 0., 0., 0., 1., 1., 2., 0., 0.], 2185s [1., 0., 1., 0., 0., 1., 1., 1., 0., 2., 2...1., 1., 1., 1., 0., 0., 1.], 2185s [1., 1., 0., 0., 1., 0., 0., 2., 0., 3., 2., 0., 1., 1., 1.]], 2185s dtype=float32) 2185s typ = 2185s 2185s @singledispatch 2185s def as_cupy(val, typ=None): 2185s """ 2185s Rough conversion function 2185s 2185s Will try to infer target type from input type if not specified. 2185s """ 2185s if typ is None: 2185s typ = resolve_cupy_type(val) 2185s 2185s if issubclass(typ, CupyArray): 2185s import cupy as cp 2185s 2185s if isinstance(val, CSMatrix): 2185s val = val.toarray() 2185s return cp.array(val) 2185s elif issubclass(typ, CupyCSRMatrix): 2185s import cupy as cp 2185s import cupyx.scipy.sparse as cpsparse 2185s 2185s if isinstance(val, np.ndarray): 2185s return cpsparse.csr_matrix(cp.array(val)) 2185s else: 2185s return cpsparse.csr_matrix(val) 2185s elif issubclass(typ, CupyCSCMatrix): 2185s > import cupy as cp 2185s E ModuleNotFoundError: No module named 'cupy' 2185s 2185s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:1024: ModuleNotFoundError 2185s ________ test_view_of_view[cupy_csc-sparray_bool_subset-single_subset] _________ 2185s 2185s matrix_type = functools.partial(, typ=) 2185s subset_func = 2185s subset_func2 = 2185s 2185s def test_view_of_view(matrix_type, subset_func, subset_func2): 2185s > adata = gen_adata((30, 15), X_type=matrix_type) 2185s 2185s tests/test_views.py:531: 2185s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 2185s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:346: in gen_adata 2185s X = X_type(random_state.binomial(100, 0.005, (M, N)).astype(X_dtype)) 2185s /usr/lib/python3.13/functools.py:934: in wrapper 2185s return dispatch(args[0].__class__)(*args, **kw) 2185s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 2185s 2185s val = array([[0., 1., 0., 0., 1., 2., 0., 0., 0., 1., 1., 2., 1., 2., 0.], 2185s [1., 0., 0., 0., 0., 0., 0., 0., 0., 0., 2...1., 0., 0., 2., 0., 1., 0.], 2185s [1., 1., 1., 0., 0., 0., 0., 0., 2., 1., 1., 0., 1., 2., 0.]], 2185s dtype=float32) 2185s typ = 2185s 2185s @singledispatch 2185s def as_cupy(val, typ=None): 2185s """ 2185s Rough conversion function 2185s 2185s Will try to infer target type from input type if not specified. 2185s """ 2185s if typ is None: 2185s typ = resolve_cupy_type(val) 2185s 2185s if issubclass(typ, CupyArray): 2185s import cupy as cp 2185s 2185s if isinstance(val, CSMatrix): 2185s val = val.toarray() 2185s return cp.array(val) 2185s elif issubclass(typ, CupyCSRMatrix): 2185s import cupy as cp 2185s import cupyx.scipy.sparse as cpsparse 2185s 2185s if isinstance(val, np.ndarray): 2185s return cpsparse.csr_matrix(cp.array(val)) 2185s else: 2185s return cpsparse.csr_matrix(val) 2185s elif issubclass(typ, CupyCSCMatrix): 2185s > import cupy as cp 2185s E ModuleNotFoundError: No module named 'cupy' 2185s 2185s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:1024: ModuleNotFoundError 2185s _______ test_view_of_view[cupy_csc-sparray_bool_subset-array_int_subset] _______ 2185s 2185s matrix_type = functools.partial(, typ=) 2185s subset_func = 2185s subset_func2 = 2185s 2185s def test_view_of_view(matrix_type, subset_func, subset_func2): 2185s > adata = gen_adata((30, 15), X_type=matrix_type) 2185s 2185s tests/test_views.py:531: 2185s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 2185s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:346: in gen_adata 2185s X = X_type(random_state.binomial(100, 0.005, (M, N)).astype(X_dtype)) 2185s /usr/lib/python3.13/functools.py:934: in wrapper 2185s return dispatch(args[0].__class__)(*args, **kw) 2185s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 2185s 2185s val = array([[1., 0., 0., 1., 1., 0., 1., 0., 0., 0., 0., 1., 1., 0., 0.], 2185s [0., 1., 0., 0., 0., 0., 1., 1., 0., 1., 1...0., 0., 2., 0., 1., 1., 0.], 2185s [2., 0., 0., 0., 1., 2., 0., 1., 0., 0., 1., 1., 1., 1., 0.]], 2185s dtype=float32) 2185s typ = 2185s 2185s @singledispatch 2185s def as_cupy(val, typ=None): 2185s """ 2185s Rough conversion function 2185s 2185s Will try to infer target type from input type if not specified. 2185s """ 2185s if typ is None: 2185s typ = resolve_cupy_type(val) 2185s 2185s if issubclass(typ, CupyArray): 2185s import cupy as cp 2185s 2185s if isinstance(val, CSMatrix): 2185s val = val.toarray() 2185s return cp.array(val) 2185s elif issubclass(typ, CupyCSRMatrix): 2185s import cupy as cp 2185s import cupyx.scipy.sparse as cpsparse 2185s 2185s if isinstance(val, np.ndarray): 2185s return cpsparse.csr_matrix(cp.array(val)) 2185s else: 2185s return cpsparse.csr_matrix(val) 2185s elif issubclass(typ, CupyCSCMatrix): 2185s > import cupy as cp 2185s E ModuleNotFoundError: No module named 'cupy' 2185s 2185s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:1024: ModuleNotFoundError 2185s _______ test_view_of_view[cupy_csc-sparray_bool_subset-list_int_subset] ________ 2185s 2185s matrix_type = functools.partial(, typ=) 2185s subset_func = 2185s subset_func2 = 2185s 2185s def test_view_of_view(matrix_type, subset_func, subset_func2): 2185s > adata = gen_adata((30, 15), X_type=matrix_type) 2185s 2185s tests/test_views.py:531: 2185s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 2185s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:346: in gen_adata 2185s X = X_type(random_state.binomial(100, 0.005, (M, N)).astype(X_dtype)) 2185s /usr/lib/python3.13/functools.py:934: in wrapper 2185s return dispatch(args[0].__class__)(*args, **kw) 2185s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 2185s 2185s val = array([[0., 0., 1., 0., 0., 1., 2., 2., 0., 0., 0., 1., 0., 1., 1.], 2185s [0., 0., 0., 2., 0., 0., 0., 0., 0., 1., 0...0., 1., 0., 0., 1., 0., 0.], 2185s [2., 2., 0., 0., 0., 2., 0., 1., 0., 1., 0., 1., 0., 0., 0.]], 2185s dtype=float32) 2185s typ = 2185s 2185s @singledispatch 2185s def as_cupy(val, typ=None): 2185s """ 2185s Rough conversion function 2185s 2185s Will try to infer target type from input type if not specified. 2185s """ 2185s if typ is None: 2185s typ = resolve_cupy_type(val) 2185s 2185s if issubclass(typ, CupyArray): 2185s import cupy as cp 2185s 2185s if isinstance(val, CSMatrix): 2185s val = val.toarray() 2185s return cp.array(val) 2185s elif issubclass(typ, CupyCSRMatrix): 2185s import cupy as cp 2185s import cupyx.scipy.sparse as cpsparse 2185s 2185s if isinstance(val, np.ndarray): 2185s return cpsparse.csr_matrix(cp.array(val)) 2185s else: 2185s return cpsparse.csr_matrix(val) 2185s elif issubclass(typ, CupyCSCMatrix): 2185s > import cupy as cp 2185s E ModuleNotFoundError: No module named 'cupy' 2185s 2185s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:1024: ModuleNotFoundError 2185s ______ test_view_of_view[cupy_csc-sparray_bool_subset-array_bool_subset] _______ 2185s 2185s matrix_type = functools.partial(, typ=) 2185s subset_func = 2185s subset_func2 = 2185s 2185s def test_view_of_view(matrix_type, subset_func, subset_func2): 2185s > adata = gen_adata((30, 15), X_type=matrix_type) 2185s 2185s tests/test_views.py:531: 2185s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 2185s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:346: in gen_adata 2185s X = X_type(random_state.binomial(100, 0.005, (M, N)).astype(X_dtype)) 2185s /usr/lib/python3.13/functools.py:934: in wrapper 2185s return dispatch(args[0].__class__)(*args, **kw) 2185s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 2185s 2185s val = array([[0., 0., 2., 0., 0., 0., 0., 1., 1., 0., 1., 0., 1., 1., 2.], 2185s [1., 1., 0., 0., 1., 2., 0., 2., 0., 1., 2...1., 1., 1., 1., 0., 1., 0.], 2185s [0., 0., 0., 0., 0., 0., 0., 1., 1., 0., 1., 0., 1., 0., 0.]], 2185s dtype=float32) 2185s typ = 2185s 2185s @singledispatch 2185s def as_cupy(val, typ=None): 2185s """ 2185s Rough conversion function 2185s 2185s Will try to infer target type from input type if not specified. 2185s """ 2185s if typ is None: 2185s typ = resolve_cupy_type(val) 2185s 2185s if issubclass(typ, CupyArray): 2185s import cupy as cp 2185s 2185s if isinstance(val, CSMatrix): 2185s val = val.toarray() 2185s return cp.array(val) 2185s elif issubclass(typ, CupyCSRMatrix): 2185s import cupy as cp 2185s import cupyx.scipy.sparse as cpsparse 2185s 2185s if isinstance(val, np.ndarray): 2185s return cpsparse.csr_matrix(cp.array(val)) 2185s else: 2185s return cpsparse.csr_matrix(val) 2185s elif issubclass(typ, CupyCSCMatrix): 2185s > import cupy as cp 2185s E ModuleNotFoundError: No module named 'cupy' 2185s 2185s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:1024: ModuleNotFoundError 2185s _______ test_view_of_view[cupy_csc-sparray_bool_subset-list_bool_subset] _______ 2185s 2185s matrix_type = functools.partial(, typ=) 2185s subset_func = 2185s subset_func2 = 2185s 2185s def test_view_of_view(matrix_type, subset_func, subset_func2): 2185s > adata = gen_adata((30, 15), X_type=matrix_type) 2185s 2185s tests/test_views.py:531: 2185s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 2185s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:346: in gen_adata 2185s X = X_type(random_state.binomial(100, 0.005, (M, N)).astype(X_dtype)) 2185s /usr/lib/python3.13/functools.py:934: in wrapper 2185s return dispatch(args[0].__class__)(*args, **kw) 2185s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 2185s 2185s val = array([[0., 0., 0., 1., 1., 1., 1., 0., 0., 0., 1., 0., 0., 1., 0.], 2185s [0., 0., 0., 0., 0., 1., 2., 0., 1., 2., 1...1., 0., 0., 1., 1., 0., 1.], 2185s [0., 2., 1., 0., 0., 0., 0., 0., 0., 0., 0., 1., 1., 0., 0.]], 2185s dtype=float32) 2185s typ = 2185s 2185s @singledispatch 2185s def as_cupy(val, typ=None): 2185s """ 2185s Rough conversion function 2185s 2185s Will try to infer target type from input type if not specified. 2185s """ 2185s if typ is None: 2185s typ = resolve_cupy_type(val) 2185s 2185s if issubclass(typ, CupyArray): 2185s import cupy as cp 2185s 2185s if isinstance(val, CSMatrix): 2185s val = val.toarray() 2185s return cp.array(val) 2185s elif issubclass(typ, CupyCSRMatrix): 2185s import cupy as cp 2185s import cupyx.scipy.sparse as cpsparse 2185s 2185s if isinstance(val, np.ndarray): 2185s return cpsparse.csr_matrix(cp.array(val)) 2185s else: 2185s return cpsparse.csr_matrix(val) 2185s elif issubclass(typ, CupyCSCMatrix): 2185s > import cupy as cp 2185s E ModuleNotFoundError: No module named 'cupy' 2185s 2185s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:1024: ModuleNotFoundError 2185s ______ test_view_of_view[cupy_csc-sparray_bool_subset-matrix_bool_subset] ______ 2185s 2185s matrix_type = functools.partial(, typ=) 2185s subset_func = 2185s subset_func2 = 2185s 2185s def test_view_of_view(matrix_type, subset_func, subset_func2): 2185s > adata = gen_adata((30, 15), X_type=matrix_type) 2185s 2185s tests/test_views.py:531: 2185s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 2185s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:346: in gen_adata 2185s X = X_type(random_state.binomial(100, 0.005, (M, N)).astype(X_dtype)) 2185s /usr/lib/python3.13/functools.py:934: in wrapper 2185s return dispatch(args[0].__class__)(*args, **kw) 2185s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 2185s 2185s val = array([[0., 1., 1., 0., 1., 0., 1., 0., 0., 1., 0., 0., 1., 0., 0.], 2185s [0., 0., 0., 0., 2., 0., 1., 0., 0., 0., 0...0., 0., 0., 0., 2., 1., 0.], 2185s [0., 1., 0., 0., 0., 0., 1., 0., 1., 0., 1., 1., 0., 2., 1.]], 2185s dtype=float32) 2185s typ = 2185s 2185s @singledispatch 2185s def as_cupy(val, typ=None): 2185s """ 2185s Rough conversion function 2185s 2185s Will try to infer target type from input type if not specified. 2185s """ 2185s if typ is None: 2185s typ = resolve_cupy_type(val) 2185s 2185s if issubclass(typ, CupyArray): 2185s import cupy as cp 2185s 2185s if isinstance(val, CSMatrix): 2185s val = val.toarray() 2185s return cp.array(val) 2185s elif issubclass(typ, CupyCSRMatrix): 2185s import cupy as cp 2185s import cupyx.scipy.sparse as cpsparse 2185s 2185s if isinstance(val, np.ndarray): 2185s return cpsparse.csr_matrix(cp.array(val)) 2185s else: 2185s return cpsparse.csr_matrix(val) 2185s elif issubclass(typ, CupyCSCMatrix): 2185s > import cupy as cp 2185s E ModuleNotFoundError: No module named 'cupy' 2185s 2185s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:1024: ModuleNotFoundError 2185s _____ test_view_of_view[cupy_csc-sparray_bool_subset-spmatrix_bool_subset] _____ 2185s 2185s matrix_type = functools.partial(, typ=) 2185s subset_func = 2185s subset_func2 = 2185s 2185s def test_view_of_view(matrix_type, subset_func, subset_func2): 2185s > adata = gen_adata((30, 15), X_type=matrix_type) 2185s 2185s tests/test_views.py:531: 2185s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 2185s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:346: in gen_adata 2185s X = X_type(random_state.binomial(100, 0.005, (M, N)).astype(X_dtype)) 2185s /usr/lib/python3.13/functools.py:934: in wrapper 2185s return dispatch(args[0].__class__)(*args, **kw) 2185s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 2185s 2185s val = array([[0., 0., 0., 0., 0., 0., 0., 1., 2., 1., 0., 1., 1., 0., 0.], 2185s [0., 2., 1., 0., 1., 0., 2., 0., 0., 1., 0...0., 0., 3., 1., 0., 1., 1.], 2185s [2., 1., 1., 0., 0., 0., 0., 0., 0., 1., 1., 0., 2., 0., 1.]], 2185s dtype=float32) 2185s typ = 2185s 2185s @singledispatch 2185s def as_cupy(val, typ=None): 2185s """ 2185s Rough conversion function 2185s 2185s Will try to infer target type from input type if not specified. 2185s """ 2185s if typ is None: 2185s typ = resolve_cupy_type(val) 2185s 2185s if issubclass(typ, CupyArray): 2185s import cupy as cp 2185s 2185s if isinstance(val, CSMatrix): 2185s val = val.toarray() 2185s return cp.array(val) 2185s elif issubclass(typ, CupyCSRMatrix): 2185s import cupy as cp 2185s import cupyx.scipy.sparse as cpsparse 2185s 2185s if isinstance(val, np.ndarray): 2185s return cpsparse.csr_matrix(cp.array(val)) 2185s else: 2185s return cpsparse.csr_matrix(val) 2185s elif issubclass(typ, CupyCSCMatrix): 2185s > import cupy as cp 2185s E ModuleNotFoundError: No module named 'cupy' 2185s 2185s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:1024: ModuleNotFoundError 2185s _____ test_view_of_view[cupy_csc-sparray_bool_subset-sparray_bool_subset] ______ 2185s 2185s matrix_type = functools.partial(, typ=) 2185s subset_func = 2185s subset_func2 = 2185s 2185s def test_view_of_view(matrix_type, subset_func, subset_func2): 2185s > adata = gen_adata((30, 15), X_type=matrix_type) 2185s 2185s tests/test_views.py:531: 2185s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 2185s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:346: in gen_adata 2185s X = X_type(random_state.binomial(100, 0.005, (M, N)).astype(X_dtype)) 2185s /usr/lib/python3.13/functools.py:934: in wrapper 2185s return dispatch(args[0].__class__)(*args, **kw) 2185s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 2185s 2185s val = array([[1., 0., 1., 0., 0., 1., 2., 0., 1., 0., 1., 2., 1., 0., 1.], 2185s [0., 0., 0., 0., 1., 0., 3., 0., 2., 1., 0...0., 0., 0., 0., 1., 0., 0.], 2185s [2., 0., 0., 0., 2., 0., 0., 2., 0., 1., 0., 0., 1., 1., 0.]], 2185s dtype=float32) 2185s typ = 2185s 2185s @singledispatch 2185s def as_cupy(val, typ=None): 2185s """ 2185s Rough conversion function 2185s 2185s Will try to infer target type from input type if not specified. 2185s """ 2185s if typ is None: 2185s typ = resolve_cupy_type(val) 2185s 2185s if issubclass(typ, CupyArray): 2185s import cupy as cp 2185s 2185s if isinstance(val, CSMatrix): 2185s val = val.toarray() 2185s return cp.array(val) 2185s elif issubclass(typ, CupyCSRMatrix): 2185s import cupy as cp 2185s import cupyx.scipy.sparse as cpsparse 2185s 2185s if isinstance(val, np.ndarray): 2185s return cpsparse.csr_matrix(cp.array(val)) 2185s else: 2185s return cpsparse.csr_matrix(val) 2185s elif issubclass(typ, CupyCSCMatrix): 2185s > import cupy as cp 2185s E ModuleNotFoundError: No module named 'cupy' 2185s 2185s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:1024: ModuleNotFoundError 2185s _________________ test_view_different_type_indices[cupy_array] _________________ 2185s 2185s matrix_type = functools.partial(, typ=) 2185s 2185s def test_view_different_type_indices(matrix_type): 2185s > orig = gen_adata((30, 30), X_type=matrix_type) 2185s 2185s tests/test_views.py:584: 2185s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 2185s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:346: in gen_adata 2185s X = X_type(random_state.binomial(100, 0.005, (M, N)).astype(X_dtype)) 2185s /usr/lib/python3.13/functools.py:934: in wrapper 2185s return dispatch(args[0].__class__)(*args, **kw) 2185s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 2185s 2185s val = array([[0., 0., 0., 2., 1., 1., 0., 0., 1., 0., 1., 1., 0., 0., 0., 0., 2185s 1., 2., 1., 1., 1., 2., 0., 1., 0., 0.... 0., 1., 0., 0., 0., 0., 2., 2., 2185s 3., 0., 0., 1., 0., 0., 0., 1., 0., 0., 0., 1., 1., 0.]], 2185s dtype=float32) 2185s typ = 2185s 2185s @singledispatch 2185s def as_cupy(val, typ=None): 2185s """ 2185s Rough conversion function 2185s 2185s Will try to infer target type from input type if not specified. 2185s """ 2185s if typ is None: 2185s typ = resolve_cupy_type(val) 2185s 2185s if issubclass(typ, CupyArray): 2185s > import cupy as cp 2185s E ModuleNotFoundError: No module named 'cupy' 2185s 2185s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:1010: ModuleNotFoundError 2185s __________________ test_view_different_type_indices[cupy_csr] __________________ 2185s 2185s matrix_type = functools.partial(, typ=) 2185s 2185s def test_view_different_type_indices(matrix_type): 2185s > orig = gen_adata((30, 30), X_type=matrix_type) 2185s 2185s tests/test_views.py:584: 2185s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 2185s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:346: in gen_adata 2185s X = X_type(random_state.binomial(100, 0.005, (M, N)).astype(X_dtype)) 2185s /usr/lib/python3.13/functools.py:934: in wrapper 2185s return dispatch(args[0].__class__)(*args, **kw) 2185s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 2185s 2185s val = array([[1., 1., 1., 1., 1., 0., 1., 0., 0., 0., 0., 1., 0., 0., 0., 1., 2185s 0., 0., 0., 0., 0., 0., 1., 0., 0., 0.... 0., 0., 1., 0., 0., 1., 0., 0., 2185s 1., 0., 0., 1., 1., 0., 1., 0., 0., 0., 0., 0., 0., 0.]], 2185s dtype=float32) 2185s typ = 2185s 2185s @singledispatch 2185s def as_cupy(val, typ=None): 2185s """ 2185s Rough conversion function 2185s 2185s Will try to infer target type from input type if not specified. 2185s """ 2185s if typ is None: 2185s typ = resolve_cupy_type(val) 2185s 2185s if issubclass(typ, CupyArray): 2185s import cupy as cp 2185s 2185s if isinstance(val, CSMatrix): 2185s val = val.toarray() 2185s return cp.array(val) 2185s elif issubclass(typ, CupyCSRMatrix): 2185s > import cupy as cp 2185s E ModuleNotFoundError: No module named 'cupy' 2185s 2185s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:1016: ModuleNotFoundError 2185s __________________ test_view_different_type_indices[cupy_csc] __________________ 2185s 2185s matrix_type = functools.partial(, typ=) 2185s 2185s def test_view_different_type_indices(matrix_type): 2185s > orig = gen_adata((30, 30), X_type=matrix_type) 2185s 2185s tests/test_views.py:584: 2185s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 2185s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:346: in gen_adata 2185s X = X_type(random_state.binomial(100, 0.005, (M, N)).astype(X_dtype)) 2185s /usr/lib/python3.13/functools.py:934: in wrapper 2185s return dispatch(args[0].__class__)(*args, **kw) 2185s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 2185s 2185s val = array([[0., 0., 1., 0., 3., 1., 0., 0., 0., 1., 0., 0., 0., 1., 0., 1., 2185s 0., 2., 0., 0., 1., 1., 1., 0., 0., 0.... 0., 2., 0., 0., 0., 0., 0., 3., 2185s 1., 0., 0., 3., 0., 0., 1., 1., 0., 1., 0., 1., 2., 2.]], 2185s dtype=float32) 2185s typ = 2185s 2185s @singledispatch 2185s def as_cupy(val, typ=None): 2185s """ 2185s Rough conversion function 2185s 2185s Will try to infer target type from input type if not specified. 2185s """ 2185s if typ is None: 2185s typ = resolve_cupy_type(val) 2185s 2185s if issubclass(typ, CupyArray): 2185s import cupy as cp 2185s 2185s if isinstance(val, CSMatrix): 2185s val = val.toarray() 2185s return cp.array(val) 2185s elif issubclass(typ, CupyCSRMatrix): 2185s import cupy as cp 2185s import cupyx.scipy.sparse as cpsparse 2185s 2185s if isinstance(val, np.ndarray): 2185s return cpsparse.csr_matrix(cp.array(val)) 2185s else: 2185s return cpsparse.csr_matrix(val) 2185s elif issubclass(typ, CupyCSCMatrix): 2185s > import cupy as cp 2185s E ModuleNotFoundError: No module named 'cupy' 2185s 2185s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:1024: ModuleNotFoundError 2185s ___________________ test_ellipsis_index[cupy_array-ellipsis] ___________________ 2185s 2185s ellipsis_index = Ellipsis 2185s equivalent_ellipsis_index = (slice(None, None, None), slice(None, None, None)) 2185s matrix_type = functools.partial(, typ=) 2185s 2185s def test_ellipsis_index( 2185s ellipsis_index: tuple[EllipsisType | slice, ...] | EllipsisType, 2185s equivalent_ellipsis_index: tuple[slice, slice], 2185s matrix_type, 2185s ): 2185s > adata = gen_adata((10, 10), X_type=matrix_type, **GEN_ADATA_DASK_ARGS) 2185s 2185s tests/test_views.py:797: 2185s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 2185s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:346: in gen_adata 2185s X = X_type(random_state.binomial(100, 0.005, (M, N)).astype(X_dtype)) 2185s /usr/lib/python3.13/functools.py:934: in wrapper 2185s return dispatch(args[0].__class__)(*args, **kw) 2185s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 2185s 2185s val = array([[0., 0., 0., 0., 0., 1., 1., 1., 0., 1.], 2185s [0., 0., 1., 1., 1., 0., 2., 2., 0., 0.], 2185s [0., 0., 0., ... 0.], 2185s [0., 0., 1., 0., 0., 0., 0., 2., 1., 1.], 2185s [0., 0., 0., 0., 0., 1., 0., 1., 0., 0.]], dtype=float32) 2185s typ = 2185s 2185s @singledispatch 2185s def as_cupy(val, typ=None): 2185s """ 2185s Rough conversion function 2185s 2185s Will try to infer target type from input type if not specified. 2185s """ 2185s if typ is None: 2185s typ = resolve_cupy_type(val) 2185s 2185s if issubclass(typ, CupyArray): 2185s > import cupy as cp 2185s E ModuleNotFoundError: No module named 'cupy' 2185s 2185s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:1010: ModuleNotFoundError 2185s ________________ test_ellipsis_index[cupy_array-ellipsis_tuple] ________________ 2185s 2185s ellipsis_index = (Ellipsis,) 2185s equivalent_ellipsis_index = (slice(None, None, None), slice(None, None, None)) 2185s matrix_type = functools.partial(, typ=) 2185s 2185s def test_ellipsis_index( 2185s ellipsis_index: tuple[EllipsisType | slice, ...] | EllipsisType, 2185s equivalent_ellipsis_index: tuple[slice, slice], 2185s matrix_type, 2185s ): 2185s > adata = gen_adata((10, 10), X_type=matrix_type, **GEN_ADATA_DASK_ARGS) 2185s 2185s tests/test_views.py:797: 2185s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 2185s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:346: in gen_adata 2185s X = X_type(random_state.binomial(100, 0.005, (M, N)).astype(X_dtype)) 2185s /usr/lib/python3.13/functools.py:934: in wrapper 2185s return dispatch(args[0].__class__)(*args, **kw) 2185s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 2185s 2185s val = array([[1., 1., 0., 1., 1., 1., 1., 0., 0., 0.], 2185s [1., 0., 0., 0., 0., 0., 0., 0., 2., 0.], 2185s [1., 1., 0., ... 0.], 2185s [0., 0., 1., 1., 1., 0., 2., 0., 0., 0.], 2185s [0., 1., 1., 0., 0., 1., 0., 1., 0., 0.]], dtype=float32) 2185s typ = 2185s 2185s @singledispatch 2185s def as_cupy(val, typ=None): 2185s """ 2185s Rough conversion function 2185s 2185s Will try to infer target type from input type if not specified. 2185s """ 2185s if typ is None: 2185s typ = resolve_cupy_type(val) 2185s 2185s if issubclass(typ, CupyArray): 2185s > import cupy as cp 2185s E ModuleNotFoundError: No module named 'cupy' 2185s 2185s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:1010: ModuleNotFoundError 2185s _________________ test_ellipsis_index[cupy_array-obs-ellipsis] _________________ 2185s 2185s ellipsis_index = (Ellipsis, slice(0, 10, None)) 2185s equivalent_ellipsis_index = (slice(None, None, None), slice(0, 10, None)) 2185s matrix_type = functools.partial(, typ=) 2185s 2185s def test_ellipsis_index( 2185s ellipsis_index: tuple[EllipsisType | slice, ...] | EllipsisType, 2185s equivalent_ellipsis_index: tuple[slice, slice], 2185s matrix_type, 2185s ): 2185s > adata = gen_adata((10, 10), X_type=matrix_type, **GEN_ADATA_DASK_ARGS) 2185s 2185s tests/test_views.py:797: 2185s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 2185s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:346: in gen_adata 2185s X = X_type(random_state.binomial(100, 0.005, (M, N)).astype(X_dtype)) 2185s /usr/lib/python3.13/functools.py:934: in wrapper 2185s return dispatch(args[0].__class__)(*args, **kw) 2185s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 2185s 2185s val = array([[1., 0., 1., 1., 2., 2., 0., 3., 0., 0.], 2185s [2., 1., 0., 1., 0., 1., 1., 0., 0., 1.], 2185s [1., 0., 0., ... 0.], 2185s [0., 0., 0., 2., 1., 1., 1., 0., 0., 0.], 2185s [0., 0., 0., 0., 0., 1., 0., 0., 0., 1.]], dtype=float32) 2185s typ = 2185s 2185s @singledispatch 2185s def as_cupy(val, typ=None): 2185s """ 2185s Rough conversion function 2185s 2185s Will try to infer target type from input type if not specified. 2185s """ 2185s if typ is None: 2185s typ = resolve_cupy_type(val) 2185s 2185s if issubclass(typ, CupyArray): 2185s > import cupy as cp 2185s E ModuleNotFoundError: No module named 'cupy' 2185s 2185s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:1010: ModuleNotFoundError 2185s _________________ test_ellipsis_index[cupy_array-var-ellipsis] _________________ 2185s 2185s ellipsis_index = (slice(0, 10, None), Ellipsis) 2185s equivalent_ellipsis_index = (slice(0, 10, None), slice(None, None, None)) 2185s matrix_type = functools.partial(, typ=) 2185s 2185s def test_ellipsis_index( 2185s ellipsis_index: tuple[EllipsisType | slice, ...] | EllipsisType, 2185s equivalent_ellipsis_index: tuple[slice, slice], 2185s matrix_type, 2185s ): 2185s > adata = gen_adata((10, 10), X_type=matrix_type, **GEN_ADATA_DASK_ARGS) 2185s 2185s tests/test_views.py:797: 2185s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 2185s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:346: in gen_adata 2185s X = X_type(random_state.binomial(100, 0.005, (M, N)).astype(X_dtype)) 2185s /usr/lib/python3.13/functools.py:934: in wrapper 2185s return dispatch(args[0].__class__)(*args, **kw) 2185s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 2185s 2185s val = array([[0., 1., 0., 0., 0., 0., 0., 1., 0., 2.], 2185s [1., 0., 0., 1., 0., 1., 0., 1., 0., 0.], 2185s [0., 1., 0., ... 1.], 2185s [0., 0., 1., 1., 0., 0., 2., 0., 1., 1.], 2185s [0., 3., 0., 0., 3., 0., 0., 0., 0., 1.]], dtype=float32) 2185s typ = 2185s 2185s @singledispatch 2185s def as_cupy(val, typ=None): 2185s """ 2185s Rough conversion function 2185s 2185s Will try to infer target type from input type if not specified. 2185s """ 2185s if typ is None: 2185s typ = resolve_cupy_type(val) 2185s 2185s if issubclass(typ, CupyArray): 2185s > import cupy as cp 2185s E ModuleNotFoundError: No module named 'cupy' 2185s 2185s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:1010: ModuleNotFoundError 2185s _______________ test_ellipsis_index[cupy_array-obs-var-ellipsis] _______________ 2185s 2185s ellipsis_index = (slice(0, 10, None), slice(0, 10, None), Ellipsis) 2185s equivalent_ellipsis_index = (slice(0, 10, None), slice(0, 10, None)) 2185s matrix_type = functools.partial(, typ=) 2185s 2185s def test_ellipsis_index( 2185s ellipsis_index: tuple[EllipsisType | slice, ...] | EllipsisType, 2185s equivalent_ellipsis_index: tuple[slice, slice], 2185s matrix_type, 2185s ): 2185s > adata = gen_adata((10, 10), X_type=matrix_type, **GEN_ADATA_DASK_ARGS) 2185s 2185s tests/test_views.py:797: 2185s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 2185s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:346: in gen_adata 2185s X = X_type(random_state.binomial(100, 0.005, (M, N)).astype(X_dtype)) 2185s /usr/lib/python3.13/functools.py:934: in wrapper 2185s return dispatch(args[0].__class__)(*args, **kw) 2185s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 2185s 2185s val = array([[0., 1., 0., 1., 0., 0., 3., 1., 1., 0.], 2185s [0., 0., 0., 1., 0., 1., 0., 0., 1., 0.], 2185s [1., 1., 1., ... 0.], 2185s [0., 0., 0., 1., 0., 0., 0., 1., 0., 1.], 2185s [0., 0., 1., 0., 0., 0., 2., 2., 0., 0.]], dtype=float32) 2185s typ = 2185s 2185s @singledispatch 2185s def as_cupy(val, typ=None): 2185s """ 2185s Rough conversion function 2185s 2185s Will try to infer target type from input type if not specified. 2185s """ 2185s if typ is None: 2185s typ = resolve_cupy_type(val) 2185s 2185s if issubclass(typ, CupyArray): 2185s > import cupy as cp 2185s E ModuleNotFoundError: No module named 'cupy' 2185s 2185s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:1010: ModuleNotFoundError 2185s _______________ test_ellipsis_index[cupy_array-ellipsis-obs-var] _______________ 2185s 2185s ellipsis_index = (Ellipsis, slice(0, 10, None), slice(0, 10, None)) 2185s equivalent_ellipsis_index = (slice(0, 10, None), slice(0, 10, None)) 2185s matrix_type = functools.partial(, typ=) 2185s 2185s def test_ellipsis_index( 2185s ellipsis_index: tuple[EllipsisType | slice, ...] | EllipsisType, 2185s equivalent_ellipsis_index: tuple[slice, slice], 2185s matrix_type, 2185s ): 2185s > adata = gen_adata((10, 10), X_type=matrix_type, **GEN_ADATA_DASK_ARGS) 2185s 2185s tests/test_views.py:797: 2185s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 2185s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:346: in gen_adata 2185s X = X_type(random_state.binomial(100, 0.005, (M, N)).astype(X_dtype)) 2185s /usr/lib/python3.13/functools.py:934: in wrapper 2185s return dispatch(args[0].__class__)(*args, **kw) 2185s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 2185s 2185s val = array([[0., 1., 0., 0., 0., 0., 0., 1., 0., 0.], 2185s [0., 0., 1., 0., 1., 0., 0., 1., 1., 0.], 2185s [0., 0., 0., ... 0.], 2185s [1., 0., 0., 2., 0., 0., 1., 0., 0., 0.], 2185s [0., 3., 1., 0., 0., 0., 0., 1., 1., 1.]], dtype=float32) 2185s typ = 2185s 2185s @singledispatch 2185s def as_cupy(val, typ=None): 2185s """ 2185s Rough conversion function 2185s 2185s Will try to infer target type from input type if not specified. 2185s """ 2185s if typ is None: 2185s typ = resolve_cupy_type(val) 2185s 2185s if issubclass(typ, CupyArray): 2185s > import cupy as cp 2185s E ModuleNotFoundError: No module named 'cupy' 2185s 2185s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:1010: ModuleNotFoundError 2185s _______________ test_ellipsis_index[cupy_array-obs-ellipsis-var] _______________ 2185s 2185s ellipsis_index = (slice(0, 10, None), Ellipsis, slice(0, 10, None)) 2185s equivalent_ellipsis_index = (slice(0, 10, None), slice(0, 10, None)) 2185s matrix_type = functools.partial(, typ=) 2185s 2185s def test_ellipsis_index( 2185s ellipsis_index: tuple[EllipsisType | slice, ...] | EllipsisType, 2185s equivalent_ellipsis_index: tuple[slice, slice], 2185s matrix_type, 2185s ): 2185s > adata = gen_adata((10, 10), X_type=matrix_type, **GEN_ADATA_DASK_ARGS) 2185s 2185s tests/test_views.py:797: 2185s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 2185s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:346: in gen_adata 2185s X = X_type(random_state.binomial(100, 0.005, (M, N)).astype(X_dtype)) 2185s /usr/lib/python3.13/functools.py:934: in wrapper 2185s return dispatch(args[0].__class__)(*args, **kw) 2185s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 2185s 2185s val = array([[1., 1., 0., 1., 0., 0., 0., 1., 0., 0.], 2185s [0., 0., 1., 0., 0., 0., 0., 0., 0., 0.], 2185s [0., 0., 0., ... 0.], 2185s [0., 0., 0., 1., 0., 1., 0., 1., 0., 0.], 2185s [0., 1., 0., 0., 1., 2., 0., 1., 0., 0.]], dtype=float32) 2185s typ = 2185s 2185s @singledispatch 2185s def as_cupy(val, typ=None): 2185s """ 2185s Rough conversion function 2185s 2185s Will try to infer target type from input type if not specified. 2185s """ 2185s if typ is None: 2185s typ = resolve_cupy_type(val) 2185s 2185s if issubclass(typ, CupyArray): 2185s > import cupy as cp 2185s E ModuleNotFoundError: No module named 'cupy' 2185s 2185s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:1010: ModuleNotFoundError 2185s ____________________ test_ellipsis_index[cupy_csr-ellipsis] ____________________ 2185s 2185s ellipsis_index = Ellipsis 2185s equivalent_ellipsis_index = (slice(None, None, None), slice(None, None, None)) 2185s matrix_type = functools.partial(, typ=) 2185s 2185s def test_ellipsis_index( 2185s ellipsis_index: tuple[EllipsisType | slice, ...] | EllipsisType, 2185s equivalent_ellipsis_index: tuple[slice, slice], 2185s matrix_type, 2185s ): 2185s > adata = gen_adata((10, 10), X_type=matrix_type, **GEN_ADATA_DASK_ARGS) 2185s 2185s tests/test_views.py:797: 2185s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 2185s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:346: in gen_adata 2185s X = X_type(random_state.binomial(100, 0.005, (M, N)).astype(X_dtype)) 2185s /usr/lib/python3.13/functools.py:934: in wrapper 2185s return dispatch(args[0].__class__)(*args, **kw) 2185s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 2185s 2185s val = array([[1., 0., 0., 0., 0., 0., 0., 1., 1., 0.], 2185s [0., 0., 2., 1., 0., 0., 0., 2., 1., 1.], 2185s [0., 0., 0., ... 0.], 2185s [0., 2., 1., 2., 1., 0., 1., 2., 0., 1.], 2185s [4., 0., 0., 0., 1., 1., 1., 0., 2., 0.]], dtype=float32) 2185s typ = 2185s 2185s @singledispatch 2185s def as_cupy(val, typ=None): 2185s """ 2185s Rough conversion function 2185s 2185s Will try to infer target type from input type if not specified. 2185s """ 2185s if typ is None: 2185s typ = resolve_cupy_type(val) 2185s 2185s if issubclass(typ, CupyArray): 2185s import cupy as cp 2185s 2185s if isinstance(val, CSMatrix): 2185s val = val.toarray() 2185s return cp.array(val) 2185s elif issubclass(typ, CupyCSRMatrix): 2185s > import cupy as cp 2185s E ModuleNotFoundError: No module named 'cupy' 2185s 2185s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:1016: ModuleNotFoundError 2185s _________________ test_ellipsis_index[cupy_csr-ellipsis_tuple] _________________ 2185s 2185s ellipsis_index = (Ellipsis,) 2185s equivalent_ellipsis_index = (slice(None, None, None), slice(None, None, None)) 2185s matrix_type = functools.partial(, typ=) 2185s 2185s def test_ellipsis_index( 2185s ellipsis_index: tuple[EllipsisType | slice, ...] | EllipsisType, 2185s equivalent_ellipsis_index: tuple[slice, slice], 2185s matrix_type, 2185s ): 2185s > adata = gen_adata((10, 10), X_type=matrix_type, **GEN_ADATA_DASK_ARGS) 2185s 2185s tests/test_views.py:797: 2185s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 2185s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:346: in gen_adata 2185s X = X_type(random_state.binomial(100, 0.005, (M, N)).astype(X_dtype)) 2185s /usr/lib/python3.13/functools.py:934: in wrapper 2185s return dispatch(args[0].__class__)(*args, **kw) 2185s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 2185s 2185s val = array([[1., 0., 1., 0., 0., 1., 0., 0., 2., 1.], 2185s [1., 0., 1., 1., 1., 0., 0., 1., 1., 0.], 2185s [0., 2., 1., ... 0.], 2185s [0., 1., 0., 1., 0., 1., 0., 1., 1., 0.], 2185s [1., 0., 0., 1., 1., 0., 0., 0., 0., 0.]], dtype=float32) 2185s typ = 2185s 2185s @singledispatch 2185s def as_cupy(val, typ=None): 2185s """ 2185s Rough conversion function 2185s 2185s Will try to infer target type from input type if not specified. 2185s """ 2185s if typ is None: 2185s typ = resolve_cupy_type(val) 2185s 2185s if issubclass(typ, CupyArray): 2185s import cupy as cp 2185s 2185s if isinstance(val, CSMatrix): 2185s val = val.toarray() 2185s return cp.array(val) 2185s elif issubclass(typ, CupyCSRMatrix): 2185s > import cupy as cp 2185s E ModuleNotFoundError: No module named 'cupy' 2185s 2185s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:1016: ModuleNotFoundError 2185s __________________ test_ellipsis_index[cupy_csr-obs-ellipsis] __________________ 2185s 2185s ellipsis_index = (Ellipsis, slice(0, 10, None)) 2185s equivalent_ellipsis_index = (slice(None, None, None), slice(0, 10, None)) 2185s matrix_type = functools.partial(, typ=) 2185s 2185s def test_ellipsis_index( 2185s ellipsis_index: tuple[EllipsisType | slice, ...] | EllipsisType, 2185s equivalent_ellipsis_index: tuple[slice, slice], 2185s matrix_type, 2185s ): 2185s > adata = gen_adata((10, 10), X_type=matrix_type, **GEN_ADATA_DASK_ARGS) 2185s 2185s tests/test_views.py:797: 2185s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 2185s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:346: in gen_adata 2185s X = X_type(random_state.binomial(100, 0.005, (M, N)).astype(X_dtype)) 2185s /usr/lib/python3.13/functools.py:934: in wrapper 2185s return dispatch(args[0].__class__)(*args, **kw) 2185s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 2185s 2185s val = array([[0., 1., 1., 0., 0., 0., 1., 0., 1., 1.], 2185s [1., 0., 1., 0., 1., 1., 1., 1., 0., 2.], 2185s [1., 1., 0., ... 1.], 2185s [0., 0., 0., 0., 1., 0., 0., 1., 0., 0.], 2185s [1., 0., 1., 0., 0., 1., 0., 0., 0., 0.]], dtype=float32) 2185s typ = 2185s 2185s @singledispatch 2185s def as_cupy(val, typ=None): 2185s """ 2185s Rough conversion function 2185s 2185s Will try to infer target type from input type if not specified. 2185s """ 2185s if typ is None: 2185s typ = resolve_cupy_type(val) 2185s 2185s if issubclass(typ, CupyArray): 2185s import cupy as cp 2185s 2185s if isinstance(val, CSMatrix): 2185s val = val.toarray() 2185s return cp.array(val) 2185s elif issubclass(typ, CupyCSRMatrix): 2185s > import cupy as cp 2185s E ModuleNotFoundError: No module named 'cupy' 2185s 2185s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:1016: ModuleNotFoundError 2185s __________________ test_ellipsis_index[cupy_csr-var-ellipsis] __________________ 2185s 2185s ellipsis_index = (slice(0, 10, None), Ellipsis) 2185s equivalent_ellipsis_index = (slice(0, 10, None), slice(None, None, None)) 2185s matrix_type = functools.partial(, typ=) 2185s 2185s def test_ellipsis_index( 2185s ellipsis_index: tuple[EllipsisType | slice, ...] | EllipsisType, 2185s equivalent_ellipsis_index: tuple[slice, slice], 2185s matrix_type, 2185s ): 2185s > adata = gen_adata((10, 10), X_type=matrix_type, **GEN_ADATA_DASK_ARGS) 2185s 2185s tests/test_views.py:797: 2185s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 2185s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:346: in gen_adata 2185s X = X_type(random_state.binomial(100, 0.005, (M, N)).astype(X_dtype)) 2185s /usr/lib/python3.13/functools.py:934: in wrapper 2185s return dispatch(args[0].__class__)(*args, **kw) 2185s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 2185s 2185s val = array([[0., 0., 1., 2., 0., 1., 0., 0., 0., 0.], 2185s [0., 0., 0., 1., 0., 0., 0., 3., 1., 2.], 2185s [0., 2., 0., ... 0.], 2185s [0., 1., 0., 1., 1., 0., 2., 0., 0., 0.], 2185s [0., 0., 0., 0., 1., 1., 2., 2., 0., 1.]], dtype=float32) 2185s typ = 2185s 2185s @singledispatch 2185s def as_cupy(val, typ=None): 2185s """ 2185s Rough conversion function 2185s 2185s Will try to infer target type from input type if not specified. 2185s """ 2185s if typ is None: 2185s typ = resolve_cupy_type(val) 2185s 2185s if issubclass(typ, CupyArray): 2185s import cupy as cp 2185s 2185s if isinstance(val, CSMatrix): 2185s val = val.toarray() 2185s return cp.array(val) 2185s elif issubclass(typ, CupyCSRMatrix): 2185s > import cupy as cp 2185s E ModuleNotFoundError: No module named 'cupy' 2185s 2185s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:1016: ModuleNotFoundError 2185s ________________ test_ellipsis_index[cupy_csr-obs-var-ellipsis] ________________ 2185s 2185s ellipsis_index = (slice(0, 10, None), slice(0, 10, None), Ellipsis) 2185s equivalent_ellipsis_index = (slice(0, 10, None), slice(0, 10, None)) 2185s matrix_type = functools.partial(, typ=) 2185s 2185s def test_ellipsis_index( 2185s ellipsis_index: tuple[EllipsisType | slice, ...] | EllipsisType, 2185s equivalent_ellipsis_index: tuple[slice, slice], 2185s matrix_type, 2185s ): 2185s > adata = gen_adata((10, 10), X_type=matrix_type, **GEN_ADATA_DASK_ARGS) 2185s 2185s tests/test_views.py:797: 2185s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 2185s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:346: in gen_adata 2185s X = X_type(random_state.binomial(100, 0.005, (M, N)).astype(X_dtype)) 2185s /usr/lib/python3.13/functools.py:934: in wrapper 2185s return dispatch(args[0].__class__)(*args, **kw) 2185s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 2185s 2185s val = array([[0., 1., 1., 0., 0., 0., 0., 0., 0., 0.], 2185s [0., 1., 1., 0., 0., 2., 1., 1., 0., 0.], 2185s [1., 0., 1., ... 0.], 2185s [0., 1., 0., 0., 2., 1., 0., 0., 1., 0.], 2185s [0., 0., 0., 0., 1., 0., 0., 0., 1., 1.]], dtype=float32) 2185s typ = 2185s 2185s @singledispatch 2185s def as_cupy(val, typ=None): 2185s """ 2185s Rough conversion function 2185s 2185s Will try to infer target type from input type if not specified. 2185s """ 2185s if typ is None: 2185s typ = resolve_cupy_type(val) 2185s 2185s if issubclass(typ, CupyArray): 2185s import cupy as cp 2185s 2185s if isinstance(val, CSMatrix): 2185s val = val.toarray() 2185s return cp.array(val) 2185s elif issubclass(typ, CupyCSRMatrix): 2185s > import cupy as cp 2185s E ModuleNotFoundError: No module named 'cupy' 2185s 2185s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:1016: ModuleNotFoundError 2185s ________________ test_ellipsis_index[cupy_csr-ellipsis-obs-var] ________________ 2185s 2185s ellipsis_index = (Ellipsis, slice(0, 10, None), slice(0, 10, None)) 2185s equivalent_ellipsis_index = (slice(0, 10, None), slice(0, 10, None)) 2185s matrix_type = functools.partial(, typ=) 2185s 2185s def test_ellipsis_index( 2185s ellipsis_index: tuple[EllipsisType | slice, ...] | EllipsisType, 2185s equivalent_ellipsis_index: tuple[slice, slice], 2185s matrix_type, 2185s ): 2185s > adata = gen_adata((10, 10), X_type=matrix_type, **GEN_ADATA_DASK_ARGS) 2185s 2185s tests/test_views.py:797: 2185s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 2185s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:346: in gen_adata 2185s X = X_type(random_state.binomial(100, 0.005, (M, N)).astype(X_dtype)) 2185s /usr/lib/python3.13/functools.py:934: in wrapper 2185s return dispatch(args[0].__class__)(*args, **kw) 2185s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 2185s 2185s val = array([[0., 0., 0., 1., 0., 0., 1., 0., 1., 1.], 2185s [0., 1., 2., 0., 0., 0., 0., 1., 1., 0.], 2185s [1., 1., 0., ... 0.], 2185s [0., 0., 1., 1., 0., 2., 1., 1., 0., 0.], 2185s [0., 0., 1., 0., 0., 1., 0., 0., 0., 1.]], dtype=float32) 2185s typ = 2185s 2185s @singledispatch 2185s def as_cupy(val, typ=None): 2185s """ 2185s Rough conversion function 2185s 2185s Will try to infer target type from input type if not specified. 2185s """ 2185s if typ is None: 2185s typ = resolve_cupy_type(val) 2185s 2185s if issubclass(typ, CupyArray): 2185s import cupy as cp 2185s 2185s if isinstance(val, CSMatrix): 2185s val = val.toarray() 2185s return cp.array(val) 2185s elif issubclass(typ, CupyCSRMatrix): 2185s > import cupy as cp 2185s E ModuleNotFoundError: No module named 'cupy' 2185s 2185s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:1016: ModuleNotFoundError 2185s ________________ test_ellipsis_index[cupy_csr-obs-ellipsis-var] ________________ 2185s 2185s ellipsis_index = (slice(0, 10, None), Ellipsis, slice(0, 10, None)) 2185s equivalent_ellipsis_index = (slice(0, 10, None), slice(0, 10, None)) 2185s matrix_type = functools.partial(, typ=) 2185s 2185s def test_ellipsis_index( 2185s ellipsis_index: tuple[EllipsisType | slice, ...] | EllipsisType, 2185s equivalent_ellipsis_index: tuple[slice, slice], 2185s matrix_type, 2185s ): 2185s > adata = gen_adata((10, 10), X_type=matrix_type, **GEN_ADATA_DASK_ARGS) 2185s 2185s tests/test_views.py:797: 2185s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 2185s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:346: in gen_adata 2185s X = X_type(random_state.binomial(100, 0.005, (M, N)).astype(X_dtype)) 2185s /usr/lib/python3.13/functools.py:934: in wrapper 2185s return dispatch(args[0].__class__)(*args, **kw) 2185s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 2185s 2185s val = array([[0., 3., 0., 1., 1., 0., 1., 1., 1., 1.], 2185s [0., 0., 1., 0., 0., 0., 1., 0., 1., 1.], 2185s [0., 3., 0., ... 0.], 2185s [0., 0., 0., 1., 0., 0., 0., 0., 0., 0.], 2185s [0., 0., 0., 0., 0., 3., 0., 0., 2., 1.]], dtype=float32) 2185s typ = 2185s 2185s @singledispatch 2185s def as_cupy(val, typ=None): 2185s """ 2185s Rough conversion function 2185s 2185s Will try to infer target type from input type if not specified. 2185s """ 2185s if typ is None: 2185s typ = resolve_cupy_type(val) 2185s 2185s if issubclass(typ, CupyArray): 2185s import cupy as cp 2185s 2185s if isinstance(val, CSMatrix): 2185s val = val.toarray() 2185s return cp.array(val) 2185s elif issubclass(typ, CupyCSRMatrix): 2185s > import cupy as cp 2185s E ModuleNotFoundError: No module named 'cupy' 2185s 2185s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:1016: ModuleNotFoundError 2185s ____________________ test_ellipsis_index[cupy_csc-ellipsis] ____________________ 2185s 2185s ellipsis_index = Ellipsis 2185s equivalent_ellipsis_index = (slice(None, None, None), slice(None, None, None)) 2185s matrix_type = functools.partial(, typ=) 2185s 2185s def test_ellipsis_index( 2185s ellipsis_index: tuple[EllipsisType | slice, ...] | EllipsisType, 2185s equivalent_ellipsis_index: tuple[slice, slice], 2185s matrix_type, 2185s ): 2185s > adata = gen_adata((10, 10), X_type=matrix_type, **GEN_ADATA_DASK_ARGS) 2185s 2185s tests/test_views.py:797: 2185s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 2185s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:346: in gen_adata 2185s X = X_type(random_state.binomial(100, 0.005, (M, N)).astype(X_dtype)) 2185s /usr/lib/python3.13/functools.py:934: in wrapper 2185s return dispatch(args[0].__class__)(*args, **kw) 2185s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 2185s 2185s val = array([[0., 1., 0., 0., 0., 2., 0., 0., 0., 0.], 2185s [1., 0., 0., 0., 0., 1., 1., 0., 0., 1.], 2185s [1., 0., 0., ... 0.], 2185s [0., 0., 2., 2., 0., 0., 0., 1., 1., 0.], 2185s [0., 0., 0., 1., 1., 3., 1., 1., 1., 0.]], dtype=float32) 2185s typ = 2185s 2185s @singledispatch 2185s def as_cupy(val, typ=None): 2185s """ 2185s Rough conversion function 2185s 2185s Will try to infer target type from input type if not specified. 2185s """ 2185s if typ is None: 2185s typ = resolve_cupy_type(val) 2185s 2185s if issubclass(typ, CupyArray): 2185s import cupy as cp 2185s 2185s if isinstance(val, CSMatrix): 2185s val = val.toarray() 2185s return cp.array(val) 2185s elif issubclass(typ, CupyCSRMatrix): 2185s import cupy as cp 2185s import cupyx.scipy.sparse as cpsparse 2185s 2185s if isinstance(val, np.ndarray): 2185s return cpsparse.csr_matrix(cp.array(val)) 2185s else: 2185s return cpsparse.csr_matrix(val) 2185s elif issubclass(typ, CupyCSCMatrix): 2185s > import cupy as cp 2185s E ModuleNotFoundError: No module named 'cupy' 2185s 2185s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:1024: ModuleNotFoundError 2185s _________________ test_ellipsis_index[cupy_csc-ellipsis_tuple] _________________ 2185s 2185s ellipsis_index = (Ellipsis,) 2185s equivalent_ellipsis_index = (slice(None, None, None), slice(None, None, None)) 2185s matrix_type = functools.partial(, typ=) 2185s 2185s def test_ellipsis_index( 2185s ellipsis_index: tuple[EllipsisType | slice, ...] | EllipsisType, 2185s equivalent_ellipsis_index: tuple[slice, slice], 2185s matrix_type, 2185s ): 2185s > adata = gen_adata((10, 10), X_type=matrix_type, **GEN_ADATA_DASK_ARGS) 2185s 2185s tests/test_views.py:797: 2185s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 2185s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:346: in gen_adata 2185s X = X_type(random_state.binomial(100, 0.005, (M, N)).astype(X_dtype)) 2185s /usr/lib/python3.13/functools.py:934: in wrapper 2185s return dispatch(args[0].__class__)(*args, **kw) 2185s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 2185s 2185s val = array([[0., 0., 0., 0., 0., 0., 0., 1., 2., 0.], 2185s [0., 0., 1., 0., 1., 0., 0., 0., 0., 0.], 2185s [0., 1., 0., ... 2.], 2185s [1., 0., 1., 0., 1., 1., 1., 0., 0., 0.], 2185s [1., 1., 0., 1., 1., 0., 0., 0., 0., 0.]], dtype=float32) 2185s typ = 2185s 2185s @singledispatch 2185s def as_cupy(val, typ=None): 2185s """ 2185s Rough conversion function 2185s 2185s Will try to infer target type from input type if not specified. 2185s """ 2185s if typ is None: 2185s typ = resolve_cupy_type(val) 2185s 2185s if issubclass(typ, CupyArray): 2185s import cupy as cp 2185s 2185s if isinstance(val, CSMatrix): 2185s val = val.toarray() 2185s return cp.array(val) 2185s elif issubclass(typ, CupyCSRMatrix): 2185s import cupy as cp 2185s import cupyx.scipy.sparse as cpsparse 2185s 2185s if isinstance(val, np.ndarray): 2185s return cpsparse.csr_matrix(cp.array(val)) 2185s else: 2185s return cpsparse.csr_matrix(val) 2185s elif issubclass(typ, CupyCSCMatrix): 2185s > import cupy as cp 2185s E ModuleNotFoundError: No module named 'cupy' 2185s 2185s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:1024: ModuleNotFoundError 2185s __________________ test_ellipsis_index[cupy_csc-obs-ellipsis] __________________ 2185s 2185s ellipsis_index = (Ellipsis, slice(0, 10, None)) 2185s equivalent_ellipsis_index = (slice(None, None, None), slice(0, 10, None)) 2185s matrix_type = functools.partial(, typ=) 2185s 2185s def test_ellipsis_index( 2185s ellipsis_index: tuple[EllipsisType | slice, ...] | EllipsisType, 2185s equivalent_ellipsis_index: tuple[slice, slice], 2185s matrix_type, 2185s ): 2185s > adata = gen_adata((10, 10), X_type=matrix_type, **GEN_ADATA_DASK_ARGS) 2185s 2185s tests/test_views.py:797: 2185s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 2185s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:346: in gen_adata 2185s X = X_type(random_state.binomial(100, 0.005, (M, N)).astype(X_dtype)) 2185s /usr/lib/python3.13/functools.py:934: in wrapper 2185s return dispatch(args[0].__class__)(*args, **kw) 2185s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 2185s 2185s val = array([[0., 0., 1., 2., 0., 1., 1., 0., 0., 1.], 2185s [0., 0., 1., 0., 0., 0., 0., 1., 0., 0.], 2185s [3., 0., 2., ... 0.], 2185s [1., 2., 0., 0., 0., 0., 1., 1., 0., 0.], 2185s [0., 0., 0., 0., 0., 0., 1., 0., 1., 1.]], dtype=float32) 2185s typ = 2185s 2185s @singledispatch 2185s def as_cupy(val, typ=None): 2185s """ 2185s Rough conversion function 2185s 2185s Will try to infer target type from input type if not specified. 2185s """ 2185s if typ is None: 2185s typ = resolve_cupy_type(val) 2185s 2185s if issubclass(typ, CupyArray): 2185s import cupy as cp 2185s 2185s if isinstance(val, CSMatrix): 2185s val = val.toarray() 2185s return cp.array(val) 2185s elif issubclass(typ, CupyCSRMatrix): 2185s import cupy as cp 2185s import cupyx.scipy.sparse as cpsparse 2185s 2185s if isinstance(val, np.ndarray): 2185s return cpsparse.csr_matrix(cp.array(val)) 2185s else: 2185s return cpsparse.csr_matrix(val) 2185s elif issubclass(typ, CupyCSCMatrix): 2185s > import cupy as cp 2185s E ModuleNotFoundError: No module named 'cupy' 2185s 2185s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:1024: ModuleNotFoundError 2185s __________________ test_ellipsis_index[cupy_csc-var-ellipsis] __________________ 2185s 2185s ellipsis_index = (slice(0, 10, None), Ellipsis) 2185s equivalent_ellipsis_index = (slice(0, 10, None), slice(None, None, None)) 2185s matrix_type = functools.partial(, typ=) 2185s 2185s def test_ellipsis_index( 2185s ellipsis_index: tuple[EllipsisType | slice, ...] | EllipsisType, 2185s equivalent_ellipsis_index: tuple[slice, slice], 2185s matrix_type, 2185s ): 2185s > adata = gen_adata((10, 10), X_type=matrix_type, **GEN_ADATA_DASK_ARGS) 2185s 2185s tests/test_views.py:797: 2185s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 2185s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:346: in gen_adata 2185s X = X_type(random_state.binomial(100, 0.005, (M, N)).astype(X_dtype)) 2185s /usr/lib/python3.13/functools.py:934: in wrapper 2185s return dispatch(args[0].__class__)(*args, **kw) 2185s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 2185s 2185s val = array([[0., 1., 0., 1., 0., 1., 0., 0., 1., 1.], 2185s [0., 0., 0., 0., 0., 0., 0., 0., 0., 3.], 2185s [0., 0., 1., ... 1.], 2185s [2., 1., 0., 0., 2., 0., 0., 0., 0., 0.], 2185s [0., 1., 1., 1., 0., 0., 0., 0., 0., 0.]], dtype=float32) 2185s typ = 2185s 2185s @singledispatch 2185s def as_cupy(val, typ=None): 2185s """ 2185s Rough conversion function 2185s 2185s Will try to infer target type from input type if not specified. 2185s """ 2185s if typ is None: 2185s typ = resolve_cupy_type(val) 2185s 2185s if issubclass(typ, CupyArray): 2185s import cupy as cp 2185s 2185s if isinstance(val, CSMatrix): 2185s val = val.toarray() 2185s return cp.array(val) 2185s elif issubclass(typ, CupyCSRMatrix): 2185s import cupy as cp 2185s import cupyx.scipy.sparse as cpsparse 2185s 2185s if isinstance(val, np.ndarray): 2185s return cpsparse.csr_matrix(cp.array(val)) 2185s else: 2185s return cpsparse.csr_matrix(val) 2185s elif issubclass(typ, CupyCSCMatrix): 2185s > import cupy as cp 2185s E ModuleNotFoundError: No module named 'cupy' 2185s 2185s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:1024: ModuleNotFoundError 2185s ________________ test_ellipsis_index[cupy_csc-obs-var-ellipsis] ________________ 2185s 2185s ellipsis_index = (slice(0, 10, None), slice(0, 10, None), Ellipsis) 2185s equivalent_ellipsis_index = (slice(0, 10, None), slice(0, 10, None)) 2185s matrix_type = functools.partial(, typ=) 2185s 2185s def test_ellipsis_index( 2185s ellipsis_index: tuple[EllipsisType | slice, ...] | EllipsisType, 2185s equivalent_ellipsis_index: tuple[slice, slice], 2185s matrix_type, 2185s ): 2185s > adata = gen_adata((10, 10), X_type=matrix_type, **GEN_ADATA_DASK_ARGS) 2185s 2185s tests/test_views.py:797: 2185s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 2185s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:346: in gen_adata 2185s X = X_type(random_state.binomial(100, 0.005, (M, N)).astype(X_dtype)) 2185s /usr/lib/python3.13/functools.py:934: in wrapper 2185s return dispatch(args[0].__class__)(*args, **kw) 2185s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 2185s 2185s val = array([[0., 0., 0., 0., 1., 0., 3., 1., 0., 2.], 2185s [1., 4., 1., 0., 1., 0., 0., 1., 0., 1.], 2185s [1., 0., 0., ... 1.], 2185s [0., 1., 2., 0., 0., 0., 0., 0., 0., 1.], 2185s [0., 1., 0., 0., 0., 1., 0., 0., 1., 0.]], dtype=float32) 2185s typ = 2185s 2185s @singledispatch 2185s def as_cupy(val, typ=None): 2185s """ 2185s Rough conversion function 2185s 2185s Will try to infer target type from input type if not specified. 2185s """ 2185s if typ is None: 2185s typ = resolve_cupy_type(val) 2185s 2185s if issubclass(typ, CupyArray): 2185s import cupy as cp 2185s 2185s if isinstance(val, CSMatrix): 2185s val = val.toarray() 2185s return cp.array(val) 2185s elif issubclass(typ, CupyCSRMatrix): 2185s import cupy as cp 2185s import cupyx.scipy.sparse as cpsparse 2185s 2185s if isinstance(val, np.ndarray): 2185s return cpsparse.csr_matrix(cp.array(val)) 2185s else: 2185s return cpsparse.csr_matrix(val) 2185s elif issubclass(typ, CupyCSCMatrix): 2185s > import cupy as cp 2185s E ModuleNotFoundError: No module named 'cupy' 2185s 2185s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:1024: ModuleNotFoundError 2185s ________________ test_ellipsis_index[cupy_csc-ellipsis-obs-var] ________________ 2185s 2185s ellipsis_index = (Ellipsis, slice(0, 10, None), slice(0, 10, None)) 2185s equivalent_ellipsis_index = (slice(0, 10, None), slice(0, 10, None)) 2185s matrix_type = functools.partial(, typ=) 2185s 2185s def test_ellipsis_index( 2185s ellipsis_index: tuple[EllipsisType | slice, ...] | EllipsisType, 2185s equivalent_ellipsis_index: tuple[slice, slice], 2185s matrix_type, 2185s ): 2185s > adata = gen_adata((10, 10), X_type=matrix_type, **GEN_ADATA_DASK_ARGS) 2185s 2185s tests/test_views.py:797: 2185s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 2185s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:346: in gen_adata 2185s X = X_type(random_state.binomial(100, 0.005, (M, N)).astype(X_dtype)) 2185s /usr/lib/python3.13/functools.py:934: in wrapper 2185s return dispatch(args[0].__class__)(*args, **kw) 2185s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 2185s 2185s val = array([[0., 1., 0., 0., 0., 0., 2., 1., 0., 0.], 2185s [0., 0., 0., 1., 0., 0., 0., 1., 0., 1.], 2185s [0., 0., 2., ... 1.], 2185s [1., 2., 0., 2., 0., 0., 0., 1., 0., 1.], 2185s [1., 0., 1., 2., 1., 3., 1., 0., 0., 0.]], dtype=float32) 2185s typ = 2185s 2185s @singledispatch 2185s def as_cupy(val, typ=None): 2185s """ 2185s Rough conversion function 2185s 2185s Will try to infer target type from input type if not specified. 2185s """ 2185s if typ is None: 2185s typ = resolve_cupy_type(val) 2185s 2185s if issubclass(typ, CupyArray): 2185s import cupy as cp 2185s 2185s if isinstance(val, CSMatrix): 2185s val = val.toarray() 2185s return cp.array(val) 2185s elif issubclass(typ, CupyCSRMatrix): 2185s import cupy as cp 2185s import cupyx.scipy.sparse as cpsparse 2185s 2185s if isinstance(val, np.ndarray): 2185s return cpsparse.csr_matrix(cp.array(val)) 2185s else: 2185s return cpsparse.csr_matrix(val) 2185s elif issubclass(typ, CupyCSCMatrix): 2185s > import cupy as cp 2185s E ModuleNotFoundError: No module named 'cupy' 2185s 2185s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:1024: ModuleNotFoundError 2185s ________________ test_ellipsis_index[cupy_csc-obs-ellipsis-var] ________________ 2185s 2185s ellipsis_index = (slice(0, 10, None), Ellipsis, slice(0, 10, None)) 2185s equivalent_ellipsis_index = (slice(0, 10, None), slice(0, 10, None)) 2185s matrix_type = functools.partial(, typ=) 2185s 2185s def test_ellipsis_index( 2185s ellipsis_index: tuple[EllipsisType | slice, ...] | EllipsisType, 2185s equivalent_ellipsis_index: tuple[slice, slice], 2185s matrix_type, 2185s ): 2185s > adata = gen_adata((10, 10), X_type=matrix_type, **GEN_ADATA_DASK_ARGS) 2185s 2185s tests/test_views.py:797: 2185s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 2185s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:346: in gen_adata 2185s X = X_type(random_state.binomial(100, 0.005, (M, N)).astype(X_dtype)) 2185s /usr/lib/python3.13/functools.py:934: in wrapper 2185s return dispatch(args[0].__class__)(*args, **kw) 2185s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 2185s 2185s val = array([[0., 1., 0., 0., 0., 1., 1., 1., 0., 0.], 2185s [3., 1., 2., 0., 0., 1., 1., 0., 0., 0.], 2185s [0., 0., 0., ... 1.], 2185s [1., 0., 1., 1., 1., 1., 0., 1., 0., 0.], 2185s [1., 1., 0., 1., 1., 1., 0., 0., 2., 0.]], dtype=float32) 2185s typ = 2185s 2185s @singledispatch 2185s def as_cupy(val, typ=None): 2185s """ 2185s Rough conversion function 2185s 2185s Will try to infer target type from input type if not specified. 2185s """ 2185s if typ is None: 2185s typ = resolve_cupy_type(val) 2185s 2185s if issubclass(typ, CupyArray): 2185s import cupy as cp 2185s 2185s if isinstance(val, CSMatrix): 2185s val = val.toarray() 2185s return cp.array(val) 2185s elif issubclass(typ, CupyCSRMatrix): 2185s import cupy as cp 2185s import cupyx.scipy.sparse as cpsparse 2185s 2185s if isinstance(val, np.ndarray): 2185s return cpsparse.csr_matrix(cp.array(val)) 2185s else: 2185s return cpsparse.csr_matrix(val) 2185s elif issubclass(typ, CupyCSCMatrix): 2185s > import cupy as cp 2185s E ModuleNotFoundError: No module named 'cupy' 2185s 2185s /usr/lib/python3/dist-packages/anndata/tests/helpers.py:1024: ModuleNotFoundError 2185s =============================== warnings summary =============================== 2185s tests/test_concatenate.py:1623 2185s /tmp/autopkgtest.Wv14x9/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 2185s @pytest.mark.gpu 2185s 2185s tests/test_dask.py:284 2185s /tmp/autopkgtest.Wv14x9/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 2185s marks=pytest.mark.gpu, 2185s 2185s tests/test_helpers.py:287 2185s /tmp/autopkgtest.Wv14x9/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 2185s as_dense_cupy_dask_array, CupyArray, id="cupy_dense", marks=pytest.mark.gpu 2185s 2185s tests/test_helpers.py:294 2185s /tmp/autopkgtest.Wv14x9/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 2185s marks=pytest.mark.gpu, 2185s 2185s tests/test_helpers.py:320 2185s /tmp/autopkgtest.Wv14x9/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 2185s @pytest.mark.gpu 2185s 2185s tests/test_io_elementwise.py:247 2185s /tmp/autopkgtest.Wv14x9/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 2185s @pytest.mark.gpu 2185s 2185s ../../../usr/lib/python3/dist-packages/anndata/utils.py:354: 1 warning 2185s tests/lazy/test_concat.py: 385 warnings 2185s tests/lazy/test_read.py: 68 warnings 2185s tests/test_backed_hdf5.py: 300 warnings 2185s tests/test_base.py: 3 warnings 2185s tests/test_concatenate.py: 59 warnings 2185s tests/test_helpers.py: 4 warnings 2185s tests/test_inplace_subset.py: 140 warnings 2185s tests/test_io_conversion.py: 17 warnings 2185s tests/test_io_dispatched.py: 5 warnings 2185s tests/test_io_elementwise.py: 26 warnings 2185s tests/test_io_warnings.py: 1 warning 2185s tests/test_raw.py: 1 warning 2185s tests/test_readwrite.py: 22 warnings 2185s tests/test_transpose.py: 13 warnings 2185s tests/test_views.py: 708 warnings 2185s tests/test_x.py: 8 warnings 2185s /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! 2185s warnings.warn(msg, category, stacklevel=stacklevel) 2185s 2185s tests/lazy/test_concat.py: 1112 warnings 2185s tests/test_concatenate.py: 442 warnings 2185s tests/test_concatenate_disk.py: 104 warnings 2185s tests/test_utils.py: 1 warning 2185s /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`. 2185s utils.warn_names_duplicates("obs") 2185s 2185s tests/lazy/test_concat.py: 160 warnings 2185s tests/test_concatenate.py: 21 warnings 2185s /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: 2185s 2185s https://github.com/scverse/anndata/issues/898 2185s warnings.warn(msg, category, stacklevel=stacklevel) 2185s 2185s tests/test_backed_dense.py::test_assign_x_subset[h5ad] 2185s tests/test_backed_dense.py::test_assign_x_subset[zarr2] 2185s tests/test_backed_dense.py::test_assign_x_subset[zarr3] 2185s /tmp/autopkgtest.Wv14x9/autopkgtest_tmp/tests/test_backed_dense.py:84: ImplicitModificationWarning: Modifying `X` on a view results in data being overridden 2185s view.X = np.zeros((4, 2)) 2185s 2185s tests/test_backed_sparse.py: 1454 warnings 2185s tests/test_dask.py: 106 warnings 2185s tests/test_io_backwards_compat.py: 8 warnings 2185s tests/test_io_elementwise.py: 225 warnings 2185s tests/test_io_partial.py: 7 warnings 2185s tests/test_io_utils.py: 1 warning 2185s tests/test_readwrite.py: 460 warnings 2185s tests/test_x.py: 37 warnings 2185s /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. 2185s return cls(**configuration_parsed) 2185s 2185s tests/test_backed_sparse.py: 345 warnings 2185s tests/test_dask.py: 35 warnings 2185s tests/test_io_backwards_compat.py: 3 warnings 2185s tests/test_io_elementwise.py: 121 warnings 2185s tests/test_io_partial.py: 2 warnings 2185s tests/test_io_utils.py: 1 warning 2185s tests/test_readwrite.py: 152 warnings 2185s tests/test_x.py: 13 warnings 2185s /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. 2185s meta = AsyncArray._create_metadata_v3( 2185s 2185s tests/test_backed_sparse.py: 345 warnings 2185s tests/test_dask.py: 15 warnings 2185s tests/test_io_backwards_compat.py: 1 warning 2185s tests/test_io_partial.py: 2 warnings 2185s tests/test_readwrite.py: 21 warnings 2185s tests/test_x.py: 1 warning 2185s /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. 2185s warnings.warn( 2185s 2185s tests/test_base.py: 5 warnings 2185s tests/test_readwrite.py: 18 warnings 2185s tests/test_views.py: 1 warning 2185s /usr/lib/python3/dist-packages/anndata/_core/aligned_df.py:83: ImplicitModificationWarning: Transforming to str index. 2185s warnings.warn("Transforming to str index.", ImplicitModificationWarning) 2185s 2185s tests/test_concatenate.py::test_concatenate_obsm_outer[nan] 2185s tests/test_concatenate.py::test_concatenate_obsm_outer[3.141592653589793] 2185s tests/test_concatenate.py::test_concatenate_fill_value[nan] 2185s tests/test_concatenate.py::test_concatenate_fill_value[3.141592653589793] 2185s tests/test_concatenate.py::test_transposed_concat[sparse_dask_array-obs-outer-None] 2185s tests/test_concatenate.py::test_transposed_concat[sparse_dask_array-obs-outer-same] 2185s tests/test_concatenate.py::test_transposed_concat[sparse_dask_array-obs-outer-unique] 2185s tests/test_concatenate.py::test_transposed_concat[sparse_dask_array-obs-outer-first] 2185s tests/test_concatenate.py::test_transposed_concat[sparse_dask_array-obs-outer-only] 2185s /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. 2185s self._set_arrayXarray(i, j, x) 2185s 2185s tests/test_concatenate.py: 268 warnings 2185s tests/test_concatenate_disk.py: 96 warnings 2185s tests/test_utils.py: 1 warning 2185s /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`. 2185s utils.warn_names_duplicates("var") 2185s 2185s tests/test_concatenate.py: 11 warnings 2185s /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. 2185s self._set_arrayXarray(i, j, x) 2185s 2185s tests/test_concatenate.py::test_concatenate_fill_value[nan] 2185s tests/test_concatenate.py::test_concatenate_fill_value[3.141592653589793] 2185s /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. 2185s self._set_arrayXarray(i, j, x) 2185s 2185s tests/test_concatenate.py: 8 warnings 2185s tests/test_views.py: 6 warnings 2185s /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. 2185s self._set_intXint(row, col, x.flat[0]) 2185s 2185s tests/test_io_dispatched.py::test_io_dispatched_keys 2185s /usr/lib/python3/dist-packages/anndata/_io/specs/registry.py:285: OldFormatWarning: Element '/' was written without encoding metadata. 2185s return self.callback(read_func, elem.name, elem, iospec=iospec) 2185s 2185s tests/test_io_elementwise.py::test_read_iospec_not_found[zarr2-encoding-type-floob] 2185s tests/test_io_elementwise.py::test_read_iospec_not_found[zarr2-encoding-version-10000.0] 2185s tests/test_io_elementwise.py::test_read_iospec_not_found[zarr3-encoding-type-floob] 2185s tests/test_io_elementwise.py::test_read_iospec_not_found[zarr3-encoding-version-10000.0] 2185s tests/test_io_utils.py::test_only_child_key_reported_on_failure[zarr] 2185s /usr/lib/python3/dist-packages/anndata/_io/utils.py:215: OldFormatWarning: Element '/' was written without encoding metadata. 2185s return func(*args, **kwargs) 2185s 2185s tests/test_views.py::test_views 2185s /tmp/autopkgtest.Wv14x9/autopkgtest_tmp/tests/test_views.py:114: ImplicitModificationWarning: Modifying `X` on a view results in data being overridden 2185s adata[:2, 0].X = [0, 0] 2185s 2185s tests/test_views.py::test_modify_view_component[scipy_csc_matrix-layers] 2185s tests/test_views.py::test_modify_view_component[scipy_csc_matrix-obsm] 2185s tests/test_views.py::test_modify_view_component[scipy_csc_matrix-varm] 2185s /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. 2185s self._set_intXint(row, col, x.flat[0]) 2185s 2185s tests/test_views.py::test_modify_view_component[scipy_csr_array-layers] 2185s tests/test_views.py::test_modify_view_component[scipy_csr_array-obsm] 2185s tests/test_views.py::test_modify_view_component[scipy_csr_array-varm] 2185s /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. 2185s self._set_intXint(row, col, x.flat[0]) 2185s 2185s tests/test_views.py::test_modify_view_component[scipy_csc_array-layers] 2185s tests/test_views.py::test_modify_view_component[scipy_csc_array-obsm] 2185s tests/test_views.py::test_modify_view_component[scipy_csc_array-varm] 2185s /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. 2185s self._set_intXint(row, col, x.flat[0]) 2185s 2185s tests/test_views.py: 70 warnings 2185s /tmp/autopkgtest.Wv14x9/autopkgtest_tmp/tests/test_views.py:375: ImplicitModificationWarning: Modifying `X` on a view results in data being overridden 2185s adata_subset.X = 1 2185s 2185s tests/test_views.py::test_view_of_view_modification 2185s /tmp/autopkgtest.Wv14x9/autopkgtest_tmp/tests/test_views.py:559: ImplicitModificationWarning: Modifying `X` on a view results in data being overridden 2185s adata[0, :][:, 5:].X = np.ones(5) 2185s 2185s tests/test_views.py::test_view_of_view_modification 2185s /tmp/autopkgtest.Wv14x9/autopkgtest_tmp/tests/test_views.py:561: ImplicitModificationWarning: Modifying `X` on a view results in data being overridden 2185s adata[[1, 2], :][:, [1, 2]].X = np.ones((2, 2)) 2185s 2185s tests/test_views.py::test_view_of_view_modification 2185s /tmp/autopkgtest.Wv14x9/autopkgtest_tmp/tests/test_views.py:565: ImplicitModificationWarning: Modifying `X` on a view results in data being overridden 2185s adata[0, :][:, 5:].X = np.ones(5) * 2 2185s 2185s tests/test_views.py::test_view_of_view_modification 2185s /tmp/autopkgtest.Wv14x9/autopkgtest_tmp/tests/test_views.py:567: ImplicitModificationWarning: Modifying `X` on a view results in data being overridden 2185s adata[[1, 2], :][:, [1, 2]].X = np.ones((2, 2)) * 2 2185s 2185s tests/test_x.py::test_repeat_indices_view 2185s /tmp/autopkgtest.Wv14x9/autopkgtest_tmp/tests/test_x.py:48: ImplicitModificationWarning: Modifying `X` on a view results in data being overridden 2185s subset.X = mat 2185s 2185s tests/test_x.py: 21 warnings 2185s /tmp/autopkgtest.Wv14x9/autopkgtest_tmp/tests/test_x.py:61: ImplicitModificationWarning: Modifying `X` on a view results in data being overridden 2185s view.X = to_assign 2185s 2185s tests/test_x.py::test_setter_view[csr-csr] 2185s tests/test_x.py::test_setter_view[csc-csr] 2185s tests/test_x.py::test_setter_view[csr_array-csr] 2185s tests/test_x.py::test_setter_view[csc_array-csr] 2185s tests/test_x.py::test_setter_view[ndarray-csr] 2185s /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. 2185s self._set_arrayXarray_sparse(i, j, x) 2185s 2185s tests/test_x.py::test_setter_view[csr-csc] 2185s tests/test_x.py::test_setter_view[csc-csc] 2185s tests/test_x.py::test_setter_view[csr_array-csc] 2185s tests/test_x.py::test_setter_view[csc_array-csc] 2185s tests/test_x.py::test_setter_view[ndarray-csc] 2185s /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. 2185s self._set_arrayXarray_sparse(i, j, x) 2185s 2185s tests/test_x.py::test_setter_view[csr-csr_array] 2185s tests/test_x.py::test_setter_view[csc-csr_array] 2185s tests/test_x.py::test_setter_view[csr_array-csr_array] 2185s tests/test_x.py::test_setter_view[csc_array-csr_array] 2185s tests/test_x.py::test_setter_view[ndarray-csr_array] 2185s /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. 2185s self._set_arrayXarray_sparse(i, j, x) 2185s 2185s tests/test_x.py::test_setter_view[csr-csc_array] 2185s tests/test_x.py::test_setter_view[csc-csc_array] 2185s tests/test_x.py::test_setter_view[csr_array-csc_array] 2185s tests/test_x.py::test_setter_view[csc_array-csc_array] 2185s tests/test_x.py::test_setter_view[ndarray-csc_array] 2185s /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. 2185s self._set_arrayXarray_sparse(i, j, x) 2185s 2185s -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html 2185s =========================== short test summary info ============================ 2185s FAILED tests/test_concatenate.py::test_concatenate_roundtrip[inner-cupy_array-concat_func0-False] 2185s FAILED tests/test_concatenate.py::test_concatenate_roundtrip[inner-cupy_array--True] 2185s FAILED tests/test_concatenate.py::test_concatenate_roundtrip[inner-cupy_csr-concat_func0-False] 2185s FAILED tests/test_concatenate.py::test_concatenate_roundtrip[inner-cupy_csr--True] 2185s FAILED tests/test_concatenate.py::test_concatenate_roundtrip[inner-cupy_csc-concat_func0-False] 2185s FAILED tests/test_concatenate.py::test_concatenate_roundtrip[inner-cupy_csc--True] 2185s FAILED tests/test_concatenate.py::test_concatenate_roundtrip[outer-cupy_array-concat_func0-False] 2185s FAILED tests/test_concatenate.py::test_concatenate_roundtrip[outer-cupy_array--True] 2185s FAILED tests/test_concatenate.py::test_concatenate_roundtrip[outer-cupy_csr-concat_func0-False] 2185s FAILED tests/test_concatenate.py::test_concatenate_roundtrip[outer-cupy_csr--True] 2185s FAILED tests/test_concatenate.py::test_concatenate_roundtrip[outer-cupy_csc-concat_func0-False] 2185s FAILED tests/test_concatenate.py::test_concatenate_roundtrip[outer-cupy_csc--True] 2185s FAILED tests/test_concatenate.py::test_concatenate_layers[cupy_array-inner] 2185s FAILED tests/test_concatenate.py::test_concatenate_layers[cupy_array-outer] 2185s FAILED tests/test_concatenate.py::test_concatenate_layers[cupy_csr-inner] - M... 2185s FAILED tests/test_concatenate.py::test_concatenate_layers[cupy_csr-outer] - M... 2185s FAILED tests/test_concatenate.py::test_concatenate_layers[cupy_csc-inner] - M... 2185s FAILED tests/test_concatenate.py::test_concatenate_layers[cupy_csc-outer] - M... 2185s FAILED tests/test_concatenate.py::test_concatenate_layers_misaligned[cupy_array-inner] 2185s FAILED tests/test_concatenate.py::test_concatenate_layers_misaligned[cupy_array-outer] 2185s FAILED tests/test_concatenate.py::test_concatenate_layers_misaligned[cupy_csr-inner] 2185s FAILED tests/test_concatenate.py::test_concatenate_layers_misaligned[cupy_csr-outer] 2185s FAILED tests/test_concatenate.py::test_concatenate_layers_misaligned[cupy_csc-inner] 2185s FAILED tests/test_concatenate.py::test_concatenate_layers_misaligned[cupy_csc-outer] 2185s FAILED tests/test_concatenate.py::test_concatenate_layers_outer[cupy_array-0] 2185s FAILED tests/test_concatenate.py::test_concatenate_layers_outer[cupy_array-nan] 2185s FAILED tests/test_concatenate.py::test_concatenate_layers_outer[cupy_array-3.141592653589793] 2185s FAILED tests/test_concatenate.py::test_concatenate_layers_outer[cupy_csr-0] 2185s FAILED tests/test_concatenate.py::test_concatenate_layers_outer[cupy_csr-nan] 2185s FAILED tests/test_concatenate.py::test_concatenate_layers_outer[cupy_csr-3.141592653589793] 2185s FAILED tests/test_concatenate.py::test_concatenate_layers_outer[cupy_csc-0] 2185s FAILED tests/test_concatenate.py::test_concatenate_layers_outer[cupy_csc-nan] 2185s FAILED tests/test_concatenate.py::test_concatenate_layers_outer[cupy_csc-3.141592653589793] 2185s FAILED tests/test_concatenate.py::test_pairwise_concat[obs-cupy_array] - Modu... 2185s FAILED tests/test_concatenate.py::test_pairwise_concat[obs-cupy_csr] - Module... 2185s FAILED tests/test_concatenate.py::test_pairwise_concat[obs-cupy_csc] - Module... 2185s FAILED tests/test_concatenate.py::test_pairwise_concat[var-cupy_array] - Modu... 2185s FAILED tests/test_concatenate.py::test_pairwise_concat[var-cupy_csr] - Module... 2185s FAILED tests/test_concatenate.py::test_pairwise_concat[var-cupy_csc] - Module... 2185s FAILED tests/test_concatenate.py::test_nan_merge[obs-inner-cupy_array] - Modu... 2185s FAILED tests/test_concatenate.py::test_nan_merge[obs-inner-cupy_csr] - Module... 2185s FAILED tests/test_concatenate.py::test_nan_merge[obs-inner-cupy_csc] - Module... 2185s FAILED tests/test_concatenate.py::test_nan_merge[obs-outer-cupy_array] - Modu... 2185s FAILED tests/test_concatenate.py::test_nan_merge[obs-outer-cupy_csr] - Module... 2185s FAILED tests/test_concatenate.py::test_nan_merge[obs-outer-cupy_csc] - Module... 2185s FAILED tests/test_concatenate.py::test_nan_merge[var-inner-cupy_array] - Modu... 2185s FAILED tests/test_concatenate.py::test_nan_merge[var-inner-cupy_csr] - Module... 2185s FAILED tests/test_concatenate.py::test_nan_merge[var-inner-cupy_csc] - Module... 2185s FAILED tests/test_concatenate.py::test_nan_merge[var-outer-cupy_array] - Modu... 2185s FAILED tests/test_concatenate.py::test_nan_merge[var-outer-cupy_csr] - Module... 2185s FAILED tests/test_concatenate.py::test_nan_merge[var-outer-cupy_csc] - Module... 2185s FAILED tests/test_concatenate.py::test_transposed_concat[cupy_array-obs-inner-None] 2185s FAILED tests/test_concatenate.py::test_transposed_concat[cupy_array-obs-inner-same] 2185s FAILED tests/test_concatenate.py::test_transposed_concat[cupy_array-obs-inner-unique] 2185s FAILED tests/test_concatenate.py::test_transposed_concat[cupy_array-obs-inner-first] 2185s FAILED tests/test_concatenate.py::test_transposed_concat[cupy_array-obs-inner-only] 2185s FAILED tests/test_concatenate.py::test_transposed_concat[cupy_array-obs-outer-None] 2185s FAILED tests/test_concatenate.py::test_transposed_concat[cupy_array-obs-outer-same] 2185s FAILED tests/test_concatenate.py::test_transposed_concat[cupy_array-obs-outer-unique] 2185s FAILED tests/test_concatenate.py::test_transposed_concat[cupy_array-obs-outer-first] 2185s FAILED tests/test_concatenate.py::test_transposed_concat[cupy_array-obs-outer-only] 2185s FAILED tests/test_concatenate.py::test_transposed_concat[cupy_array-var-inner-None] 2185s FAILED tests/test_concatenate.py::test_transposed_concat[cupy_array-var-inner-same] 2185s FAILED tests/test_concatenate.py::test_transposed_concat[cupy_array-var-inner-unique] 2185s FAILED tests/test_concatenate.py::test_transposed_concat[cupy_array-var-inner-first] 2185s FAILED tests/test_concatenate.py::test_transposed_concat[cupy_array-var-inner-only] 2185s FAILED tests/test_concatenate.py::test_transposed_concat[cupy_array-var-outer-None] 2185s FAILED tests/test_concatenate.py::test_transposed_concat[cupy_array-var-outer-same] 2185s FAILED tests/test_concatenate.py::test_transposed_concat[cupy_array-var-outer-unique] 2185s FAILED tests/test_concatenate.py::test_transposed_concat[cupy_array-var-outer-first] 2185s FAILED tests/test_concatenate.py::test_transposed_concat[cupy_array-var-outer-only] 2185s FAILED tests/test_concatenate.py::test_transposed_concat[cupy_csr-obs-inner-None] 2185s FAILED tests/test_concatenate.py::test_transposed_concat[cupy_csr-obs-inner-same] 2185s FAILED tests/test_concatenate.py::test_transposed_concat[cupy_csr-obs-inner-unique] 2185s FAILED tests/test_concatenate.py::test_transposed_concat[cupy_csr-obs-inner-first] 2185s FAILED tests/test_concatenate.py::test_transposed_concat[cupy_csr-obs-inner-only] 2185s FAILED tests/test_concatenate.py::test_transposed_concat[cupy_csr-obs-outer-None] 2185s FAILED tests/test_concatenate.py::test_transposed_concat[cupy_csr-obs-outer-same] 2185s FAILED tests/test_concatenate.py::test_transposed_concat[cupy_csr-obs-outer-unique] 2185s FAILED tests/test_concatenate.py::test_transposed_concat[cupy_csr-obs-outer-first] 2185s FAILED tests/test_concatenate.py::test_transposed_concat[cupy_csr-obs-outer-only] 2185s FAILED tests/test_concatenate.py::test_transposed_concat[cupy_csr-var-inner-None] 2185s FAILED tests/test_concatenate.py::test_transposed_concat[cupy_csr-var-inner-same] 2185s FAILED tests/test_concatenate.py::test_transposed_concat[cupy_csr-var-inner-unique] 2185s FAILED tests/test_concatenate.py::test_transposed_concat[cupy_csr-var-inner-first] 2185s FAILED tests/test_concatenate.py::test_transposed_concat[cupy_csr-var-inner-only] 2185s FAILED tests/test_concatenate.py::test_transposed_concat[cupy_csr-var-outer-None] 2185s FAILED tests/test_concatenate.py::test_transposed_concat[cupy_csr-var-outer-same] 2185s FAILED tests/test_concatenate.py::test_transposed_concat[cupy_csr-var-outer-unique] 2185s FAILED tests/test_concatenate.py::test_transposed_concat[cupy_csr-var-outer-first] 2185s FAILED tests/test_concatenate.py::test_transposed_concat[cupy_csr-var-outer-only] 2185s FAILED tests/test_concatenate.py::test_transposed_concat[cupy_csc-obs-inner-None] 2185s FAILED tests/test_concatenate.py::test_transposed_concat[cupy_csc-obs-inner-same] 2185s FAILED tests/test_concatenate.py::test_transposed_concat[cupy_csc-obs-inner-unique] 2185s FAILED tests/test_concatenate.py::test_transposed_concat[cupy_csc-obs-inner-first] 2185s FAILED tests/test_concatenate.py::test_transposed_concat[cupy_csc-obs-inner-only] 2185s FAILED tests/test_concatenate.py::test_transposed_concat[cupy_csc-obs-outer-None] 2185s FAILED tests/test_concatenate.py::test_transposed_concat[cupy_csc-obs-outer-same] 2185s FAILED tests/test_concatenate.py::test_transposed_concat[cupy_csc-obs-outer-unique] 2185s FAILED tests/test_concatenate.py::test_transposed_concat[cupy_csc-obs-outer-first] 2185s FAILED tests/test_concatenate.py::test_transposed_concat[cupy_csc-obs-outer-only] 2185s FAILED tests/test_concatenate.py::test_transposed_concat[cupy_csc-var-inner-None] 2185s FAILED tests/test_concatenate.py::test_transposed_concat[cupy_csc-var-inner-same] 2185s FAILED tests/test_concatenate.py::test_transposed_concat[cupy_csc-var-inner-unique] 2185s FAILED tests/test_concatenate.py::test_transposed_concat[cupy_csc-var-inner-first] 2185s FAILED tests/test_concatenate.py::test_transposed_concat[cupy_csc-var-inner-only] 2185s FAILED tests/test_concatenate.py::test_transposed_concat[cupy_csc-var-outer-None] 2185s FAILED tests/test_concatenate.py::test_transposed_concat[cupy_csc-var-outer-same] 2185s FAILED tests/test_concatenate.py::test_transposed_concat[cupy_csc-var-outer-unique] 2185s FAILED tests/test_concatenate.py::test_transposed_concat[cupy_csc-var-outer-first] 2185s FAILED tests/test_concatenate.py::test_transposed_concat[cupy_csc-var-outer-only] 2185s FAILED tests/test_concatenate.py::test_concat_different_types_dask[None-cupy_array] 2185s FAILED tests/test_concatenate.py::test_concat_different_types_dask[None-cupy_csr] 2185s FAILED tests/test_concatenate.py::test_concat_different_types_dask[None-cupy_csc] 2185s FAILED tests/test_concatenate.py::test_concat_different_types_dask[same-cupy_array] 2185s FAILED tests/test_concatenate.py::test_concat_different_types_dask[same-cupy_csr] 2185s FAILED tests/test_concatenate.py::test_concat_different_types_dask[same-cupy_csc] 2185s FAILED tests/test_concatenate.py::test_concat_different_types_dask[unique-cupy_array] 2185s FAILED tests/test_concatenate.py::test_concat_different_types_dask[unique-cupy_csr] 2185s FAILED tests/test_concatenate.py::test_concat_different_types_dask[unique-cupy_csc] 2185s FAILED tests/test_concatenate.py::test_concat_different_types_dask[first-cupy_array] 2185s FAILED tests/test_concatenate.py::test_concat_different_types_dask[first-cupy_csr] 2185s FAILED tests/test_concatenate.py::test_concat_different_types_dask[first-cupy_csc] 2185s FAILED tests/test_concatenate.py::test_concat_different_types_dask[only-cupy_array] 2185s FAILED tests/test_concatenate.py::test_concat_different_types_dask[only-cupy_csr] 2185s FAILED tests/test_concatenate.py::test_concat_different_types_dask[only-cupy_csc] 2185s FAILED tests/test_concatenate.py::test_concat_on_var_outer_join[cupy_array] 2185s FAILED tests/test_concatenate.py::test_concat_on_var_outer_join[cupy_csr] - M... 2185s FAILED tests/test_concatenate.py::test_concat_on_var_outer_join[cupy_csc] - M... 2185s FAILED tests/test_dask.py::test_dask_to_memory_unbacked[cupy_dense_dask_array] 2185s FAILED tests/test_helpers.py::test_as_dask_functions[cupy_dense-np_array] - M... 2185s FAILED tests/test_helpers.py::test_as_dask_functions[cupy_dense-scipy_csr_matrix] 2185s FAILED tests/test_helpers.py::test_as_dask_functions[cupy_dense-scipy_csc_matrix] 2185s FAILED tests/test_helpers.py::test_as_dask_functions[cupy_dense-scipy_csr_array] 2185s FAILED tests/test_helpers.py::test_as_dask_functions[cupy_dense-scipy_csc_array] 2185s FAILED tests/test_helpers.py::test_as_dask_functions[cupy_dense-dense_dask_array] 2185s FAILED tests/test_helpers.py::test_as_dask_functions[cupy_dense-sparse_dask_array] 2185s FAILED tests/test_helpers.py::test_as_dask_functions[cupy_dense-cupy_array] 2185s FAILED tests/test_helpers.py::test_as_dask_functions[cupy_dense-cupy_csr] - M... 2185s FAILED tests/test_helpers.py::test_as_dask_functions[cupy_dense-cupy_csc] - M... 2185s FAILED tests/test_helpers.py::test_as_dask_functions[numpy_dense-cupy_array] 2185s FAILED tests/test_helpers.py::test_as_dask_functions[numpy_dense-cupy_csr] - ... 2185s FAILED tests/test_helpers.py::test_as_dask_functions[numpy_dense-cupy_csc] - ... 2185s FAILED tests/test_helpers.py::test_as_dask_functions[cupy_csr-np_array] - Key... 2185s FAILED tests/test_helpers.py::test_as_dask_functions[cupy_csr-scipy_csr_matrix] 2185s FAILED tests/test_helpers.py::test_as_dask_functions[cupy_csr-scipy_csc_matrix] 2185s FAILED tests/test_helpers.py::test_as_dask_functions[cupy_csr-scipy_csr_array] 2185s FAILED tests/test_helpers.py::test_as_dask_functions[cupy_csr-scipy_csc_array] 2185s FAILED tests/test_helpers.py::test_as_dask_functions[cupy_csr-dense_dask_array] 2185s FAILED tests/test_helpers.py::test_as_dask_functions[cupy_csr-sparse_dask_array] 2185s FAILED tests/test_helpers.py::test_as_dask_functions[cupy_csr-cupy_array] - M... 2185s FAILED tests/test_helpers.py::test_as_dask_functions[cupy_csr-cupy_csr] - Mod... 2185s FAILED tests/test_helpers.py::test_as_dask_functions[cupy_csr-cupy_csc] - Mod... 2185s FAILED tests/test_helpers.py::test_as_cupy_dask[dense_dask_array] - ModuleNot... 2185s FAILED tests/test_helpers.py::test_as_cupy_dask[sparse_dask_array] - ModuleNo... 2185s FAILED tests/test_io_elementwise.py::test_io_spec_cupy[h5ad-False-value0-array] 2185s FAILED tests/test_io_elementwise.py::test_io_spec_cupy[h5ad-False-value1-array] 2185s FAILED tests/test_io_elementwise.py::test_io_spec_cupy[h5ad-False-value2-csr_matrix] 2185s FAILED tests/test_io_elementwise.py::test_io_spec_cupy[h5ad-False-value3-csc_matrix] 2185s FAILED tests/test_io_elementwise.py::test_io_spec_cupy[h5ad-True-value0-array] 2185s FAILED tests/test_io_elementwise.py::test_io_spec_cupy[h5ad-True-value1-array] 2185s FAILED tests/test_io_elementwise.py::test_io_spec_cupy[h5ad-True-value2-csr_matrix] 2185s FAILED tests/test_io_elementwise.py::test_io_spec_cupy[h5ad-True-value3-csc_matrix] 2185s FAILED tests/test_io_elementwise.py::test_io_spec_cupy[zarr2-False-value0-array] 2185s FAILED tests/test_io_elementwise.py::test_io_spec_cupy[zarr2-False-value1-array] 2185s FAILED tests/test_io_elementwise.py::test_io_spec_cupy[zarr2-False-value2-csr_matrix] 2185s FAILED tests/test_io_elementwise.py::test_io_spec_cupy[zarr2-False-value3-csc_matrix] 2185s FAILED tests/test_io_elementwise.py::test_io_spec_cupy[zarr2-True-value0-array] 2185s FAILED tests/test_io_elementwise.py::test_io_spec_cupy[zarr2-True-value1-array] 2185s FAILED tests/test_io_elementwise.py::test_io_spec_cupy[zarr2-True-value2-csr_matrix] 2185s FAILED tests/test_io_elementwise.py::test_io_spec_cupy[zarr2-True-value3-csc_matrix] 2185s FAILED tests/test_io_elementwise.py::test_io_spec_cupy[zarr3-False-value0-array] 2185s FAILED tests/test_io_elementwise.py::test_io_spec_cupy[zarr3-False-value1-array] 2185s FAILED tests/test_io_elementwise.py::test_io_spec_cupy[zarr3-False-value2-csr_matrix] 2185s FAILED tests/test_io_elementwise.py::test_io_spec_cupy[zarr3-False-value3-csc_matrix] 2185s FAILED tests/test_io_elementwise.py::test_io_spec_cupy[zarr3-True-value0-array] 2185s FAILED tests/test_io_elementwise.py::test_io_spec_cupy[zarr3-True-value1-array] 2185s FAILED tests/test_io_elementwise.py::test_io_spec_cupy[zarr3-True-value2-csr_matrix] 2185s FAILED tests/test_io_elementwise.py::test_io_spec_cupy[zarr3-True-value3-csc_matrix] 2185s FAILED tests/test_readwrite.py::test_readwrite_kitchensink[dataset_kwargs0-csr_matrix-h5ad] 2185s FAILED tests/test_readwrite.py::test_readwrite_kitchensink[dataset_kwargs0-csr_matrix-zarr] 2185s FAILED tests/test_readwrite.py::test_readwrite_kitchensink[dataset_kwargs0-csr_array-h5ad] 2185s FAILED tests/test_readwrite.py::test_readwrite_kitchensink[dataset_kwargs0-csr_array-zarr] 2185s FAILED tests/test_readwrite.py::test_readwrite_kitchensink[dataset_kwargs1-csr_matrix-h5ad] 2185s FAILED tests/test_readwrite.py::test_readwrite_kitchensink[dataset_kwargs1-csr_matrix-zarr] 2185s FAILED tests/test_readwrite.py::test_readwrite_kitchensink[dataset_kwargs1-csr_array-h5ad] 2185s FAILED tests/test_readwrite.py::test_readwrite_kitchensink[dataset_kwargs1-csr_array-zarr] 2185s FAILED tests/test_readwrite.py::test_read_write_maintain_obsmvarm_dtypes - As... 2185s FAILED tests/test_readwrite.py::test_maintain_layers - AssertionError: assert... 2185s FAILED tests/test_views.py::test_modify_view_component[cupy_array-layers] - M... 2185s FAILED tests/test_views.py::test_modify_view_component[cupy_array-obsm] - Mod... 2185s FAILED tests/test_views.py::test_modify_view_component[cupy_array-varm] - Mod... 2185s FAILED tests/test_views.py::test_modify_view_component[cupy_csr-layers] - Mod... 2185s FAILED tests/test_views.py::test_modify_view_component[cupy_csr-obsm] - Modul... 2185s FAILED tests/test_views.py::test_modify_view_component[cupy_csr-varm] - Modul... 2185s FAILED tests/test_views.py::test_modify_view_component[cupy_csc-layers] - Mod... 2185s FAILED tests/test_views.py::test_modify_view_component[cupy_csc-obsm] - Modul... 2185s FAILED tests/test_views.py::test_modify_view_component[cupy_csc-varm] - Modul... 2185s FAILED tests/test_views.py::test_set_scalar_subset_X[cupy_array-array_subset] 2185s FAILED tests/test_views.py::test_set_scalar_subset_X[cupy_array-slice_subset] 2185s FAILED tests/test_views.py::test_set_scalar_subset_X[cupy_array-single_subset] 2185s FAILED tests/test_views.py::test_set_scalar_subset_X[cupy_array-array_int_subset] 2185s FAILED tests/test_views.py::test_set_scalar_subset_X[cupy_array-list_int_subset] 2185s FAILED tests/test_views.py::test_set_scalar_subset_X[cupy_array-array_bool_subset] 2185s FAILED tests/test_views.py::test_set_scalar_subset_X[cupy_array-list_bool_subset] 2185s FAILED tests/test_views.py::test_set_scalar_subset_X[cupy_array-matrix_bool_subset] 2185s FAILED tests/test_views.py::test_set_scalar_subset_X[cupy_array-spmatrix_bool_subset] 2185s FAILED tests/test_views.py::test_set_scalar_subset_X[cupy_array-sparray_bool_subset] 2185s FAILED tests/test_views.py::test_set_scalar_subset_X[cupy_csr-array_subset] 2185s FAILED tests/test_views.py::test_set_scalar_subset_X[cupy_csr-slice_subset] 2185s FAILED tests/test_views.py::test_set_scalar_subset_X[cupy_csr-single_subset] 2185s FAILED tests/test_views.py::test_set_scalar_subset_X[cupy_csr-array_int_subset] 2185s FAILED tests/test_views.py::test_set_scalar_subset_X[cupy_csr-list_int_subset] 2185s FAILED tests/test_views.py::test_set_scalar_subset_X[cupy_csr-array_bool_subset] 2185s FAILED tests/test_views.py::test_set_scalar_subset_X[cupy_csr-list_bool_subset] 2185s FAILED tests/test_views.py::test_set_scalar_subset_X[cupy_csr-matrix_bool_subset] 2185s FAILED tests/test_views.py::test_set_scalar_subset_X[cupy_csr-spmatrix_bool_subset] 2185s FAILED tests/test_views.py::test_set_scalar_subset_X[cupy_csr-sparray_bool_subset] 2185s FAILED tests/test_views.py::test_set_scalar_subset_X[cupy_csc-array_subset] 2185s FAILED tests/test_views.py::test_set_scalar_subset_X[cupy_csc-slice_subset] 2185s FAILED tests/test_views.py::test_set_scalar_subset_X[cupy_csc-single_subset] 2185s FAILED tests/test_views.py::test_set_scalar_subset_X[cupy_csc-array_int_subset] 2185s FAILED tests/test_views.py::test_set_scalar_subset_X[cupy_csc-list_int_subset] 2185s FAILED tests/test_views.py::test_set_scalar_subset_X[cupy_csc-array_bool_subset] 2185s FAILED tests/test_views.py::test_set_scalar_subset_X[cupy_csc-list_bool_subset] 2185s FAILED tests/test_views.py::test_set_scalar_subset_X[cupy_csc-matrix_bool_subset] 2185s FAILED tests/test_views.py::test_set_scalar_subset_X[cupy_csc-spmatrix_bool_subset] 2185s FAILED tests/test_views.py::test_set_scalar_subset_X[cupy_csc-sparray_bool_subset] 2185s FAILED tests/test_views.py::test_view_of_view[cupy_array-array_subset-array_subset] 2185s FAILED tests/test_views.py::test_view_of_view[cupy_array-array_subset-slice_subset] 2185s FAILED tests/test_views.py::test_view_of_view[cupy_array-array_subset-single_subset] 2185s FAILED tests/test_views.py::test_view_of_view[cupy_array-array_subset-array_int_subset] 2185s FAILED tests/test_views.py::test_view_of_view[cupy_array-array_subset-list_int_subset] 2185s FAILED tests/test_views.py::test_view_of_view[cupy_array-array_subset-array_bool_subset] 2185s FAILED tests/test_views.py::test_view_of_view[cupy_array-array_subset-list_bool_subset] 2185s FAILED tests/test_views.py::test_view_of_view[cupy_array-array_subset-matrix_bool_subset] 2185s FAILED tests/test_views.py::test_view_of_view[cupy_array-array_subset-spmatrix_bool_subset] 2185s FAILED tests/test_views.py::test_view_of_view[cupy_array-array_subset-sparray_bool_subset] 2185s FAILED tests/test_views.py::test_view_of_view[cupy_array-slice_subset-array_subset] 2185s FAILED tests/test_views.py::test_view_of_view[cupy_array-slice_subset-slice_subset] 2185s FAILED tests/test_views.py::test_view_of_view[cupy_array-slice_subset-single_subset] 2185s FAILED tests/test_views.py::test_view_of_view[cupy_array-slice_subset-array_int_subset] 2185s FAILED tests/test_views.py::test_view_of_view[cupy_array-slice_subset-list_int_subset] 2185s FAILED tests/test_views.py::test_view_of_view[cupy_array-slice_subset-array_bool_subset] 2185s FAILED tests/test_views.py::test_view_of_view[cupy_array-slice_subset-list_bool_subset] 2185s FAILED tests/test_views.py::test_view_of_view[cupy_array-slice_subset-matrix_bool_subset] 2185s FAILED tests/test_views.py::test_view_of_view[cupy_array-slice_subset-spmatrix_bool_subset] 2185s FAILED tests/test_views.py::test_view_of_view[cupy_array-slice_subset-sparray_bool_subset] 2185s FAILED tests/test_views.py::test_view_of_view[cupy_array-single_subset-array_subset] 2185s FAILED tests/test_views.py::test_view_of_view[cupy_array-single_subset-slice_subset] 2185s FAILED tests/test_views.py::test_view_of_view[cupy_array-single_subset-single_subset] 2185s FAILED tests/test_views.py::test_view_of_view[cupy_array-single_subset-array_int_subset] 2185s FAILED tests/test_views.py::test_view_of_view[cupy_array-single_subset-list_int_subset] 2185s FAILED tests/test_views.py::test_view_of_view[cupy_array-single_subset-array_bool_subset] 2185s FAILED tests/test_views.py::test_view_of_view[cupy_array-single_subset-list_bool_subset] 2185s FAILED tests/test_views.py::test_view_of_view[cupy_array-single_subset-matrix_bool_subset] 2185s FAILED tests/test_views.py::test_view_of_view[cupy_array-single_subset-spmatrix_bool_subset] 2185s FAILED tests/test_views.py::test_view_of_view[cupy_array-single_subset-sparray_bool_subset] 2185s FAILED tests/test_views.py::test_view_of_view[cupy_array-array_int_subset-array_subset] 2185s FAILED tests/test_views.py::test_view_of_view[cupy_array-array_int_subset-slice_subset] 2185s FAILED tests/test_views.py::test_view_of_view[cupy_array-array_int_subset-single_subset] 2185s FAILED tests/test_views.py::test_view_of_view[cupy_array-array_int_subset-array_int_subset] 2185s FAILED tests/test_views.py::test_view_of_view[cupy_array-array_int_subset-list_int_subset] 2185s FAILED tests/test_views.py::test_view_of_view[cupy_array-array_int_subset-array_bool_subset] 2185s FAILED tests/test_views.py::test_view_of_view[cupy_array-array_int_subset-list_bool_subset] 2185s FAILED tests/test_views.py::test_view_of_view[cupy_array-array_int_subset-matrix_bool_subset] 2185s FAILED tests/test_views.py::test_view_of_view[cupy_array-array_int_subset-spmatrix_bool_subset] 2185s FAILED tests/test_views.py::test_view_of_view[cupy_array-array_int_subset-sparray_bool_subset] 2185s FAILED tests/test_views.py::test_view_of_view[cupy_array-list_int_subset-array_subset] 2185s FAILED tests/test_views.py::test_view_of_view[cupy_array-list_int_subset-slice_subset] 2185s FAILED tests/test_views.py::test_view_of_view[cupy_array-list_int_subset-single_subset] 2185s FAILED tests/test_views.py::test_view_of_view[cupy_array-list_int_subset-array_int_subset] 2185s FAILED tests/test_views.py::test_view_of_view[cupy_array-list_int_subset-list_int_subset] 2185s FAILED tests/test_views.py::test_view_of_view[cupy_array-list_int_subset-array_bool_subset] 2185s FAILED tests/test_views.py::test_view_of_view[cupy_array-list_int_subset-list_bool_subset] 2185s FAILED tests/test_views.py::test_view_of_view[cupy_array-list_int_subset-matrix_bool_subset] 2185s FAILED tests/test_views.py::test_view_of_view[cupy_array-list_int_subset-spmatrix_bool_subset] 2185s FAILED tests/test_views.py::test_view_of_view[cupy_array-list_int_subset-sparray_bool_subset] 2185s FAILED tests/test_views.py::test_view_of_view[cupy_array-array_bool_subset-array_subset] 2185s FAILED tests/test_views.py::test_view_of_view[cupy_array-array_bool_subset-slice_subset] 2185s FAILED tests/test_views.py::test_view_of_view[cupy_array-array_bool_subset-single_subset] 2185s FAILED tests/test_views.py::test_view_of_view[cupy_array-array_bool_subset-array_int_subset] 2185s FAILED tests/test_views.py::test_view_of_view[cupy_array-array_bool_subset-list_int_subset] 2185s FAILED tests/test_views.py::test_view_of_view[cupy_array-array_bool_subset-array_bool_subset] 2185s FAILED tests/test_views.py::test_view_of_view[cupy_array-array_bool_subset-list_bool_subset] 2185s FAILED tests/test_views.py::test_view_of_view[cupy_array-array_bool_subset-matrix_bool_subset] 2185s FAILED tests/test_views.py::test_view_of_view[cupy_array-array_bool_subset-spmatrix_bool_subset] 2185s FAILED tests/test_views.py::test_view_of_view[cupy_array-array_bool_subset-sparray_bool_subset] 2185s FAILED tests/test_views.py::test_view_of_view[cupy_array-list_bool_subset-array_subset] 2185s FAILED tests/test_views.py::test_view_of_view[cupy_array-list_bool_subset-slice_subset] 2185s FAILED tests/test_views.py::test_view_of_view[cupy_array-list_bool_subset-single_subset] 2185s FAILED tests/test_views.py::test_view_of_view[cupy_array-list_bool_subset-array_int_subset] 2185s FAILED tests/test_views.py::test_view_of_view[cupy_array-list_bool_subset-list_int_subset] 2185s FAILED tests/test_views.py::test_view_of_view[cupy_array-list_bool_subset-array_bool_subset] 2185s FAILED tests/test_views.py::test_view_of_view[cupy_array-list_bool_subset-list_bool_subset] 2185s FAILED tests/test_views.py::test_view_of_view[cupy_array-list_bool_subset-matrix_bool_subset] 2185s FAILED tests/test_views.py::test_view_of_view[cupy_array-list_bool_subset-spmatrix_bool_subset] 2185s FAILED tests/test_views.py::test_view_of_view[cupy_array-list_bool_subset-sparray_bool_subset] 2185s FAILED tests/test_views.py::test_view_of_view[cupy_array-matrix_bool_subset-array_subset] 2185s FAILED tests/test_views.py::test_view_of_view[cupy_array-matrix_bool_subset-slice_subset] 2185s FAILED tests/test_views.py::test_view_of_view[cupy_array-matrix_bool_subset-single_subset] 2185s FAILED tests/test_views.py::test_view_of_view[cupy_array-matrix_bool_subset-array_int_subset] 2185s FAILED tests/test_views.py::test_view_of_view[cupy_array-matrix_bool_subset-list_int_subset] 2185s FAILED tests/test_views.py::test_view_of_view[cupy_array-matrix_bool_subset-array_bool_subset] 2185s FAILED tests/test_views.py::test_view_of_view[cupy_array-matrix_bool_subset-list_bool_subset] 2185s FAILED tests/test_views.py::test_view_of_view[cupy_array-matrix_bool_subset-matrix_bool_subset] 2185s FAILED tests/test_views.py::test_view_of_view[cupy_array-matrix_bool_subset-spmatrix_bool_subset] 2185s FAILED tests/test_views.py::test_view_of_view[cupy_array-matrix_bool_subset-sparray_bool_subset] 2185s FAILED tests/test_views.py::test_view_of_view[cupy_array-spmatrix_bool_subset-array_subset] 2185s FAILED tests/test_views.py::test_view_of_view[cupy_array-spmatrix_bool_subset-slice_subset] 2185s FAILED tests/test_views.py::test_view_of_view[cupy_array-spmatrix_bool_subset-single_subset] 2185s FAILED tests/test_views.py::test_view_of_view[cupy_array-spmatrix_bool_subset-array_int_subset] 2185s FAILED tests/test_views.py::test_view_of_view[cupy_array-spmatrix_bool_subset-list_int_subset] 2185s FAILED tests/test_views.py::test_view_of_view[cupy_array-spmatrix_bool_subset-array_bool_subset] 2185s FAILED tests/test_views.py::test_view_of_view[cupy_array-spmatrix_bool_subset-list_bool_subset] 2185s FAILED tests/test_views.py::test_view_of_view[cupy_array-spmatrix_bool_subset-matrix_bool_subset] 2185s FAILED tests/test_views.py::test_view_of_view[cupy_array-spmatrix_bool_subset-spmatrix_bool_subset] 2185s FAILED tests/test_views.py::test_view_of_view[cupy_array-spmatrix_bool_subset-sparray_bool_subset] 2185s FAILED tests/test_views.py::test_view_of_view[cupy_array-sparray_bool_subset-array_subset] 2185s FAILED tests/test_views.py::test_view_of_view[cupy_array-sparray_bool_subset-slice_subset] 2185s FAILED tests/test_views.py::test_view_of_view[cupy_array-sparray_bool_subset-single_subset] 2185s FAILED tests/test_views.py::test_view_of_view[cupy_array-sparray_bool_subset-array_int_subset] 2185s FAILED tests/test_views.py::test_view_of_view[cupy_array-sparray_bool_subset-list_int_subset] 2185s FAILED tests/test_views.py::test_view_of_view[cupy_array-sparray_bool_subset-array_bool_subset] 2185s FAILED tests/test_views.py::test_view_of_view[cupy_array-sparray_bool_subset-list_bool_subset] 2185s FAILED tests/test_views.py::test_view_of_view[cupy_array-sparray_bool_subset-matrix_bool_subset] 2185s FAILED tests/test_views.py::test_view_of_view[cupy_array-sparray_bool_subset-spmatrix_bool_subset] 2185s FAILED tests/test_views.py::test_view_of_view[cupy_array-sparray_bool_subset-sparray_bool_subset] 2185s FAILED tests/test_views.py::test_view_of_view[cupy_csr-array_subset-array_subset] 2185s FAILED tests/test_views.py::test_view_of_view[cupy_csr-array_subset-slice_subset] 2185s FAILED tests/test_views.py::test_view_of_view[cupy_csr-array_subset-single_subset] 2185s FAILED tests/test_views.py::test_view_of_view[cupy_csr-array_subset-array_int_subset] 2185s FAILED tests/test_views.py::test_view_of_view[cupy_csr-array_subset-list_int_subset] 2185s FAILED tests/test_views.py::test_view_of_view[cupy_csr-array_subset-array_bool_subset] 2185s FAILED tests/test_views.py::test_view_of_view[cupy_csr-array_subset-list_bool_subset] 2185s FAILED tests/test_views.py::test_view_of_view[cupy_csr-array_subset-matrix_bool_subset] 2185s FAILED tests/test_views.py::test_view_of_view[cupy_csr-array_subset-spmatrix_bool_subset] 2185s FAILED tests/test_views.py::test_view_of_view[cupy_csr-array_subset-sparray_bool_subset] 2185s FAILED tests/test_views.py::test_view_of_view[cupy_csr-slice_subset-array_subset] 2185s FAILED tests/test_views.py::test_view_of_view[cupy_csr-slice_subset-slice_subset] 2185s FAILED tests/test_views.py::test_view_of_view[cupy_csr-slice_subset-single_subset] 2185s FAILED tests/test_views.py::test_view_of_view[cupy_csr-slice_subset-array_int_subset] 2185s FAILED tests/test_views.py::test_view_of_view[cupy_csr-slice_subset-list_int_subset] 2185s FAILED tests/test_views.py::test_view_of_view[cupy_csr-slice_subset-array_bool_subset] 2185s FAILED tests/test_views.py::test_view_of_view[cupy_csr-slice_subset-list_bool_subset] 2185s FAILED tests/test_views.py::test_view_of_view[cupy_csr-slice_subset-matrix_bool_subset] 2185s FAILED tests/test_views.py::test_view_of_view[cupy_csr-slice_subset-spmatrix_bool_subset] 2185s FAILED tests/test_views.py::test_view_of_view[cupy_csr-slice_subset-sparray_bool_subset] 2185s FAILED tests/test_views.py::test_view_of_view[cupy_csr-single_subset-array_subset] 2185s FAILED tests/test_views.py::test_view_of_view[cupy_csr-single_subset-slice_subset] 2185s FAILED tests/test_views.py::test_view_of_view[cupy_csr-single_subset-single_subset] 2185s FAILED tests/test_views.py::test_view_of_view[cupy_csr-single_subset-array_int_subset] 2185s FAILED tests/test_views.py::test_view_of_view[cupy_csr-single_subset-list_int_subset] 2185s FAILED tests/test_views.py::test_view_of_view[cupy_csr-single_subset-array_bool_subset] 2185s FAILED tests/test_views.py::test_view_of_view[cupy_csr-single_subset-list_bool_subset] 2185s FAILED tests/test_views.py::test_view_of_view[cupy_csr-single_subset-matrix_bool_subset] 2185s FAILED tests/test_views.py::test_view_of_view[cupy_csr-single_subset-spmatrix_bool_subset] 2185s FAILED tests/test_views.py::test_view_of_view[cupy_csr-single_subset-sparray_bool_subset] 2185s FAILED tests/test_views.py::test_view_of_view[cupy_csr-array_int_subset-array_subset] 2185s FAILED tests/test_views.py::test_view_of_view[cupy_csr-array_int_subset-slice_subset] 2185s FAILED tests/test_views.py::test_view_of_view[cupy_csr-array_int_subset-single_subset] 2185s FAILED tests/test_views.py::test_view_of_view[cupy_csr-array_int_subset-array_int_subset] 2185s FAILED tests/test_views.py::test_view_of_view[cupy_csr-array_int_subset-list_int_subset] 2185s FAILED tests/test_views.py::test_view_of_view[cupy_csr-array_int_subset-array_bool_subset] 2185s FAILED tests/test_views.py::test_view_of_view[cupy_csr-array_int_subset-list_bool_subset] 2185s FAILED tests/test_views.py::test_view_of_view[cupy_csr-array_int_subset-matrix_bool_subset] 2185s FAILED tests/test_views.py::test_view_of_view[cupy_csr-array_int_subset-spmatrix_bool_subset] 2185s FAILED tests/test_views.py::test_view_of_view[cupy_csr-array_int_subset-sparray_bool_subset] 2185s FAILED tests/test_views.py::test_view_of_view[cupy_csr-list_int_subset-array_subset] 2185s FAILED tests/test_views.py::test_view_of_view[cupy_csr-list_int_subset-slice_subset] 2185s FAILED tests/test_views.py::test_view_of_view[cupy_csr-list_int_subset-single_subset] 2185s FAILED tests/test_views.py::test_view_of_view[cupy_csr-list_int_subset-array_int_subset] 2185s FAILED tests/test_views.py::test_view_of_view[cupy_csr-list_int_subset-list_int_subset] 2185s FAILED tests/test_views.py::test_view_of_view[cupy_csr-list_int_subset-array_bool_subset] 2185s FAILED tests/test_views.py::test_view_of_view[cupy_csr-list_int_subset-list_bool_subset] 2185s FAILED tests/test_views.py::test_view_of_view[cupy_csr-list_int_subset-matrix_bool_subset] 2185s FAILED tests/test_views.py::test_view_of_view[cupy_csr-list_int_subset-spmatrix_bool_subset] 2185s FAILED tests/test_views.py::test_view_of_view[cupy_csr-list_int_subset-sparray_bool_subset] 2185s FAILED tests/test_views.py::test_view_of_view[cupy_csr-array_bool_subset-array_subset] 2185s FAILED tests/test_views.py::test_view_of_view[cupy_csr-array_bool_subset-slice_subset] 2185s FAILED tests/test_views.py::test_view_of_view[cupy_csr-array_bool_subset-single_subset] 2185s FAILED tests/test_views.py::test_view_of_view[cupy_csr-array_bool_subset-array_int_subset] 2185s FAILED tests/test_views.py::test_view_of_view[cupy_csr-array_bool_subset-list_int_subset] 2185s FAILED tests/test_views.py::test_view_of_view[cupy_csr-array_bool_subset-array_bool_subset] 2185s FAILED tests/test_views.py::test_view_of_view[cupy_csr-array_bool_subset-list_bool_subset] 2185s FAILED tests/test_views.py::test_view_of_view[cupy_csr-array_bool_subset-matrix_bool_subset] 2185s FAILED tests/test_views.py::test_view_of_view[cupy_csr-array_bool_subset-spmatrix_bool_subset] 2185s FAILED tests/test_views.py::test_view_of_view[cupy_csr-array_bool_subset-sparray_bool_subset] 2185s FAILED tests/test_views.py::test_view_of_view[cupy_csr-list_bool_subset-array_subset] 2185s FAILED tests/test_views.py::test_view_of_view[cupy_csr-list_bool_subset-slice_subset] 2185s FAILED tests/test_views.py::test_view_of_view[cupy_csr-list_bool_subset-single_subset] 2185s FAILED tests/test_views.py::test_view_of_view[cupy_csr-list_bool_subset-array_int_subset] 2185s FAILED tests/test_views.py::test_view_of_view[cupy_csr-list_bool_subset-list_int_subset] 2185s FAILED tests/test_views.py::test_view_of_view[cupy_csr-list_bool_subset-array_bool_subset] 2185s FAILED tests/test_views.py::test_view_of_view[cupy_csr-list_bool_subset-list_bool_subset] 2185s FAILED tests/test_views.py::test_view_of_view[cupy_csr-list_bool_subset-matrix_bool_subset] 2185s FAILED tests/test_views.py::test_view_of_view[cupy_csr-list_bool_subset-spmatrix_bool_subset] 2185s FAILED tests/test_views.py::test_view_of_view[cupy_csr-list_bool_subset-sparray_bool_subset] 2185s FAILED tests/test_views.py::test_view_of_view[cupy_csr-matrix_bool_subset-array_subset] 2185s FAILED tests/test_views.py::test_view_of_view[cupy_csr-matrix_bool_subset-slice_subset] 2185s FAILED tests/test_views.py::test_view_of_view[cupy_csr-matrix_bool_subset-single_subset] 2185s FAILED tests/test_views.py::test_view_of_view[cupy_csr-matrix_bool_subset-array_int_subset] 2185s FAILED tests/test_views.py::test_view_of_view[cupy_csr-matrix_bool_subset-list_int_subset] 2185s FAILED tests/test_views.py::test_view_of_view[cupy_csr-matrix_bool_subset-array_bool_subset] 2185s FAILED tests/test_views.py::test_view_of_view[cupy_csr-matrix_bool_subset-list_bool_subset] 2185s FAILED tests/test_views.py::test_view_of_view[cupy_csr-matrix_bool_subset-matrix_bool_subset] 2185s FAILED tests/test_views.py::test_view_of_view[cupy_csr-matrix_bool_subset-spmatrix_bool_subset] 2185s FAILED tests/test_views.py::test_view_of_view[cupy_csr-matrix_bool_subset-sparray_bool_subset] 2185s FAILED tests/test_views.py::test_view_of_view[cupy_csr-spmatrix_bool_subset-array_subset] 2185s FAILED tests/test_views.py::test_view_of_view[cupy_csr-spmatrix_bool_subset-slice_subset] 2185s FAILED tests/test_views.py::test_view_of_view[cupy_csr-spmatrix_bool_subset-single_subset] 2185s FAILED tests/test_views.py::test_view_of_view[cupy_csr-spmatrix_bool_subset-array_int_subset] 2185s FAILED tests/test_views.py::test_view_of_view[cupy_csr-spmatrix_bool_subset-list_int_subset] 2185s FAILED tests/test_views.py::test_view_of_view[cupy_csr-spmatrix_bool_subset-array_bool_subset] 2185s FAILED tests/test_views.py::test_view_of_view[cupy_csr-spmatrix_bool_subset-list_bool_subset] 2185s FAILED tests/test_views.py::test_view_of_view[cupy_csr-spmatrix_bool_subset-matrix_bool_subset] 2185s FAILED tests/test_views.py::test_view_of_view[cupy_csr-spmatrix_bool_subset-spmatrix_bool_subset] 2185s FAILED tests/test_views.py::test_view_of_view[cupy_csr-spmatrix_bool_subset-sparray_bool_subset] 2185s FAILED tests/test_views.py::test_view_of_view[cupy_csr-sparray_bool_subset-array_subset] 2185s FAILED tests/test_views.py::test_view_of_view[cupy_csr-sparray_bool_subset-slice_subset] 2185s FAILED tests/test_views.py::test_view_of_view[cupy_csr-sparray_bool_subset-single_subset] 2185s FAILED tests/test_views.py::test_view_of_view[cupy_csr-sparray_bool_subset-array_int_subset] 2185s FAILED tests/test_views.py::test_view_of_view[cupy_csr-sparray_bool_subset-list_int_subset] 2185s FAILED tests/test_views.py::test_view_of_view[cupy_csr-sparray_bool_subset-array_bool_subset] 2185s FAILED tests/test_views.py::test_view_of_view[cupy_csr-sparray_bool_subset-list_bool_subset] 2185s FAILED tests/test_views.py::test_view_of_view[cupy_csr-sparray_bool_subset-matrix_bool_subset] 2185s FAILED tests/test_views.py::test_view_of_view[cupy_csr-sparray_bool_subset-spmatrix_bool_subset] 2185s FAILED tests/test_views.py::test_view_of_view[cupy_csr-sparray_bool_subset-sparray_bool_subset] 2185s FAILED tests/test_views.py::test_view_of_view[cupy_csc-array_subset-array_subset] 2185s FAILED tests/test_views.py::test_view_of_view[cupy_csc-array_subset-slice_subset] 2185s FAILED tests/test_views.py::test_view_of_view[cupy_csc-array_subset-single_subset] 2185s FAILED tests/test_views.py::test_view_of_view[cupy_csc-array_subset-array_int_subset] 2185s FAILED tests/test_views.py::test_view_of_view[cupy_csc-array_subset-list_int_subset] 2185s FAILED tests/test_views.py::test_view_of_view[cupy_csc-array_subset-array_bool_subset] 2185s FAILED tests/test_views.py::test_view_of_view[cupy_csc-array_subset-list_bool_subset] 2185s FAILED tests/test_views.py::test_view_of_view[cupy_csc-array_subset-matrix_bool_subset] 2185s FAILED tests/test_views.py::test_view_of_view[cupy_csc-array_subset-spmatrix_bool_subset] 2185s FAILED tests/test_views.py::test_view_of_view[cupy_csc-array_subset-sparray_bool_subset] 2185s FAILED tests/test_views.py::test_view_of_view[cupy_csc-slice_subset-array_subset] 2185s FAILED tests/test_views.py::test_view_of_view[cupy_csc-slice_subset-slice_subset] 2185s FAILED tests/test_views.py::test_view_of_view[cupy_csc-slice_subset-single_subset] 2185s FAILED tests/test_views.py::test_view_of_view[cupy_csc-slice_subset-array_int_subset] 2185s FAILED tests/test_views.py::test_view_of_view[cupy_csc-slice_subset-list_int_subset] 2185s FAILED tests/test_views.py::test_view_of_view[cupy_csc-slice_subset-array_bool_subset] 2185s FAILED tests/test_views.py::test_view_of_view[cupy_csc-slice_subset-list_bool_subset] 2185s FAILED tests/test_views.py::test_view_of_view[cupy_csc-slice_subset-matrix_bool_subset] 2185s FAILED tests/test_views.py::test_view_of_view[cupy_csc-slice_subset-spmatrix_bool_subset] 2185s FAILED tests/test_views.py::test_view_of_view[cupy_csc-slice_subset-sparray_bool_subset] 2185s FAILED tests/test_views.py::test_view_of_view[cupy_csc-single_subset-array_subset] 2185s FAILED tests/test_views.py::test_view_of_view[cupy_csc-single_subset-slice_subset] 2185s FAILED tests/test_views.py::test_view_of_view[cupy_csc-single_subset-single_subset] 2185s FAILED tests/test_views.py::test_view_of_view[cupy_csc-single_subset-array_int_subset] 2185s FAILED tests/test_views.py::test_view_of_view[cupy_csc-single_subset-list_int_subset] 2185s FAILED tests/test_views.py::test_view_of_view[cupy_csc-single_subset-array_bool_subset] 2185s FAILED tests/test_views.py::test_view_of_view[cupy_csc-single_subset-list_bool_subset] 2185s FAILED tests/test_views.py::test_view_of_view[cupy_csc-single_subset-matrix_bool_subset] 2185s FAILED tests/test_views.py::test_view_of_view[cupy_csc-single_subset-spmatrix_bool_subset] 2185s FAILED tests/test_views.py::test_view_of_view[cupy_csc-single_subset-sparray_bool_subset] 2185s FAILED tests/test_views.py::test_view_of_view[cupy_csc-array_int_subset-array_subset] 2185s FAILED tests/test_views.py::test_view_of_view[cupy_csc-array_int_subset-slice_subset] 2185s FAILED tests/test_views.py::test_view_of_view[cupy_csc-array_int_subset-single_subset] 2185s FAILED tests/test_views.py::test_view_of_view[cupy_csc-array_int_subset-array_int_subset] 2185s FAILED tests/test_views.py::test_view_of_view[cupy_csc-array_int_subset-list_int_subset] 2185s FAILED tests/test_views.py::test_view_of_view[cupy_csc-array_int_subset-array_bool_subset] 2185s FAILED tests/test_views.py::test_view_of_view[cupy_csc-array_int_subset-list_bool_subset] 2185s FAILED tests/test_views.py::test_view_of_view[cupy_csc-array_int_subset-matrix_bool_subset] 2185s FAILED tests/test_views.py::test_view_of_view[cupy_csc-array_int_subset-spmatrix_bool_subset] 2185s FAILED tests/test_views.py::test_view_of_view[cupy_csc-array_int_subset-sparray_bool_subset] 2185s FAILED tests/test_views.py::test_view_of_view[cupy_csc-list_int_subset-array_subset] 2185s FAILED tests/test_views.py::test_view_of_view[cupy_csc-list_int_subset-slice_subset] 2185s FAILED tests/test_views.py::test_view_of_view[cupy_csc-list_int_subset-single_subset] 2185s FAILED tests/test_views.py::test_view_of_view[cupy_csc-list_int_subset-array_int_subset] 2185s FAILED tests/test_views.py::test_view_of_view[cupy_csc-list_int_subset-list_int_subset] 2185s FAILED tests/test_views.py::test_view_of_view[cupy_csc-list_int_subset-array_bool_subset] 2185s FAILED tests/test_views.py::test_view_of_view[cupy_csc-list_int_subset-list_bool_subset] 2185s FAILED tests/test_views.py::test_view_of_view[cupy_csc-list_int_subset-matrix_bool_subset] 2185s FAILED tests/test_views.py::test_view_of_view[cupy_csc-list_int_subset-spmatrix_bool_subset] 2185s FAILED tests/test_views.py::test_view_of_view[cupy_csc-list_int_subset-sparray_bool_subset] 2185s FAILED tests/test_views.py::test_view_of_view[cupy_csc-array_bool_subset-array_subset] 2185s FAILED tests/test_views.py::test_view_of_view[cupy_csc-array_bool_subset-slice_subset] 2185s FAILED tests/test_views.py::test_view_of_view[cupy_csc-array_bool_subset-single_subset] 2185s FAILED tests/test_views.py::test_view_of_view[cupy_csc-array_bool_subset-array_int_subset] 2185s FAILED tests/test_views.py::test_view_of_view[cupy_csc-array_bool_subset-list_int_subset] 2185s FAILED tests/test_views.py::test_view_of_view[cupy_csc-array_bool_subset-array_bool_subset] 2185s FAILED tests/test_views.py::test_view_of_view[cupy_csc-array_bool_subset-list_bool_subset] 2185s FAILED tests/test_views.py::test_view_of_view[cupy_csc-array_bool_subset-matrix_bool_subset] 2185s FAILED tests/test_views.py::test_view_of_view[cupy_csc-array_bool_subset-spmatrix_bool_subset] 2185s FAILED tests/test_views.py::test_view_of_view[cupy_csc-array_bool_subset-sparray_bool_subset] 2185s FAILED tests/test_views.py::test_view_of_view[cupy_csc-list_bool_subset-array_subset] 2185s FAILED tests/test_views.py::test_view_of_view[cupy_csc-list_bool_subset-slice_subset] 2185s FAILED tests/test_views.py::test_view_of_view[cupy_csc-list_bool_subset-single_subset] 2185s FAILED tests/test_views.py::test_view_of_view[cupy_csc-list_bool_subset-array_int_subset] 2185s FAILED tests/test_views.py::test_view_of_view[cupy_csc-list_bool_subset-list_int_subset] 2185s FAILED tests/test_views.py::test_view_of_view[cupy_csc-list_bool_subset-array_bool_subset] 2185s FAILED tests/test_views.py::test_view_of_view[cupy_csc-list_bool_subset-list_bool_subset] 2185s FAILED tests/test_views.py::test_view_of_view[cupy_csc-list_bool_subset-matrix_bool_subset] 2185s FAILED tests/test_views.py::test_view_of_view[cupy_csc-list_bool_subset-spmatrix_bool_subset] 2185s FAILED tests/test_views.py::test_view_of_view[cupy_csc-list_bool_subset-sparray_bool_subset] 2185s FAILED tests/test_views.py::test_view_of_view[cupy_csc-matrix_bool_subset-array_subset] 2185s FAILED tests/test_views.py::test_view_of_view[cupy_csc-matrix_bool_subset-slice_subset] 2185s FAILED tests/test_views.py::test_view_of_view[cupy_csc-matrix_bool_subset-single_subset] 2185s FAILED tests/test_views.py::test_view_of_view[cupy_csc-matrix_bool_subset-array_int_subset] 2185s FAILED tests/test_views.py::test_view_of_view[cupy_csc-matrix_bool_subset-list_int_subset] 2185s FAILED tests/test_views.py::test_view_of_view[cupy_csc-matrix_bool_subset-array_bool_subset] 2185s FAILED tests/test_views.py::test_view_of_view[cupy_csc-matrix_bool_subset-list_bool_subset] 2185s FAILED tests/test_views.py::test_view_of_view[cupy_csc-matrix_bool_subset-matrix_bool_subset] 2185s FAILED tests/test_views.py::test_view_of_view[cupy_csc-matrix_bool_subset-spmatrix_bool_subset] 2185s FAILED tests/test_views.py::test_view_of_view[cupy_csc-matrix_bool_subset-sparray_bool_subset] 2185s FAILED tests/test_views.py::test_view_of_view[cupy_csc-spmatrix_bool_subset-array_subset] 2185s FAILED tests/test_views.py::test_view_of_view[cupy_csc-spmatrix_bool_subset-slice_subset] 2185s FAILED tests/test_views.py::test_view_of_view[cupy_csc-spmatrix_bool_subset-single_subset] 2185s FAILED tests/test_views.py::test_view_of_view[cupy_csc-spmatrix_bool_subset-array_int_subset] 2185s FAILED tests/test_views.py::test_view_of_view[cupy_csc-spmatrix_bool_subset-list_int_subset] 2185s FAILED tests/test_views.py::test_view_of_view[cupy_csc-spmatrix_bool_subset-array_bool_subset] 2185s FAILED tests/test_views.py::test_view_of_view[cupy_csc-spmatrix_bool_subset-list_bool_subset] 2185s FAILED tests/test_views.py::test_view_of_view[cupy_csc-spmatrix_bool_subset-matrix_bool_subset] 2185s FAILED tests/test_views.py::test_view_of_view[cupy_csc-spmatrix_bool_subset-spmatrix_bool_subset] 2185s FAILED tests/test_views.py::test_view_of_view[cupy_csc-spmatrix_bool_subset-sparray_bool_subset] 2185s FAILED tests/test_views.py::test_view_of_view[cupy_csc-sparray_bool_subset-array_subset] 2185s FAILED tests/test_views.py::test_view_of_view[cupy_csc-sparray_bool_subset-slice_subset] 2185s FAILED tests/test_views.py::test_view_of_view[cupy_csc-sparray_bool_subset-single_subset] 2185s FAILED tests/test_views.py::test_view_of_view[cupy_csc-sparray_bool_subset-array_int_subset] 2185s FAILED tests/test_views.py::test_view_of_view[cupy_csc-sparray_bool_subset-list_int_subset] 2185s FAILED tests/test_views.py::test_view_of_view[cupy_csc-sparray_bool_subset-array_bool_subset] 2185s FAILED tests/test_views.py::test_view_of_view[cupy_csc-sparray_bool_subset-list_bool_subset] 2185s FAILED tests/test_views.py::test_view_of_view[cupy_csc-sparray_bool_subset-matrix_bool_subset] 2185s FAILED tests/test_views.py::test_view_of_view[cupy_csc-sparray_bool_subset-spmatrix_bool_subset] 2185s FAILED tests/test_views.py::test_view_of_view[cupy_csc-sparray_bool_subset-sparray_bool_subset] 2185s FAILED tests/test_views.py::test_view_different_type_indices[cupy_array] - Mo... 2185s FAILED tests/test_views.py::test_view_different_type_indices[cupy_csr] - Modu... 2185s FAILED tests/test_views.py::test_view_different_type_indices[cupy_csc] - Modu... 2185s FAILED tests/test_views.py::test_ellipsis_index[cupy_array-ellipsis] - Module... 2185s FAILED tests/test_views.py::test_ellipsis_index[cupy_array-ellipsis_tuple] - ... 2185s FAILED tests/test_views.py::test_ellipsis_index[cupy_array-obs-ellipsis] - Mo... 2185s FAILED tests/test_views.py::test_ellipsis_index[cupy_array-var-ellipsis] - Mo... 2185s FAILED tests/test_views.py::test_ellipsis_index[cupy_array-obs-var-ellipsis] 2185s FAILED tests/test_views.py::test_ellipsis_index[cupy_array-ellipsis-obs-var] 2185s FAILED tests/test_views.py::test_ellipsis_index[cupy_array-obs-ellipsis-var] 2185s FAILED tests/test_views.py::test_ellipsis_index[cupy_csr-ellipsis] - ModuleNo... 2185s FAILED tests/test_views.py::test_ellipsis_index[cupy_csr-ellipsis_tuple] - Mo... 2185s FAILED tests/test_views.py::test_ellipsis_index[cupy_csr-obs-ellipsis] - Modu... 2185s FAILED tests/test_views.py::test_ellipsis_index[cupy_csr-var-ellipsis] - Modu... 2185s FAILED tests/test_views.py::test_ellipsis_index[cupy_csr-obs-var-ellipsis] - ... 2185s FAILED tests/test_views.py::test_ellipsis_index[cupy_csr-ellipsis-obs-var] - ... 2185s FAILED tests/test_views.py::test_ellipsis_index[cupy_csr-obs-ellipsis-var] - ... 2185s FAILED tests/test_views.py::test_ellipsis_index[cupy_csc-ellipsis] - ModuleNo... 2185s FAILED tests/test_views.py::test_ellipsis_index[cupy_csc-ellipsis_tuple] - Mo... 2185s FAILED tests/test_views.py::test_ellipsis_index[cupy_csc-obs-ellipsis] - Modu... 2185s FAILED tests/test_views.py::test_ellipsis_index[cupy_csc-var-ellipsis] - Modu... 2185s FAILED tests/test_views.py::test_ellipsis_index[cupy_csc-obs-var-ellipsis] - ... 2185s FAILED tests/test_views.py::test_ellipsis_index[cupy_csc-ellipsis-obs-var] - ... 2185s FAILED tests/test_views.py::test_ellipsis_index[cupy_csc-obs-ellipsis-var] - ... 2185s = 552 failed, 5242 passed, 92 skipped, 143 xfailed, 7522 warnings in 2036.54s (0:33:56) = 2187s autopkgtest [18:00:06]: test run-unit-test: -----------------------] 2188s run-unit-test FAIL non-zero exit status 1 2188s autopkgtest [18:00:07]: test run-unit-test: - - - - - - - - - - results - - - - - - - - - - 2188s autopkgtest [18:00:07]: @@@@@@@@@@@@@@@@@@@@ summary 2188s run-unit-test FAIL non-zero exit status 1