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

1301 questions
0
votes
0 answers

HDF5 much slower on nodejs than in python

Under nodejs the hdf5 code below takes about 200 milliseconds to run. hdf5 = require('hdf5').hdf5; h5lt = require('hdf5').h5lt; Access = require('hdf5/lib/globals').Access; start = new Date(); f = new hdf5.File('myhdf5file',…
Greg Clinton
  • 365
  • 1
  • 7
  • 18
0
votes
0 answers

HDF5 and Python: Automatic export of an object

I'm new to the HDF5 file format and have been experimenting successfully in Python with h5py. Now its time to store real data. I will need to store a list of objects, where each object can be one of several types and each type will have a number of…
Hephaestus
  • 4,337
  • 5
  • 35
  • 48
0
votes
1 answer

Is it possible to save/export a reshaped data using pandas into csv/text/h5 file?

I found this question : How to reshape every nth row's data using pandas? I modified the script to save the result in csv file but there is an error saying AttributeError: 'numpy.ndarray' object has no attribute 'to_csv' This is the script.…
Fang
  • 824
  • 4
  • 17
  • 32
0
votes
1 answer

H5py datasets not seen

After transferring my hdf5 file to Amazon EC2 linux instance it seems that I cannot see datasets in that file (5GB, md5sum checked after transfer) When I run that code: import h5py h5_fname = 'DATA\DATA.h5' print (h5py.version.info) f =…
klubow
  • 126
  • 7
0
votes
1 answer

How can I speed up gzip compression with h5py?

I'm trying to store the frames of an mp4 video into hdf5 using h5py. At first I tried simply not compressing the data. This caused a 5000 MB video to be about 500 GBs when stored in hdf5. I'm experimenting with using gzip compression to make the…
mdornfe1
  • 1,982
  • 1
  • 24
  • 42
0
votes
1 answer

Getting multiple datasets from group in HDF5

I am comparing two different hdf5 files to make sure that they match. I want to create a list with all of the datasets in the group in the hdf5 file so that I can have a loop run through all of the datasets, instead of entering them manually. I cant…
0
votes
0 answers

Why won't H5PYDataset.get_data() work within function?

I have a function which is supposed to unpack an H5PY dataset, temp.hdf5, which only contains one example so it can be evaluated: def getprob(): test_set = H5PYDataset('temp.hdf5', which_sets=('test',)) handle = test_set.open() test_data…
0
votes
1 answer

Retrieving hdf5 index given literal name

I have an hdf5 database with 3 keys (features, image_ids, index). The image_ids and index each have 1000 entries. The problem is, while I can get the 10th image_ids via: dbhdf5 ["image_ids"][10] >>> u'image001.jpg' I want to do the reverse, i.e.…
Ben Nguyen
  • 33
  • 6
0
votes
1 answer

Uppercases convert to lowercase when loading a file with h5py

Hello I can't load a hdf5 file with h5py: $ python verif.py Traceback (most recent call last): File "verif.py", line 4, in h5f = h5py.File("../DeepFISH-Github_projects/DeepFISH/dataset/'+'LowRes_13434_overlapping_pairs.h5",'r') …
Jean-Pat
  • 1,839
  • 4
  • 24
  • 41
0
votes
0 answers

Parallel h5py/hdf5 writing to large dataset skips data chunks

I am using mpi and h5py/hdf5 (Hdf5 and h5py were compiled to have parallel capabilities and everything runs on python 3.4.) on a cluster to stitch a dataset of overlapping tiles (200 or more images/numpy arrays 2048x2048). Each tile has an assigned…
s1mc0d3
  • 523
  • 2
  • 15
0
votes
1 answer

partially write array in HDF5 with h5py

What I want to do is save thousands set of images.Each image set has variable number of images. I've seen that hdf5 format doesn't allocate disk until actual data is written. I decided to write (number of set, maximum set size, imgX,imgY) shape…
jinhwan
  • 1,207
  • 1
  • 13
  • 27
0
votes
1 answer

Python - Crashing when running hdf5 files

I'm currently switching to using my terminal for opening python files. In particular, i'm testing out scripts I use to make sure everything runs accordingly. I'm having certain file that is acting troublesome when trying to open it. It contains …
iron2man
  • 1,787
  • 5
  • 27
  • 39
0
votes
1 answer

h5py - Python Package install error in Windows 10 64bit

I have succeeded to install h5py package via pp and anaconda on windows 10 64bit, Python 3.5.1. conda install h5py But I couldn't execute python server. Here is the screenshot to show my trouble. I need your help. thanks
Kenyi Despean
  • 206
  • 2
  • 15
0
votes
1 answer

Reading hdf5 file quickly with cython and h5py

I'm trying to speed up a python3 function that takes some data, which is an array of indexes and saves them if they meet a certain criterion. I have tried to speed it up by using "cython -a script.py", but the bottle neck seems to be the h5py I/O…
j.arthur5
  • 13
  • 4
0
votes
1 answer

Problems while importing h5py package

I am coding in python and trying to import h5py. I have installed this package before. When I try to do this, it gives this error: Traceback (most recent call last): File "", line 1, in File…
user3925736
  • 99
  • 1
  • 1
  • 13