Skip to content

IndexError: index 0 is out of bounds for axis 0 with size 0 #31

@cool-RR

Description

@cool-RR

Running this code under Python 3.8 produced the following traceback. Note that it seems that max_n=10**7 is related to this bug, because it didn't happen before I used that.

Traceback (most recent call last):
  File "heapz.py", line 115, in <module>
    best, others = big_o.big_o(heapify, data_generator_heapify, max_n=10**6)
  File "C:\Program Files\Python38\lib\site-packages\big_o\big_o.py", line 157, in big_o
    return infer_big_o_class(ns, time, classes, verbose=verbose)
  File "C:\Program Files\Python38\lib\site-packages\big_o\big_o.py", line 97, in infer_big_o_class
    residuals = inst.fit(ns, time)
  File "C:\Program Files\Python38\lib\site-packages\big_o\complexities.py", line 38, in fit
    return residuals[0]
IndexError: index 0 is out of bounds for axis 0 with size 0

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