Giter Club home page Giter Club logo

Comments (7)

ariymarkowitz avatar ariymarkowitz commented on July 20, 2024
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.

ariymarkowitz avatar ariymarkowitz commented on July 20, 2024

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.

aelzenaar avatar aelzenaar commented on July 20, 2024

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.

aelzenaar avatar aelzenaar commented on July 20, 2024

______________________________________ 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.

aelzenaar avatar aelzenaar commented on July 20, 2024

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.

aelzenaar avatar aelzenaar commented on July 20, 2024

(For reference having to fall back on introspection makes the apollonian_circles.py example 11% slower on my machine.)

from bella.

aelzenaar avatar aelzenaar commented on July 20, 2024

today in "should have done that on a branch"...

from bella.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.