Giter VIP home page Giter VIP logo

hdf5.node's People

Contributors

arabm avatar dependabot[bot] avatar disconnect3d avatar gpichot avatar iiseymour avatar ingvord avatar inigohu avatar nini1988 avatar pietervanleeuwen avatar rimmartin avatar ryancole avatar shumway avatar yhan2017 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

hdf5.node's Issues

Error 1083: can not open include file: 'hdf5.h': No Such file or directory

I am using windows 10 opencv 3.0.0 Vs 2013, when i debug the program it gives me the following errors:
Error 1083: can not open include file: 'hdf5.h': No Such file or directory
IntelliSense: can not open source file "hdf5.h"

even i link libraries etc by a good way. "hdf5.h" exist in C:\opencv-3.0.0\opencv\build\include\opencv2\flann but still it is giving me issue. can anybody help me?

Thanks

Does not build on Node.js 4.2.0 (LTS) (OS X)

Node.js has just cut its first LTS release, version 4.2.0. I'd dive in to try to offer up a PR, but I've never worked with Node's native bindings stuff so I really don't have much to offer. Here's some info about my environment:

  • OS X 10.10.5
  • Node.js 4.2.0
  • npm 3.3.8
  • hdf5 1.8.15
  • gcc 4.9

Note that this works fine when I switch back to Node 0.12.7. I haven't tried on any Linux variants yet, nor Windows.

From what I can tell, it looks like the new version of V8 is throwing a wrench into the works? Here's what appears to be the relevant bits of the build (please let me know if more info would be helpful, I'll be glad to provide as much as I can):

Thread model: posix
gcc version 4.9.3 (Homebrew gcc49 4.9.3) 
COLLECT_GCC_OPTIONS='-D' 'NODE_GYP_MODULE_NAME=h5im' '-D' '_DARWIN_USE_64_BIT_INODE=1' '-D' '_LARGEFILE_SOURCE' '-D' '_FILE_OFFSET_BITS=64' '-D' 'BUILDING_NODE_EXTENSION' '-I' '/Users/username/.node-gyp/4.2.0/include/node' '-I' '/Users/username/.node-gyp/4.2.0/src' '-I' '/Users/username/.node-gyp/4.2.0/deps/uv/include' '-I' '/Users/username/.node-gyp/4.2.0/deps/v8/include' '-I' '/usr/local/Cellar/hdf5/1.8.15/include' '-Os' '-gdwarf-2' '-mmacosx-version-min=10.5' '-m64' '-Wall' '-Wendif-labels' '-Wextra' '-Wno-unused-parameter' '-std=gnu++11' '-fno-rtti' '-fno-threadsafe-statics' '-fPIC' '-O4' '-std=c++11' '-fexceptions' '-v' '-MMD' '-MF' './Release/.deps/Release/obj.target/h5im/src/h5im.o.d.raw' '-c' '-o' 'Release/obj.target/h5im/src/h5im.o' '-mtune=core2'
 /usr/local/Cellar/gcc49/4.9.3/libexec/gcc/x86_64-apple-darwin14.4.0/4.9.3/cc1plus -quiet -v -I /Users/username/.node-gyp/4.2.0/include/node -I /Users/username/.node-gyp/4.2.0/src -I /Users/username/.node-gyp/4.2.0/deps/uv/include -I /Users/username/.node-gyp/4.2.0/deps/v8/include -I /usr/local/Cellar/hdf5/1.8.15/include -MMD Release/obj.target/h5im/src/h5im.d -MF ./Release/.deps/Release/obj.target/h5im/src/h5im.o.d.raw -MQ Release/obj.target/h5im/src/h5im.o -D__DYNAMIC__ -D NODE_GYP_MODULE_NAME=h5im -D _DARWIN_USE_64_BIT_INODE=1 -D _LARGEFILE_SOURCE -D _FILE_OFFSET_BITS=64 -D BUILDING_NODE_EXTENSION ../src/h5im.cc -fPIC -quiet -dumpbase h5im.cc -mmacosx-version-min=10.5 -m64 -mtune=core2 -auxbase-strip Release/obj.target/h5im/src/h5im.o -gdwarf-2 -Os -O4 -Wall -Wendif-labels -Wextra -Wno-unused-parameter -std=gnu++11 -std=c++11 -version -fno-rtti -fno-threadsafe-statics -fPIC -fexceptions -o /var/folders/gm/prk8pp4n6b3b4p82cpmdfssdykv292/T//ccY4bnzL.s
GNU C++ (Homebrew gcc49 4.9.3) version 4.9.3 (x86_64-apple-darwin14.4.0)
    compiled by GNU C version 4.9.3, GMP version 4.3.2, MPFR version 2.4.2, MPC version 0.8.1
GGC heuristics: --param ggc-min-expand=100 --param ggc-min-heapsize=131072
ignoring nonexistent directory "/usr/local/Cellar/gcc49/4.9.3/lib/gcc/4.9/gcc/x86_64-apple-darwin14.4.0/4.9.3/../../../../../../x86_64-apple-darwin14.4.0/include"
ignoring nonexistent directory "/Users/username/.node-gyp/4.2.0/src"
ignoring nonexistent directory "/Users/username/.node-gyp/4.2.0/deps/uv/include"
ignoring nonexistent directory "/Users/username/.node-gyp/4.2.0/deps/v8/include"
#include "..." search starts here:
#include <...> search starts here:
 /Users/username/.node-gyp/4.2.0/include/node
 /usr/local/Cellar/hdf5/1.8.15/include
 /usr/local/Cellar/gcc49/4.9.3/lib/gcc/4.9/gcc/x86_64-apple-darwin14.4.0/4.9.3/../../../../../../include/c++/4.9.3
 /usr/local/Cellar/gcc49/4.9.3/lib/gcc/4.9/gcc/x86_64-apple-darwin14.4.0/4.9.3/../../../../../../include/c++/4.9.3/x86_64-apple-darwin14.4.0
 /usr/local/Cellar/gcc49/4.9.3/lib/gcc/4.9/gcc/x86_64-apple-darwin14.4.0/4.9.3/../../../../../../include/c++/4.9.3/backward
 /usr/local/Cellar/gcc49/4.9.3/lib/gcc/4.9/gcc/x86_64-apple-darwin14.4.0/4.9.3/include
 /usr/local/include
 /usr/local/Cellar/gcc49/4.9.3/include
 /usr/local/Cellar/gcc49/4.9.3/lib/gcc/4.9/gcc/x86_64-apple-darwin14.4.0/4.9.3/include-fixed
 /usr/include
 /System/Library/Frameworks
 /Library/Frameworks
End of search list.
GNU C++ (Homebrew gcc49 4.9.3) version 4.9.3 (x86_64-apple-darwin14.4.0)
    compiled by GNU C version 4.9.3, GMP version 4.3.2, MPFR version 2.4.2, MPC version 0.8.1
GGC heuristics: --param ggc-min-expand=100 --param ggc-min-heapsize=131072
Compiler executable checksum: 588f768c4156eb0b3065f0148fd605f3
In file included from ../src/h5im.cc:4:0:
../src/h5_im.hpp: In static member function 'static void NodeHDF5::H5im::read_image(const v8::FunctionCallbackInfo<v8::Value>&)':
../src/h5_im.hpp:104:132: error: call of overloaded 'New(v8::Isolate*, const char*, hsize_t)' is ambiguous
     v8::Local<v8::Object> buffer=node::Buffer::New(v8::Isolate::GetCurrent(), (const char*)contentBuffer.get(), planes*width*height);
                                                                                                                                    ^
../src/h5_im.hpp:104:132: note: candidates are:
In file included from ../src/h5_im.hpp:5:0,
                 from ../src/h5im.cc:4:
