Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

isBlade fails on degenerate metrics #145

Open
eric-wieser opened this issue Oct 18, 2019 · 1 comment · May be fixed by #162
Open

isBlade fails on degenerate metrics #145

eric-wieser opened this issue Oct 18, 2019 · 1 comment · May be fixed by #162
Labels
bug component: core Relating to Layout and MultiVector

Comments

@eric-wieser
Copy link
Member

eric-wieser commented Oct 18, 2019

>>> import clifford
>>> layout, _ = clifford.Cl(3, 0, 1, firstIdx=0)
>>> locals().update(layout.blades)
>>> e0.isBlade()
clifford\__init__.py: RuntimeWarning: divide by zero encountered in true_divide
  newValue = self.value / other
clifford\__init__.py: RuntimeWarning: invalid value encountered in true_divide
  newValue = self.value / other
False

As discovered by @enkimute

@eric-wieser eric-wieser linked a pull request Oct 22, 2019 that will close this issue
@eric-wieser eric-wieser added the component: core Relating to Layout and MultiVector label Oct 28, 2019
@eric-wieser
Copy link
Member Author

eric-wieser commented Jul 27, 2020

This happens in CGA too:

>>> from clifford.g2c import *
>>> t = up(e1) | (up(e1)^up(e2)^up(-e1))  # tangent blade
>>> t*t
0
>>> t.isBlade()
clifford\_multivector.py:264: RuntimeWarning: divide by zero encountered in true_divide
  newValue = self.value / other
clifford\_multivector.py:264: RuntimeWarning: invalid value encountered in true_divide
  newValue = self.value / other
clifford\_multivector.py:691: RuntimeWarning: invalid value encountered in greater
  nonzero_grades = self.layout._basis_blade_order.grades[abs(self.value) > eps]
False

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug component: core Relating to Layout and MultiVector
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant