Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Issue reading complex datatype written in Julia #13

Open
phibeck opened this issue Jan 12, 2023 · 0 comments
Open

Issue reading complex datatype written in Julia #13

phibeck opened this issue Jan 12, 2023 · 0 comments
Labels
bug Something isn't working

Comments

@phibeck
Copy link

phibeck commented Jan 12, 2023

Description

h5 has an issue reading complex datatype written in Julia.

Steps to Reproduce

  1. create HDF5 archive in Julia

using HDF5
h5open("archive.h5", "w") do file
g = create_group(file, "group")
g["dataset_float"] = rand(5,5)
g["dataset_complex"] = rand(5,5) + rand(5,5)im
end

  1. load using TRIQS/h5

from h5 import HDFArchive
with HDFArchive('archive.h5', 'r') as h5:
dataset_float = h5['group']['dataset_float']
dataset_complex = h5['group']['dataset_complex']

  1. h5py instead works

import h5py
hf = h5py.File('archive.h5', 'r')
dataset_float = np.array(hf['group']['dataset_float'])
dataset_complex = np.array(hf['group']['dataset_complex'])

Expected behavior: [What you expect to happen]

Actual behavior:

RuntimeError: .. Error occurred at Thu Jan 12 09:18:06 2023
.. Error .. calling C++ overload
.. h5_read_bare(group g, std::string name) -> PyObject *
.. in implementation of function _h5py.h5_read
.. C++ error was :
HDF5/Python Internal Error : can not find the numpy type from the HDF5 type

Versions

h5 version 1.1.x and unstable

@phibeck phibeck added the bug Something isn't working label Jan 12, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant