Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
161 views
in Technique[技术] by (71.8m points)

Trying To Use Clifford Algebra Package in Python/Spyder

I installed the "clifford" package, or at least so I believed. Here is what I executed:

import clifford as cf
layout, blades = cf.Cl(4)

Here's the result:

  File "C:UsersasdfDocuments4DPythonclifford.py", line 10, in <module>
    layout, blades = cf.Cl(3)

AttributeError: partially initialized module 'clifford' has no attribute 'Cl' (most likely due to a circular import)

Now what?

question from:https://stackoverflow.com/questions/65937748/trying-to-use-clifford-algebra-package-in-python-spyder

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)

Your file is called clifford.py hence it creates another python module called clifford and trys importing from there.
Renaming your file should work


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

2.1m questions

2.1m answers

60 comments

57.0k users

...