Giter Club home page Giter Club logo

diophantine's Introduction

Thomas G. Close, PhD

  • ๐Ÿ”ญ Iโ€™m currently working on frameworks for neuroimaging analysis pipelines
  • ๐ŸŒฑ Iโ€™m currently learning Kubernetes and PyTorch
  • ๐Ÿ‘ฏ Iโ€™m looking to collaborate on open-source scientific software and cerebellar neuroscience projects
  • ๐Ÿค” Iโ€™m looking for help with productive ways to find/read/write good scientific papers
  • ๐Ÿ’ฌ Ask me about Neuroimaging, informatics, cerebellar neuroscience, Python, XNAT
  • ๐Ÿ“ซ How to reach me: tomclose @ BlueSky, tomgclose @ X
  • ๐Ÿ˜„ Pronouns: He/him
  • โšก Fun fact: There are more neurons in the cerebellum than the rest of the brain combined

diophantine's People

Contributors

tanbur avatar tclose avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

diophantine's Issues

lllhermite bug

Dear Thomas,
I'm using your package to compute HNF matrices, but somehow in one exceptional instance I get a wrong result:
In [28]: Diophantine.lllhermite( array([[ 1, -1, 5], [-1, 1, 5], [-1, -1, 7]]))

Out[28]: (Matrix([ [1, 1, 3], [0, 2, -2], [0, 0, 10]]), Matrix([ [1, 1, -1], [0, 1, -1], [1, 1, 0]]), 3)
The output is not in Hermite normal form (one negative index), and the A matrix is definitely not unimodular... Any idea what the problem is? Thanks!
Best,
Pierre

lllhermite Index error

I believe there is a bug in the code:
lllhermite(sympy.Matrix([[0,1,0,1],[-1,0,1,0]])
throws an exception. I believe this is because

def lllhermite(G, m1=1, n1=1):
    """
    Input: integer mxn matrix A, nonzero, at least two rows+
    Output: small unimodular matrix B and HNF(A), such that BA=HNF(A)+
    The Havas, Majewski, Matthews LLL method is used+
    We usually take alpha=m1/n1, with (m1,n1)=(1,1) to get best results+
    """
    m = G.shape[0]
    n = G.shape[1]
    A, B, L, D = initialise_working_matrices(G)
    if first_nonzero_is_negative(A):
        B[m, m] = -1
        A[m, :] *= -1

should be:

m = G.shape[0]
n = G.shape[1]
A, B, L, D = initialise_working_matrices(G)
if first_nonzero_is_negative(A):
    B[m-1, m-1] = -1
    A[m-1, :] *= -1

What do you think?

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.