Ad
  • Custom User Avatar

    I am going to close this issue as obsolete. I cannot reproduce the problem now, but it was most probably caused by overwriting the name test in concatenated test fixture, which does not happen anymore.

    If the issue persists or comes back, please re-reaise.

  • Default User Avatar

    Hi, that isList method of yours is not a good practice. Having this function, that only does exactly one function which is inside is not very good. You can just use it explicitely there

  • Custom User Avatar

    How have do you converted it to normal int? I'm trying to do [[int(j) for j in result[i]] for i in range(9)] or with map() to convert from numpy to a list of ints and it's slowing down too much
    Edited : i've used arr.tolist() but it's still too slow ;_; guess my solution is not good enough

  • Custom User Avatar

    you could use isinstance func explicitly in same_structure_as func

  • Default User Avatar

    Thank you. Hope they could fix it soon.

  • Custom User Avatar

    Currently Codewars platform is experiencing issues.

    https://github.com/Codewars/codewars.com/issues/893

  • Default User Avatar

    Time: 474ms Passed: 516 Failed: 0
    I passed all the tests but can't submit the solution and didn't get any error information.
    Could anyone explain what could be the cause?

  • Default User Avatar

    Thank you for your information. Now I know the reason. I used numpy, so the dtype in my answer is 'numpy.int64' rather than 'int'. After I converted dtype to int, I pass the test. It seems this issue only occurs for multiple solution sudoku. Why do you check data type for multiple solution sudoku?

  • Custom User Avatar

    I'm doing the following line in the assertions:

    solution =  solve(...)
    flat_solution = list(itertools.chain(*solution))
    only_int = all(type(i) is int for i in flat_solution)
    Test.assert_equals(only_int, True, "You're solution shound only contains int")
    

    now I don't know why you're solution isn't completly iterable but I may assume something wrong?
    Tell me if you find something please!

    Thanks

  • Default User Avatar

    I got the following test error message:
    ✘ You're solution shound only contains int: False should equal True
    Could anyone explain what happend? It can be easily checked that the solution is a valid one(if my understanding about this game is right.)
    The problem is
    [[0, 8, 0, 0, 0, 9, 7, 4, 3], [0, 5, 0, 0, 0, 8, 0, 1, 0], [0, 1, 0, 0, 0, 0, 0, 0, 0], [8, 0, 0, 0, 0, 5, 0, 0, 0], [0, 0, 0, 8, 0, 4, 0, 0, 0], [0, 0, 0, 3, 0, 0, 0, 0, 6], [0, 0, 0, 0, 0, 0, 0, 7, 0], [0, 3, 0, 5, 0, 0, 0, 8, 0], [9, 7, 2, 4, 0, 0, 0, 5, 0]]

    The solution I get was:
    [[2, 8, 6, 1, 5, 9, 7, 4, 3], [3, 5, 4, 7, 6, 8, 9, 1, 2], [7, 1, 9, 2, 4, 3, 5, 6, 8], [8, 9, 3, 6, 1, 5, 4, 2, 7], [6, 2, 7, 8, 9, 4, 1, 3, 5], [1, 4, 5, 3, 2, 7, 8, 9, 6], [5, 6, 8, 9, 3, 1, 2, 7, 4], [4, 3, 1, 5, 7, 2, 6, 8, 9], [9, 7, 2, 4, 8, 6, 3, 5, 1]]
    ✘ You're solution shound only contains int: False should equal True

  • Custom User Avatar

    github issue submitted: https://github.com/Codewars/codewars.com/issues/649


    Similar error today (not only on this kata by the way)

    I have the following when I try to test my code:

    Time: 125ms Passed: 0 Failed: 0 Errors: 1
    Test Results:

     Traceback:
       in <module>
    AttributeError: 'function' object has no attribute 'expect_equals'
    

    STDERR:

    Traceback:
       in 
    AttributeError: 'function' object has no attribute 'expect_equals'
    
  • Default User Avatar

    Test Results:
    Traceback:
    in
    AttributeError: 'module' object has no attribute 'expect_equals'.
    ???

  • Default User Avatar

    Test Results:
    Traceback:
    in
    AttributeError: 'module' object has no attribute 'expect_equals'

    Is the test module not available now??

  • Default User Avatar

    Traceback:
    in
    AttributeError: 'module' object has no attribute 'expect_equals'
    -------What does this mean??

  • Default User Avatar

    Traceback:
    in
    AttributeError: 'module' object has no attribute 'expect_equals'

    What does this mean????

  • Loading more items...