Skip to content

New bitflag error #937

@hyanwong

Description

@hyanwong

When using tsinfer I'm now getting the following error:

../../../miniforge3/envs/tsdate/lib/python3.12/site-packages/tsinfer/inference.py:1965: in get_samples_tree_sequence
    new_flags = np.bitwise_and(tables.nodes.flags, ~tskit.NODE_IS_SAMPLE)
E   OverflowError: Python integer -2 out of bounds for uint32

I think we might need to coerce tskit.NODE_IS_SAMPLE to the correct dtype, i.e.

new_flags = np.bitwise_and(tables.nodes.flags, ~tables.nodes.flags.dtype.type(tskit.NODE_IS_SAMPLE))

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions