KxSystems / hdf5

A library for converting between kdb+ and HDF5 data
https://code.kx.com/q/interfaces
Apache License 2.0
13 stars 8 forks source link

Issue with fixed length strings, raised in #25 #26

Closed cmccarthy1 closed 4 years ago

cmccarthy1 commented 4 years ago

Indexing a fixed length string arrays is causing issues due to being initialised at 1 rather than 0.

Incorrect behaviour can be highlighted by the use of the following:

Python script

import h5py
f = h5py.File('dataset.h5', 'w')
dataset = [b'test',b'fdsd']
f.create_dataset('dset',data=dataset)
f.close()

Pre-code fix

q).hdf5.readDataset["dataset.h5";"dset"]
"fdsd"
"fdsd"

Post-code fix

q).hdf5.readDataset["dataset.h5";"dset"]
"test"
"fdsd"