Merge branch 'develop' of https://github.com/pyqtgraph/pyqtgraph into develop

This commit is contained in:
Luke Campagnola 2018-05-03 15:30:33 -07:00
commit 120d49b0f3
2 changed files with 8 additions and 2 deletions

View File

@ -105,7 +105,13 @@ class Point(QtCore.QPointF):
def length(self):
"""Returns the vector length of this Point."""
return (self[0]**2 + self[1]**2) ** 0.5
try:
return (self[0]**2 + self[1]**2) ** 0.5
except OverflowError:
try:
return self[1] / np.sin(np.arctan2(self[1], self[0]))
except OverflowError:
return np.inf
def norm(self):
"""Returns a vector in the same direction with unit length."""

View File

@ -113,7 +113,7 @@ class SRTTransform3D(Transform3D):
def setFromMatrix(self, m):
"""
Set this transform mased on the elements of *m*
Set this transform based on the elements of *m*
The input matrix must be affine AND have no shear,
otherwise the conversion will most likely fail.
"""