79148170

Date: 2024-11-01 13:40:25
Score: 2
Natty:
Report link

How about this,

dist = 3.98+0.00j
print(np.real_if_close(dist))
# 3.98
dist = -2.99j
print(np.real_if_close(dist))
# (-0-2.99j)

The above is with default tol=100, can read more about it at https://numpy.org/devdocs/reference/generated/numpy.real_if_close.html

Reasons:
  • Probably link only (1):
  • Low length (0.5):
  • Has code block (-0.5):
  • Starts with a question (0.5): How
  • Low reputation (0.5):
Posted by: durranaik