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

h5py 3.0+ triggers TestHDF5BasicIO Error #390

Closed
rmcgibbo opened this issue Dec 29, 2020 · 2 comments
Closed

h5py 3.0+ triggers TestHDF5BasicIO Error #390

rmcgibbo opened this issue Dec 29, 2020 · 2 comments

Comments

@rmcgibbo
Copy link

rmcgibbo commented Dec 29, 2020

It looks like clifford has recently been failing to build in nixpkgs because of the following test failure. I looked in the issues here, but didn't see this reported. Here's a link to the log in the nix build system: https://hydra.nixos.org/build/134004734.

I believe that this failure results from bumping h5py from 2.10.0 to the latest release, 3.1.0.

=================================== FAILURES ===================================
_____________________ TestHDF5BasicIO.test_write_and_read ______________________

self = <clifford.test.test_io.TestHDF5BasicIO object at 0x7fffa0dc5580>
tmp_path = PosixPath('/build/pytest-of-nixbld/pytest-0/test_write_and_read0')

    def test_write_and_read(self, tmp_path):
        file_name = str(tmp_path / "test.ga")

        basis_names = np.array(layout.basis_names, dtype=str)

        mv_array = ConformalMVArray([random_point_pair() for i in range(1000)]).value
        write_ga_file(file_name, mv_array, layout.metric, basis_names, compression=True,
                      transpose=False, sparse=False, support=False)

        data_array, metric_2, basis_names_2, support = read_ga_file(file_name)

        np.testing.assert_equal(data_array, mv_array)
        np.testing.assert_equal(layout.metric, metric_2)
>       np.testing.assert_equal(basis_names, basis_names_2)
E       AssertionError: 
E       Arrays are not equal
E       
E       Mismatched elements: 5 / 5 (100%)
E        x: array(['e1', 'e2', 'e3', 'e4', 'e5'], dtype='<U2')
E        y: array([b'e1', b'e2', b'e3', b'e4', b'e5'], dtype=object)

test_io.py:35: AssertionError

https://docs.h5py.org/en/latest/whatsnew/3.0.html

The interface for storing & reading strings has changed - see Strings in HDF5. The new rules are hopefully more consistent, but may well require some changes in coding using h5py.

@rmcgibbo rmcgibbo changed the title h5py 3.0+ triggers TestHDF5BasicIO Error (?) h5py 3.0+ triggers TestHDF5BasicIO Error Dec 29, 2020
@eric-wieser
Copy link
Member

eric-wieser commented Dec 29, 2020

Duplicate of #387, I think?

@eric-wieser eric-wieser marked this as a duplicate of #387 Dec 29, 2020
@rmcgibbo
Copy link
Author

Ah sorry. Closing,

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants