0

我想M+1通过NDenseMatrix(DM_a下)删除行,以生成另一个 DenseMatrix(DM_b)。像这样的东西:

                               K
DM_a =   0 +-------------------+
           |                   |
           |                   |
           |                   |
         M |                   |
           |                   |
           |                   |
           |                   |
         N +-------------------+



                               K
DM_b =   0 +-------------------+
           |                   |
           |                   |
           |                   |
         M +-------------------+

用这样的切片来做到这一点是最好的(最有效的):val DM_b = DM_a(0 to M, ::)还是我应该映射padRight到的每一列DM_a

4

1 回答 1

1

矩阵切片:

  DM_a(0 until M, ::)
于 2016-05-04T21:09:52.030 回答