Skip to content

Commit

Permalink
update array_reshape() for numpy 2.1
Browse files Browse the repository at this point in the history
  • Loading branch information
t-kalinowski committed Aug 22, 2024
1 parent ddab6a6 commit 9aca237
Showing 1 changed file with 1 addition and 2 deletions.
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 9aca237

Please sign in to comment.