bowman-lab / enspara

Modeling molecular ensembles with scalable data structures and parallel computing
https://enspara.readthedocs.io
GNU General Public License v3.0
33 stars 16 forks source link

RaggedArray in three dimensions fails to identify even array #174

Open justinrporter opened 5 years ago

justinrporter commented 5 years ago
ra.RaggedArray(
    [[[1, 0, 0],
      [1, 0, 0],
      [1, 0, 0]],
     [[1, 0, 0],
      [0, 1, 0],
      [0, 1, 0]],
     [[1, 0, 0],
      [0, 1, 0],
      [0, 1, 0]]])

produces

RaggedArray([
      [[1, 0, 0],
       [1, 0, 0],
       [1, 0, 0]], dtype=object,
      [[1, 0, 0],
       [0, 1, 0],
       [0, 1, 0]], dtype=object,
      [[1, 0, 0],
       [0, 1, 0],
       [0, 1, 0]], dtype=object])

where I expected a return type of

array([[[1, 0, 0],
        [1, 0, 0],
        [1, 0, 0]],

       [[1, 0, 0],
        [0, 1, 0],
        [0, 1, 0]],

       [[1, 0, 0],
        [0, 1, 0],
        [0, 1, 0]]])

@mizimmer90 we should talk about this behavior.