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

making use of h5py #22

Open
shimwell opened this issue Sep 23, 2022 · 2 comments
Open

making use of h5py #22

shimwell opened this issue Sep 23, 2022 · 2 comments

Comments

@shimwell
Copy link
Member

material tags can be read

import h5py
dag = h5py.File("dagmc.h5m")
d=dag['/tstt/tags/NAME']
c=d.get('values')
c.shape
c[1]
c[0]
import numpy as np
np.array2string(c[0])


@shimwell
Copy link
Member Author

s2=s.rstrip("\x00'")
s3=s2.replace('\x','')

s4=s3.lstrip("b'")
bytes.fromhex(s4)

@shimwell
Copy link
Member Author

import h5py
dagmc_file_contents = h5py.File('dagmc.h5m')
groups=dagmc_file_contents['/tstt/sets/children']
print(len(groups)

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

1 participant