Comments (7)
Traceback (most recent call last):
File "atom.py", line 8, in <module>
from bella import cayley
File "/home/amar630/bella/cayley.py", line 68
warnings.warn(f"generator {n} does not seem to have non-unit determinant {det}",NonUnitDeterminantWarning)
^
SyntaxError: invalid syntax
from bella.
Errors when I run pytest
:
______________________________________ ERROR collecting tests/test_cayley.py ______________________________________
../.local/lib/python3.4/site-packages/_pytest/python.py:507: in _importtestmodule
mod = self.fspath.pyimport(ensuresyspath=importmode)
../.local/lib/python3.4/site-packages/py/_path/local.py:704: in pyimport
__import__(modname)
E File "/home/amar630/bella-main/tests/test_cayley.py", line 18
E assert matrix_almosteq_up_to_sign(orthogonal_gens[0] @ orthogonal_gens[0], mp.eye(2))
E ^
E SyntaxError: invalid syntax
______________________________________ ERROR collecting tests/test_farey.py _______________________________________
ImportError while importing test module '/home/amar630/bella-main/tests/test_farey.py'.
Hint: make sure your test modules/packages have valid Python names.
Traceback:
tests/test_farey.py:3: in <module>
from bella import farey, riley, cayley
E ImportError: No module named 'bella'
______________________________________ ERROR collecting tests/test_riley.py _______________________________________
ImportError while importing test module '/home/amar630/bella-main/tests/test_riley.py'.
Hint: make sure your test modules/packages have valid Python names.
Traceback:
tests/test_riley.py:2: in <module>
from bella import riley,farey
E ImportError: No module named 'bella'
from bella.
Traceback (most recent call last):
File "atom.py", line 8, in
from bella import cayley
File "/home/amar630/bella/cayley.py", line 68
warnings.warn(f"generator {n} does not seem to have non-unit determinant {det}",NonUnitDeterminantWarning)
^
SyntaxError: invalid syntax
This one is an easy fix, I just need to replace f"...{var}..."
with "...{}...".format(var)
from bella.
______________________________________ ERROR collecting tests/test_cayley.py ______________________________________
../.local/lib/python3.4/site-packages/_pytest/python.py:507: in _importtestmodule
mod = self.fspath.pyimport(ensuresyspath=importmode)
../.local/lib/python3.4/site-packages/py/_path/local.py:704: in pyimport
import(modname)
E File "/home/amar630/bella-main/tests/test_cayley.py", line 18
E assert matrix_almosteq_up_to_sign(orthogonal_gens[0] @ orthogonal_gens[0], mp.eye(2))
E ^
E SyntaxError: invalid syntax
This is PEP 465, the syntax was introduced in 3.5. I will need to take a little bit of time to think about this because in order to do precision work I use mpmath.matrix() for matrices almost everywhere and use numpy.array only when doing p-adic work. These two classes have interchangeable syntax so I can pass np.arrays with padics around and as long as I do nothing weird everything works interchangeably. But without @ I think they have different syntax for multiplication (one uses * and one has an external dot(.,.) function iirc) so I will need to think about it. (It would be an easy fix if I didn't care about p-adic support.)
from bella.
Closing as WONTFIX. The issue is that 3.4 came out almost 10 years ago and support ended for it 6 years ago, and all the very standard dependencies like pandas use more recent language features (which they are entitled to do, since all supported versions of Python have them).
Thus I will roll back the changes I made to matrix multiplication etc. since they have made the software significantly slower (instead of dropping down directly to the C++ backend I have to do some introspection to determine which kind of matrix I have which means spending a lot of CPU cycles in Python and not C, even with the significant speedups of 3.11 this is still slow as it cannot be optimised away).
from bella.
(For reference having to fall back on introspection makes the apollonian_circles.py
example 11% slower on my machine.)
from bella.
today in "should have done that on a branch"...
from bella.
Related Issues (20)
- Utilise multithreading HOT 2
- Revamp Farey polynomial API
- p-adic number systems don't work
- Conduct convergence study on mpmath HOT 1
- Implement additional limit set algorithms HOT 1
- Port automorphic function support from MATLAB
- Compute peripheral subwords of Riley words
- GroupCache.subgroup() should take a list of words
- Change padic.py to use coloured_limit_set
- Add holoviews helper functions
- coloured_limit_set_mc come back please
- Pleating ray API HOT 1
- Error running atom.py HOT 11
- Add example graphs
- `slices.elliptic_slice_exterior` computes the wrong polynomials HOT 2
- Hyperbolic geometry functions HOT 1
- Farey fractions
- action_on_circles seems to be broken HOT 1
- Integration with sagemath HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from bella.