Comments (10)
probably need to set the start, stride and count to two rank hyperslab;
like http://hdf-ni.github.io/hdf5.node/tut/subset_tutorial.html
var data = h5lt.readDataset(file.id, "V",{start: [0,0], stride: [1,1], count: [1,128]});
start, stride and count are arrays the size of rank for choosing the subset/hyperslab
from hdf5.node.
or reading your description further to be by column of row values
var yCount=0;
var data = h5lt.readDataset(file.id, "V",{start: [0,yCount], stride: [1,1], count: [128, 1]});
where you vary yCount to get each column(all the rows values at that column)
from hdf5.node.
Hi,
Thank you for the answer. But the options that you offer don't work. They all read the whole 2d array. Attached one of these files, if you want to test it.
Regards,
oriol
from hdf5.node.
Ah ok, I'll try
from hdf5.node.
h5lt.readDatasetAsBuffer works while h5lt.readDataset doesn't. In later node js versions the javascript object returned by h5lt.readDatasetAsBuffer is ArrayBufferView with constructor name Buffer and has the functionality of https://nodejs.org/docs/latest/api/buffer.html. I'll work hyperslabs into h5lt.readDataset to catch it up to the documentation ad return a Float32Array. Until I commit changes the following should work for you to get to the hyperslab
try
{
var file = new hdf5.File("/home/roger/Downloads/signD3.h5", Access.ACC_RDONLY);
var data = h5lt.readDatasetAsBuffer(file.id, "V",{start: [0,0], stride: [1,1], count: [1,128]});
console.log("length"+data.length);
file.close();
}
catch(err) {
console.dir(err.message);
}
from hdf5.node.
I've committed so h5lt.readDataset should work as well and return a Float32Array for your case.
travis build passed. Yet I do want to add more tests
from hdf5.node.
Hi,
How can I get the latest version to test it? I used npm to install hdf5 package.
Thanks,
oriol
from hdf5.node.
npm install HDF-NI/hdf5.node
should pull from the github master branch
I got some other things going on before another publish
from hdf5.node.
Hi,
I tested it and it looks good.
Please let me know when it will be available as a new release.
Thanks,
oriol
from hdf5.node.
I will. I think in about two week ends
from hdf5.node.
Related Issues (20)
- Support for Single Writer Multiple Reader (SWMR)? HOT 7
- Getting dataset attribute (getDatasetAttribute) on a 32 bit floating point in NODE/javascript returns a totally different value HOT 6
- hdf5_home_win does not get set HOT 2
- issues reading 4 dimensional dataset HOT 2
- SyntaxError: unsupported data type on compound datasets HOT 5
- Node 12? HOT 32
- Delete attribute HOT 6
- Tutorial: "Writing & Reading subsets" is not working. HOT 3
- Segfault reading HOT 4
- issue with appending to tables on windows 10
- Error: The specified procedure could not be found. (process.dlopen) HOT 1
- `hdf5.File is not a constructor` when bundled with webpack HOT 2
- cannot install HOT 3
- Win10+Node v14.15.5 Compilation errors HOT 6
- Getting data from Buffer
- Compile Error HOT 12
- install with yarn? HOT 2
- windows-build-tools / vs2017? HOT 37
- Error with handling variable length data (H5T_VLEN) HOT 6
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from hdf5.node.