Skip to content

dimnames behavior different after dim is changed #34

@comicfans

Description

@comicfans
  1. ary <- array(NA,dim=c(2,3,4),dimnames=list(1:2,1:3,1:4))
  2. dim(ary) <- c(6,4)
  3. dimnames(ary)[[2]] <- 1:4

fastR reports: length of 'dimnames' [3] must match that of 'dims' [2]

after step 2
dimnames(ary) gives NULL on GNUR, but fastR gives
[[1]]
[1] "1" "2"

[[2]]
[1] "1" "2" "3"

[[3]]
[1] "1" "2" "3" "4"

seems that fastR still preserve old dimnames even array dim is changed

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions