I'm curious why I did not pass the edge test, have any idea? My code should've considered special cases such as 0, negative numbers, other data types as arguments in the lcm function.
Traceback (most recent call last):
File "/workspace/default/.venv/lib/python3.10/site-packages/codewars_test/test_framework.py", line 112, in wrapper
func()
File "/workspace/default/tests.py", line 21, in example_tests
test.assert_equals(lcm(),1)
File "/workspace/default/solution.py", line 10, in lcm
x = np.lcm.reduce(arr)
numpy.core._exceptions._UFuncNoLoopError: ufunc 'lcm' did not contain a loop with signature matching types (None, <class 'numpy.dtype[float64]'>) -> None
I like this one.
That's a problem with your code, not a kata issue. Read this: https://docs.codewars.com/training/troubleshooting
Your loop won't run if the list is empty.
I'm curious why I did not pass the edge test, have any idea? My code should've considered special cases such as 0, negative numbers, other data types as arguments in the lcm function.
Traceback (most recent call last):
File "/workspace/default/.venv/lib/python3.10/site-packages/codewars_test/test_framework.py", line 112, in wrapper
func()
File "/workspace/default/tests.py", line 21, in example_tests
test.assert_equals(lcm(),1)
File "/workspace/default/solution.py", line 10, in lcm
x = np.lcm.reduce(arr)
numpy.core._exceptions._UFuncNoLoopError: ufunc 'lcm' did not contain a loop with signature matching types (None, <class 'numpy.dtype[float64]'>) -> None
This comment is hidden because it contains spoiler information about the solution
This comment is hidden because it contains spoiler information about the solution