Skip to content

show method for >2D arrays load the whole 2d slices (than necessary) in the middle steps #25

@Liubuntu

Description

@Liubuntu

Is it expected to return just a few rows and a few columns? (e.g., first and last 2 rows, ...)

da <- DelayedArray(array(1, dim=c(20, 5, 4)))
trace(extract_array, quote(print(str(index))), exit=quote(print(returnValue())))
## Tracing function "extract_array" in environment
## <namespace:DelayedArray>
## Warning: Tracing only in the namespace; to untrace you will need:
## untrace("extract_array", where = getNamespace("DelayedArray"))
## [1] "extract_array"
## attr(,"package")
## [1] "DelayedArray"
> da
## Tracing extract_array(x, index) on entry 
## List of 3
##  $ : int(0) 
##  $ : int(0) 
##  $ : int(0) 
## NULL
## Tracing extract_array(x@seed, index) on entry 
## List of 3
##  $ : int(0) 
##  $ : int(0) 
##  $ : int(0) 
## NULL
## Tracing extract_array(x@seed, index) on exit 
## <0 x 0 x 0 array of double>


## Tracing extract_array(x, index) on exit 
## <0 x 0 x 0 array of double>


## <20 x 5 x 4> DelayedArray object of type "double":
## Tracing extract_array(x, index) on entry 
## List of 3
##  $ : int(0) 
##  $ : int(0) 
##  $ : int(0) 
## NULL
## Tracing extract_array(x@seed, index) on entry 
## List of 3
##  $ : int(0) 
##  $ : int(0) 
##  $ : int(0) 
## NULL
## Tracing extract_array(x@seed, index) on exit 
## <0 x 0 x 0 array of double>

## ,,1
## Tracing extract_array(x, expand_Nindex_RangeNSBS(Nindex)) on entry 
## List of 3
##  $ : NULL
##  $ : NULL
##  $ : int 1
## NULL
## Tracing extract_array(x@seed, index) on entry 
## List of 3
##  $ : NULL
##  $ : NULL
##  $ : int 1
## NULL
## Tracing extract_array(x@seed, index) on exit 
## , , 1
##       [,1] [,2] [,3] [,4] [,5]
##  [1,]    1    1    1    1    1
##  [2,]    1    1    1    1    1
##  [3,]    1    1    1    1    1
##  [4,]    1    1    1    1    1
##  [5,]    1    1    1    1    1
##  [6,]    1    1    1    1    1
##  [7,]    1    1    1    1    1
##  [8,]    1    1    1    1    1
##  [9,]    1    1    1    1    1
## [10,]    1    1    1    1    1
## [11,]    1    1    1    1    1
## [12,]    1    1    1    1    1
## [13,]    1    1    1    1    1
## [14,]    1    1    1    1    1
## [15,]    1    1    1    1    1
## [16,]    1    1    1    1    1
## [17,]    1    1    1    1    1
## [18,]    1    1    1    1    1
## [19,]    1    1    1    1    1
## [20,]    1    1    1    1    1

## Tracing extract_array(x, expand_Nindex_RangeNSBS(Nindex)) on exit 
## , , 1

##       [,1] [,2] [,3] [,4] [,5]
##  [1,]    1    1    1    1    1
##  [2,]    1    1    1    1    1
##  [3,]    1    1    1    1    1
##  [4,]    1    1    1    1    1
##  [5,]    1    1    1    1    1
##  [6,]    1    1    1    1    1
##  [7,]    1    1    1    1    1
##  [8,]    1    1    1    1    1
##  [9,]    1    1    1    1    1
## [10,]    1    1    1    1    1
## [11,]    1    1    1    1    1
## [12,]    1    1    1    1    1
## [13,]    1    1    1    1    1
## [14,]    1    1    1    1    1
## [15,]    1    1    1    1    1
## [16,]    1    1    1    1    1
## [17,]    1    1    1    1    1
## [18,]    1    1    1    1    1
## [19,]    1    1    1    1    1
## [20,]    1    1    1    1    1

