Skip to content

Commit 9aa2c91

Browse files
committed
Test R fix
To get around "'x' must be an array of at least two dimensions" - probably a numpy 2.0 + older reticulate error
1 parent 4c19919 commit 9aa2c91

File tree

1 file changed

+7
-3
lines changed

1 file changed

+7
-3
lines changed

.github/workflows/build.yml

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -41,13 +41,17 @@ jobs:
4141
# We need to remove R to pull in a version that's compatible with CRAN, weirdly.
4242
sudo apt-get update
4343
sudo apt-get remove r-base-core
44-
sudo apt-get install r-cran-reticulate r-cran-pbdzmq r-cran-uuid r-cran-ape
45-
sudo R -e 'install.packages("IRkernel")'
44+
sudo apt-get install r-cran-pbdzmq r-cran-uuid r-cran-ape
45+
# Numpy 2 needs a newer reticulate version than ubuntu-24.04 + r-cran-reticulate
46+
sudo R -e 'install.packages(c("reticulate", "IRkernel"))'
4647
R -e 'IRkernel::installspec()'
4748
4849
# Build the book
4950
- name: Build the book
50-
run: ./build.sh
51+
run: |
52+
# Ensure R (reticulate) uses the python version with the new installed packages
53+
export RETICULATE_PYTHON=$(which python)
54+
./build.sh
5155
5256
- name: Copy files for users to run tutorials
5357
run: |

0 commit comments

Comments
 (0)