Yep, However you are ill-posing this problem because there are multiple solutions:
However you can reach the same effect just removing the exponential
>>> import math
>>> z = [1.0, -2.0, -3.0, 4.0, 1.0, 2.0, 3.0]
>>> z_exp = [float(i) for i in z]
>>> print([round(i, 2) for i in z_exp])
>>> sum_z_exp = sum(z_exp)
>>> print(round(sum_z_exp, 2))
>>> softmax = [round(i / sum_z_exp, 3) for i in z_exp]
>>> print(softmax)
[1.0, -2.0, -3.0, 4.0, 1.0, 2.0, 3.0]
6.0
[0.167, -0.333, -0.5, 0.667, 0.167, 0.333, 0.5]

sum(softmax)
Out[14]: 1.001

You should also pick the absolute value not to invert the sign if the sum is negative. It’s not defined when the sum is 0 since weights already sum 1