summaryrefslogtreecommitdiff
path: root/lj_matrix
diff options
context:
space:
mode:
authorDavid Luevano <55825613+luevano@users.noreply.github.com>2019-12-18 08:15:18 -0700
committerDavid Luevano <55825613+luevano@users.noreply.github.com>2019-12-18 08:15:18 -0700
commit124c3c5eb77c807b8a8a78413f3800720914c8e1 (patch)
tree0e3bde56737d3b37976c375d976f5415738dbdb3 /lj_matrix
parent487bf8840846b5d4d694b38985268c308aadb36e (diff)
Fix bugs
Diffstat (limited to 'lj_matrix')
-rw-r--r--lj_matrix/__init__.py23
-rw-r--r--lj_matrix/__main__.py13
-rw-r--r--lj_matrix/c_matrix.py2
-rw-r--r--lj_matrix/do_ml.py4
-rw-r--r--lj_matrix/gauss_kernel.py2
-rw-r--r--lj_matrix/lj_matrix.py2
-rw-r--r--lj_matrix/read_qm7_data.py2
-rw-r--r--lj_matrix/version.py23
8 files changed, 59 insertions, 12 deletions
diff --git a/lj_matrix/__init__.py b/lj_matrix/__init__.py
index 48cd14913..47d7e5013 100644
--- a/lj_matrix/__init__.py
+++ b/lj_matrix/__init__.py
@@ -20,3 +20,26 @@ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
"""
+from misc import printc
+from read_qm7_data import read_qm7_data, read_nc_data, reas_db_data
+from c_matrix import c_matrix, c_matrix_multiple
+from cholesky_solve import cholesky_solve
+from do_ml import do_ml
+from frob_norm import frob_norm
+from gauss_kernel import gauss_kernel
+from lj_matrix import lj_matrix, lj_matrix_multiple
+
+# If somebody does "from package import *", this is what they will
+# be able to access:
+__all__ = ['printc',
+ 'read_qm7_data',
+ 'read_nc_data',
+ 'reas_db_data',
+ 'c_matrix',
+ 'c_matrix_multiple',
+ 'cholesky_solve',
+ 'do_ml',
+ 'frob_norm',
+ 'gauss_kernel',
+ 'lj_matrix',
+ 'lj_matrix_multiple']
diff --git a/lj_matrix/__main__.py b/lj_matrix/__main__.py
index 4e13f4995..5a0e95b94 100644
--- a/lj_matrix/__main__.py
+++ b/lj_matrix/__main__.py
@@ -24,11 +24,11 @@ import time
from multiprocessing import Process, Pipe
# import matplotlib.pyplot as plt
import pandas as pd
-from lj_matrix.misc import printc
-from lj_matrix.read_qm7_data import read_qm7_data
-from lj_matrix.c_matrix import c_matrix_multiple
-from lj_matrix.lj_matrix import lj_matrix_multiple
-from lj_matrix.do_ml import do_ml
+from misc import printc
+from read_qm7_data import read_qm7_data
+from c_matrix import c_matrix_multiple
+from lj_matrix import lj_matrix_multiple
+from do_ml import do_ml
# Test
@@ -235,4 +235,5 @@ def pl():
if __name__ == '__main__':
# ml()
- pl()
+ # pl()
+ print('OK!')
diff --git a/lj_matrix/c_matrix.py b/lj_matrix/c_matrix.py
index f40a18c68..4de711a1b 100644
--- a/lj_matrix/c_matrix.py
+++ b/lj_matrix/c_matrix.py
@@ -21,7 +21,7 @@ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
"""
import time
-from lj_matrix.misc import printc
+from misc import printc
import math
import numpy as np
from numpy.linalg import eig
diff --git a/lj_matrix/do_ml.py b/lj_matrix/do_ml.py
index acf5455f4..c88533e68 100644
--- a/lj_matrix/do_ml.py
+++ b/lj_matrix/do_ml.py
@@ -23,8 +23,8 @@ SOFTWARE.
import time
from misc import printc
import numpy as np
-from lj_matrix.gauss_kernel import gauss_kernel
-from lj_matrix.cholesky_solve import cholesky_solve
+from gauss_kernel import gauss_kernel
+from cholesky_solve import cholesky_solve
def do_ml(desc_data,
diff --git a/lj_matrix/gauss_kernel.py b/lj_matrix/gauss_kernel.py
index 5dd8e6406..0dfc65d59 100644
--- a/lj_matrix/gauss_kernel.py
+++ b/lj_matrix/gauss_kernel.py
@@ -22,7 +22,7 @@ SOFTWARE.
"""
import math
import numpy as np
-from lj_matrix.frob_norm import frob_norm
+from frob_norm import frob_norm
def gauss_kernel(X_1, X_2, sigma):
diff --git a/lj_matrix/lj_matrix.py b/lj_matrix/lj_matrix.py
index 4f63e95ca..2a8e0d956 100644
--- a/lj_matrix/lj_matrix.py
+++ b/lj_matrix/lj_matrix.py
@@ -21,7 +21,7 @@ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
"""
import time
-from lj_matrix.misc import printc
+from misc import printc
import math
import numpy as np
from numpy.linalg import eig
diff --git a/lj_matrix/read_qm7_data.py b/lj_matrix/read_qm7_data.py
index b54691fb0..068ea1a42 100644
--- a/lj_matrix/read_qm7_data.py
+++ b/lj_matrix/read_qm7_data.py
@@ -24,7 +24,7 @@ import os
import time
import numpy as np
import random
-from lj_matrix.misc import printc
+from misc import printc
# 'periodic_table_of_elements.txt' retrieved from
diff --git a/lj_matrix/version.py b/lj_matrix/version.py
new file mode 100644
index 000000000..fab58433d
--- /dev/null
+++ b/lj_matrix/version.py
@@ -0,0 +1,23 @@
+"""MIT License
+
+Copyright (c) 2019 David Luevano Alvarado
+
+Permission is hereby granted, free of charge, to any person obtaining a copy
+of this software and associated documentation files (the "Software"), to deal
+in the Software without restriction, including without limitation the rights
+to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+copies of the Software, and to permit persons to whom the Software is
+furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in all
+copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+SOFTWARE.
+"""
+__version__ = '0.0.1'