Skip to content

Read dataset with 2d array stored fails on reading chunks #103

@oguitart

Description

@oguitart

Hello,

We have several h5 files that were created in python with the h5py package. These files contain a dataset called "V", which contains a 2D array. I'm trying to read only parts of this dataset by using the following method:

var file = new hdf5.File(/data_signatures/signA1.h5", Access.ACC_RDONLY);
var data = h5lt.readDataset(file.id, "V",{start: [0], stride: [1], count: [128]});

In the above case, I'm trying to read the first 128 rows but what I get it is the whole 2d array but transformed to 1D array. The prove of that is that I do:

data.length

And the output it is the multiplication of the number of rows and the number of columns of this 2d array.
Am I doing anything wrong? Or maybe there is an issue reading this kind of data?
If I do the same thing on a dataset that contains a 1D array then it works fine and I only get the chunk of the data that I want.
Thanks,

oriol

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