/Users/username/.node-gyp/4.2.0/include/node/node_buffer.h:31:40: note: v8::MaybeLocal<v8::Object> node::Buffer::New(v8::Isolate*, v8::Local<v8::String>, node::encoding) <near match>
 NODE_EXTERN v8::MaybeLocal<v8::Object> New(v8::Isolate* isolate,
                                        ^
/Users/username/.node-gyp/4.2.0/include/node/node_buffer.h:31:40: note:   no known conversion for argument 3 from 'hsize_t {aka long long unsigned int}' to 'node::encoding'
/Users/username/.node-gyp/4.2.0/include/node/node_buffer.h:43:40: note: v8::MaybeLocal<v8::Object> node::Buffer::New(v8::Isolate*, char*, size_t) <near match>
 NODE_EXTERN v8::MaybeLocal<v8::Object> New(v8::Isolate* isolate,
                                        ^
/Users/username/.node-gyp/4.2.0/include/node/node_buffer.h:43:40: note:   no known conversion for argument 2 from 'const char*' to 'char*'
In file included from ../src/h5im.cc:4:0:
../src/h5_im.hpp: In static member function 'static void NodeHDF5::H5im::make_palette(const v8::FunctionCallbackInfo<v8::Value>&)':
../src/h5_im.hpp:128:53: warning: narrowing conversion of 'rankValue.v8::Local<T>::operator-><v8::Value>()->v8::Value::ToInt32().v8::Local<T>::operator-><v8::Int32>()->v8::Int32::Value()' from 'int32_t {aka int}' to 'hsize_t {aka long long unsigned int}' inside { } [-Wnarrowing]
     hsize_t pal_dims[1]{rankValue->ToInt32()->Value()};
                                                     ^
../src/h5_im.hpp:129:12: warning: unused variable 'err' [-Wunused-variable]
     herr_t err=H5IMmake_palette ( args[0]->ToInt32()->Value(), *dset_name, pal_dims, (const unsigned char *)buffer->Buffer()->Externalize().Data());
            ^
make: *** [Release/obj.target/h5im/src/h5im.o] Error 1

basic file creation / dataset issues

i was not able to create a new hdf5 file (osx 10.10.3, node 0.12.0, compiled with gcc-4.9). so i used your example code in http://rycole.com/hdf5.node/tut/dataset-tutorial.html

i am getting the same errors as with my own previous tries. i am not sure if this due to my limited knowledge of hdf5 but i'll now have to read up on this anyway. maybe the output is really an issue and of interest to you:

/usr/local/bin/node index.js
'hdf5 exports'
flags 2
HDF5-DIAG: Error detected in HDF5 (1.8.14) thread 0:
  #000: H5Pocpl.c line 1303 in H5Pset_deflate(): can't find object for ID
    major: Object atom
    minor: Unable to find atom information (already closed?)
  #001: H5Pint.c line 3381 in H5P_object_verify(): property list is not a member of the class
    major: Property lists
    minor: Unable to register new atom
HDF5-DIAG: Error detected in HDF5 (1.8.14) thread 0:
  #000: H5D.c line 165 in H5Dcreate2(): not a location ID
    major: Invalid arguments to routine
    minor: Inappropriate type
  #001: H5Gloc.c line 253 in H5G_loc(): invalid object ID
    major: Invalid arguments to routine
    minor: Bad value
id 16777216
/Users/anton/WebstormProjects/hdf5-test/index.js:15
h5lt.makeDataset(group.id, 'Refractive Index', buffer);
     ^
SyntaxError: failed to make dataset
    at SyntaxError (native)
    at Object.<anonymous> (/Users/anton/WebstormProjects/hdf5-test/index.js:15:6)
    at Module._compile (module.js:460:26)
    at Object.Module._extensions..js (module.js:478:10)
    at Module.load (module.js:355:32)
    at Function.Module._load (module.js:310:12)
    at Function.Module.runMain (module.js:501:10)
    at startup (node.js:129:16)
    at node.js:814:3

Process finished with exit code 1

Documentation

I spent about an hour evaluating hdf5.node, and didn't make much progress. There some misdirection in the README.md and the link to the api appears to be out of date. Looking at the recent commit history and test suites is helpful.

I would suggest two concurrent steps to improve the documentation:

  1. Update the README.md to be similar in style and quality to popular node projects. The README.md on express looks like a good model. Having README sections Installation, Features, Philosophy, and Docs & Community would be helpful for users and contributors. It's important to say up front what hdf5.node does and does not do.
  2. Discussion forum on Gitter or Google Groups. Searchable discussion forums outside of issues could attract new developers, help focus the scope and goals, and nucleate new ideas. I've used Slack and Google Groups on other projects, but Gitter might be the best match for this project.

If other developers think this is a good idea. I can jump in and do this. I (or someone else) should probably set up the discussion group first, since I have some questions about the existing README.md file. I also need to make sure I understand the philosophy and vision behind this project. I don't want to add any additional confusion about the scope or goals.

Linking hdf5.node to static hdf5 C library

I'm using hdf5.node as part of an electron app, and I'd like to link it to a static version of the hdf5 C library so that a user will not need to install hdf5 separately to use my app.

On my local machine, a mac, revising hdf5.node's binding.gyp to link to somefile.a instead of somefile.dylib and then rebuilding hdf5.node with electron-rebuild successfully produces a statically linked version of the library that can be packed with an electron app and run on a system that does not have the hdf5 C library installed.

However, not all features of the rebuilt hdf5.node behave in the expected way. I am able to load a hdf5 formatted file, and view some of it's contents, for example, the file's child groups. But, when attempting to read datasets, an error is produced. Specifically, the error is:
Uncaught SyntaxError: failed to find dataset rank

I've read through your response to issue #22, so I realize that this might not be a feature you plan to address or support in the near term. If that is the case, would you be willing to point me towards the areas that might need to be altered to successfully link to the static version of hdf5 with all the features intact?

Thanks!
binding.gyp.zip

Cannot write string dataset w/ many points

This works:

var dataset = new Array(10000);
h5lt.makeDataset(file.id, '/dataset', dataset);

This doesn't:

var dataset = new Array(100000);
h5lt.makeDataset(file.id, '/dataset', dataset);

Stacktrace:

HDF5-DIAG: Error detected in HDF5 (1.8.17) thread 0:
  #000: H5Dio.c line 271 in H5Dwrite(): can't prepare for writing data
    major: Dataset
    minor: Write failed
  #001: H5Dio.c line 352 in H5D__pre_write(): can't write data
    major: Dataset
    minor: Write failed
  #002: H5Dio.c line 769 in H5D__write(): unable to initialize storage
    major: Dataset
    minor: Unable to initialize object
  #003: H5Dint.c line 1836 in H5D__alloc_storage(): unable to initialize dataset with fill value
    major: Dataset
    minor: Unable to initialize object
  #004: H5Dint.c line 1898 in H5D__init_storage(): unable to allocate all chunks of dataset
    major: Dataset
    minor: Unable to initialize object
  #005: H5Dcontig.c line 315 in H5D__contig_fill(): unable to write fill value to dataset
    major: Dataset
    minor: Unable to initialize object
  #006: H5Dcontig.c line 618 in H5D__contig_write_one(): vector write failed
    major: Low-level I/O
    minor: Write failed
  #007: H5Dcontig.c line 1206 in H5D__contig_writevv(): can't perform vectorized sieve buffer write
    major: Dataset
    minor: Can't operate on object
  #008: H5VM.c line 1457 in H5VM_opvv(): can't perform operation
    major: Internal error (too specific to document in detail)
    minor: Can't operate on object
  #009: H5Dcontig.c line 952 in H5D__contig_writevv_sieve_cb(): block write failed
    major: Dataset
    minor: Write failed
  #010: H5Fio.c line 171 in H5F_block_write(): write through metadata accumulator failed
    major: Low-level I/O
    minor: Write failed
  #011: H5Faccum.c line 825 in H5F__accum_write(): file write failed
    major: Low-level I/O
    minor: Write failed
  #012: H5FDint.c line 260 in H5FD_write(): driver write request failed
    major: Virtual File Layer
    minor: Write failed
  #013: H5FDsec2.c line 802 in H5FD_sec2_write(): file write failed: time = Sat Oct  8 00:58:40 2016
, filename = '/home/jacopo/data-backend/products/gistemp/gistemp.h5', file descriptor = 12, errno = 14, error message = 'Bad address', buf = 0x55c61fcac378, total write size = 422496, bytes this sub-write = 422496, bytes actually written = 18446744073709551615, offset = 1179648
    major: Low-level I/O
    minor: Write failed
Unhandled rejection SyntaxError: failed to make var len dataset
    at SyntaxError (native)
    at createHDF5Product (/home/jacopo/data-backend/scripts/gistemp-process.js:111:8)
    at tryCatcher (/home/jacopo/data-backend/node_modules/bluebird/js/release/util.js:16:23)

I've tried to experiment a bit to no avail. Any ideas? It almost looks like it's running out of memory, even though there's plenty of disk space.

Error on require in Debian

PRETTY_NAME="Debian GNU/Linux 8 (jessie)"
NAME="Debian GNU/Linux"
VERSION_ID="8"
VERSION="8 (jessie)"
ID=debian

Node v4.7.0
NPM v2.15.11
HDF5 v1.8.18
gcc (Debian 4.9.2-10) 4.9.2

I installed hdf5.node successfully using npm install hdf5 --fallback-to-build --hdf5_home_linux=/usr/local/hdf5 within a Node project. However, I get the following error when trying to require:

> var hdf5 = require('hdf5');
Error: libhdf5.so.100: cannot open shared object file: No such file or directory
    at Error (native)
    at Object.Module._extensions..node (module.js:434:18)
    at Module.load (module.js:343:32)
    at Function.Module._load (module.js:300:12)
    at Module.require (module.js:353:17)
    at require (internal/module.js:12:17)
    at Object.<anonymous> (/root/test-app/node_modules/hdf5/index.js:4:25)
    at Module._compile (module.js:409:26)
    at Object.Module._extensions..js (module.js:416:10)
    at Module.load (module.js:343:32)

refurbished for v0.11.13-pre & 3.25.30

Hi,

I believe I got this project upgraded for the changes in v8 and nodejs

Although the unit tests fails without an hdf5 file. I'll be making additions to create an hdf5 and then read it back for tests.

I can provide a patch if interested

Note: node::Buffer is Int8Array

Since around nodejs v4.2.x node::Buffer is a wrap of Int8Array. This introduced the upper limit of max size regardless of rank and dimensions to unsigned int.

Docs update? Linux compiler should support C++11 ==> C++14

Hi, just got a bit confused by the installation docs until I looked at what binding.gyp was doing, as it's a bit contradictory. They say

The code requires a gcc compiler supporting C++11 for linux.

I had pre-C++14 g++-4.8, that came with my distro (Ub 14.04-based). I've now updated to the current [C++14-supporting] g++-4.9 after the npm install failed with an error telling me about

  g++: error: unrecognized command line option ‘-std=c++14’

If I've got the wrong idea then apologies, but I might have cottoned on a bit sooner had the docs said "you need a compiler supporting C++14". Is it a typo // needs updating to reflect changes in the package?

Again, I might be wrong, but from looking at this are Macs also using C++14 compilers (so should the same edit be made to the OS X installation instructions)?

bindings.gyp line endings

Trying to install on linux with node v0.12.7 and npm v2.11.3
Ran 'npm install [email protected] --fallback-to-build'
Fails on line 1 of binding.gyp. Based on the local clone, it seems binding.gyp has eol=crlf instead of text=auto. Changing the local binding.gyp with dos2unix lets it compile, but there is not a version 0.0.20 branch or tag to use.

js bindings to native code

i am not sure if i am missing something here but how exactly are the bindings to js supposed to work?

update: i completely messed up the repo in the process, sorry for bothering.

Reusing a typed array for writing a dataset causes a fatal error

Considering this code snippet:

const hdf5 = require('hdf5').hdf5;
const h5lt = require('hdf5').h5lt;
const Access = require('hdf5/lib/globals').Access;
const H5Type = require('hdf5/lib/globals').H5Type;

var file = new hdf5.File('t.h5', Access.ACC_CREAT);
var data = new Float32Array(10);
data.type = H5Type.H5T_NATIVE_FLOAT;
data.rank = 3;
data.sections = 1;
// create dataset with data
h5lt.makeDataset(file.id, 'data', data);

data[3] = 5;

// reuse typed array to overwrite content
h5lt.writeDataset(file.id, 'data', data);

file.close();

This program fails with the following message (master branch, Node.js v5.8.0):

FATAL ERROR: v8::ArrayBuffer::Externalize ArrayBuffer already externalized
Aborted (core dumped)

Discovering groups and datasets in existing HDF5

Is there a way to discover the group and dataset IDs within an existing file? I don't see anything in the documentation and inspecting an hdf5.File object doesn't show anything that might be useful in figuring out the id to be used in a call to file.openGroup().

Reorganizing into coordinated projects under HDF-NI

With different groups developing their own application it makes sense the core hdf5.node have only the native interface independently and reference and other layers separated into dependent projects.

This may help forks be pull compatible.

The reference editor/viewer in it's own project.

I'm experimenting with a web socket API layer based on ws and bson.

There could be a layer specializing in image api to browsers as well

Any ideas?

getting dataset's datatype

Hi @Y--

Do we have redundant methods in getting this info? the fIle or groups have a method called getDataType(name) that takes the name of a child and returns the type mapped to H5Type's http://hdf-ni.github.io/hdf5.node/ref/globals.html#h5type for the javascript side.

http://hdf-ni.github.io/hdf5.node/ref/groups.html

and h5lt.readDatasetDatatype(id, name) where id is file or group id. that returns a raw type. Is the raw form working and what is being utilities? Or is it actually an address? The native side types aren't real enumerations if I'm remembering right

What do you think?

`npm test` and `mocha test` fail

Problem

$ mocha test
module.js:328
    throw err;
    ^

Error: Cannot find module './build/Release/hdf5'

Issues

  • I am probably doing something wrong, but I can't find documentation.
  • I know hdf5 is installed correctly because I can use it directly from the node REPL.
  • If I only sudo npm install -g then npm test gives an error about misiing co-mocha, which is in the package.json devDependencies. Doing npm install local doesn't work, but it does install the co-mocha dependency.
  • The testing strategy and test status are not documented anywhere that I could find. I'd like to add that to the documentation pages and refer to it on the getting started / install landing page.
  • Do we want to add continuous integration on https://travis-ci.org and a test status badge on the readme.md?

I can work on this, but some feedback from current developers on the state of the test suite would be helpful. Any suggestions or requests regarding testing are welcome.

Cannot call readDataset w/ hyperslab

Hello.

I'm evaluating this module - which is fantastic, by the way - and I noticed that I can read hyperslabs using h5lt.readDatasetAsBuffer() but I can only read entire datasets when using h5lt.readDataset().

The call h5lt.readDataset(file.id, '/xco2', {start: [x], stride: [y], count: [z]}) throws the following error:

SyntaxError: expected id, name
    at SyntaxError (native)
    at /Users/jacopo/Code/iseechange-v2/indexer/index.js:72:18
    at Array.forEach (native)
    at Object.<anonymous> (/Users/jacopo/Code/iseechange-v2/indexer/index.js:70:17)
    at Module._compile (module.js:409:26)
    at Object.Module._extensions..js (module.js:416:10)
    at Module.load (module.js:343:32)
    at Function.Module._load (module.js:300:12)
    at Function.Module.runMain (module.js:441:10)
    at startup (node.js:139:18)

However, the same options argument with h5lt.readDatasetAsBuffer() seems to work fine, even though the resulting Buffer has the type attribute set to 0.

The documentation details the following:

h5lt.readDataset(id, name [, options])
   id → the group or file id location. Every group and the file return with an id attribute
   name → a string naming the dataset.
   [options] → start, stride and count.
   return ← A typed array or string
h5lt.readDatasetAsBuffer(id, name [, options])
    id → the group or file id location. Every group and the file return with an id attribute
    name → a string naming the dataset.
    [options] → start, stride and count.
    return ← A node::Buffer with the data and attributes for its shape and type.

Two questions:

  1. Is the lack of support for hyperslabs in readDataset() a bug or is the documentation outdated?
  2. When using readDatasetAsBuffer(), how do I figure out which TypedArray class I should use to convert the buffer into something I can work with?

Many thanks and cheers again for the nice work. I'd be happy to contribute with some additional documentation as I get around to play with this.

segfault when reading string arrays

I am trying to read an HDF5 file with some datasets consisting of rank-1 string arrays, and this causes a segmentation fault.

The h5lt.readDataset API documentation says it returns a typed array or a string, so it seems it is not designed to handle an array of strings.

To give an idea of what I was hoping would work, I forked the project and created a branch which does what I want, though I believe it breaks your API because it may return an Array in the case of a string array dataset, rather than a typed array. It also does not handle string arrays of higher than rank 1 at the moment, though I believe it still does handle the case of a scalar string dataset.

https://github.com/scottwittenburg/hdf5.node/tree/fix-segfault-on-string-array

If you are interested in discussing this issue, I am willing to be "shepherded" through the process of getting this into the main project by creating a PR and iterating with you until you feel it is ready.

Reading hyperslabs fails

Example:
Prerequisites: Download hdf5 file from http://pklab.med.harvard.edu/velocyto/hgForebrainGlut/hgForebrainGlut.loom

var hdf5 = require('hdf5').hdf5;
var h5lt = require('hdf5').h5lt;
var Access = require('hdf5/lib/globals').Access;
var file = new hdf5.File('hgForebrainGlut.loom', Access.ACC_RDONLY);
var dim = file.getDatasetDimensions('matrix');
for (var i = 0; i < dim[0]; i++) {
  var buffer = h5lt.readDatasetAsBuffer(file.id, 'matrix', {
    start: [i, 0],
    stride: [1, 1],
    count: [1, dim[1]]
  });
}

Error:
HDF5-DIAG: Error detected in HDF5 (1.8.20) thread 0:
#000: H5S.c line 1382 in H5Screate_simple(): maxdims is smaller than dims
major: Invalid arguments to routine
minor: Bad value
HDF5-DIAG: Error detected in HDF5 (1.8.20) thread 0:
#000: H5Dio.c line 147 in H5Dread(): not a data space
major: Invalid arguments to routine
minor: Inappropriate type
HDF5-DIAG: Error detected in HDF5 (1.8.20) thread 0:
#000: H5S.c line 390 in H5Sclose(): not a dataspace
major: Invalid arguments to routine
minor: Inappropriate type
SyntaxError: failed to read dataset

"The specified module could not be found" Windows 10 - x64

Hello,

First, thanks for your work.

After compiling successfully I tried just this line of code:

var hdf5 = require('hdf5').hdf5;

And I get the following error

module.js:568
return process.dlopen(module, path._makeLong(filename));
^

Error: The specified module could not be found.
?\D:\Users\Broker\Proyectos\tfg\hdf5\node_modules\hdf5\build\Release\hdf5.node
at Error (native)
at Object.Module._extensions..node (module.js:568:18)
at Module.load (module.js:458:32)
at tryModuleLoad (module.js:417:12)
at Function.Module._load (module.js:409:3)
at Module.require (module.js:468:17)
at require (internal/module.js:20:19)
at Object. (D:\Users\Broker\Proyectos\tfg\hdf5\node_modules\hdf5\index.js:4:25)
at Module._compile (module.js:541:32)
at Object.Module._extensions..js (module.js:550:10)

I double check that the file hdf5.node exists on that path.

May you help me, please?

Cannot build on windows

Hello,

I'm having an issue building on windows 7. Versions are:
npm: 3.9.5
node: 6.2.2

I have installed node-gyp globally, and installed hdf5 1.8.15-patch1 in the default directory. I also have vs2013 installed.

The first error that occurs is:
c:\users\jabba\icpdashboard\node_modules\hdf5\src\file.h(11): fatal error C1083: Cannot open include file: 'hdf5.h': No such file or directory (..\src\h5_file.cc)[C:\Users\jabba\icpdashboard\node_modules\hdf5\build\hdf5.vcxproj]

I'm probably missing something but I've been trying a bunch of stuff and nothing seems to work. Can someone help me, please?

Following is the whole output.

C:\Users\jabba\icpdashboard>npm install hdf5 --fallback-to-build

> [email protected] install C:\Users\jabba\icpdashboard\node_modules\hdf5
> node-pre-gyp install --fallback-to-build

Building the projects in this solution one at a time. To enable parallel build, please add the "/m" switch.
  hdf5.cc
  h5_file.cc
  h5_group.cc
  win_delay_load_hook.cc
c:\program files\microsoft sdks\windows\v7.1\include\sal_supp.h(57): warning C4005: '__useHeader' : macro redefinition (C:\Users\jabba\icpdashboard\node_module
s\node-gyp\src\win_delay_load_hook.cc) [C:\Users\jabba\icpdashboard\node_modules\hdf5\build\hdf5.vcxproj]
          C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC\include\sal.h(2886) : see previous definition of '__useHeader'
c:\program files\microsoft sdks\windows\v7.1\include\specstrings_supp.h(77): warning C4005: '__on_failure' : macro redefinition (C:\Users\jabba\icpdashboard\no
de_modules\node-gyp\src\win_delay_load_hook.cc) [C:\Users\jabba\icpdashboard\node_modules\hdf5\build\hdf5.vcxproj]
          C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC\include\sal.h(2896) : see previous definition of '__on_failure'
c:\program files\microsoft sdks\windows\v7.1\include\sal_supp.h(57): warning C4005: '__useHeader' : macro redefinition (..\src\hdf5.cc) [C:\Users\jabba\icpdash
board\node_modules\hdf5\build\hdf5.vcxproj]
          C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC\include\sal.h(2886) : see previous definition of '__useHeader'
c:\program files\microsoft sdks\windows\v7.1\include\specstrings_supp.h(77): warning C4005: '__on_failure' : macro redefinition (..\src\hdf5.cc) [C:\Users\jabb
a\icpdashboard\node_modules\hdf5\build\hdf5.vcxproj]
          C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC\include\sal.h(2896) : see previous definition of '__on_failure'
c:\program files\microsoft sdks\windows\v7.1\include\sal_supp.h(57): warning C4005: '__useHeader' : macro redefinition (..\src\h5_file.cc) [C:\Users\jabba\icpd
ashboard\node_modules\hdf5\build\hdf5.vcxproj]
          C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC\include\sal.h(2886) : see previous definition of '__useHeader'
c:\program files\microsoft sdks\windows\v7.1\include\specstrings_supp.h(77): warning C4005: '__on_failure' : macro redefinition (..\src\h5_file.cc) [C:\Users\j
abba\icpdashboard\node_modules\hdf5\build\hdf5.vcxproj]
          C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC\include\sal.h(2896) : see previous definition of '__on_failure'
c:\program files\microsoft sdks\windows\v7.1\include\sal_supp.h(57): warning C4005: '__useHeader' : macro redefinition (..\src\h5_group.cc) [C:\Users\jabba\icp
dashboard\node_modules\hdf5\build\hdf5.vcxproj]
          C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC\include\sal.h(2886) : see previous definition of '__useHeader'
c:\program files\microsoft sdks\windows\v7.1\include\specstrings_supp.h(77): warning C4005: '__on_failure' : macro redefinition (..\src\h5_group.cc) [C:\Users\
jabba\icpdashboard\node_modules\hdf5\build\hdf5.vcxproj]
          C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC\include\sal.h(2896) : see previous definition of '__on_failure'
c:\users\jabba\icpdashboard\node_modules\hdf5\src\file.h(11): fatal error C1083: Cannot open include file: 'hdf5.h': No such file or directory (..\src\h5_file.
cc) [C:\Users\jabba\icpdashboard\node_modules\hdf5\build\hdf5.vcxproj]
c:\users\jabba\icpdashboard\node_modules\hdf5\src\file.h(11): fatal error C1083: Cannot open include file: 'hdf5.h': No such file or directory (..\src\hdf5.cc)
 [C:\Users\jabba\icpdashboard\node_modules\hdf5\build\hdf5.vcxproj]
c:\users\jabba\icpdashboard\node_modules\hdf5\src\file.h(11): fatal error C1083: Cannot open include file: 'hdf5.h': No such file or directory (..\src\h5_group
.cc) [C:\Users\jabba\icpdashboard\node_modules\hdf5\build\hdf5.vcxproj]
gyp ERR! build error
gyp ERR! stack Error: `C:\Program Files (x86)\MSBuild\14.0\bin\msbuild.exe` failed with exit code: 1
gyp ERR! stack     at ChildProcess.onExit (C:\Users\jabba\icpdashboard\node_modules\node-gyp\lib\build.js:276:23)
gyp ERR! stack     at emitTwo (events.js:106:13)
gyp ERR! stack     at ChildProcess.emit (events.js:191:7)
gyp ERR! stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:204:12)
gyp ERR! System Windows_NT 6.1.7601
gyp ERR! command "C:\\Program Files\\nodejs\\node.exe" "C:\\Users\\jabba\\icpdashboard\\node_modules\\node-gyp\\bin\\node-gyp.js" "build" "--fallback-to-build"
"--module=C:\\Users\\jabba\\icpdashboard\\node_modules\\hdf5\\lib\\binding\\hdf5.node" "--module_name=hdf5" "--module_path=C:\\Users\\jabba\\icpdashboard\\node_
modules\\hdf5\\lib\\binding"
gyp ERR! cwd C:\Users\jabba\icpdashboard\node_modules\hdf5
gyp ERR! node -v v6.2.2
gyp ERR! node-gyp -v v3.4.0
gyp ERR! not ok
node-pre-gyp ERR! build error
node-pre-gyp ERR! stack Error: Failed to execute 'C:\Program Files\nodejs\node.exe C:\Users\jabba\icpdashboard\node_modules\node-gyp\bin\node-gyp.js build --fal
lback-to-build --module=C:\Users\jabba\icpdashboard\node_modules\hdf5\lib\binding\hdf5.node --module_name=hdf5 --module_path=C:\Users\jabba\icpdashboard\node_mo
dules\hdf5\lib\binding' (1)
node-pre-gyp ERR! stack     at ChildProcess.<anonymous> (C:\Users\jabba\icpdashboard\node_modules\hdf5\node_modules\node-pre-gyp\lib\util\compile.js:83:29)
node-pre-gyp ERR! stack     at emitTwo (events.js:106:13)
node-pre-gyp ERR! stack     at ChildProcess.emit (events.js:191:7)
node-pre-gyp ERR! stack     at maybeClose (internal/child_process.js:852:16)
node-pre-gyp ERR! stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:215:5)
node-pre-gyp ERR! System Windows_NT 6.1.7601
node-pre-gyp ERR! command "C:\\Program Files\\nodejs\\node.exe" "C:\\Users\\jabba\\icpdashboard\\node_modules\\hdf5\\node_modules\\node-pre-gyp\\bin\\node-pre-g
yp" "install" "--fallback-to-build"
node-pre-gyp ERR! cwd C:\Users\jabba\icpdashboard\node_modules\hdf5
node-pre-gyp ERR! node -v v6.2.2
node-pre-gyp ERR! node-pre-gyp -v v0.6.11
node-pre-gyp ERR! not ok
Failed to execute 'C:\Program Files\nodejs\node.exe C:\Users\jabba\icpdashboard\node_modules\node-gyp\bin\node-gyp.js build --fallback-to-build --module=C:\User
s\jabba\icpdashboard\node_modules\hdf5\lib\binding\hdf5.node --module_name=hdf5 --module_path=C:\Users\jabba\icpdashboard\node_modules\hdf5\lib\binding' (1)
[email protected] C:\Users\jabba\icpdashboard
+-- [email protected]
+-- [email protected]
+-- [email protected]
+-- [email protected]
+-- [email protected]
+-- [email protected]
+-- [email protected]
+-- [email protected]
+-- [email protected]
+-- [email protected]
`-- [email protected]

npm WARN optional Skipping failed optional dependency /chokidar/fsevents:
npm WARN notsup Not compatible with your operating system or architecture: [email protected]
npm WARN Failed to parse json
npm WARN Unexpected token '?' at 1:1
npm WARN ??t??♫►♂&?Z??}???K7?}???♂?+?[?P?J????;???1?i??V^?a???G►↕♦?{?X?u§?S`?i\??p?\l??u
npm WARN ^
npm WARN File: C:\Users\jabba\icpdashboard\node_modules\convert-source-map\package.json
npm WARN [email protected] license should be a valid SPDX license expression
npm ERR! Windows_NT 6.1.7601
npm ERR! argv "C:\\Program Files\\nodejs\\node.exe" "C:\\Program Files\\nodejs\\node_modules\\npm\\bin\\npm-cli.js" "install" "hdf5" "--fallback-to-build"
npm ERR! node v6.2.2
npm ERR! npm  v3.9.5
npm ERR! code ELIFECYCLE

