Comments (11)
Thanks for the sample data. I'll run thru and see what data types to add support for.
from hdf5.node.
Ah, these are 64 bit integers. Javascript has no primitive integer with this bit resolution. The google v8 doesn't have anything for it.
For hdf5.node I made a custom holder for 64 bit id's called hdf5.Int64. We could use this to return these attribute data types as well. It is possible to get the string representation with hdf5.Int64.toString method which javascript will use in print statements. Could also return Array's of hdf5.Int64's as well.
To write back to h5/biom files any attribute within 32 bit could be written with new hdf5.Int64(0)
I will be adding instantiation to take a string representation of a 64 bit like new hdf5.Int64("0")
Would this solution work for you?
from hdf5.node.
Could also add a hdf5.Uint64 for unsigned ones
from hdf5.node.
If the remaining attributes come wrapped in your hdf5.Int64 container in the same way the id attribute does that would be perfect. That solution would work well for me - thanks!
from hdf5.node.
Ok, I'll move forward
from hdf5.node.
I should have this working by morning; got delayed over the weekend not being near my computers
from hdf5.node.
The repository HEAD is read int64_t & uint64_t attributes as single values or arrays.
Adding writing using a string representation
from hdf5.node.
The writing of Uint64 and Int64 scalar and array attributes have been added
file.nnz=new hdf5Lib.hdf5.Int64("15");
file.unnz=new hdf5Lib.hdf5.Uint64("40");
var fv=new Array(2);
fv[0]=new hdf5Lib.hdf5.Int64("2");
fv[1]=new hdf5Lib.hdf5.Int64("1");
file["formart-version"]=fv;
var ufv=new Array(2);
ufv[0]=new hdf5Lib.hdf5.Uint64("20");
ufv[1]=new hdf5Lib.hdf5.Uint64("10");
file["uformart-version"]=ufv;
file.flush();
from hdf5.node.
file.refresh()
is working for me at e857f0eef9c8c7019935b013611a4b0b9db1df82 - thanks!
When do these changes typically make their way onto the NPM registry?
from hdf5.node.
Will do soon. I now have access to a mac talking with github to test it is working on darwin with static hdf5 native libraries #56. Hopefully over the weekend and publish to npm on Monday
from hdf5.node.
Postponed for a while but getting close now that I can build on a mac via travis-ci.org
https://travis-ci.org/HDF-NI/hdf5.node/
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
- Read dataset with 2d array stored fails on reading chunks HOT 10
- 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.