Questions tagged [h5py]

h5py is a NumPy-compatible Python module for handling The Hierarchical Data Format (HDF5) files.

h5py is a NumPy-compatible Python module for handling The Hierarchical Data Format (HDF5) files.

Main features

  • Free (BSD licensed)
  • limited dependencies (Python, NumPy, HDF5 libs.)
  • includes both a low level c-like HDF5 interface and a high level Python/NumPy style interface
  • directly interact with datasets using NumPy metaphors, such as slicing
  • datatypes specified using standard NumPy dtype objects

Some links to get started

1070 questions
0
votes
1 answer

H5py: fast way to save list of list of numpy.ndarray?

How can I save and read efficiently a list of list of numpy.ndarray, with h5py? E.g. I want to save/read: Y = np.arange(3**3).reshape(3,3,3) X = [[Y,Y],[Y,Y,Y],[Y]] I am looking for the most efficient (no double loops etc) solution.
memecs
  • 5,816
  • 6
  • 30
  • 46
0
votes
1 answer

Fast slicing .h5 files using h5py

I am working with .h5 files with little experience. In a script I wrote I load in data from an .h5 file. The shape of the resulting array is: [3584, 3584, 75]. Here the values 3584 denotes the number of pixels, and 75 denotes the number of time…
The Dude
  • 3,208
  • 3
  • 26
  • 42
0
votes
1 answer

Statistical analysis of .h5 files (SPSS?)

I have two sets of data in separated .h5 files (Hierarchical Data Format 5, HDF5), obtained with python scripts, and I would like to perform statistical analysis to find correlations between them. My experience here is limited; I don't know any R. I…
Scipio
  • 173
  • 1
  • 14
0
votes
0 answers

How to save a Python dtype('O') in an HDF5

According to this link the NumPy generic object ("O") datatype is not supported by h5py but I really need to fine a way to store my object. I have designed my file and already stored other datatypes into it and don't wanna move to other data…
Am1rr3zA
  • 5,777
  • 15
  • 66
  • 112
0
votes
1 answer

h5py install on windows cannot open hdf5dll18.lib and hdf5_hldll.lib

After downloading hdf5-1.8.12-win32-vs10shared.zip and installing (adds dir to PATH) there is still no hdf5dll18.lib and hdf5_hldll.lib available. So python3 setup.py install fails (python3 is my rename). My h5py is from github. Workaround:…
Roland Puntaier
  • 2,570
  • 23
  • 28
0
votes
1 answer

What does h5py broadcasting refers to?

The h5py documentations (http://www.h5py.org/docs/high/dataset.html) says the following: Importantly, h5py does not use NumPy to do broadcasting before the write... >>> dset2 = f.create_dataset("MyDataset", (1000,1000,1000), 'f') >>> data =…
methane
  • 587
  • 1
  • 6
  • 15
0
votes
0 answers

h5py module does not write character to file

I'm running into a problem with the h5py module for python. I'm trying to open a file in 'r+' mode and would like to change some characters within this file. Whenever I overwrite the data, the character is deleted. This is what I get: >>> f =…
nils
  • 43
  • 4
0
votes
1 answer

Installing h5py on Windows fails - Possibly a 32 vs 64bit issue?

I just switched my python installation to the lovely Anaconda and am trying to get the packages I use often installed and working again. Unfortunately I'm having some problems getting h5py to work - the Python 2.7 installer available from h5py.org…
Blas
  • 77
  • 2
  • 6
0
votes
1 answer

h5py, sporadic writing errors

I have some float numbers to be stored in a big (500K x 500K) matrix. I am storing them in chunks, by using arrays of variable sizes (in accordance to some specific conditions). I have a parallellised code (Python3.3 and h5py) which produces the…
user_1177868
  • 384
  • 2
  • 16
0
votes
1 answer

Performance issue with loop on datasets with h5py

I want to apply a simple function to the datasets contained in an hdf5 file. I am using a code similar to this import h5py data_sums = [] with h5py.File(input_file, "r") as f: for (name, data) in f["group"].iteritems(): print name …
M. Toya
  • 485
  • 6
  • 22
0
votes
2 answers

Storing large unstructured list in Python

Do you know any Python libraries good for storing large unstructured lists (for instance a=[0,numpy.asarray([1,2,3])])? What I've seen so far h5py doesn't support this kind of data, and pickle seems to be slow. Any other alternatives? For my purpose…
m4linka
  • 525
  • 1
  • 4
  • 6
0
votes
1 answer

Column stack and row stack with H5py to existing datasets

I am trying to use Python to column stack and row stack data I have in an HDF5 file with additional data. I am recording images from a camera and saving them to individual files. Then I want to be able to generate a single file with all of the…
Mink
  • 318
  • 5
  • 14
0
votes
0 answers

netcdf files merging in python

I am trying to run a python script for aggregation of HDF5 data files. But it shows an error. Can somebody can figure it out? I am new to python. Any help would be really appreciated. The program given below import sys import h5py import…
0
votes
1 answer

How can I define the spatial reference system for an hdf5 stack in python?

I'm new to h5py and my actual task is to create a hdf5-stack with MODIS subsets. I can create the stack with all the nice data in it but I'm not able to create or attach a spatial reference system. Goal is to load single datasets from the stack into…
rickjarzy
  • 1
  • 1
0
votes
1 answer

Fast search in a h5py or similar hierarchical database

I need a database for an online catalog; if it's possible one dataset per product. And a simple database; that's what I love h5py. The method visititems of groups it's not fast for large files. import h5py #in memory database. Not relevant for…
cu6yu4
  • 1
  • 2