## Tracing extract_array(x, expand_Nindex_RangeNSBS(Nindex)) on entry 
## List of 2
##  $ : int [1:4] 1 2 19 20
##  $ : NULL
## NULL
## Tracing extract_array(x, expand_Nindex_RangeNSBS(Nindex)) on exit 
##      [,1] [,2] [,3] [,4] [,5]
## [1,]    1    1    1    1    1
## [2,]    1    1    1    1    1
## [3,]    1    1    1    1    1
## [4,]    1    1    1    1    1
##       [,1] [,2] [,3] [,4] [,5]
##  [1,]    1    1    1    1    1
##  [2,]    1    1    1    1    1
##   ...    .    .    .    .    .
## [19,]    1    1    1    1    1
## [20,]    1    1    1    1    1

## ...

## ,,4
## Tracing extract_array(x, expand_Nindex_RangeNSBS(Nindex)) on entry 
## List of 3
##  $ : NULL
##  $ : NULL
##  $ : int 4
## NULL
## Tracing extract_array(x@seed, index) on entry 
## List of 3
##  $ : NULL
##  $ : NULL
##  $ : int 4
## NULL
## Tracing extract_array(x@seed, index) on exit 
## , , 1

##       [,1] [,2] [,3] [,4] [,5]
##  [1,]    1    1    1    1    1
##  [2,]    1    1    1    1    1
##  [3,]    1    1    1    1    1
##  [4,]    1    1    1    1    1
##  [5,]    1    1    1    1    1
##  [6,]    1    1    1    1    1
##  [7,]    1    1    1    1    1
##  [8,]    1    1    1    1    1
##  [9,]    1    1    1    1    1
## [10,]    1    1    1    1    1
## [11,]    1    1    1    1    1
## [12,]    1    1    1    1    1
## [13,]    1    1    1    1    1
## [14,]    1    1    1    1    1
## [15,]    1    1    1    1    1
## [16,]    1    1    1    1    1
## [17,]    1    1    1    1    1
## [18,]    1    1    1    1    1
## [19,]    1    1    1    1    1
## [20,]    1    1    1    1    1

## Tracing extract_array(x, expand_Nindex_RangeNSBS(Nindex)) on exit 
## , , 1

##       [,1] [,2] [,3] [,4] [,5]
##  [1,]    1    1    1    1    1
##  [2,]    1    1    1    1    1
##  [3,]    1    1    1    1    1
##  [4,]    1    1    1    1    1
##  [5,]    1    1    1    1    1
##  [6,]    1    1    1    1    1
##  [7,]    1    1    1    1    1
##  [8,]    1    1    1    1    1
##  [9,]    1    1    1    1    1
## [10,]    1    1    1    1    1
## [11,]    1    1    1    1    1
## [12,]    1    1    1    1    1
## [13,]    1    1    1    1    1
## [14,]    1    1    1    1    1
## [15,]    1    1    1    1    1
## [16,]    1    1    1    1    1
## [17,]    1    1    1    1    1
## [18,]    1    1    1    1    1
## [19,]    1    1    1    1    1
## [20,]    1    1    1    1    1

## Tracing extract_array(x, expand_Nindex_RangeNSBS(Nindex)) on entry 
## List of 2
##  $ : int [1:4] 1 2 19 20
##  $ : NULL
## NULL
## Tracing extract_array(x, expand_Nindex_RangeNSBS(Nindex)) on exit 
##      [,1] [,2] [,3] [,4] [,5]
## [1,]    1    1    1    1    1
## [2,]    1    1    1    1    1
## [3,]    1    1    1    1    1
## [4,]    1    1    1    1    1
##       [,1] [,2] [,3] [,4] [,5]
##  [1,]    1    1    1    1    1
##  [2,]    1    1    1    1    1
##   ...    .    .    .    .    .
## [19,]    1    1    1    1    1
## [20,]    1    1    1    1    1

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