Skip to content

Commit

Permalink
Merge pull request #1683 from rstudio/minor-changes
Browse files Browse the repository at this point in the history
Minor changes
  • Loading branch information
t-kalinowski authored Oct 22, 2024
2 parents 0c2ff33 + 6c6aeab commit 19276b7
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 5 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -18,3 +18,4 @@ inst/doc
rchk
.cache
compile_commands.json
*.Dockerfile
7 changes: 2 additions & 5 deletions R/array.R
Original file line number Diff line number Diff line change
Expand Up @@ -89,10 +89,7 @@ length.numpy.ndarray <- function(x) {
#' }
#' @export
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 = order)
if (!is_py_object(x))
reshaped <- py_to_r(reshaped)
reshaped
np <- import("numpy", convert = !is_py_object(x))
np$reshape(x, as.integer(dim), order = order)
}

0 comments on commit 19276b7

Please sign in to comment.