C1W3,Why is the same data similar to the code output different

Planar Data Classification with One Hidden Layer | Coursera
Ok , above is the test link , when I use shape function to search the shape of X and Y , if I use shape to find the row of X and Y in Exercise1, out 2 and 1 , but in Exercise3 it turn to 5 and 2 (use the same code and use the code in exercise1 just to check if I shape the same X and Y) , why ?
Looking forward to your reply , thanks .

That is just a test case for the function. We are supposed to write “general” code here that works for any shape of inputs. So they test it with different sizes than the real data that is used in this exercise. If you write the code to just use the shapes of the input parameters, then you’ll get a general purpose (reusable) function and will pass the tests.