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

the mismatch of reutrn type from get_loom_spec_version #165

Open
ygidtu opened this issue Dec 22, 2021 · 0 comments
Open

the mismatch of reutrn type from get_loom_spec_version #165

ygidtu opened this issue Dec 22, 2021 · 0 comments

Comments

@ygidtu
Copy link

ygidtu commented Dec 22, 2021

In current version, the get_loom_spec_version from utils.py will return str or np.ndarray from materialize_attr_values, it should add sort of convertion.

Here is my code:

def get_loom_spec_version(f: HDF5File) -> str:
	version = "0.0.0.0"
	if "attrs" in f and "LOOM_SPEC_VERSION" in f["/attrs"]:
		version = materialize_attr_values(f["/attrs"]["LOOM_SPEC_VERSION"][()])
	if "LOOM_SPEC_VERSION" in f.attrs:
		version = materialize_attr_values(f.attrs["LOOM_SPEC_VERSION"])
	
	if isinstance(version, np.ndarray):
		version = [str(x) for x in version]
		version = ".".join(version)

	return version
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