npm ERR! [email protected] install: `node-pre-gyp install --fallback-to-build`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the [email protected] install script 'node-pre-gyp install --fallback-to-build'.
npm ERR! Make sure you have the latest version of node.js and npm installed.
npm ERR! If you do, this is most likely a problem with the hdf5 package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR!     node-pre-gyp install --fallback-to-build
npm ERR! You can get information on how to open an issue for this project with:
npm ERR!     npm bugs hdf5
npm ERR! Or if that isn't available, you can get their info via:
npm ERR!     npm owner ls hdf5
npm ERR! There is likely additional logging output above.

npm ERR! Please include the following file with any support request:
npm ERR!     C:\Users\jabba\icpdashboard\npm-debug.log

Build failing on Ubuntu 12.04

I'm trying to build on Ubuntu Linux 12.04 which fails with the following:

$ node-gyp configure build
gyp info it worked if it ends with ok
gyp info using [email protected]
gyp info using [email protected] | linux | x64
gyp info spawn python
gyp info spawn args [ '/usr/local/lib/node_modules/node-gyp/gyp/gyp_main.py',
gyp info spawn args   'binding.gyp',
gyp info spawn args   '-f',
gyp info spawn args   'make',
gyp info spawn args   '-I',
gyp info spawn args   '/home/cseymour/Code/node/node5/hdf5.node/build/config.gypi',
gyp info spawn args   '-I',
gyp info spawn args   '/usr/local/lib/node_modules/node-gyp/addon.gypi',
gyp info spawn args   '-I',
gyp info spawn args   '/home/csyemour/.node-gyp/0.10.26/common.gypi',
gyp info spawn args   '-Dlibrary=shared_library',
gyp info spawn args   '-Dvisibility=default',
gyp info spawn args   '-Dnode_root_dir=/home/cseymour/.node-gyp/0.10.26',
gyp info spawn args   '-Dmodule_root_dir=/home/cseymour/Code/node/node5/hdf5.node',
gyp info spawn args   '--depth=.',
gyp info spawn args   '--no-parallel',
gyp info spawn args   '--generator-output',
gyp info spawn args   'build',
gyp info spawn args   '-Goutput_dir=.' ]
gyp info spawn make
gyp info spawn args [ 'BUILDTYPE=Release', '-C', 'build' ]
make: Entering directory `/home/cseymour/Code/node/node5/hdf5.node/build'
  CXX(target) Release/obj.target/h5im/src/h5im.o
In file included from ../src/h5im.cc:2:0:
../src/hdf5.h:20:66: error: a brace-enclosed initializer is not allowed here before ‘{’ token
In file included from ../src/h5im.cc:2:0:
../src/hdf5.h:20:178: error: ISO C++ forbids initialisation of member ‘toAccessMap’ [-fpermissive]
../src/hdf5.h:20:178: error: making ‘toAccessMap’ static [-fpermissive]
../src/hdf5.h:20:178: error: invalid in-class initialisation of static data member of non-integral type ‘std::map<long unsigned int, long unsigned int>’
../src/hdf5.h:34:36: error: ‘FunctionCallbackInfo’ in namespace ‘v8’ does not name a type
../src/hdf5.h:34:40: error: ISO C++ forbids declaration of ‘parameter’ with no type [-fpermissive]
../src/hdf5.h:34:60: error: expected ‘,’ or ‘...’ before ‘<’ token
../src/hdf5.h:35:44: error: ‘FunctionCallbackInfo’ in namespace ‘v8’ does not name a type
../src/hdf5.h:35:48: error: ISO C++ forbids declaration of ‘parameter’ with no type [-fpermissive]
../src/hdf5.h:35:68: error: expected ‘,’ or ‘...’ before ‘<’ token
../src/hdf5.h:36:42: error: ‘FunctionCallbackInfo’ in namespace ‘v8’ does not name a type
../src/hdf5.h:36:46: error: ISO C++ forbids declaration of ‘parameter’ with no type [-fpermissive]
../src/hdf5.h:36:66: error: expected ‘,’ or ‘...’ before ‘<’ token
../src/hdf5.h:45:13: error: ‘shared_ptr’ in namespace ‘std’ does not name a type
../src/hdf5.h:47:36: error: ‘FunctionCallbackInfo’ in namespace ‘v8’ does not name a type
../src/hdf5.h:47:40: error: ISO C++ forbids declaration of ‘parameter’ with no type [-fpermissive]
../src/hdf5.h:47:60: error: expected ‘,’ or ‘...’ before ‘<’ token
../src/hdf5.h:54:39: error: ‘FunctionCallbackInfo’ in namespace ‘v8’ does not name a type
../src/hdf5.h:54:43: error: ISO C++ forbids declaration of ‘parameter’ with no type [-fpermissive]
../src/hdf5.h:54:63: error: expected ‘,’ or ‘...’ before ‘<’ token
../src/hdf5.h:55:37: error: ‘FunctionCallbackInfo’ in namespace ‘v8’ does not name a type
../src/hdf5.h:55:41: error: ISO C++ forbids declaration of ‘parameter’ with no type [-fpermissive]
../src/hdf5.h:55:61: error: expected ‘,’ or ‘...’ before ‘<’ token
../src/hdf5.h:56:44: error: ‘FunctionCallbackInfo’ in namespace ‘v8’ does not name a type
../src/hdf5.h:56:48: error: ISO C++ forbids declaration of ‘parameter’ with no type [-fpermissive]
../src/hdf5.h:56:68: error: expected ‘,’ or ‘...’ before ‘<’ token
../src/hdf5.h:57:50: error: ‘FunctionCallbackInfo’ in namespace ‘v8’ does not name a type
../src/hdf5.h:57:54: error: ISO C++ forbids declaration of ‘parameter’ with no type [-fpermissive]
../src/hdf5.h:57:74: error: expected ‘,’ or ‘...’ before ‘<’ token
../src/hdf5.h:58:46: error: ‘FunctionCallbackInfo’ in namespace ‘v8’ does not name a type
../src/hdf5.h:58:50: error: ISO C++ forbids declaration of ‘parameter’ with no type [-fpermissive]
../src/hdf5.h:58:70: error: expected ‘,’ or ‘...’ before ‘<’ token
../src/hdf5.h:59:43: error: ‘FunctionCallbackInfo’ in namespace ‘v8’ does not name a type
../src/hdf5.h:59:47: error: ISO C++ forbids declaration of ‘parameter’ with no type [-fpermissive]
../src/hdf5.h:59:67: error: expected ‘,’ or ‘...’ before ‘<’ token
../src/hdf5.h:60:47: error: ‘FunctionCallbackInfo’ in namespace ‘v8’ does not name a type
../src/hdf5.h:60:51: error: ISO C++ forbids declaration of ‘parameter’ with no type [-fpermissive]
../src/hdf5.h:60:71: error: expected ‘,’ or ‘...’ before ‘<’ token
../src/hdf5.h:61:62: error: ‘FunctionCallbackInfo’ in namespace ‘v8’ does not name a type
../src/hdf5.h:61:66: error: ISO C++ forbids declaration of ‘parameter’ with no type [-fpermissive]
../src/hdf5.h:61:86: error: expected ‘,’ or ‘...’ before ‘<’ token
In file included from ../src/h5im.cc:3:0:
../src/h5_im.hpp:25:31: error: ‘FunctionCallbackInfo’ in namespace ‘v8’ does not name a type
../src/h5_im.hpp:25:35: error: ISO C++ forbids declaration of ‘parameter’ with no type [-fpermissive]
../src/h5_im.hpp:25:55: error: expected ‘,’ or ‘...’ before ‘<’ token
In file included from ../src/h5im.cc:3:0:
../src/h5_im.hpp:40:31: error: ‘FunctionCallbackInfo’ in namespace ‘v8’ does not name a type
../src/h5_im.hpp:40:35: error: ISO C++ forbids declaration of ‘parameter’ with no type [-fpermissive]
../src/h5_im.hpp:40:55: error: expected ‘,’ or ‘...’ before ‘<’ token
../src/h5_im.hpp:67:29: error: ‘FunctionCallbackInfo’ in namespace ‘v8’ does not name a type
../src/h5_im.hpp:67:33: error: ISO C++ forbids declaration of ‘parameter’ with no type [-fpermissive]
../src/h5_im.hpp:67:53: error: expected ‘,’ or ‘...’ before ‘<’ token
In file included from ../src/h5im.cc:3:0:
../src/h5_im.hpp: In static member function ‘static void NodeHDF5::H5im::Initialize(v8::Handle<v8::Object>)’:
../src/h5_im.hpp:19:21: error: ‘NewFromUtf8’ is not a member of ‘v8::String’
In file included from ../src/h5im.cc:3:0:
../src/h5_im.hpp:19:147: error: no matching function for call to ‘v8::FunctionTemplate::New(v8::Isolate*, void (&)(int))’
../src/h5_im.hpp:19:147: note: candidate is:
/home/cseymour/.node-gyp/0.10.26/deps/v8/include/v8.h:2255:34: note: static v8::Local<v8::FunctionTemplate> v8::FunctionTemplate::New(v8::InvocationCallback, v8::Handle<v8::Value>, v8::Handle<v8::Signature>)
/home/cseymour/.node-gyp/0.10.26/deps/v8/include/v8.h:2255:34: note:   no known conversion for argument 1 from ‘v8::Isolate*’ to ‘v8::InvocationCallback {aka v8::Handle<v8::Value> (*)(const v8::Arguments&)}’
../src/h5_im.hpp:20:21: error: ‘NewFromUtf8’ is not a member of ‘v8::String’
../src/h5_im.hpp:20:147: error: no matching function for call to ‘v8::FunctionTemplate::New(v8::Isolate*, void (&)(int))’
../src/h5_im.hpp:20:147: note: candidate is:
/home/cseymour/.node-gyp/0.10.26/deps/v8/include/v8.h:2255:34: note: static v8::Local<v8::FunctionTemplate> v8::FunctionTemplate::New(v8::InvocationCallback, v8::Handle<v8::Value>, v8::Handle<v8::Signature>)
/home/cseymour/.node-gyp/0.10.26/deps/v8/include/v8.h:2255:34: note:   no known conversion for argument 1 from ‘v8::Isolate*’ to ‘v8::InvocationCallback {aka v8::Handle<v8::Value> (*)(const v8::Arguments&)}’
../src/h5_im.hpp:21:21: error: ‘NewFromUtf8’ is not a member of ‘v8::String’
../src/h5_im.hpp:21:143: error: no matching function for call to ‘v8::FunctionTemplate::New(v8::Isolate*, void (&)(int))’
../src/h5_im.hpp:21:143: note: candidate is:
/home/cseymour/.node-gyp/0.10.26/deps/v8/include/v8.h:2255:34: note: static v8::Local<v8::FunctionTemplate> v8::FunctionTemplate::New(v8::InvocationCallback, v8::Handle<v8::Value>, v8::Handle<v8::Signature>)
/home/cseymour/.node-gyp/0.10.26/deps/v8/include/v8.h:2255:34: note:   no known conversion for argument 1 from ‘v8::Isolate*’ to ‘v8::InvocationCallback {aka v8::Handle<v8::Value> (*)(const v8::Arguments&)}’
../src/h5_im.hpp: In static member function ‘static void NodeHDF5::H5im::make_image(int)’:
../src/h5_im.hpp:28:34: error: ‘args’ was not declared in this scope
../src/h5_im.hpp:29:11: error: ‘Uint8Array’ was not declared in this scope
../src/h5_im.hpp:29:21: error: template argument 1 is invalid
../src/h5_im.hpp:29:30: error: invalid type in declaration before ‘=’ token
../src/h5_im.hpp:29:49: error: type/value mismatch at argument 1 in template parameter list for ‘template<class T> class v8::Local’
../src/h5_im.hpp:29:49: error:   expected a type, got ‘Uint8Array’
../src/h5_im.hpp:32:40: error: base operand of ‘->’ is not a pointer
../src/h5_im.hpp:32:46: error: ‘NewFromUtf8’ is not a member of ‘v8::String’
../src/h5_im.hpp:33:14: error: base operand of ‘->’ is not a pointer
../src/h5_im.hpp:33:20: error: ‘NewFromUtf8’ is not a member of ‘v8::String’
../src/h5_im.hpp:35:90: error: base operand of ‘->’ is not a pointer
../src/h5_im.hpp:35:96: error: ‘NewFromUtf8’ is not a member of ‘v8::String’
../src/h5_im.hpp:35:180: error: base operand of ‘->’ is not a pointer
../src/h5_im.hpp:35:186: error: ‘NewFromUtf8’ is not a member of ‘v8::String’
In file included from ../src/h5im.cc:3:0:
../src/h5_im.hpp:35:306: error: base operand of ‘->’ is not a pointer
../src/h5_im.hpp:35:16: warning: unused variable ‘err’ [-Wunused-variable]
../src/h5_im.hpp: In static member function ‘static void NodeHDF5::H5im::read_image(int)’:
../src/h5_im.hpp:43:34: error: ‘args’ was not declared in this scope
../src/h5_im.hpp:51:5: error: ‘unique_ptr’ is not a member of ‘std’
../src/h5_im.hpp:51:21: error: expected primary-expression before ‘unsigned’
../src/h5_im.hpp:51:21: error: expected ‘;’ before ‘unsigned’
../src/h5_im.hpp:52:11: error: ‘Uint8Array’ was not declared in this scope
../src/h5_im.hpp:52:21: error: template argument 1 is invalid
../src/h5_im.hpp:52:30: error: invalid type in declaration before ‘=’ token
../src/h5_im.hpp:52:32: error: ‘Uint8Array’ is not a class or namespace
../src/h5_im.hpp:52:48: error: ‘ArrayBuffer’ has not been declared
../src/h5_im.hpp:53:66: error: ‘contentBuffer’ was not declared in this scope
../src/h5_im.hpp:56:15: error: base operand of ‘->’ is not a pointer
../src/h5_im.hpp:58:11: error: base operand of ‘->’ is not a pointer
../src/h5_im.hpp:58:17: error: ‘NewFromUtf8’ is not a member of ‘v8::String’
../src/h5_im.hpp:58:118: error: no matching function for call to ‘v8::Number::New(v8::Isolate*, hsize_t&)’
../src/h5_im.hpp:58:118: note: candidate is:
/home/cseymour/.node-gyp/0.10.26/deps/v8/include/v8.h:1377:33: note: static v8::Local<v8::Number> v8::Number::New(double)
/home/cseymour/.node-gyp/0.10.26/deps/v8/include/v8.h:1377:33: note:   candidate expects 1 argument, 2 provided
../src/h5_im.hpp:59:11: error: base operand of ‘->’ is not a pointer
../src/h5_im.hpp:59:17: error: ‘NewFromUtf8’ is not a member of ‘v8::String’
../src/h5_im.hpp:59:120: error: no matching function for call to ‘v8::Number::New(v8::Isolate*, hsize_t&)’
../src/h5_im.hpp:59:120: note: candidate is:
/home/cseymour/.node-gyp/0.10.26/deps/v8/include/v8.h:1377:33: note: static v8::Local<v8::Number> v8::Number::New(double)
/home/cseymour/.node-gyp/0.10.26/deps/v8/include/v8.h:1377:33: note:   candidate expects 1 argument, 2 provided
../src/h5_im.hpp:60:11: error: base operand of ‘->’ is not a pointer
../src/h5_im.hpp:60:17: error: ‘NewFromUtf8’ is not a member of ‘v8::String’
../src/h5_im.hpp:60:120: error: no matching function for call to ‘v8::Number::New(v8::Isolate*, hsize_t&)’
../src/h5_im.hpp:60:120: note: candidate is:
/home/cseymour/.node-gyp/0.10.26/deps/v8/include/v8.h:1377:33: note: static v8::Local<v8::Number> v8::Number::New(double)
/home/cseymour/.node-gyp/0.10.26/deps/v8/include/v8.h:1377:33: note:   candidate expects 1 argument, 2 provided
../src/h5_im.hpp:61:11: error: base operand of ‘->’ is not a pointer
../src/h5_im.hpp:61:17: error: ‘NewFromUtf8’ is not a member of ‘v8::String’
../src/h5_im.hpp:61:78: error: ‘NewFromUtf8’ is not a member of ‘v8::String’
../src/h5_im.hpp:62:11: error: base operand of ‘->’ is not a pointer
../src/h5_im.hpp:62:17: error: ‘NewFromUtf8’ is not a member of ‘v8::String’
../src/h5_im.hpp:62:118: error: no matching function for call to ‘v8::Number::New(v8::Isolate*, hssize_t&)’
../src/h5_im.hpp:62:118: note: candidate is:
/home/cseymour/.node-gyp/0.10.26/deps/v8/include/v8.h:1377:33: note: static v8::Local<v8::Number> v8::Number::New(double)
/home/cseymour/.node-gyp/0.10.26/deps/v8/include/v8.h:1377:33: note:   candidate expects 1 argument, 2 provided
../src/h5_im.hpp: In static member function ‘static void NodeHDF5::H5im::is_image(int)’:
../src/h5_im.hpp:70:34: error: ‘args’ was not declared in this scope
../src/h5im.cc: In function ‘void init_im(v8::Handle<v8::Object>)’:
../src/h5im.cc:13:52: error: no matching function for call to ‘v8::HandleScope::HandleScope(v8::Isolate*)’
../src/h5im.cc:13:52: note: candidates are:
/home/cseymour/.node-gyp/0.10.26/deps/v8/include/v8.h:473:3: note: v8::HandleScope::HandleScope(const v8::HandleScope&)
/home/cseymour/.node-gyp/0.10.26/deps/v8/include/v8.h:473:3: note:   no known conversion for argument 1 from ‘v8::Isolate*’ to ‘const v8::HandleScope&’
/home/cseymour/.node-gyp/0.10.26/deps/v8/include/v8.h:448:3: note: v8::HandleScope::HandleScope()
/home/cseymour/.node-gyp/0.10.26/deps/v8/include/v8.h:448:3: note:   candidate expects 0 arguments, 1 provided
make: *** [Release/obj.target/h5im/src/h5im.o] Error 1
make: Leaving directory `/home/cseymour/Code/node/node5/hdf5.node/build'
gyp ERR! build error 
gyp ERR! stack Error: `make` failed with exit code: 2
gyp ERR! stack     at ChildProcess.onExit (/usr/local/lib/node_modules/node-gyp/lib/build.js:267:23)
gyp ERR! stack     at ChildProcess.EventEmitter.emit (events.js:98:17)
gyp ERR! stack     at Process.ChildProcess._handle.onexit (child_process.js:797:12)
gyp ERR! System Linux 3.2.0-58-generic
gyp ERR! command "node" "/usr/local/bin/node-gyp" "configure" "build"
gyp ERR! cwd /home/cseymour/Code/node/node5/hdf5.node
gyp ERR! node -v v0.10.26
gyp ERR! node-gyp -v v1.0.1
gyp ERR! not ok 

