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

Potential TypeError in bm_chaos.py:68 #57

Closed
rmonat opened this issue Jun 4, 2019 · 1 comment
Closed

Potential TypeError in bm_chaos.py:68 #57

rmonat opened this issue Jun 4, 2019 · 1 comment

Comments

@rmonat
Copy link

rmonat commented Jun 4, 2019

In bm_chaos.py, in the definition of function GetKnots, I think that adding a list with a range object raises a TypeError in Python 3.x:

def GetKnots(points, degree):
    knots = [0] * degree + range(1, len(points) - degree)
    knots += [len(points) - degree] * degree
    return knots

This function isn't called in the actual benchmark due to a test in Spline init. Could we change the first line of GetKnots with

    knots = [0] * degree + list(range(1, len(points) - degree))
vstinner added a commit that referenced this issue Jun 4, 2019
Remove GetKnots() function.
@vstinner
Copy link
Member

vstinner commented Jun 4, 2019

Well... since the function is never called, I just removed it in commit 6690642 :-)

@vstinner vstinner closed this as completed Jun 4, 2019
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

2 participants