i have next function:
def check_smaller_zeros(v):
return v < 0
When i create array with numpy i can write next code for element-by-element measurement:
v_1 = numpy.array([1, 2, -4, -1])
result = check_smaller_zeros(v_1)
# result: [False, False, True, True]
but when i try repeat it with tuple, set, frozenset and list/array reise next error:
TypeError: '<' not supported between instances of 'tuple' and 'int'
what exactly allows numpy array to have the capability for this behavior? This looks convenient, but is a bit non-obvious