Skip to content

Array size changes following loading of numpy array #783

@pwolfram

Description

@pwolfram

The issue in a nutshell is that

(Pdb) rlzns.xParticle[rnum*Ntr:(rnum+1)*Ntr,:].shape                                                                    
(30, 1012000)                                                         
(Pdb) rlzns.xParticle[rnum*Ntr:(rnum+1)*Ntr,:].values.shape    
(29, 1012000)                                                  
(Pdb) rlzns.xParticle[rnum*Ntr:(rnum+1)*Ntr,:].data.shape                   
(30, 1012000)                                                                      
(Pdb) rlzns.xParticle[rnum*Ntr:(rnum+1)*Ntr,:].data                                  
dask.array<getitem..., shape=(30, 1012000), dtype=float64, chunksize=(23, 1012000)>  

It seems to me that for some reason when the array is loaded via values that it is no longer the same size. The dask shape appears to be correct.

I previously do a filter on time via rlzns = rlzns.isel(Time=np.where(reset > 0)[0])
and do some commands like np.reshape(rlzns.Time[rnum*Ntr:(rnum+1)*Ntr].values,(1,Ntr)),axis=1)
but it seems unlikely that this would be causing the problem.

Has anyone had an issue like this? Any ideas on what could be causing the problem would be greatly appreciated because this behavior is very strange.

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