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

Problem with .inv() function #423

Open
kosibakonrad opened this issue Nov 7, 2022 · 0 comments
Open

Problem with .inv() function #423

kosibakonrad opened this issue Nov 7, 2022 · 0 comments

Comments

@kosibakonrad
Copy link

I tried a very simple example (exactly what in the tutorial https://github.com/pygae/clifford/blob/master/docs/tutorials/g2-quick-start.ipynb) but the inv function does not work for me .. what can be the reason for this?

import clifford as cf

layout, blades = cf.Cl(2) # creates a 2-dimensional clifford algebra

e1 = blades['e1']
e2 = blades['e2']
e12 = blades['e12']

a = e1+e2     # the vector
n = e1        # the reflector
-n*a*n.inv()  # reflect `a` in hyperplane normal to `n`

last line gives error:

C:\Users\dell\PycharmProjects\GA4\venv\Scripts\python.exe C:/Users/dell/PycharmProjects/GA4/main.py
Traceback (most recent call last):
File "C:/Users/dell/PycharmProjects/GA4/main.py", line 11, in
-nan.inv() # reflect a in hyperplane normal to n
File "C:\Users\dell\PycharmProjects\GA4\venv\lib\site-packages\clifford_multivector.py", line 150, in mul
newValue = self.layout.gmt_func(self.value, other.value)
File "C:\Users\dell\PycharmProjects\GA4\venv\lib\site-packages\clifford_layout.py", line 36, in get
val = self.fget(obj)
File "C:\Users\dell\PycharmProjects\GA4\venv\lib\site-packages\clifford_layout.py", line 635, in gmt_func
return get_mult_function(self.gmt, self._basis_blade_order.grades)
File "C:\Users\dell\PycharmProjects\GA4\venv\lib\site-packages\clifford_layout.py", line 36, in get
val = self.fget(obj)
File "C:\Users\dell\PycharmProjects\GA4\venv\lib\site-packages\clifford_layout.py", line 365, in gmt
return construct_gmt(self._basis_blade_order, self.sig)
File "C:\Users\dell\PycharmProjects\GA4\venv\lib\site-packages\clifford_layout.py", line 134, in construct_gmt
coords, mult_table_vals = _numba_construct_gmt(
File "C:\Users\dell\PycharmProjects\GA4\venv\lib\site-packages\numba\dispatcher.py", line 420, in _compile_for_args
raise e
File "C:\Users\dell\PycharmProjects\GA4\venv\lib\site-packages\numba\dispatcher.py", line 353, in _compile_for_args
return self.compile(tuple(argtypes))
File "C:\Users\dell\PycharmProjects\GA4\venv\lib\site-packages\numba\compiler_lock.py", line 32, in _acquire_compile_lock
return func(*args, **kwargs)
File "C:\Users\dell\PycharmProjects\GA4\venv\lib\site-packages\numba\dispatcher.py", line 768, in compile
cres = self._compiler.compile(args, return_type)
File "C:\Users\dell\PycharmProjects\GA4\venv\lib\site-packages\numba\dispatcher.py", line 77, in compile
status, retval = self._compile_cached(args, return_type)
File "C:\Users\dell\PycharmProjects\GA4\venv\lib\site-packages\numba\dispatcher.py", line 91, in _compile_cached
retval = self._compile_core(args, return_type)
File "C:\Users\dell\PycharmProjects\GA4\venv\lib\site-packages\numba\dispatcher.py", line 104, in _compile_core
cres = compiler.compile_extra(self.targetdescr.typing_context,
File "C:\Users\dell\PycharmProjects\GA4\venv\lib\site-packages\numba\compiler.py", line 551, in compile_extra
return pipeline.compile_extra(func)
File "C:\Users\dell\PycharmProjects\GA4\venv\lib\site-packages\numba\compiler.py", line 331, in compile_extra
return self._compile_bytecode()
File "C:\Users\dell\PycharmProjects\GA4\venv\lib\site-packages\numba\compiler.py", line 393, in _compile_bytecode
return self._compile_core()
File "C:\Users\dell\PycharmProjects\GA4\venv\lib\site-packages\numba\compiler.py", line 373, in _compile_core
raise e
File "C:\Users\dell\PycharmProjects\GA4\venv\lib\site-packages\numba\compiler.py", line 364, in _compile_core
pm.run(self.state)
File "C:\Users\dell\PycharmProjects\GA4\venv\lib\site-packages\numba\compiler_machinery.py", line 347, in run
raise patched_exception
File "C:\Users\dell\PycharmProjects\GA4\venv\lib\site-packages\numba\compiler_machinery.py", line 338, in run
self._runPass(idx, pass_inst, state)
File "C:\Users\dell\PycharmProjects\GA4\venv\lib\site-packages\numba\compiler_lock.py", line 32, in _acquire_compile_lock
return func(*args, **kwargs)
File "C:\Users\dell\PycharmProjects\GA4\venv\lib\site-packages\numba\compiler_machinery.py", line 302, in _runPass
mutated |= check(pss.run_pass, internal_state)
File "C:\Users\dell\PycharmProjects\GA4\venv\lib\site-packages\numba\compiler_machinery.py", line 275, in check
mangled = func(compiler_state)
File "C:\Users\dell\PycharmProjects\GA4\venv\lib\site-packages\numba\typed_passes.py", line 407, in run_pass
NativeLowering().run_pass(state)
File "C:\Users\dell\PycharmProjects\GA4\venv\lib\site-packages\numba\typed_passes.py", line 349, in run_pass
lower.lower()
File "C:\Users\dell\PycharmProjects\GA4\venv\lib\site-packages\numba\lowering.py", line 195, in lower
self.lower_normal_function(self.fndesc)
File "C:\Users\dell\PycharmProjects\GA4\venv\lib\site-packages\numba\lowering.py", line 248, in lower_normal_function
entry_block_tail = self.lower_function_body()
File "C:\Users\dell\PycharmProjects\GA4\venv\lib\site-packages\numba\lowering.py", line 273, in lower_function_body
self.lower_block(block)
File "C:\Users\dell\PycharmProjects\GA4\venv\lib\site-packages\numba\lowering.py", line 288, in lower_block
self.lower_inst(inst)
File "C:\Users\dell\PycharmProjects\GA4\venv\lib\site-packages\numba\lowering.py", line 476, in lower_inst
func(self, inst)
File "C:\Users\dell\PycharmProjects\GA4\venv\lib\site-packages\numba\npyufunc\parfor.py", line 52, in _lower_parfor_parallel
ensure_parallel_support()
File "C:\Users\dell\PycharmProjects\GA4\venv\lib\site-packages\numba\parfor.py", line 4156, in ensure_parallel_support
raise errors.UnsupportedParforsError(msg)
numba.errors.UnsupportedParforsError: Failed in nopython mode pipeline (step: nopython mode backend)
The 'parallel' target is not currently supported on Windows operating systems when using Python 2.7, or on 32 bit hardware.
[1] During: lowering "id=0[LoopNest(index_variable = parfor_index.16, range = (0, $const26.10, 1)), LoopNest(index_variable = parfor_index.17, range = (0, $array_length.31, 1))]{219: <ir.Block at C:\Users\dell\PycharmProjects\GA4\venv\lib\site-packages\clifford_layout.py (104)>}Var($parfor_index_tuple_var.23, _layout.py:104)" at C:\Users\dell\PycharmProjects\GA4\venv\lib\site-packages\clifford_layout.py (104)

Process finished with exit code 1

I tried different versions of packages but couldn't fix it. Please help ;)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant