Redimention


#1

Hello all!

I can’t undestand. I have an array

I load csv data on database in it.
How can I do matrix 522x451 with 2 dimentions with this data?


#2

Something like this:

redimension ( 
  apply ( 
    testarray,
    X, I / 522,
    Y, I % 522
   ),
   < attr : int64 > 
   [ X=0:452,1000,0, Y=0:522, 1000, 0]
)

The apply(…) operator lets you perform basic scalar operations on the input array. Don’t forget! Operators in SciDB are composable. We might not have something that goes from Array_Shape_Where_You_Are to Array_Shape_Where_You_Want_To_Be, but you can generally get there from bere using some (creative) combination of operators.