diff --git a/yoshi-seals1.3.1.tar.xz b/Older Versions/yoshi-seals1.3.1.tar.xz similarity index 100% rename from yoshi-seals1.3.1.tar.xz rename to Older Versions/yoshi-seals1.3.1.tar.xz diff --git a/Older Versions/yoshi-seals1.3.1/.vscode/settings.json b/Older Versions/yoshi-seals1.3.1/.vscode/settings.json new file mode 100644 index 0000000..5464203 --- /dev/null +++ b/Older Versions/yoshi-seals1.3.1/.vscode/settings.json @@ -0,0 +1,3 @@ +{ + "python.pythonPath": "/home/hideyoshi/anaconda3/bin/python" +} \ No newline at end of file diff --git a/yoshi-seals1.3.1/LICENSE b/Older Versions/yoshi-seals1.3.1/LICENSE similarity index 100% rename from yoshi-seals1.3.1/LICENSE rename to Older Versions/yoshi-seals1.3.1/LICENSE diff --git a/yoshi-seals1.3.1/README.md b/Older Versions/yoshi-seals1.3.1/README.md similarity index 100% rename from yoshi-seals1.3.1/README.md rename to Older Versions/yoshi-seals1.3.1/README.md diff --git a/yoshi-seals1.3.1/Seals/__init__.py b/Older Versions/yoshi-seals1.3.1/Seals/__init__.py similarity index 100% rename from yoshi-seals1.3.1/Seals/__init__.py rename to Older Versions/yoshi-seals1.3.1/Seals/__init__.py diff --git a/yoshi-seals1.3.1/Seals/__pycache__/__init__.cpython-37.pyc b/Older Versions/yoshi-seals1.3.1/Seals/__pycache__/__init__.cpython-37.pyc similarity index 100% rename from yoshi-seals1.3.1/Seals/__pycache__/__init__.cpython-37.pyc rename to Older Versions/yoshi-seals1.3.1/Seals/__pycache__/__init__.cpython-37.pyc diff --git a/yoshi-seals1.3.1/Seals/eigen/__init__.py b/Older Versions/yoshi-seals1.3.1/Seals/eigen/__init__.py similarity index 100% rename from yoshi-seals1.3.1/Seals/eigen/__init__.py rename to Older Versions/yoshi-seals1.3.1/Seals/eigen/__init__.py diff --git a/yoshi-seals1.3.1/Seals/eigen/__pycache__/__init__.cpython-37.pyc b/Older Versions/yoshi-seals1.3.1/Seals/eigen/__pycache__/__init__.cpython-37.pyc similarity index 100% rename from yoshi-seals1.3.1/Seals/eigen/__pycache__/__init__.cpython-37.pyc rename to Older Versions/yoshi-seals1.3.1/Seals/eigen/__pycache__/__init__.cpython-37.pyc diff --git a/yoshi-seals1.3.1/Seals/eigen/__pycache__/eigen.cpython-37.pyc b/Older Versions/yoshi-seals1.3.1/Seals/eigen/__pycache__/eigen.cpython-37.pyc similarity index 100% rename from yoshi-seals1.3.1/Seals/eigen/__pycache__/eigen.cpython-37.pyc rename to Older Versions/yoshi-seals1.3.1/Seals/eigen/__pycache__/eigen.cpython-37.pyc diff --git a/yoshi-seals1.3.1/Seals/eigen/eigen.py b/Older Versions/yoshi-seals1.3.1/Seals/eigen/eigen.py similarity index 100% rename from yoshi-seals1.3.1/Seals/eigen/eigen.py rename to Older Versions/yoshi-seals1.3.1/Seals/eigen/eigen.py diff --git a/yoshi-seals1.3.1/Seals/insert/__init__.py b/Older Versions/yoshi-seals1.3.1/Seals/insert/__init__.py similarity index 100% rename from yoshi-seals1.3.1/Seals/insert/__init__.py rename to Older Versions/yoshi-seals1.3.1/Seals/insert/__init__.py diff --git a/yoshi-seals1.3.1/Seals/insert/__pycache__/__init__.cpython-37.pyc b/Older Versions/yoshi-seals1.3.1/Seals/insert/__pycache__/__init__.cpython-37.pyc similarity index 100% rename from yoshi-seals1.3.1/Seals/insert/__pycache__/__init__.cpython-37.pyc rename to Older Versions/yoshi-seals1.3.1/Seals/insert/__pycache__/__init__.cpython-37.pyc diff --git a/yoshi-seals1.3.1/Seals/insert/__pycache__/insert.cpython-37.pyc b/Older Versions/yoshi-seals1.3.1/Seals/insert/__pycache__/insert.cpython-37.pyc similarity index 100% rename from yoshi-seals1.3.1/Seals/insert/__pycache__/insert.cpython-37.pyc rename to Older Versions/yoshi-seals1.3.1/Seals/insert/__pycache__/insert.cpython-37.pyc diff --git a/yoshi-seals1.3.1/Seals/insert/insert.py b/Older Versions/yoshi-seals1.3.1/Seals/insert/insert.py similarity index 100% rename from yoshi-seals1.3.1/Seals/insert/insert.py rename to Older Versions/yoshi-seals1.3.1/Seals/insert/insert.py diff --git a/yoshi-seals1.3.1/Seals/process/__init__.py b/Older Versions/yoshi-seals1.3.1/Seals/process/__init__.py similarity index 100% rename from yoshi-seals1.3.1/Seals/process/__init__.py rename to Older Versions/yoshi-seals1.3.1/Seals/process/__init__.py diff --git a/yoshi-seals1.3.1/Seals/process/__pycache__/__init__.cpython-37.pyc b/Older Versions/yoshi-seals1.3.1/Seals/process/__pycache__/__init__.cpython-37.pyc similarity index 100% rename from yoshi-seals1.3.1/Seals/process/__pycache__/__init__.cpython-37.pyc rename to Older Versions/yoshi-seals1.3.1/Seals/process/__pycache__/__init__.cpython-37.pyc diff --git a/yoshi-seals1.3.1/Seals/process/__pycache__/process.cpython-37.pyc b/Older Versions/yoshi-seals1.3.1/Seals/process/__pycache__/process.cpython-37.pyc similarity index 100% rename from yoshi-seals1.3.1/Seals/process/__pycache__/process.cpython-37.pyc rename to Older Versions/yoshi-seals1.3.1/Seals/process/__pycache__/process.cpython-37.pyc diff --git a/yoshi-seals1.3.1/Seals/process/process.py b/Older Versions/yoshi-seals1.3.1/Seals/process/process.py similarity index 100% rename from yoshi-seals1.3.1/Seals/process/process.py rename to Older Versions/yoshi-seals1.3.1/Seals/process/process.py diff --git a/yoshi-seals1.3.1/Seals/scan/__init__.py b/Older Versions/yoshi-seals1.3.1/Seals/scan/__init__.py similarity index 100% rename from yoshi-seals1.3.1/Seals/scan/__init__.py rename to Older Versions/yoshi-seals1.3.1/Seals/scan/__init__.py diff --git a/yoshi-seals1.3.1/Seals/scan/__pycache__/__init__.cpython-37.pyc b/Older Versions/yoshi-seals1.3.1/Seals/scan/__pycache__/__init__.cpython-37.pyc similarity index 100% rename from yoshi-seals1.3.1/Seals/scan/__pycache__/__init__.cpython-37.pyc rename to Older Versions/yoshi-seals1.3.1/Seals/scan/__pycache__/__init__.cpython-37.pyc diff --git a/yoshi-seals1.3.1/Seals/scan/__pycache__/scan.cpython-37.pyc b/Older Versions/yoshi-seals1.3.1/Seals/scan/__pycache__/scan.cpython-37.pyc similarity index 100% rename from yoshi-seals1.3.1/Seals/scan/__pycache__/scan.cpython-37.pyc rename to Older Versions/yoshi-seals1.3.1/Seals/scan/__pycache__/scan.cpython-37.pyc diff --git a/yoshi-seals1.3.1/Seals/scan/scan.py b/Older Versions/yoshi-seals1.3.1/Seals/scan/scan.py similarity index 100% rename from yoshi-seals1.3.1/Seals/scan/scan.py rename to Older Versions/yoshi-seals1.3.1/Seals/scan/scan.py diff --git a/yoshi-seals1.3.1/Seals/write/__init__.py b/Older Versions/yoshi-seals1.3.1/Seals/write/__init__.py similarity index 100% rename from yoshi-seals1.3.1/Seals/write/__init__.py rename to Older Versions/yoshi-seals1.3.1/Seals/write/__init__.py diff --git a/yoshi-seals1.3.1/Seals/write/__pycache__/__init__.cpython-37.pyc b/Older Versions/yoshi-seals1.3.1/Seals/write/__pycache__/__init__.cpython-37.pyc similarity index 100% rename from yoshi-seals1.3.1/Seals/write/__pycache__/__init__.cpython-37.pyc rename to Older Versions/yoshi-seals1.3.1/Seals/write/__pycache__/__init__.cpython-37.pyc diff --git a/yoshi-seals1.3.1/Seals/write/__pycache__/write.cpython-37.pyc b/Older Versions/yoshi-seals1.3.1/Seals/write/__pycache__/write.cpython-37.pyc similarity index 100% rename from yoshi-seals1.3.1/Seals/write/__pycache__/write.cpython-37.pyc rename to Older Versions/yoshi-seals1.3.1/Seals/write/__pycache__/write.cpython-37.pyc diff --git a/yoshi-seals1.3.1/Seals/write/write.py b/Older Versions/yoshi-seals1.3.1/Seals/write/write.py similarity index 100% rename from yoshi-seals1.3.1/Seals/write/write.py rename to Older Versions/yoshi-seals1.3.1/Seals/write/write.py diff --git a/yoshi-seals1.3.1/build/lib/Seals/__init__.py b/Older Versions/yoshi-seals1.3.1/build/lib/Seals/__init__.py similarity index 100% rename from yoshi-seals1.3.1/build/lib/Seals/__init__.py rename to Older Versions/yoshi-seals1.3.1/build/lib/Seals/__init__.py diff --git a/yoshi-seals1.3.1/build/lib/Seals/eigen/__init__.py b/Older Versions/yoshi-seals1.3.1/build/lib/Seals/eigen/__init__.py similarity index 100% rename from yoshi-seals1.3.1/build/lib/Seals/eigen/__init__.py rename to Older Versions/yoshi-seals1.3.1/build/lib/Seals/eigen/__init__.py diff --git a/yoshi-seals1.3.1/build/lib/Seals/eigen/eigen.py b/Older Versions/yoshi-seals1.3.1/build/lib/Seals/eigen/eigen.py similarity index 100% rename from yoshi-seals1.3.1/build/lib/Seals/eigen/eigen.py rename to Older Versions/yoshi-seals1.3.1/build/lib/Seals/eigen/eigen.py diff --git a/yoshi-seals1.3.1/build/lib/Seals/insert/__init__.py b/Older Versions/yoshi-seals1.3.1/build/lib/Seals/insert/__init__.py similarity index 100% rename from yoshi-seals1.3.1/build/lib/Seals/insert/__init__.py rename to Older Versions/yoshi-seals1.3.1/build/lib/Seals/insert/__init__.py diff --git a/yoshi-seals1.3.1/build/lib/Seals/insert/insert.py b/Older Versions/yoshi-seals1.3.1/build/lib/Seals/insert/insert.py similarity index 100% rename from yoshi-seals1.3.1/build/lib/Seals/insert/insert.py rename to Older Versions/yoshi-seals1.3.1/build/lib/Seals/insert/insert.py diff --git a/yoshi-seals1.3.1/build/lib/Seals/process/__init__.py b/Older Versions/yoshi-seals1.3.1/build/lib/Seals/process/__init__.py similarity index 100% rename from yoshi-seals1.3.1/build/lib/Seals/process/__init__.py rename to Older Versions/yoshi-seals1.3.1/build/lib/Seals/process/__init__.py diff --git a/yoshi-seals1.3.1/build/lib/Seals/process/process.py b/Older Versions/yoshi-seals1.3.1/build/lib/Seals/process/process.py similarity index 100% rename from yoshi-seals1.3.1/build/lib/Seals/process/process.py rename to Older Versions/yoshi-seals1.3.1/build/lib/Seals/process/process.py diff --git a/yoshi-seals1.3.1/build/lib/Seals/scan/__init__.py b/Older Versions/yoshi-seals1.3.1/build/lib/Seals/scan/__init__.py similarity index 100% rename from yoshi-seals1.3.1/build/lib/Seals/scan/__init__.py rename to Older Versions/yoshi-seals1.3.1/build/lib/Seals/scan/__init__.py diff --git a/yoshi-seals1.3.1/build/lib/Seals/scan/scan.py b/Older Versions/yoshi-seals1.3.1/build/lib/Seals/scan/scan.py similarity index 100% rename from yoshi-seals1.3.1/build/lib/Seals/scan/scan.py rename to Older Versions/yoshi-seals1.3.1/build/lib/Seals/scan/scan.py diff --git a/yoshi-seals1.3.1/build/lib/Seals/write/__init__.py b/Older Versions/yoshi-seals1.3.1/build/lib/Seals/write/__init__.py similarity index 100% rename from yoshi-seals1.3.1/build/lib/Seals/write/__init__.py rename to Older Versions/yoshi-seals1.3.1/build/lib/Seals/write/__init__.py diff --git a/yoshi-seals1.3.1/build/lib/Seals/write/write.py b/Older Versions/yoshi-seals1.3.1/build/lib/Seals/write/write.py similarity index 100% rename from yoshi-seals1.3.1/build/lib/Seals/write/write.py rename to Older Versions/yoshi-seals1.3.1/build/lib/Seals/write/write.py diff --git a/yoshi-seals1.3.1/dist/yoshi-seals-1.3.tar.gz b/Older Versions/yoshi-seals1.3.1/dist/yoshi-seals-1.3.tar.gz similarity index 100% rename from yoshi-seals1.3.1/dist/yoshi-seals-1.3.tar.gz rename to Older Versions/yoshi-seals1.3.1/dist/yoshi-seals-1.3.tar.gz diff --git a/yoshi-seals1.3.1/dist/yoshi_seals-1.3-py3-none-any.whl b/Older Versions/yoshi-seals1.3.1/dist/yoshi_seals-1.3-py3-none-any.whl similarity index 100% rename from yoshi-seals1.3.1/dist/yoshi_seals-1.3-py3-none-any.whl rename to Older Versions/yoshi-seals1.3.1/dist/yoshi_seals-1.3-py3-none-any.whl diff --git a/yoshi-seals1.3.1/setup.py b/Older Versions/yoshi-seals1.3.1/setup.py similarity index 100% rename from yoshi-seals1.3.1/setup.py rename to Older Versions/yoshi-seals1.3.1/setup.py diff --git a/yoshi-seals1.3.1/yoshi_seals.egg-info/PKG-INFO b/Older Versions/yoshi-seals1.3.1/yoshi_seals.egg-info/PKG-INFO similarity index 100% rename from yoshi-seals1.3.1/yoshi_seals.egg-info/PKG-INFO rename to Older Versions/yoshi-seals1.3.1/yoshi_seals.egg-info/PKG-INFO diff --git a/yoshi-seals1.3.1/yoshi_seals.egg-info/SOURCES.txt b/Older Versions/yoshi-seals1.3.1/yoshi_seals.egg-info/SOURCES.txt similarity index 100% rename from yoshi-seals1.3.1/yoshi_seals.egg-info/SOURCES.txt rename to Older Versions/yoshi-seals1.3.1/yoshi_seals.egg-info/SOURCES.txt diff --git a/yoshi-seals1.3.1/yoshi_seals.egg-info/dependency_links.txt b/Older Versions/yoshi-seals1.3.1/yoshi_seals.egg-info/dependency_links.txt similarity index 100% rename from yoshi-seals1.3.1/yoshi_seals.egg-info/dependency_links.txt rename to Older Versions/yoshi-seals1.3.1/yoshi_seals.egg-info/dependency_links.txt diff --git a/yoshi-seals1.3.1/yoshi_seals.egg-info/requires.txt b/Older Versions/yoshi-seals1.3.1/yoshi_seals.egg-info/requires.txt similarity index 100% rename from yoshi-seals1.3.1/yoshi_seals.egg-info/requires.txt rename to Older Versions/yoshi-seals1.3.1/yoshi_seals.egg-info/requires.txt diff --git a/yoshi-seals1.3.1/yoshi_seals.egg-info/top_level.txt b/Older Versions/yoshi-seals1.3.1/yoshi_seals.egg-info/top_level.txt similarity index 100% rename from yoshi-seals1.3.1/yoshi_seals.egg-info/top_level.txt rename to Older Versions/yoshi-seals1.3.1/yoshi_seals.egg-info/top_level.txt diff --git a/yoshi-seals1.3.2/.vscode/launch.json b/yoshi-seals1.3.2/.vscode/launch.json new file mode 100644 index 0000000..17e15f2 --- /dev/null +++ b/yoshi-seals1.3.2/.vscode/launch.json @@ -0,0 +1,15 @@ +{ + // Use IntelliSense to learn about possible attributes. + // Hover to view descriptions of existing attributes. + // For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387 + "version": "0.2.0", + "configurations": [ + { + "name": "Python: Current File", + "type": "python", + "request": "launch", + "program": "${file}", + "console": "integratedTerminal" + } + ] +} \ No newline at end of file diff --git a/yoshi-seals1.3.2/.vscode/settings.json b/yoshi-seals1.3.2/.vscode/settings.json new file mode 100644 index 0000000..5464203 --- /dev/null +++ b/yoshi-seals1.3.2/.vscode/settings.json @@ -0,0 +1,3 @@ +{ + "python.pythonPath": "/home/hideyoshi/anaconda3/bin/python" +} \ No newline at end of file diff --git a/yoshi-seals1.3/LICENSE b/yoshi-seals1.3.2/LICENSE similarity index 100% rename from yoshi-seals1.3/LICENSE rename to yoshi-seals1.3.2/LICENSE diff --git a/yoshi-seals1.3/README.md b/yoshi-seals1.3.2/README.md similarity index 62% rename from yoshi-seals1.3/README.md rename to yoshi-seals1.3.2/README.md index 400dd62..ef4af91 100644 --- a/yoshi-seals1.3/README.md +++ b/yoshi-seals1.3.2/README.md @@ -1,6 +1,6 @@ # Seals - Numeric Calculus -This python package is made for applied Numeric Calculus of Linear Algebra. It is made with the following objectives in mind: +This python namespace is made for applied Numeric Calculus of Linear Algebra. It is made with the following objectives in mind: * Scan *csv* files to make a numpy matrix. @@ -20,17 +20,17 @@ This python package is made for applied Numeric Calculus of Linear Algebra. It i ## Syntax -The module *scan* has a function for *Numpy* arrays and *Pandas* dataframes, and used the following syntax `Seals.scan.np(path)` for *Numpy* and `Seals.scan.pd(path)` for *Pandas*, where `path` is the path to your directory. +To call the package *scan* use the syntax: `from Seals import scan`. The package also has a function for *Numpy* arrays and *Pandas* dataframes, and used the following syntax `scan.np(path)` for *Numpy* and `scan.pd(path)` for *Pandas*, where `path` is the path to your directory. -The module *write* has a function for *Numpy* arrays and *Pandas* dataframes, and uses the following syntax `Seals.write.np(array,path)` for *Numpy*, where `array` is the matrix that you desire to output and `path` is the path to your directory, and `Seals.write.pd(df,path)` for *Pandas*, where `df` is the matrix that you desire to output and `path` is the path to your directory. +To call the package *write* use the syntax: `from Seals import write`. The package also has a function for *Numpy* arrays and *Pandas* dataframes, and uses the following syntax `write.np(array,path)` for *Numpy*, where `array` is the matrix that you desire to output and `path` is the path to your directory, and `write.pd(df,path)` for *Pandas*, where `df` is the matrix that you desire to output and `path` is the path to your directory. -The module *insert* has a function for *matrix* and another for *vector*, and it has the following syntax `Seals.insert.function(array)`, where `insert` is the *Python Module* and `function` is either a `matrix` or a `vector` and `array` is either a *matrix* or a *vector*. +To call the package *insert* use the syntax: `from Seals import insert`. The package also has a function for *matrix* and another for *vector*, and it has the following syntax `insert.function(array)`, where `insert` is the *Python Module* and `function` is either a `matrix` or a `vector` and `array` is either a *matrix* or a *vector*. There is also a function that given a matrix it return all real eigen values ### Processes -To call the module `process` use the syntax: `sl = Seals.process`, where `sl` is an instance and to use a function you have to append the desired function in front of the instance like: `sl.identity(array)`. +To call the module `process` use the syntax: `from Seals import process as sl`, where `sl` is an instance and to use a function you have to append the desired function in front of the instance like: `sl.identity(array)`. * The function *identity* returns a *numpy* identity matrix of the order of the matrix passed into to it, and it has the following syntax `sl.identity(array)`, which `array` is a square matrix. diff --git a/yoshi-seals1.3/Seals/__init__.py b/yoshi-seals1.3.2/Seals/__init__.py similarity index 100% rename from yoshi-seals1.3/Seals/__init__.py rename to yoshi-seals1.3.2/Seals/__init__.py diff --git a/yoshi-seals1.3.2/Seals/__pycache__/__init__.cpython-37.pyc b/yoshi-seals1.3.2/Seals/__pycache__/__init__.cpython-37.pyc new file mode 100644 index 0000000..f8ca22e Binary files /dev/null and b/yoshi-seals1.3.2/Seals/__pycache__/__init__.cpython-37.pyc differ diff --git a/yoshi-seals1.3/Seals/eigen/__init__.py b/yoshi-seals1.3.2/Seals/eigen/__init__.py similarity index 100% rename from yoshi-seals1.3/Seals/eigen/__init__.py rename to yoshi-seals1.3.2/Seals/eigen/__init__.py diff --git a/yoshi-seals1.3/Seals/eigen/__pycache__/__init__.cpython-37.pyc b/yoshi-seals1.3.2/Seals/eigen/__pycache__/__init__.cpython-37.pyc similarity index 100% rename from yoshi-seals1.3/Seals/eigen/__pycache__/__init__.cpython-37.pyc rename to yoshi-seals1.3.2/Seals/eigen/__pycache__/__init__.cpython-37.pyc diff --git a/yoshi-seals1.3/Seals/eigen/__pycache__/eigen.cpython-37.pyc b/yoshi-seals1.3.2/Seals/eigen/__pycache__/eigen.cpython-37.pyc similarity index 100% rename from yoshi-seals1.3/Seals/eigen/__pycache__/eigen.cpython-37.pyc rename to yoshi-seals1.3.2/Seals/eigen/__pycache__/eigen.cpython-37.pyc diff --git a/yoshi-seals1.3/build/lib/Seals/eigen/eigen.py b/yoshi-seals1.3.2/Seals/eigen/eigen.py similarity index 64% rename from yoshi-seals1.3/build/lib/Seals/eigen/eigen.py rename to yoshi-seals1.3.2/Seals/eigen/eigen.py index e8ba45a..777fdfb 100644 --- a/yoshi-seals1.3/build/lib/Seals/eigen/eigen.py +++ b/yoshi-seals1.3.2/Seals/eigen/eigen.py @@ -24,9 +24,11 @@ def eigen(a): k = 0 l = np.ones((a.shape[0])) - while (k < a.shape[0]): + at = a #variavel temporaria para A - u = np.random.rand(a.shape[0],1) + while (k < at.shape[0]): + + u = np.random.rand(at.shape[0],1) u = u/max(u.min(), u.max(), key=abs) ctrl = 0 @@ -34,7 +36,7 @@ def eigen(a): while (ctrl != l[k]): ctrl = l[k] - u = a.dot(u) + u = at.dot(u) l[k] = max(u.min(), u.max(), key=abs) u = u/l[k] @@ -44,8 +46,26 @@ def eigen(a): while (u[i] == 0): i += 1 - a = a - (1/u[i])*u*a[i] - + at = at - (1/u[i])*u*at[i] k += 1 - return l \ No newline at end of file + i = 0 + b = np.random.rand(a.shape[0],a.shape[1]) + + while (i < l.shape[0]): + + alpha = 0.999*l[i] + + t = np.random.rand(a.shape[0],1) + + b[i] = b[i]/max(b[i].min(), b[i].max(), key=abs) + t = l/max(l.min(), l.max(), key=abs) + + while not (np.allclose(b[i],t,atol=10**(-17))): + t = b[i].copy() + b[i] = np.linalg.solve((a - alpha*np.identity(a.shape[0])),((l[i]-alpha)*t)) + b[i] = b[i]/max(b[i].min(), b[i].max(), key=abs) + + i += 1 + + return l, b \ No newline at end of file diff --git a/yoshi-seals1.3/Seals/insert/__init__.py b/yoshi-seals1.3.2/Seals/insert/__init__.py similarity index 100% rename from yoshi-seals1.3/Seals/insert/__init__.py rename to yoshi-seals1.3.2/Seals/insert/__init__.py diff --git a/yoshi-seals1.3/Seals/insert/__pycache__/__init__.cpython-37.pyc b/yoshi-seals1.3.2/Seals/insert/__pycache__/__init__.cpython-37.pyc similarity index 100% rename from yoshi-seals1.3/Seals/insert/__pycache__/__init__.cpython-37.pyc rename to yoshi-seals1.3.2/Seals/insert/__pycache__/__init__.cpython-37.pyc diff --git a/yoshi-seals1.3/Seals/insert/__pycache__/insert.cpython-37.pyc b/yoshi-seals1.3.2/Seals/insert/__pycache__/insert.cpython-37.pyc similarity index 100% rename from yoshi-seals1.3/Seals/insert/__pycache__/insert.cpython-37.pyc rename to yoshi-seals1.3.2/Seals/insert/__pycache__/insert.cpython-37.pyc diff --git a/yoshi-seals1.3/Seals/insert/insert.py b/yoshi-seals1.3.2/Seals/insert/insert.py similarity index 100% rename from yoshi-seals1.3/Seals/insert/insert.py rename to yoshi-seals1.3.2/Seals/insert/insert.py diff --git a/yoshi-seals1.3/Seals/process/__init__.py b/yoshi-seals1.3.2/Seals/process/__init__.py similarity index 100% rename from yoshi-seals1.3/Seals/process/__init__.py rename to yoshi-seals1.3.2/Seals/process/__init__.py diff --git a/yoshi-seals1.3/Seals/process/__pycache__/__init__.cpython-37.pyc b/yoshi-seals1.3.2/Seals/process/__pycache__/__init__.cpython-37.pyc similarity index 100% rename from yoshi-seals1.3/Seals/process/__pycache__/__init__.cpython-37.pyc rename to yoshi-seals1.3.2/Seals/process/__pycache__/__init__.cpython-37.pyc diff --git a/yoshi-seals1.3/Seals/process/__pycache__/process.cpython-37.pyc b/yoshi-seals1.3.2/Seals/process/__pycache__/process.cpython-37.pyc similarity index 100% rename from yoshi-seals1.3/Seals/process/__pycache__/process.cpython-37.pyc rename to yoshi-seals1.3.2/Seals/process/__pycache__/process.cpython-37.pyc diff --git a/yoshi-seals1.3/Seals/process/process.py b/yoshi-seals1.3.2/Seals/process/process.py similarity index 100% rename from yoshi-seals1.3/Seals/process/process.py rename to yoshi-seals1.3.2/Seals/process/process.py diff --git a/yoshi-seals1.3/Seals/scan/__init__.py b/yoshi-seals1.3.2/Seals/scan/__init__.py similarity index 100% rename from yoshi-seals1.3/Seals/scan/__init__.py rename to yoshi-seals1.3.2/Seals/scan/__init__.py diff --git a/yoshi-seals1.3/Seals/scan/__pycache__/__init__.cpython-37.pyc b/yoshi-seals1.3.2/Seals/scan/__pycache__/__init__.cpython-37.pyc similarity index 100% rename from yoshi-seals1.3/Seals/scan/__pycache__/__init__.cpython-37.pyc rename to yoshi-seals1.3.2/Seals/scan/__pycache__/__init__.cpython-37.pyc diff --git a/yoshi-seals1.3/Seals/scan/__pycache__/scan.cpython-37.pyc b/yoshi-seals1.3.2/Seals/scan/__pycache__/scan.cpython-37.pyc similarity index 100% rename from yoshi-seals1.3/Seals/scan/__pycache__/scan.cpython-37.pyc rename to yoshi-seals1.3.2/Seals/scan/__pycache__/scan.cpython-37.pyc diff --git a/yoshi-seals1.3/Seals/scan/scan.py b/yoshi-seals1.3.2/Seals/scan/scan.py similarity index 100% rename from yoshi-seals1.3/Seals/scan/scan.py rename to yoshi-seals1.3.2/Seals/scan/scan.py diff --git a/yoshi-seals1.3/Seals/write/__init__.py b/yoshi-seals1.3.2/Seals/write/__init__.py similarity index 100% rename from yoshi-seals1.3/Seals/write/__init__.py rename to yoshi-seals1.3.2/Seals/write/__init__.py diff --git a/yoshi-seals1.3/Seals/write/__pycache__/__init__.cpython-37.pyc b/yoshi-seals1.3.2/Seals/write/__pycache__/__init__.cpython-37.pyc similarity index 100% rename from yoshi-seals1.3/Seals/write/__pycache__/__init__.cpython-37.pyc rename to yoshi-seals1.3.2/Seals/write/__pycache__/__init__.cpython-37.pyc diff --git a/yoshi-seals1.3/Seals/write/__pycache__/write.cpython-37.pyc b/yoshi-seals1.3.2/Seals/write/__pycache__/write.cpython-37.pyc similarity index 100% rename from yoshi-seals1.3/Seals/write/__pycache__/write.cpython-37.pyc rename to yoshi-seals1.3.2/Seals/write/__pycache__/write.cpython-37.pyc diff --git a/yoshi-seals1.3/Seals/write/write.py b/yoshi-seals1.3.2/Seals/write/write.py similarity index 100% rename from yoshi-seals1.3/Seals/write/write.py rename to yoshi-seals1.3.2/Seals/write/write.py diff --git a/yoshi-seals1.3/build/lib/Seals/__init__.py b/yoshi-seals1.3.2/build/lib/Seals/__init__.py similarity index 100% rename from yoshi-seals1.3/build/lib/Seals/__init__.py rename to yoshi-seals1.3.2/build/lib/Seals/__init__.py diff --git a/yoshi-seals1.3/build/lib/Seals/eigen/__init__.py b/yoshi-seals1.3.2/build/lib/Seals/eigen/__init__.py similarity index 100% rename from yoshi-seals1.3/build/lib/Seals/eigen/__init__.py rename to yoshi-seals1.3.2/build/lib/Seals/eigen/__init__.py diff --git a/yoshi-seals1.3/Seals/eigen/eigen.py b/yoshi-seals1.3.2/build/lib/Seals/eigen/eigen.py similarity index 64% rename from yoshi-seals1.3/Seals/eigen/eigen.py rename to yoshi-seals1.3.2/build/lib/Seals/eigen/eigen.py index e8ba45a..777fdfb 100644 --- a/yoshi-seals1.3/Seals/eigen/eigen.py +++ b/yoshi-seals1.3.2/build/lib/Seals/eigen/eigen.py @@ -24,9 +24,11 @@ def eigen(a): k = 0 l = np.ones((a.shape[0])) - while (k < a.shape[0]): + at = a #variavel temporaria para A - u = np.random.rand(a.shape[0],1) + while (k < at.shape[0]): + + u = np.random.rand(at.shape[0],1) u = u/max(u.min(), u.max(), key=abs) ctrl = 0 @@ -34,7 +36,7 @@ def eigen(a): while (ctrl != l[k]): ctrl = l[k] - u = a.dot(u) + u = at.dot(u) l[k] = max(u.min(), u.max(), key=abs) u = u/l[k] @@ -44,8 +46,26 @@ def eigen(a): while (u[i] == 0): i += 1 - a = a - (1/u[i])*u*a[i] - + at = at - (1/u[i])*u*at[i] k += 1 - return l \ No newline at end of file + i = 0 + b = np.random.rand(a.shape[0],a.shape[1]) + + while (i < l.shape[0]): + + alpha = 0.999*l[i] + + t = np.random.rand(a.shape[0],1) + + b[i] = b[i]/max(b[i].min(), b[i].max(), key=abs) + t = l/max(l.min(), l.max(), key=abs) + + while not (np.allclose(b[i],t,atol=10**(-17))): + t = b[i].copy() + b[i] = np.linalg.solve((a - alpha*np.identity(a.shape[0])),((l[i]-alpha)*t)) + b[i] = b[i]/max(b[i].min(), b[i].max(), key=abs) + + i += 1 + + return l, b \ No newline at end of file diff --git a/yoshi-seals1.3/build/lib/Seals/insert/__init__.py b/yoshi-seals1.3.2/build/lib/Seals/insert/__init__.py similarity index 100% rename from yoshi-seals1.3/build/lib/Seals/insert/__init__.py rename to yoshi-seals1.3.2/build/lib/Seals/insert/__init__.py diff --git a/yoshi-seals1.3/build/lib/Seals/insert/insert.py b/yoshi-seals1.3.2/build/lib/Seals/insert/insert.py similarity index 100% rename from yoshi-seals1.3/build/lib/Seals/insert/insert.py rename to yoshi-seals1.3.2/build/lib/Seals/insert/insert.py diff --git a/yoshi-seals1.3/build/lib/Seals/process/__init__.py b/yoshi-seals1.3.2/build/lib/Seals/process/__init__.py similarity index 100% rename from yoshi-seals1.3/build/lib/Seals/process/__init__.py rename to yoshi-seals1.3.2/build/lib/Seals/process/__init__.py diff --git a/yoshi-seals1.3/build/lib/Seals/process/process.py b/yoshi-seals1.3.2/build/lib/Seals/process/process.py similarity index 100% rename from yoshi-seals1.3/build/lib/Seals/process/process.py rename to yoshi-seals1.3.2/build/lib/Seals/process/process.py diff --git a/yoshi-seals1.3/build/lib/Seals/scan/__init__.py b/yoshi-seals1.3.2/build/lib/Seals/scan/__init__.py similarity index 100% rename from yoshi-seals1.3/build/lib/Seals/scan/__init__.py rename to yoshi-seals1.3.2/build/lib/Seals/scan/__init__.py diff --git a/yoshi-seals1.3/build/lib/Seals/scan/scan.py b/yoshi-seals1.3.2/build/lib/Seals/scan/scan.py similarity index 100% rename from yoshi-seals1.3/build/lib/Seals/scan/scan.py rename to yoshi-seals1.3.2/build/lib/Seals/scan/scan.py diff --git a/yoshi-seals1.3/build/lib/Seals/write/__init__.py b/yoshi-seals1.3.2/build/lib/Seals/write/__init__.py similarity index 100% rename from yoshi-seals1.3/build/lib/Seals/write/__init__.py rename to yoshi-seals1.3.2/build/lib/Seals/write/__init__.py diff --git a/yoshi-seals1.3/build/lib/Seals/write/write.py b/yoshi-seals1.3.2/build/lib/Seals/write/write.py similarity index 100% rename from yoshi-seals1.3/build/lib/Seals/write/write.py rename to yoshi-seals1.3.2/build/lib/Seals/write/write.py diff --git a/yoshi-seals1.3.2/dist/yoshi-seals-1.3.2.tar.gz b/yoshi-seals1.3.2/dist/yoshi-seals-1.3.2.tar.gz new file mode 100644 index 0000000..3962d47 Binary files /dev/null and b/yoshi-seals1.3.2/dist/yoshi-seals-1.3.2.tar.gz differ diff --git a/yoshi-seals1.3/dist/yoshi_seals-1.3-py3-none-any.whl b/yoshi-seals1.3.2/dist/yoshi_seals-1.3.2-py3-none-any.whl similarity index 68% rename from yoshi-seals1.3/dist/yoshi_seals-1.3-py3-none-any.whl rename to yoshi-seals1.3.2/dist/yoshi_seals-1.3.2-py3-none-any.whl index 23abc2c..7c6b89f 100644 Binary files a/yoshi-seals1.3/dist/yoshi_seals-1.3-py3-none-any.whl and b/yoshi-seals1.3.2/dist/yoshi_seals-1.3.2-py3-none-any.whl differ diff --git a/yoshi-seals1.3/setup.py b/yoshi-seals1.3.2/setup.py similarity index 97% rename from yoshi-seals1.3/setup.py rename to yoshi-seals1.3.2/setup.py index c0a6cc2..11ab735 100644 --- a/yoshi-seals1.3/setup.py +++ b/yoshi-seals1.3.2/setup.py @@ -5,7 +5,7 @@ with open("README.md", "r") as fh: setuptools.setup( name="yoshi-seals", - version="1.3", + version="1.3.2", author="Vitor Hideyoshi", author_email="vitor.h.n.batista@gmail.com", description="Numeric Calculus python module in the topic of Linear Algebra", diff --git a/yoshi-seals1.3/yoshi_seals.egg-info/PKG-INFO b/yoshi-seals1.3.2/yoshi_seals.egg-info/PKG-INFO similarity index 70% rename from yoshi-seals1.3/yoshi_seals.egg-info/PKG-INFO rename to yoshi-seals1.3.2/yoshi_seals.egg-info/PKG-INFO index b239706..04d3b9b 100644 --- a/yoshi-seals1.3/yoshi_seals.egg-info/PKG-INFO +++ b/yoshi-seals1.3.2/yoshi_seals.egg-info/PKG-INFO @@ -1,6 +1,6 @@ Metadata-Version: 2.1 Name: yoshi-seals -Version: 1.3 +Version: 1.3.2 Summary: Numeric Calculus python module in the topic of Linear Algebra Home-page: https://github.com/HideyoshiNakazone/Seals-NumericCalculus.git Author: Vitor Hideyoshi @@ -8,7 +8,7 @@ Author-email: vitor.h.n.batista@gmail.com License: UNKNOWN Description: # Seals - Numeric Calculus - This python package is made for applied Numeric Calculus of Linear Algebra. It is made with the following objectives in mind: + This python namespace is made for applied Numeric Calculus of Linear Algebra. It is made with the following objectives in mind: * Scan *csv* files to make a numpy matrix. @@ -28,17 +28,17 @@ Description: # Seals - Numeric Calculus ## Syntax - The module *scan* has a function for *Numpy* arrays and *Pandas* dataframes, and used the following syntax `Seals.scan.np(path)` for *Numpy* and `Seals.scan.pd(path)` for *Pandas*, where `path` is the path to your directory. + To call the package *scan* use the syntax: `from Seals import scan`. The package also has a function for *Numpy* arrays and *Pandas* dataframes, and used the following syntax `scan.np(path)` for *Numpy* and `scan.pd(path)` for *Pandas*, where `path` is the path to your directory. - The module *write* has a function for *Numpy* arrays and *Pandas* dataframes, and uses the following syntax `Seals.write.np(array,path)` for *Numpy*, where `array` is the matrix that you desire to output and `path` is the path to your directory, and `Seals.write.pd(df,path)` for *Pandas*, where `df` is the matrix that you desire to output and `path` is the path to your directory. + To call the package *write* use the syntax: `from Seals import write`. The package also has a function for *Numpy* arrays and *Pandas* dataframes, and uses the following syntax `write.np(array,path)` for *Numpy*, where `array` is the matrix that you desire to output and `path` is the path to your directory, and `write.pd(df,path)` for *Pandas*, where `df` is the matrix that you desire to output and `path` is the path to your directory. - The module *insert* has a function for *matrix* and another for *vector*, and it has the following syntax `Seals.insert.function(array)`, where `insert` is the *Python Module* and `function` is either a `matrix` or a `vector` and `array` is either a *matrix* or a *vector*. + To call the package *insert* use the syntax: `from Seals import insert`. The package also has a function for *matrix* and another for *vector*, and it has the following syntax `insert.function(array)`, where `insert` is the *Python Module* and `function` is either a `matrix` or a `vector` and `array` is either a *matrix* or a *vector*. There is also a function that given a matrix it return all real eigen values ### Processes - To call the module `process` use the syntax: `sl = Seals.process`, where `sl` is an instance and to use a function you have to append the desired function in front of the instance like: `sl.identity(array)`. + To call the module `process` use the syntax: `from Seals import process as sl`, where `sl` is an instance and to use a function you have to append the desired function in front of the instance like: `sl.identity(array)`. * The function *identity* returns a *numpy* identity matrix of the order of the matrix passed into to it, and it has the following syntax `sl.identity(array)`, which `array` is a square matrix. diff --git a/yoshi-seals1.3/yoshi_seals.egg-info/SOURCES.txt b/yoshi-seals1.3.2/yoshi_seals.egg-info/SOURCES.txt similarity index 100% rename from yoshi-seals1.3/yoshi_seals.egg-info/SOURCES.txt rename to yoshi-seals1.3.2/yoshi_seals.egg-info/SOURCES.txt diff --git a/yoshi-seals1.3/yoshi_seals.egg-info/dependency_links.txt b/yoshi-seals1.3.2/yoshi_seals.egg-info/dependency_links.txt similarity index 100% rename from yoshi-seals1.3/yoshi_seals.egg-info/dependency_links.txt rename to yoshi-seals1.3.2/yoshi_seals.egg-info/dependency_links.txt diff --git a/yoshi-seals1.3/yoshi_seals.egg-info/requires.txt b/yoshi-seals1.3.2/yoshi_seals.egg-info/requires.txt similarity index 100% rename from yoshi-seals1.3/yoshi_seals.egg-info/requires.txt rename to yoshi-seals1.3.2/yoshi_seals.egg-info/requires.txt diff --git a/yoshi-seals1.3/yoshi_seals.egg-info/top_level.txt b/yoshi-seals1.3.2/yoshi_seals.egg-info/top_level.txt similarity index 100% rename from yoshi-seals1.3/yoshi_seals.egg-info/top_level.txt rename to yoshi-seals1.3.2/yoshi_seals.egg-info/top_level.txt diff --git a/yoshi-seals1.3.tar.xz b/yoshi-seals1.3.tar.xz deleted file mode 100644 index a8722ce..0000000 Binary files a/yoshi-seals1.3.tar.xz and /dev/null differ diff --git a/yoshi-seals1.3/Seals/__pycache__/__init__.cpython-37.pyc b/yoshi-seals1.3/Seals/__pycache__/__init__.cpython-37.pyc deleted file mode 100644 index 699f180..0000000 Binary files a/yoshi-seals1.3/Seals/__pycache__/__init__.cpython-37.pyc and /dev/null differ diff --git a/yoshi-seals1.3/dist/yoshi-seals-1.3.tar.gz b/yoshi-seals1.3/dist/yoshi-seals-1.3.tar.gz deleted file mode 100644 index 76d87bd..0000000 Binary files a/yoshi-seals1.3/dist/yoshi-seals-1.3.tar.gz and /dev/null differ