This is the hdf5storage package, a Python package to read and write python data types to HDF5 (Heirarchal Data Format) files beyond just Numpy types.
Questions tagged [hdf5storage]
13 questions
1
vote
1 answer
Python hdf5storage is transposing my data?
Python Code:
import h5py
import hdf5storage
from functools import reduce
import numpy as np
from operator import mul
sz = 128,256,512
a = np.random.normal(size=reduce(mul,sz)).reshape(sz)
save_dict = {'data':a}
spath =…
wolfblade87
- 153
- 6
1
vote
0 answers
Python pandas read_hdf WHERE term not functioning as expected
I'm trying to do a simple filter on an HDF5-formatted table, using Python pandas. Works fine when I query by the 'subject' column alone:
> df_test = pd.read_hdf(result_file, where=['subject==andrew'])
> print(df_test)
Which gives the output:
…
Andrew Reid
- 181
- 1
- 1
- 5
1
vote
1 answer
how to import .mat-v7.3 file using h5py
I have .mat file which have 3 matrixes A, B, C.
Actually I used scipy.io to import this mat file as below.
data = sio.loadmat('/data.mat')
A = data['A']
B = data['B']
C = data['C']
But, v7.3 file cannot import using this way.
So, I tried to import…
Tom
- 441
- 2
- 6
- 17
1
vote
2 answers
load .mat file from python
I am trying to run from Python a script in Matlab that run a Simulink mode, save a variable as Power.mat and read this variable in Python. I am using Python 2.7 on Windows.
I've tried to use the library hdf5storage to read the file:
import…
Alessandra Cuneo
- 11
- 1
- 2
1
vote
0 answers
load .mat file in simulink from python hdf5storage library
I am trying to load/read some random data in simulink I created using the Python module hdf5storage.
I created .mat file in Python (simulink supports version 7.3 only) using this code:
# get code on…
Chandy Alex
- 103
- 1
- 5
0
votes
0 answers
Problem to save big dataset with hdf5storage
The following error happens when I try to save a long mat data with "hdf5storage.write(dict22, '.', 'test.mat', matlab_compatible=True)"
File "/users/p/prylepy1/.local/lib/python3.6/site-packages/h5py/_hl/attrs.py", line 197, in create
attr =…
Pedro JF.
- 21
- 3
0
votes
1 answer
How to compare multiple hdf5 files
I have multiple h5py files(pixel-level annotations) for one image. Image Masks are stored in hdf5 files as key-value pairs with the key being the id of some class. The masks (hdf5 files) all match the dimension of their corresponding image and…
Nikitha JV
- 37
- 2
- 11
0
votes
0 answers
Mismatch of data between two hdf5 files in hexdump tool
enter image description hereThere is a difference between two hdf5 files when I compared it using hexdump. First I did binary to h5 conversion using c++ code. Then I tried CSV to H5 using python code. In both cases I could see a difference in…
Hemalatha
- 1
- 1
0
votes
0 answers
H5Tset_precision data format in hdf5 file
I have a stream of 12-bit pixel frame data contatenated one to another in format of a stream of bytes. Imagine for example that 1000 12-bit pixel data is contatenated one to another exactly in this order: P0[11:0], P1[11:0], P2[11:0], ,...,…
Dawood
- 1
- 2
0
votes
0 answers
HDF5ExtError when opening file from sftp
I'm trying to open a HDF5 located in a sftp with HDFStore (tried with both pandas 0.15 and 0.23), using the command:
hdf_file = HDFStore('/run/user/2082/gvfs/sftp:host=hostname.com[...]HDF5_filename.hdf5')
But I receive this error:
HDF5ExtError:…
panzerotto
- 1
- 1
0
votes
3 answers
Reading Large HDF5 Files
I am new to using HDF5 files and I am trying to read files with shapes of (20670, 224, 224, 3). Whenever I try to store the results from the hdf5 into a list or another data structure, it takes either takes so long that I abort the execution or it…
David
- 133
- 8
0
votes
2 answers
Memory Error : Training large dataset
memory error
My dataset have 70k images which i want to train through Conv2D but it is throwing memory error when i tried to load the dataset. I just have 4GB RAM, how i can resolve this issue through HDF5 matrix by creating a dataset in HDF5?…
user9456630
- 3
- 1
- 3
0
votes
2 answers
Adding a new variable to a .mat file using the Python package hdf5storage
Is it possible to add a new variable to a .mat file (v7.3) using the Python package hdf5storage?
Example:
I wrote in Matlab:
test = {'Hello', 'world!'; 'Good', 'morning'; 'See', 'you!'};
save('data.mat', 'test', '-v7.3') % v7.3 so that it is…
Franck Dernoncourt
- 62,576
- 61
- 286
- 446