Skip to content

Some bug I found in this project #10

Description

@Scottyang8math

Recently, I have used this project in my research. There are two bugs I found.
First: it seems to change the original sequences after running the "binary_matrix_rank" test. It should be fixed by replacing "self._matrix = block" with "self._matrix = block.copy()" on line 31 of file "test_binary_matrix_rank.py".

lastly: As @Programmer101N mentioned, it has the wrong output for the "Random Excursion Test". It should be fixed by the following change:
line 64,65:

         if sum_prime[index] != 0:
            cycle += [sum_prime[index]]

        if sum_prime[index + 1] != 0:
            cycle += [sum_prime[index + 1]]

line 71:

    cycles.append(cycle)

    # cycles.append(cycle)

line 86--98 replaced by (Important)

    # Count occurrences
    for value in frequencies_table.keys():
        for cycle in cycles:
            occurrences: int = numpy.count_nonzero(numpy.array(cycle) == value)
            if occurrences > 5:
                occurrences = 5
            frequencies_table[value][occurrences] += 1

(In fact, I did not understand the original code. This code is what I understand of "ν_k (x)" on Page 2-36 of the official document.)

Thanks for this project!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions