Skip to content

Commit

Permalink
Merge pull request #1651 from rstudio/numpy-2.1-compat
Browse files Browse the repository at this point in the history
Updates for NumPy 2.1
  • Loading branch information
t-kalinowski authored Aug 22, 2024
2 parents ddab6a6 + 735ac7d commit c0fdb1c
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
2 changes: 2 additions & 0 deletions NEWS.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@

- Python background threads can now run in parallel with
the R session (#1641).

- Internal updates for NumPy 2.1 (#1651)

- Fixed error when importing a module named `config` (#1628)

Expand Down
3 changes: 1 addition & 2 deletions R/array.R
Original file line number Diff line number Diff line change
Expand Up @@ -91,9 +91,8 @@ length.numpy.ndarray <- function(x) {
array_reshape <- function(x, dim, order = c("C", "F")) {
np <- import("numpy", convert = FALSE)
order <- match.arg(order)
reshaped <- np$reshape(x, as.integer(dim), order)
reshaped <- np$reshape(x, as.integer(dim), order = order)
if (!is_py_object(x))
reshaped <- py_to_r(reshaped)
reshaped
}

0 comments on commit c0fdb1c

Please sign in to comment.