markcbell / flipper Goto Github PK
View Code? Open in Web Editor NEWLicense: MIT License
License: MIT License
I tried installing flipper in the docker image sagemath/sagemath-dev:8.7
via
$ sage -pip install flipper
It proceeds fine together with its dependencies (pandas, cypari). Though when importing I obtain
$ sage -python
Python 2.7.15 (default, Mar 24 2019, 03:41:40)
[GCC 5.4.0 20160609] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import flipper
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/home/sage/sage/local/lib/python2.7/site-packages/flipper/__init__.py", line 31, in <module>
from flipper.census import census # noqa: F401
File "/home/sage/sage/local/lib/python2.7/site-packages/flipper/census.py", line 9, in <module>
DATABASES = set(os.path.splitext(os.path.basename(path))[0] for path in os.listdir(DATABASE_DIRECTORY) if os.path.splitext(path)[1] == '.csv')
OSError: [Errno 2] No such file or directory: '/home/sage/sage/local/lib/python2.7/site-packages/flipper/censuses'
Currently, setup.py does not make it specific which versions of its requirements are needed. It would be great if we could be more specific there. In particular, this makes it easier to package flipper for distributions such as conda-forge.
Or maybe, any version that installs is actually good enough. Then it would be nice to mention it in setup.py.
The fact that pip install flipper
triggers a cypari
compilation is extremly annoying. cypari
is very costly to install (time and space) and requires Cython as well as a C compiler. It is superseeded by cypari2
and moreover many distributions (Debian/Ubuntu, archlinux, Gentoo, conda, ...) does package cypari2
(which happens to also be a SageMath dependency).
See also sagemath/cypari2#19
With Python3 and the current version from PyPI
>>> import flipper
>>> S = flipper.load('S_2_1')
>>> h = S.mapping_class('acBD')
>>> h.flat_structure()
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/opt/sage/sage-py3-gcc/local/lib/python3.7/site-packages/flipper/kernel/encoding.py", line 792, in flat_structure
edge_vectors[edges[0]] = flipper.kernel.Vector2(+stable_lamination(edges[0]), +unstable_lamination(edges[0]))
TypeError: bad operand type for unary +: 'RealAlgebraic'
Is there an easy way to convert between triangulations in Regina and triangulations in flipper? Both support importing and exporting isomorphism signatures but they don't seem immediately compatible. For example, regina.Triangulation3.fromIsoSig(flipper.load('S_1_2').triangulation.iso_sig())
results in
InvalidArgument: fromIsoSig(): incomplete signature
and
flipper.triangulation_from_iso_sig(regina.Triangulation3.fromIsoSig('cPcbbbiht').isoSig())
results in
ValueError: Signature must specify permutations for each triangle.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.