Skip to content

Commit

Permalink
Corrected required C API version && corrected error trap && modified …
Browse files Browse the repository at this point in the history
…type check code (#20)

Co-authored-by: mshimizu-kx <[email protected]>
  • Loading branch information
mshimizu-kx and mshimizu-kx authored May 27, 2020
1 parent fa9688e commit f9d4472
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ If you have any HDF5 related questions, you can raise them on the [HDF Forum](ht
### Requirements

* kdb+ ≥ 3.5 64-bit
* [HDF5 C api](https://support.hdfgroup.org/HDF5/doc/H5.intro.html) ≥ 1.10
* [HDF5 C api](https://support.hdfgroup.org/HDF5/doc/H5.intro.html) ≥ 1.10.4

### Third-Party Library Installation

Expand Down
4 changes: 2 additions & 2 deletions q/hdf5.q
Original file line number Diff line number Diff line change
Expand Up @@ -63,10 +63,10 @@ funcs:(

i.typeConv:{$[x in"sg";string;("*"^("bmduvtpnz"!"xiiiiijjf")x)$]}
i.typeRead:{$[x="s";`;x="g";"G";x]$}
i.typeChar:{$[0>x;.Q.t abs x;upper .Q.t x]}
i.typeChar:{$[0>x;::;upper].Q.t abs x}
i.checkDimsType:{$[0=t:type x;count[x],'distinct raze .z.s each x;10=t;t;enlist(count x;neg t)]}
i.checkData:{
if[1<count dt:i.checkDimsType x;`$"invalid ",$[1<count distinct last each dt;"type";"shape"]];
if[1<count dt:i.checkDimsType x;'"invalid ",$[1<count distinct last each dt;"type";"shape"]];
if[10h~dt:first dt;dt:count[x],-10h];
kdims:-1_dt;
ktype:i.typeChar last dt;
Expand Down

0 comments on commit f9d4472

Please sign in to comment.