This article gives you a comprehensive understanding of Java object serialization and deserialization>>>
Original code:
return np.linalg.norm(np.cross(p2 - p1, p1 - p3))/np.linalg.norm(p2 - p1)
Error reported:
xxx/labelKeypoint/utils/qt.py:81: RuntimeWarning: invalid value encountered in double_scalars
The problem of denominator 0 is ignored in stackoverflow. The modification code is as follows:
if np.linalg.norm(p2 - p1) == 0:
return np.linalg.norm(np.cross(p2 - p1, p1 - p3))
else:
return np.linalg.norm(np.cross(p2 - p1, p1 - p3))/np.linalg.norm(p2 - p1)
Solve the problem of error reporting
Similar Posts:
- PyTorch :TypeError: exceptions must derive from BaseException
- ImportError: cannot import name’e.g. utils’from’tensorflow.as.utils’ 38382;’ 39064;
- [Solved] Runtime Warning: Font Glyph 20108 is missing. Font.set Fu text (s,0.0,flags=flags), RuntimeWarningGlyph20108missingfromcurrentfontfontsettexts00flagsflags
- Solutions to errors encountered by Python
- Python learning notes – Import utils error
- JQuery Ajax crossdomain cannot be used in IE [How to Solve]
- Solutions to the problem of too many arguments in Linux Bash
- [Solved] Git pull error: You have not concluded your merge (MERGE_HEAD exists)
- C Compilation Error: implicit declaration of function xxx is invalid in C99 [-Wimplicit-function-declaration]