Matrix4f eq doesn't work (but the others do...)
Affects | Status | Importance | Assigned to | Milestone | ||
---|---|---|---|---|---|---|
PyEigen | Status tracked in Trunk | |||||
Trunk |
Fix Committed
|
Undecided
|
Unassigned |
Bug Description
EDIT: I don't think richcompare is set properly.
Matrix4f __eq__ doesn't work when the objects are different but it works when they are the same. Other types of matrices don't have this problem.
eg:
>>> from pyeigen import *
>>> n = Matrix4f(
>>> m = Matrix4f(
>>> m == n # Should be True!
False #crud, got False
>>> n == n # This works!
True
>>> m < n # Should raise
False
>>> m = Matrix3f(
>>> n = Matrix3f(
>>> n == m # This works!
True
>>> n = Matrix2f(1,2,3,4,)
>>> m = Matrix2f(1,2,3,4,)
>>> n == m # This works!
True
>>> m < n
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
TypeError: Comparison not supported
Related branches
- Jussi Lepistö: Approve
-
Diff: 385 lines (+91/-15)18 files modifiedsource/matrix/matrix2f.cpp (+2/-1)
source/matrix/matrix3f.cpp (+3/-3)
source/matrix/matrix4f.cpp (+5/-5)
source/vector/rowvector2f.cpp (+1/-1)
source/vector/rowvector3f.cpp (+1/-1)
source/vector/rowvector4f.cpp (+1/-1)
source/vector/vector2f.cpp (+1/-1)
source/vector/vector3f.cpp (+1/-1)
source/vector/vector4f.cpp (+1/-1)
test/test_matrix2f.py (+8/-0)
test/test_matrix3f.py (+9/-0)
test/test_matrix4f.py (+10/-0)
test/test_rowvector2f.py (+8/-0)
test/test_rowvector3f.py (+8/-0)
test/test_rowvector4f.py (+8/-0)
test/test_vector2f.py (+8/-0)
test/test_vector3f.py (+8/-0)
test/test_vector4f.py (+8/-0)
description: | updated |
Changed in pyeigen: | |
status: | New → In Progress |
Changed in pyeigen: | |
status: | In Progress → Fix Committed |
Changed in pyeigen: | |
milestone: | none → 0.2 |