Skip to content

the mismatch of reutrn type from get_loom_spec_version #165

Description

@ygidtu

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions