Ad
  • Custom User Avatar

    python new test framework is required. updated in this fork

  • Custom User Avatar

    python new test framework is required. updated in this fork

  • Custom User Avatar

    python

    • missing imports
    • python new test framework
    • no assertion messages
  • Custom User Avatar
    • missing imports
    • python new test framework
    • no assertion messages
  • Custom User Avatar

    Bit of an inconsistency: instructions state you it should return an array of arrays, but the test (and attempt) cases expect a list of lists.

  • Custom User Avatar
    1. Sample tests use the old Codewars Python testing framework that isn't supported anymore
    2. All random tests are huge and impossible to debug when there is a failed assertion
    3. Assertions do not take into account any possible floating point errors, essentially restricting the solution space to one particular function in Numpy and rejecting all other (possibly) valid approaches
  • Custom User Avatar

    (EDIT by @kazk: Updated for Codewars framework)

    Consider using numpy testing once this is deployed. This gives beautified and helpful output for test failures:

    import numpy as np
    
    @test.describe('Example Tests')
    def example_tests():
        @test.it('Example Test Case')
        def example_test_case():
            actual = np.reshape(range(16), [4, 4])
            expected = np.reshape(range(1, 17), [4, 4])
            np.testing.assert_equal(expected, actual)
    

  • Custom User Avatar

    Why is the list split in 2? Just to do the same thing twice?

    Also, why the hell was this approved? This is a duplicate.

  • Custom User Avatar

    You definitely need to improve the instructions for this kata. Even now, I have no idea how this worked ---> pattern(30, 7) = [-1, -8, -3, -2, -1]. It would be helpful if you made the example better by showing why the output of [-1, -8, -3, -2, -1] makes sense coming from (30, 7).