With V8 version:

$ node -e "console.log(process.versions.v8)"
3.14.5.9

Any ideas?

hdf5 javascript in a webbrowser

Is it possible to adjust this code to run in a browser?
I want to write a javascript module for my web application that allows handling of hdf5 data.
Thus I can not directly interact with files. Instead the data would come from a webserver in raw binary format interpreted as typed array (https://developer.mozilla.org/en-US/docs/Web/JavaScript/Typed_arrays). I want to allow the user to interact with the data, modify it and send it back (still as raw binary HDF5 data).

I see that this is not the scope of your node module but I still hope you have an idea on how to do that.
Thanks in advance.

Cannot read top-level attributes of file

I'm using hdf5.node to load and parse hdf5 biom files.

The biom format requires several top-level attributes on the file. Initially, when the file is loaded by hdf5.node, only the id is visible on the File object, but calling .getNumAttrs() on the file object does return the correct number (8).

After calling refresh() on the file object, two more of the expected attributes, creation-date and format-url, both strings, become visible. However, this also causes a syntax error unsupported data type.

I believe this is because at least one of the 5 remaining attributes on the file object is not being coerced into a data type supported by node, but if there is a simple solution I've missed, please let me know. The remaining data types are tuple, list of ints, int, and string.

Sample Data

Sample Code:

const hdf5 = require('hdf5').hdf5;
const Access = require('hdf5/lib/globals').Access;

const file = new hdf5.File('rich_sparse_otu_table_hdf5.biom', Access.ACC_RDONLY);
console.log(file);
console.log(file.getNumAttrs());
file.refresh();

npm build error on h5_lt.hpp

../src/h5_lt.hpp:35:17: error: unused variable 'maxsize' [-Werror,-Wunused-variable]

If I remove the following line, compilation works on Mac.

const hsize_t maxsize = H5S_UNLIMITED;

No file id or group id when reading hdf5.

I'm trying to read datasets from files containing nested groups. When reading in the file and groups, the id attributes are not being populated.

File:

NEONDSTowerTemperatureData.hdf5.zip

const hdf5        = require('hdf5').hdf5;
const file        = new hdf5.File('NEONDSTowerTemperatureData.hdf5', Access.ACC_RDONLY);
const members     = file.getMemberNames();
const firstMember = members[0];
const group       = file.openGroup(firstMember);

// not populated, so unable to retrieve group datasets
console.log(file.id);
console.log(group.id);

nodejs Hdf5 very very slow comparing to h5py python package

Hello,

We are using hdf5 files to store several data that we want to use it later to display it on the web. We have processed the data and created the .h5 files with python and the package h5py. Then we decided to use nodejs for our webserver and so your hdf5 package to read large h5 files (~1G) in our server. The problem is that we are noticing a very slow reading time (miliseconds vs 30 minutes) when using your hdf5 package. Have you noticed that before? I made sure that the hdf5 libraries are the same for the h5py and your nodejs package. Below, you can see the details of what we are doing. I would like to know if we are doing something wrong or this is the normal performance.
Thanks,

oriol

Installed (Nodejs and Hdf5) and (python and h5py) in same computer.

python and h5py:

Installation

miniconda2/bin/conda install hdf5=1.8.19
miniconda2/bin/conda install h5py

Code

import h5py
with h5py.File("/aloy/home/mduran/myscripts/mosaic/A/A1/sig.h5", "r") as hf:
inchikeys = hf["inchikeys"][:]

Time

Miliseconds

Nodejs and Hdf5

Installation

Download hdf5-1.8.19, compile (make) and install (make install)
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/local/hdf5/lib
npm install hdf5 --hdf5_home_linux=/usr/local/hdf5
Node version: v6.11.2

Code

var hdf5 = require('hdf5').hdf5;
var h5lt = require('hdf5').h5lt;
var Access = require('hdf5/lib/globals').Access;
var file = new hdf5.File('/aloy/home/mduran/myscripts/mosaic/A/A1/sig.h5', Access.ACC_RDONLY);
var dataset2 = h5lt.readDataset(file.id, "inchikeys");

Time

More than half an hour

h5_im.hpp:104 no member named 'ToLocalChecked'

I've pulled the latest and am executing npm install --build-from-source inside the bundle.

I get the following error:

../src/h5_im.hpp:104:128: error: 'class v8::Local<v8::Object>' has no member named 'ToLocalChecked'
     v8::Local<v8::Object> buffer=node::Buffer::New(v8::Isolate::GetCurrent(), (char*)contentBuffer.get(), planes*width*height).ToLocalChecked();

This is with gcc-5 on Mac OS X. gcc-4.9 too.

Any ideas?

Thank you.

Code cleanup

Hi!

I saw several points that could make the code more readable, and maybe more efficient:

  • We should not threat hpp file as source file (in binding.gyp). hpp/h file are headers, and should not be considered as sources.
  • It may be more readable (and more efficient for the compiler) to have header files (h/hpp) that declare functions/classes prototypes and cc files that implement them. It is done in file.h/h5_file.cc, and group.h/h5_group.cc. IMHO it should be done for all other classes. I also think we should decide if we use .h or .hpp for haeder files, and use one unique convention.
  • We may not use namespace in header files. It is generally a bad practice as it pollute the global namespace in a header, which is meant to be included in several source files, and can then cause names conflicts in source files.
  • We should have proper code indentation. I think it could be a good idea to have also common code formatting.

Of course we can discuss about any point above if needed, this are only ideas.
If you agree on some of the above points, I can work on them, and propose pull requests.
Let me know.

Syntax Error: unsupported data type

I am trying to retrieve a data type for a fast5 file but it throws the following error:

/Volumes/Coruscant/project/routes/index.js:17
var dataset = h5lt.readDataset(group.id,'Events');
                   ^
SyntaxError: unsupported data type
    at SyntaxError (native)
    at Object.<anonymous> (/Volumes/Coruscant/project/routes/ind
ex.js:17:20)
    at Module._compile (module.js:556:32)
    at Object.Module._extensions..js (module.js:565:10)
    at Module.load (module.js:473:32)
    at tryModuleLoad (module.js:432:12)
    at Function.Module._load (module.js:424:3)
    at Module.require (module.js:483:17)
    at require (internal/module.js:20:19)
    at Object.<anonymous> (/Volumes/Coruscant/project/app.js:8:1
3)

Here's how the dataset looks like in h5dump:

HDF5 "file1.fast5" {
DATASET "/Analyses/Basecall_1D_001/BaseCalled_template/Events" {
   DATATYPE  H5T_COMPOUND {
      H5T_IEEE_F32LE "mean";
      H5T_IEEE_F32LE "stdv";
      H5T_IEEE_F32LE "start";
      H5T_IEEE_F32LE "length";
      H5T_STRING {
         STRSIZE 5;
         STRPAD H5T_STR_NULLPAD;
         CSET H5T_CSET_ASCII;
         CTYPE H5T_C_S1;
      } "model_state";
      H5T_STD_I32LE "move";
      H5T_IEEE_F32LE "weights";
      H5T_IEEE_F32LE "p_model_state";
      H5T_STRING {
         STRSIZE 5;
         STRPAD H5T_STR_NULLPAD;
         CSET H5T_CSET_ASCII;
         CTYPE H5T_C_S1;
      } "mp_state";
      H5T_IEEE_F32LE "p_mp_state";
      H5T_IEEE_F32LE "p_A";
      H5T_IEEE_F32LE "p_C";
      H5T_IEEE_F32LE "p_G";
      H5T_IEEE_F32LE "p_T";
   }
   DATASPACE  SIMPLE { ( 12771 ) / ( 12771 ) }
   DATA {
   (0): {
         137.778,
         0.528982,
         218.686,
         0.001,
         "CTGTT",
         1,
         0.0343166,
         0.262244,
         "CTGTT",
         0.262244,
         0.16503,
         0.079916,
         0.679372,
         0.075683
      },
   (1): {
         110.178,
         2.62537,
         218.687,
         0.001,
         "CTGTT",
         0,
         0.420341,
         0.0162997,
         "TATTT",
         0.219776,
         0.301549,
         0.0163437,
         0.0578457,
         0.624261
      },
   ...
   .... {hidden items} ....
   ...
(12770): {
         116.651,
         5.52655,
         234.834,
         0.001,
         "TTCGC",
         0,
         1,
         0.0477271,
         "TTTAA",
         0.080599,
         0.4063,
         0.25599,
         0.16818,
         0.16953
      }
   }
}
}

Cannot install or rebuild module on OSX 10.10

Hello,

both installing from npm (npm install hdf5) or rebuilding from node-gyp (cloned repo and node-gyp rebuild) return me the same error :

./src/file.h:11:10: fatal error: 'hdf5.h' file not found
#include "hdf5.h"

I have :

  • node v0.12.7
  • node-gyp v2.0.1
  • OSX 10.10.3

I see that file.h is under ./src/file.h and the only file hdf5.h is under ./legacy/node-v0.10.31/hdf5.h.

Any suggestion? Probably I'm doing something wrong.
If you need more details tell me.

Thanks.

Paolo

Default libhdf5 path on Ubuntu and similar distros

On Ubuntu after installing libhdf5-dev, I need to use the following command to install this package:

npm i hdf5 --hdf5_home_linux=/usr/lib/x86_64-linux-gnu/hdf5/serial

Would it be possible to add /usr/lib/x86_64-linux-gnu/hdf5/serial to the list of paths to search? This would make it easier for someone else to run npm install without having to dig this up.

Reading string attribute from group returns weird results

Hello,

I am trying to read an string attribute and I am having two problems. The first one is that using the same file the string returned is not the same every run. The second one is related to charset, I think.

I attached a sample. The HDF5 file only have one group with attributes. The problem is the string attribute called 'name'. The code is this:

var HDF5 = require('hdf5');
var HDF5_GLOBALS = require('hdf5/lib/globals');
var hdf5 = HDF5.hdf5;
var h5lt = HDF5.h5lt;
var Access = HDF5_GLOBALS.Access;

var hdf5File = new hdf5.File("sample.h5", Access.ACC_RDONLY);
var hdf5Group = hdf5File.openGroup("neuron_layer_0");

hdf5Group.refresh();
console.dir(hdf5Group);
hdf5Group.refresh();
console.dir(hdf5Group);
hdf5Group.refresh();
console.dir(hdf5Group);

And the result is:
captura

HDFView show this properties on the group:
image

sample.zip

TypeError: Failed to open file {file_name} and flags 0 with return: -1.

I am running this following code from the index.js file in the routes of my express project.

var express = require('express');
var hdf5 = require('hdf5').hdf5;
var router = express.Router();

var Access = require('hdf5/lib/globals').Access;
var file = new hdf5.File('filename.fast5', Access.ACC_RDONLY);
var group = file.openGroup('/Raw/Reads/Read_53');

I am storing the file in the same directories in which the index.js file is residing.
Here's the tree structure of my project showing where the fast5 file is in:

./
├── README.md
├── app.js
├── bin
│   └── www
├── d3
│   ├── API.md
│   ├── CHANGES.md
│   ├── LICENSE
│   ├── README.md
│   ├── d3.js
│   └── d3.min.js
├── includes
│   ├── css
│   ├── data
│   └── js
├── index.html
├── node_modules
│   
|      .... 
│   ├── hdf5
|     ....
├── package.json
├── routes
│   ├── filename.fast5
│   ├── index.js
│   └── users.js
└── views
    ├── error.ejs
    └── index.ejs

And here's the error that I am getting:

╭─tayabsoomro
╰─$ npm start                                                                                                                                                1 ↵

> [email protected] start /Volumes/Coruscant/project
> node ./bin/www

HDF5-DIAG: Error detected in HDF5 (1.10.1) thread 0:
  #000: H5F.c line 586 in H5Fopen(): unable to open file
    major: File accessibilty
    minor: Unable to open file
  #001: H5Fint.c line 1236 in H5F_open(): unable to open file: time = Fri Aug 25 10:06:39 2017
, name = 'filename.fast5', tent_flags = 0
    major: File accessibilty
    minor: Unable to open file
  #002: H5FD.c line 809 in H5FD_open(): open failed
    major: Virtual File Layer
    minor: Unable to initialize object
  #003: H5FDsec2.c line 346 in H5FD_sec2_open(): unable to open file: name = 'filename.fast5', errno = 2, error message = 'No such file or directory', flags = 0, o_flags = 0
    major: File accessibilty
    minor: Unable to open file
/Volumes/Coruscant/project/routes/index.js:6
var file = new hdf5.File('filename.fast5', Access.ACC_RDONLY);
           ^

TypeError: Failed to open file, filename.fast5 and flags 0 with return: -1.

    at TypeError (native)
    at Object.<anonymous> (/Volumes/Coruscant/project/routes/index.js:6:12)
    at Module._compile (module.js:556:32)
    at Object.Module._extensions..js (module.js:565:10)
    at Module.load (module.js:473:32)
    at tryModuleLoad (module.js:432:12)
    at Function.Module._load (module.js:424:3)
    at Module.require (module.js:483:17)
    at require (internal/module.js:20:19)
    at Object.<anonymous> (/Volumes/Coruscant/project/app.js:8:13)
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! [email protected] start: `node ./bin/www`
npm ERR! Exit status 1

Build failing on OS X Yosemite (10.10)

I tried building the module with node-gyp configure build from the latest commit in OS X.

At first it gave me an error about unique_ptr not being in std, so I figured the c++11 flags were not properly handled by the Clang compiler. After some googling I stumbled upon this page: http://skitr.com/2014/05/11/node-js-addons-and-c11/

Basically I added the 'conditions' config to bindings.gyp, as follows:

'conditions': [
              [ 'OS=="mac"', {
                "xcode_settings": {
                    'OTHER_CPLUSPLUSFLAGS' : ['-std=c++1y','-stdlib=libc++'],
                    'OTHER_LDFLAGS': ['-stdlib=libc++'],
                    'MACOSX_DEPLOYMENT_TARGET': '10.7'
                }
              }]
            ],

Too bad, the module still doesn't compile. Now with different errors:

gyp info spawn args [ 'BUILDTYPE=Release', '-C', 'build' ]
  CXX(target) Release/obj.target/h5im/src/h5im.o
In file included from ../src/h5im.cc:2:
In file included from ../src/file.h:14:
../src/attributes.hpp:39:13: error: no matching function for call to 'H5Aiterate2'
            H5Aiterate(group->id,H5_INDEX_NAME, H5_ITER_INC, &index, [&](hid_t loc, const char* attr_name, const H5...
            ^~~~~~~~~~
/usr/local/include/H5version.h:169:20: note: expanded from macro 'H5Aiterate'
#define H5Aiterate H5Aiterate2
                   ^~~~~~~~~~~
/usr/local/include/H5Apublic.h:74:16: note: candidate function not viable: no known conversion from '<lambda at
      ../src/attributes.hpp:39:70>' to 'H5A_operator2_t'
      (aka 'herr_t (*)(hid_t, const char *, const H5A_info_t *, void *)') for 5th argument
H5_DLL herr_t  H5Aiterate2(hid_t loc_id, H5_index_t idx_type,
               ^
1 error generated.
make: *** [Release/obj.target/h5im/src/h5im.o] Error 1

I thought this information would be useful.

Built on node v0.12.2, V8 3.28.73

Convert number in 64 bit integer

Hello,
i need to convert a javascript timestamp to HDF5 64 bit integer but i can't find a solution.
i tried this :
var buffer = Buffer.alloc(8); var now = new Date().getTime(); buffer.write(now.toString()); buffer.type=H5Type.H5T_STD_I64LE; h5lt.makeDataset(ContexteOptm.id,'DateMAJContexteOptm',buffer)
but instead of 1491403310065 i have 3689345520468833329
Anyone have an idea ?

Thanks a lot

h5lt.makeDataset failed with "not a location ID"

nodejs 7.1.0
hdf5.node 0.2.1
hdf5 1.10.0_patch 1-1
linux 4.8.8.2, x86-64, archlinux
compiled with gcc, I will check the version later.

related code here

'use strict';
const h5 = require('hdf5');
const h5var = require('hdf5/lib/globals');

var file = new h5.hdf5.File('./test.h5', h5var.Access.ACC_TRUNC);
//file id is 72057594037927940
var gp = file.createGroup('test');
//group id is 144115188075855870

var buf = Buffer.alloc(8*10*8,0);
buf.rank=2;
buf.rows=8;
buf.columns=10;
buf.type=H5Type.H5T_NATIVE_DOUBLE;

h5.h5lt.makeDataset(gp.id,'test',buf);

this trigger the error:
H5D.c line 121 in H5Dcreate2(): not a location ID
major: Invalid arguments to routine
minor: Inappropriate type

H5Gloc.c line 253 H5G_loc(): invalid object ID
major: Invalid arguments to routine
minor: bad value

[Quick Question] Using stride with 1d array

Hello!

My question is, given this 1d array = [1,2,3,4,5,6,7,8,9,10, ...], I need to select [1,3,5,7,9, ...]. So, I need to start from first element (index=0), and having a stride equals to 2 (select every other element).

var hdf5 = require('hdf5').hdf5;
var h5lt = require('hdf5').h5lt;

var Access = require('hdf5/lib/globals').Access;
var file = new hdf5.File('inchies_1.h5');

var dataset = h5lt.readDataset(file.id, "inchies", {start: [0], stride: [2]});

What I will get is all the whole array starting from index=0, and stride will be ignored. I struggled with this for a while. So, I hope there is a workaround.

Thanks,
Omar

higher rank datasets

Looking to make the setting of rank and dimensions generic so users can go to any rank and define all dimensions.

Adding for rank 4 continuing current style of rows, columns, sections and now files http://io9.gizmodo.com/5823271/the-many-dimensions-of-the-tesseract.
Pillars might be another name for sections.

In the end may add an array called dimensions but was also looking to do it without properties which could conflict with user property names; have the usual javascript properties in braces

h5lt.makeDataset(id, name, buffer , {dimensions: [2,2,2,2]});

for example

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.